summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* a5xx: add backface stencil emissionIlia Mirkin2017-07-074-9/+27
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* radeonsi: fix invalidating bindless buffer descriptorsSamuel Pitoiset2017-07-071-2/+2
| | | | | | | | | | | | | The VA is stored at [4:5], not [0:1]. This invalidated all texture buffer descriptors when they were made resident in the current context. This removes few partial flushes and cache invalidations which are needed when updating a bindless descriptor on the fly with a WRITE_DATA packet. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/wgl: Implement wglUseFontBitmaps.Olivier Lauffenburger2017-07-061-16/+49
| | | | | | | | | wglUseFontBitmaps is currently a noop. This patch implements this function for Windows. Misc code clean-ups by Brian. Signed-off-by: Olivier Lauffenburger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/wgl: improve selection of pixel formatOlivier Lauffenburger2017-07-061-7/+29
| | | | | | | | | | | | | | | | | | Current selection of pixel format does not enforce the request of stencil or depth buffer if the color depth is not the same as requested. For instance, GLUT requests a 32-bit color buffer with an 8-bit stencil buffer, but because color buffers are only 24-bit, no priority is given to creating a stencil buffer. This patch gives more priority to the creation of requested buffers and less priority to the difference in bit depth. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101703 Signed-off-by: Olivier Lauffenburger <[email protected]> Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsicsAlex Smith2017-07-071-1/+1
| | | | | | | | | | The NIR parameters are ordered "compare, data", matching GLSL, but both the image and buffer LLVM intrinsics take them the other way around. This is already handled correctly for SSBO atomics. Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* mesa: simplify get_tex_images_for_clear()Brian Paul2017-07-061-19/+14
| | | | | | Get rid of redundant code. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: new comments, assertion related to glClearTexSubImageBrian Paul2017-07-061-0/+12
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* st/mesa: find proper mipmap level in st_ClearTexSubImage()Brian Paul2017-07-061-4/+56
| | | | | | | | | | | | | | | | | | | | The Piglit arb_clear_texture-error test creates a texture with only a 1x1 image at level=1, then tries to clear level 0 (nonexistent) and level 1 (exists). The test only checks that the former generates an error but the later doesn't. The test passes, but when we try to clear the level=1 image we're passing an invalid level to pipe_context::clear_texture(). level=1, but since there's only one mipmap level in the texture, it should be zero. This fixes the code to search the gallium texture resource for the correct mipmap level. Also, add an assertion to make sure we're not passing an invalid level to pipe_context::clear_texture(). Fixes device errors with VMware driver. No Piglit regressions. v2: don't do the level search when using immutable textures. Reviewed-by: Charmaine Lee <[email protected]>
* st/mesa: whitespace fixes in st_cb_fbo.cBrian Paul2017-07-061-29/+19
| | | | Trivial.
* st/mesa: whitespace fixes in st_texture.cBrian Paul2017-07-061-13/+15
| | | | Trivial.
* radv: don't overallocate depth/stencil formatsDave Airlie2017-07-061-1/+1
| | | | | | | | | | | For depth/stencil formats the surface layer allocates the stencil separately, so we don't need to include it in the bpe. This reduces the side of d32s8 allocates to something closer to pro. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable sisched toggle in perftest flags.Dave Airlie2017-07-065-2/+10
| | | | | | | | | RADV_PERFTEST=sisched to enable it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/llvm: set xnack like radeonsi does.Dave Airlie2017-07-061-1/+3
| | | | | | | Use family, but only set xnack+ for gfx9. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/llvm: create features list using snprintf.Dave Airlie2017-07-061-2/+5
| | | | | | | Just more moving code around before adding things to it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/radv: change api to create target machineDave Airlie2017-07-063-7/+14
| | | | | | | | This just modifies the API to make it easier to add other flags to target machine creation. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* build systems: move git_sha1_gen.sh to bin/Eric Engestrom2017-07-065-5/+5
| | | | | | | | | There was no reason for this script to live outside the scripts directory. Suggested-by: Brian Paul <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swr/rast: Correctly allocate SWR_STATS memory as cacheline alignedTim Rowley2017-07-062-5/+5
| | | | | | | | | | | | Cacheline alignment of SWR_STATS to prevent sharing of cachelines between threads (performance). Gets rid of gcc-7.1 warning about using c++17's over-aligned new feature. Cc: [email protected] Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: remove unused variablesTim Rowley2017-07-062-4/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: don't use _mm256_fmsub_ps in AVX codeTim Rowley2017-07-061-1/+5
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: _mm*_undefined_* implementations for gcc<4.9Tim Rowley2017-07-061-0/+6
| | | | | | | | | Define these in terms of setzero for ancient gcc versions which don't have the undefined intrinsics. Cc: [email protected] Reviewed-by: Bruce Cherniak <[email protected]>
* etnaviv: don't dereference etna_resource pointer if allocation failsAleksander Morgado2017-07-061-3/+7
| | | | | | | The check for the pointer being non-NULL was being done too late. Signed-off-by: Aleksander Morgado <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* scons: Check for xlocale.h before defining HAVE_XLOCALE_H.Vinson Lee2017-07-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | Don't assume the header is present on some platforms - use the more robust CheckHeader() instead. glibc 2.26 removed xlocale.h. https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 Fix this build error with glibc 2.26. Compiling src/util/strtod.c ... src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory #include <xlocale.h> ^~~~~~~~~~~ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101657 Signed-off-by: Vinson Lee <[email protected]> Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Eric Engestrom <[email protected]>
* radv: add support for cmd predication.Dave Airlie2017-07-065-30/+64
| | | | | | | | This doesn't get used yet, it just adds support to various PKT3 emissions to enable it later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: check if any of the named builtins are available firstIlia Mirkin2017-07-053-4/+14
| | | | | | | | | | | | | | | | | | | | | _mesa_glsl_has_builtin_function is used to determine whether any variant of a builtin are available, for the purpose of enforcing the GLSL ES 3.00+ rule that overloads or overrides of builtins are disallowed. However the builtin_builder contains information on all builtins, irrespective of parse state, or versions, or extension enablement. As a result we would say that a builtin existed even if it was not actually available. To resolve this, first check if at least one signature is available for a builtin before returning true. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101666 Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] Reviewed-by: Timothy Arceri <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir/spirv: Rework function argument setupJason Ekstrand2017-07-053-28/+34
| | | | | | | | Now that we have proper pointer types, we can be more sensible about the way we set up function arguments and deal with the two cases of pointer vs. SSA parameters distinctly. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Stop trying to convert pointers to SSA in glsl450Jason Ekstrand2017-07-051-1/+6
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Use real pointer typesJason Ekstrand2017-07-054-15/+60
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Stop using glsl_type for function typesJason Ekstrand2017-07-053-31/+31
| | | | | | | We're going to want the full vtn_type available to us anyway at which point glsl_type isn't really buying us anything. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Beef up the type system a bitJason Ekstrand2017-07-052-28/+59
| | | | | | | | | This adds a vtn concept of base_type as well as a couple of other fields. This lets us be a tiny bit more efficient in some cases but, more importantly, it will eventually let us express things the GLSL type system can't. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Compact vtn_typeJason Ekstrand2017-07-052-26/+39
| | | | | | | Use an anonymous union of structs to help keep the structure small and better organized. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Simplify type copyingJason Ekstrand2017-07-051-7/+1
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Compute offsets for UBOs and SSBOs up-frontJason Ekstrand2017-07-052-27/+138
| | | | | | | | | Now that we have a pointer wrapper class, we can create offsets for UBOs and SSBOs up-front instead of waiting until we have the full access chain. For push constants, we still use the old mechanism because it provides us with some nice range information. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Rework the way pointers get dereferencedJason Ekstrand2017-07-052-64/+88
| | | | | | | This has the advantage of moving all of the "extend an access chain" code into one place. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Break variable creation out into a helperJason Ekstrand2017-07-051-172/+184
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Remove unneeded parameters from pointer_to_offsetJason Ekstrand2017-07-053-19/+8
| | | | | | | | Everyone now calls it with stop_at_matrix = false. Since we're now always walking all the way to the end of the access chain, the type returned is just the same as ptr->type; Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Simplify matrix loads/storesJason Ekstrand2017-07-052-100/+90
| | | | | | | | | | | | | | | | | | | | | Instead of handling all of the complexity at the end, we choose to decorate types a bit more cleverly. When we have a row-major matrix type, we give it the stride of a single vector and give it's array element type (which represents a column) the actual matrix stride. Previously, we were using stop_at_matrix and handling everything from matrix on down as special cases but now we walk the access chain all the way to the end and then load. Even though this looks like it may lead to a significant functional change, it doesn't. The reason why we needed to do stop_at_matrix before was to handle row-major properly since the offsets and strides would be all out-of-order. Now that row major matrix types have the small stride on the matrix and the large stride on the vector, offsetting to a single column of a row-major matrix works fine. The load/store code simply picks up on the fact that the stride isn't the type size and does multiple loads. The generated code from these methods should be the same. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Use the correct stride for non-32-bit vectorsJason Ekstrand2017-07-051-1/+1
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Wrap access chains in a new vtn_pointer data structureJason Ekstrand2017-07-054-159/+187
| | | | | | | | | | | | The vtn_pointer structure provides a bit better abstraction than passing access chains around directly. For one thing, if the pointer just points to a variable, we don't need the access chain at all. Also, pointers know what their dereferenced type is so we can avoid passing the type in a bunch of places. Finally, pointers can, in theory, be extended to the case where you don't actually know what variable is being referenced. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Rename some things from access_chain to pointerJason Ekstrand2017-07-054-82/+73
| | | | | | | We're about to add a vtn_pointer data structure and this will prevent some rename churn in the next commit. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Split up Uniform and UniformConstant storage classesJason Ekstrand2017-07-051-3/+7
| | | | | | | | | We were originally handling them together because I was rather unclear on the distinction. However, keeping them combined keeps the confusion. Split them up so that it's more clear from the code how we expect the two storage classes to be used. Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Add a storage_class_to_mode helperJason Ekstrand2017-07-051-45/+78
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Use the type from the deref for atomicsJason Ekstrand2017-07-051-3/+3
| | | | | | | Previously, we were using the type of the variable which is incorrect. Cc: "17.1" <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir/spirv: Move a "}"Jason Ekstrand2017-07-051-1/+1
| | | | | | | It's closing a "{" at the begining of a switch case. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* i965: Move surface resolves back to draw/dispatch timeJason Ekstrand2017-07-054-121/+143
| | | | | | | | | | | | | | | | | This is effectively a revert of 388f02729bbf88ba104f4f8ee1fdf005a240969c though much code has been added since. Kristian initially moved it to try and avoid locking problems with meta-based resolves. Now that meta is gone from the resolve path (for good this time, we hope), we can move it back. The problem with having it in intel_update_state was that the UpdateState hook gets called by core mesa directly and all sorts of things will cause a UpdateState to get called which may trigger resolves at inopportune times. In particular, it gets called by _mesa_Clear and, if we have a HiZ buffer in the INVALID_AUX state, causes a HiZ resolve right before the clear which is pointless. By moving it back to try_draw_prims time, we know it will only get called right before a draw which is where we want it. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Avoid set comprehension.Vinson Lee2017-07-051-1/+1
| | | | | | | | | | | | | | Fix build error on CentOS 6.9 with Python 2.6. GEN main/format_fallback.c File "./main/format_fallback.py", line 42 names = {fmt.name for fmt in formats} ^ SyntaxError: invalid syntax Fixes: a1983223d883 ("mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]") Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* ac/nir: Move VS position exports before param exports.Bas Nieuwenhuizen2017-07-051-55/+54
| | | | | | | | According to Nicolai the SX can already start work when all the position exports are done, so do those first. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Always set depthbuffer using image format instead of iview format.Bas Nieuwenhuizen2017-07-051-2/+2
| | | | | | | | We have some cases where changing between depth and stencil only aspect was causing hangs. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Disable depth & stencil tests when the depthbuffer doesn't support it.Bas Nieuwenhuizen2017-07-056-11/+36
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* egl: android: Fix potential use of unitialized variableTomasz Figa2017-07-051-1/+3
| | | | | | | | | | | If dri2_setup_extensions() fails, the "err" variable would not be assigned causing the error path to access an unitialized variable. Fix it by assigning an error message. Fixes: 2c341f2bda4 ("egl: refactor dri2_create_screen() into three separate functions") Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* intel: common: Fix link failure with standalone Android buildTomasz Figa2017-07-051-0/+5
| | | | | | | | | | | | | | | Some reshuffle in the Makefiles under src/intel resulted in Android libraries being no longer linked with code using src/intel/common/gen_debug.h that contains references to functions exported by those libraries (namely ALOGW macro, which is currently resolved into a call to __android_log_print() from cutils). Fix the build by taking into account ANDROID_CFLAGS and ANDROID_LIBS for affected module on Android NDK builds. Fixes: d5b355ce5fd ("i965: Move intel_debug.h to intel/common/gen_debug.h") Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]>