summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-23version: bump version to 20.2.3mesa-20.2.3Dylan Baker1-1/+1
2020-11-23docs: add release notes for 20.2.3Dylan Baker1-0/+184
2020-11-19intel/fs: Fix sampler message headers on Gen11+ when using scratchKenneth Graunke2-6/+23
Icelake's sampler message header introduces a field in m0.3 bit 0 which controls whether the sampler state pointer should be relative to bindless sampler state base address or dynamic state base address. g0.3 bit 0 is part of the per-thread scratch space field. On older hardware, we were able to copy that along because the sampler ignored bits 4:0. Now, however, we need to mask them out. Fixes various textureGatherOffsets piglit tests when forcing the FS to run with 2048 bytes of per-thread scratch space (which is a per-thread scratch space encoding of 1, meaning bit 0 will be set). Cc: mesa-stable Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6735> (cherry picked from commit 31290f98061acc237ba0f5d9c8c4c38ad6075c70)
2020-11-19radeonsi: fix scan_instruction for bindless inc_wrap/dec_wrap atomicsMarek Olšák2-1/+3
Fixes: 25fff591c1162 - radeonsi: add support for nir atomic_inc_wrap/atomic_dec_wrap Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542> (cherry picked from commit ff22fcf4500e74fa518f5667b442931fee5ba85a)
2020-11-19radeonsi: only do VGT_FLUSH for fast launch if previous draw was normal launchMarek Olšák3-2/+7
Fixes: 3da91b3327f - radeonsi/ngg: add VGT_FLUSH when enabling fast launch Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542> (cherry picked from commit 8d2876a34314e7378eff67a5f320eba56683dba3)
2020-11-19radeonsi: do VGT_FLUSH when switching NGG -> legacy on Sienna CichlidMarek Olšák2-2/+2
Other chips don't need this. Fixes: 9538b9a68ed - radeonsi: add support for Sienna Cichlid Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542> (cherry picked from commit c4ebdf9ee7eac7241b5185d7d496e96384a41ecb)
2020-11-19anv/image: Fix isl_surf_usage_flags for stencil imagesChad Versace2-5/+5
Respect VkImageStencilUsageCreateInfoEXT. CC: mesa-stable@lists.freedesktop.org Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit b50275a4b63d3da12ead2f6e57be8988223af83d)
2020-11-19anv/image: Check DISJOINT in vkGetPhysicalDeviceImageFormatProperties2 (v2)Chad Versace2-1/+26
The code did not return error when VK_IMAGE_CREATE_DISJOINT_BIT was incompatible with the other input params. If the Vulkan spec forbids a set of input params for vkCreateImage, but permits them for vkGetPhysicalDeviceImageFormatProperties2, then vkGetPhysicalDeviceImageFormatProperties2 must reject those input params with failure. - v2: Clearer commit message. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v2) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit 51a19c83b000407a31b5cd17b996084a6b58a4ff)
2020-11-19freedreno: Fix leak of shader binary on disk cache hits.Eric Anholt2-2/+2
It's supposed to be ralloced -- there's not even a shader variant destroy function for freeing, just ralloc_free() on the ir3_shader_variant or the parent ir3_shader when you're done! Fixes: f97acb4bb4b1 ("freedreno/ir3: disk-cache support") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5810> (cherry picked from commit 433841d9eb7cd9dd5e00b2f47cd998e0e986ef02)
2020-11-19egl/dri2: fix race between image create and egl_image_target_textureTapani Pälli2-1/+4
All other functions calling _eglLookupImage hold the display lock. ==16659== Possible data race during write of size 8 at 0x5D1BCF0 by thread #2668 ==16659== Locks held: 1, at address 0x5D1B6F8 ==16659== at 0x5405DDF: _eglLinkResource (egldisplay.c:454) ==16659== by 0x53F9189: _eglLinkImage (eglimage.h:138) ==16659== by 0x53FE2CA: _eglCreateImageCommon (eglapi.c:1740) ==16659== by 0x53FE39A: eglCreateImageKHR (eglapi.c:1751) ==16659== ==16659== This conflicts with a previous read of size 8 by thread #2664 ==16659== Locks held: 1, at address 0x5308D00 ==16659== at 0x5405C06: _eglCheckResource (egldisplay.c:387) ==16659== by 0x5408C92: _eglLookupImage (eglimage.h:162) ==16659== by 0x5409E96: dri2_lookup_egl_image (egl_dri2.c:688) ==16659== by 0x6210AAF: dri2_lookup_egl_image (dri_helpers.c:250) ==16659== by 0x6212843: dri_get_egl_image (dri_screen.c:470) ==16659== by 0x625F7CC: st_get_egl_image (st_cb_eglimage.c:152) ==16659== by 0x625FE7D: st_egl_image_target_texture_2d (st_cb_eglimage.c:354) ==16659== by 0x6501C05: egl_image_target_texture (teximage.c:3446) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7544> (cherry picked from commit 959c2d1edbf56934f6d313a48136f6f1740dc549)
2020-11-19draw: fix tess eval pipeline statistics.Dave Airlie2-4/+5
The number of invocations wasn't getting incremented correctly. Fixes: 202bc38ce9e3 ("draw: collect tessellation invocations statistics") Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7597> (cherry picked from commit ce07c52b825903e698b63bc608d7ddb8cb578cd6)
2020-11-19etnaviv: nir: do not run opt loop after nir_lower_bool_xxx(..)Christian Gmeiner2-3/+1
Running the optimizations after bool to float/int lowering is not going to work. Large portions of NIR are likely to blow up if they see floats/ints in weird places. Most of the bool->float/int conversions are direct instruction substitutions and it's not going to leave a lot of garbage around to optimize. Fixes nir.h:261: nir_const_value_as_bool: Assertion `i == 0 || i == -1' failed dEQP-GLES2.functional.shaders.loops.while_constant_iterations.no_iterations_vertex Here are shader-db results for GC2000: instructions HURT: shaders/tesseract/488.shader_test FRAG: 516 -> 524 (1.55%) instructions HURT: shaders/tesseract/491.shader_test FRAG: 248 -> 260 (4.84%) instructions HURT: shaders/tesseract/494.shader_test FRAG: 244 -> 256 (4.92%) instructions HURT: shaders/tesseract/238.shader_test FRAG: 232 -> 244 (5.17%) instructions HURT: shaders/tesseract/241.shader_test FRAG: 232 -> 244 (5.17%) instructions HURT: shaders/tesseract/127.shader_test FRAG: 76 -> 80 (5.26%) instructions HURT: shaders/tesseract/130.shader_test FRAG: 148 -> 156 (5.41%) instructions HURT: shaders/tesseract/226.shader_test FRAG: 192 -> 204 (6.25%) instructions HURT: shaders/tesseract/229.shader_test FRAG: 192 -> 204 (6.25%) instructions HURT: shaders/tesseract/217.shader_test FRAG: 152 -> 164 (7.89%) instructions HURT: shaders/tesseract/214.shader_test FRAG: 152 -> 164 (7.89%) instructions HURT: shaders/tesseract/205.shader_test FRAG: 112 -> 124 (10.71%) instructions HURT: shaders/tesseract/202.shader_test FRAG: 112 -> 124 (10.71%) instructions HURT: shaders/tesseract/169.shader_test FRAG: 32 -> 36 (12.50%) instructions HURT: shaders/tesseract/166.shader_test FRAG: 32 -> 36 (12.50%) instructions HURT: shaders/deqp_gles3/61312.shader_test FRAG: 448 -> 508 (13.39%) instructions HURT: shaders/deqp_gles3/61309.shader_test FRAG: 448 -> 508 (13.39%) instructions HURT: shaders/deqp_gles3/61324.shader_test FRAG: 448 -> 508 (13.39%) instructions HURT: shaders/tesseract/118.shader_test FRAG: 28 -> 32 (14.29%) instructions HURT: shaders/tesseract/181.shader_test FRAG: 52 -> 60 (15.38%) instructions HURT: shaders/tesseract/178.shader_test FRAG: 52 -> 60 (15.38%) instructions HURT: shaders/tesseract/121.shader_test FRAG: 52 -> 60 (15.38%) instructions HURT: shaders/tesseract/193.shader_test FRAG: 72 -> 84 (16.67%) instructions HURT: shaders/tesseract/190.shader_test FRAG: 72 -> 84 (16.67%) total instructions in shared programs: 64220 -> 64572 (0.55%) instructions in affected programs: 4924 -> 5276 (7.15%) helped: 5 HURT: 24 helped stats (abs) min: 4 max: 8 x̄: 5.60 x̃: 4 helped stats (rel) min: 4.35% max: 5.41% x̄: 4.72% x̃: 4.35% HURT stats (abs) min: 4 max: 60 x̄: 15.83 x̃: 12 HURT stats (rel) min: 1.55% max: 16.67% x̄: 10.04% x̃: 10.71% 95% mean confidence interval for instructions value: 5.39 18.89 95% mean confidence interval for instructions %-change: 4.81% 10.18% Instructions are HURT. total temps in shared programs: 2514 -> 2512 (-0.08%) temps in affected programs: 9 -> 7 (-22.22%) helped: 2 HURT: 0 Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7624> (cherry picked from commit 9b6516ac249ee479b78e399e1a54a293e53e9676)
2020-11-19vdpau: Add missing printf format specifier.Vinson Lee2-2/+2
Fix defect reported by Coverity Scan. Extra argument to printf format specifier (PRINTF_ARGS) extra_argument: This argument was not used by the format string: vmixer->max_layers. Fixes: 89b986325227 ("vdpau: Add support for parameters") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7200> (cherry picked from commit 3fe5c13d71b831b42798755a3ba983b5de6d1563)
2020-11-19freedreno/ir3: Fix crash in shader compile fail pathRob Clark2-2/+2
Fixes: 74140c2e859 ("freedreno/ir3: convert over to ralloc") Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7612> (cherry picked from commit 4b65c09d86d37efa34e93b17b0e4a03546f26af9)
2020-11-19mesa: Clamp some depth values in glClearBufferfiNanley Chery2-3/+15
OpenGL 3.0 spec, section 4.2.3 "Clearing the Buffers": depth and stencil are the values to clear the depth and stencil buffers to, respectively. Clamping and type conversion for fixed-point depth buffers are performed in the same fashion as for ClearDepth. Enables iris to pass the clearbuffer-depth-stencil piglit test. Cc: mesa-stable Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7410> (cherry picked from commit 2e713313a29422b38435c91f8277c1893fcad095)
2020-11-19mesa: Clamp some depth values in glClearBufferfvNanley Chery2-2/+16
OpenGL 3.0 spec, section 4.2.3 "Clearing the Buffers": If buffer is DEPTH, drawbuffer must be zero, and value points to the single depth value to clear the depth buffer to. Clamping and type conversion for fixed-point depth buffers are performed in the same fashion as for ClearDepth. Enables iris to pass the clearbuffer-depth piglit test. v2. Add spec citation. (Eric Anholt) v3. Don't clamp floating point formats. (Eric Anholt) Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7410> (cherry picked from commit 1bf539b3a2129779addde397886870c00045e6d7)
2020-11-19mesa: Add and use _mesa_has_depth_float_channelNanley Chery4-3/+14
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7410> (cherry picked from commit fda015023af5d0d2d844d5fde07a8c19e4d8f453)
2020-11-19mesa: Fix vertex_format_to_pipe_format index.Brendan Dougherty2-5/+4
Corrects the index into the vertex_formats table for `integer` and `normalized` values other than 0 or 1. Fixes: e6448f993b1 ("mesa: translate into gallium vertex formats in mesa/main") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7554> (cherry picked from commit 9edb6e1be0f8ac65496e1f0da6c78376d81d70ff)
2020-11-19nir: handle float atomics in copy propagation passMarcin Ślusarz2-1/+9
Without this patch, copy propagation pass can optimize out buffer loads out of compare & swap loop, which then leads to infinite loop. Triggered by a change to atomicCompSwap float test in piglit. Fixes: 8424cd8fbd1 ("nir: Account for atomics in copy propagation.") Suggested-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7538> (cherry picked from commit 6e6dab479907fe79ed24e69be841dd3ec7bd479e)
2020-11-19intel/fs: Fix use of undefined value in fixup_nomask_control_flowJason Ekstrand2-2/+3
Fixes: a8ac0bd759cbf "intel/fs/gen12: Workaround unwanted SEND execution..." Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7536> (cherry picked from commit e9caba6ce54d35870ef2fc555d00e2ccb45e40c0)
2020-11-19util/set: Fix the _mesa_set_clear function to not leave tombstones.Eric Anholt2-5/+9
This implementation was broken and should have just been the same as the hash_table_clear() one, which I copied over here. It was setting all formerly-present entries to deleted, yet also setting deleted_entries to 0. This meant that all new searches or additions after clearing would have to reprobe the whole table until a rehash happened, and that rehash would be delayed because we violated the deleted_entries invariant. No statistically significant performance difference on softpipe KHR-GL33.texture_swizzle.functional runtime (n=18) Fixes: 5c075b085585 ("util/set: add a set_clear function") Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7244> (cherry picked from commit 2afdd94f86149295f3e9422672c4501092f671d6)
2020-11-19freedreno: Protect gmem_cache ralloc allocationsRob Clark2-3/+7
Since the ralloc context for cache_key allocation is shared between all the contexts hanging off a screen, we need to allocate the key under the screen->lock. Fixes: 91f9bb99c5e ("freedreno: add gmem state cache") Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7342> (cherry picked from commit cb034ae44f4a1f3ed036ba71fc42746efb4cd775)
2020-11-19frontends/va: Fix *num_entrypoints check.Vinson Lee2-2/+2
Fix defect reported by Coverity Scan. Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking num_entrypoints suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Fixes: 5bcaa1b9e970 ("st/va: add encode entrypoint v2") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7360> (cherry picked from commit 7820c8c13ff3e9367b208f09059c940a1629f708)
2020-11-19mesa/main: add missing include in glformats.hErik Faye-Lund2-1/+2
This header uses uint32_t without including stdint.h. This worked fine by accident until a new c-source started including it. Fixes: 1bf539b3a21 ("mesa: Clamp some depth values in glClearBufferfv") Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7637> (cherry picked from commit 2410def98fa688aa009b42de3224e12e5ddbaff3)
2020-11-19glcpp: Handle bison-3.6 error message changesMatt Turner3-2/+6
In bison's commit 72c9fa4510eb (skeletons: use "end of file" instead of "$end") in bison-3.6, '$end' was changed to 'end of file' in error messages. Since our glcpp test cases contain the expected output text, they rely on the particular messages printed by bison. The test case 084-unbalanced-parentheses fails when Mesa is built with bison-3.6 due to this change. To allow the test to pass on all supported versions of bison, we: 1. Change '$end' -> 'end of file' in the .expected file, and 2. Normalize the error generated by the test case with the same replacement Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3181 Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7659> (cherry picked from commit df29d0a111da3a555d8f0751722ca70fe0c5ffc0)
2020-11-19.pick_status.json: Update to bac6cc586fe4c1b24351e0574d3a961eb631f6aeDylan Baker1-0/+1314
2020-11-19gallium/util: do not pass undefined sample-countErik Faye-Lund2-5/+4
We forgot to initialize the sample_count member here, leading to it being undefined. This causes problems on MSVC when compiling in debug-mode, where we get a run-time error for using an undefined variable. To avoid similar problems in the future if more fields are added, let's initialize the whole struct to zero to start with. This also allows us to remove a no-longer-needed zero-initialization. Fixes: cf170616daa ("gallium: Add a util_blitter path for using a custom VS and FS.") Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7503> (cherry picked from commit 441feda0bb374e551a59af24111d3574d9adc948)
2020-11-19amd/addrlib: Add missing va_end.Vinson Lee2-1/+2
Fix defect reported by Coverity Scan. Missing varargs init or cleanup (VARARGS) missing_va_end: va_end was not called for debugPrintInput.ap. Fixes: 69ea473eeb91 ("amd/addrlib: update to the latest version") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7299> (cherry picked from commit c8630fd1143f055249a35877aa056878e56d00c3)
2020-11-19iris: Flush dmabufs during context flushesNanley Chery6-5/+70
Currently, every modifier that uses CCS also lacks support for fast-clears. On gen9+, dmabufs may gain fast-cleared blocks through clear calls. On gen12, fast-clearing can occur during any rendering operation. Mark when dmabufs gain fast-cleared blocks and flush them during a context flush operation. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3425 Tested-by: Simon Ser <contact@emersion.fr> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7384> (cherry picked from commit 5194cbc76633e4458f1c5f1db388950cae0200a9)
2020-11-19iris: fix source/destination layers for 3D blitsKenneth Graunke2-3/+16
See commit ea326912575fad09af59486ad62d126c4ea0ede7 for the corresponding fix in anv. Fixes Piglit's fbo-generatemipmap-3d. Cc: mesa-stable Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7321> (cherry picked from commit 382451ff9d7bfa4f807e8ca447180642c91b92e6)
2020-11-19aco/ra: Fix counting of subdword variables in get_reg_create_vectorTony Wasserka2-2/+2
The loop variable "k" shadowed another variable in the outer scope, so this loop had no actual effect. Fixes: 52cc1f8237d ("aco: improve p_create_vector RA for sub-dword operands") Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7427> (cherry picked from commit 456beb40b8f74d37017eaeb6d0ad0a7108b08345)
2020-11-19nir/opt_intrinsics: Report progress for the gl_SampleMask optimizationJason Ekstrand2-1/+2
Fixes: d3ce8a7f6b93 "nir: optimize gl_SampleMaskIn to gl_HelperInvocation..." Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7366> (cherry picked from commit d9c0f3627d78c33926c358f362818f9fe917c8a6)
2020-11-19nir: skip bcsel with non-trivial swizzle in opt_simplify_bcsel_of_phi()Rhys Perry2-7/+6
Fixes validation error in a Dota 2 shader. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Fixes: b031c643491 ("nir: Convert a bcsel with only phi node sources to a phi node") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7426> (cherry picked from commit 233a820f2c3fb0a008a84a16a0920c3bbdbd61f5)
2020-11-19nir: add nir_alu_src_is_trivial_ssa()Rhys Perry3-1/+17
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7426> (cherry picked from commit 1df2fc9f9c8d720d05bf1da7b2baf659bfae98ed)
2020-11-19nir: Handle incomplete derefs in split_struct_varsJason Ekstrand2-1/+9
In split_var_list_structs where we initalize the splitting, we already use get_complex_used_vars to avoid splitting any variables that have a complex use. However, we weren't actually handling the complex uses properly in the case where we can't actually find the variable. Fixes: f1cb3348f1 "nir/split_vars: Properly bail in the presence of ..." Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332> (cherry picked from commit 5664713d7b99b99dcee1d009ef6e5b105a2d65ee)
2020-11-19nir/large_constants: only search for constant duplicatesYevhenii Kolesnikov2-2/+4
Fixes: b6d47535684 ("nir/large_constants: De-duplicate constants") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3706 Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7350> (cherry picked from commit ea81889ea436c2de7e3f3937f95f96e71d4c50ad)
2020-11-19r600: amend space check for chips older than EVERGREENIgor V. Kovalenko2-2/+2
evergreen_emit_atomic_buffer_setup_count is only called if chip >= EVERGREEN otherwise atomic_used_mask is left uninitialized when unconditionally used by r600_need_cs_space so it might want more space than needed fix this by always initializing atomic_used_mask Fixes: 32529e60849 ("r600/eg: rework atomic counter emission with flushes") Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7417> (cherry picked from commit 7ae81d65a495a6ba6da6dda6bcbd91a30cc2a8dc)
2020-11-19mesa/spirv: Lower variable initializers for global variablesJason Ekstrand2-1/+8
We lower variable initializers for local variables higher up in the function but we never called nir_lower_variable_initializers for anything else. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7296> (cherry picked from commit 6b85a887ff511c40ea6ea0f1aea311151ab9d01d)
2020-11-19mesa: do not throw _mesa_problem when invalid enum is usedTapani Pälli2-7/+2
Like with other getters, invalid enum is dealt in find_value by setting error to GL_INVALID_ENUM and returning INVALID_TYPE which makes get_value_size return 0. Fixes false 'implementation errors' seen with Piglit test: ext_external_objects-memory-object-api-errors "Mesa 20.3.0-devel implementation error: invalid value type in GetUnsignedBytei_vEXT() Please report at https://gitlab.freedesktop.org/mesa/mesa/-/issues" v2: add assert to get_value_size() (Lionel) Fixes: e064d660205 ("mesa: implement glGetUnsignedByte{v|i_v}") Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eleni Maria Stea <estea@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7403> (cherry picked from commit 29fc115d5810f1b1b65686b543b687d6d08205e9)
2020-11-19mesa/st: call memobj_destroy only if there is memory importedTapani Pälli2-2/+3
Something may go wrong during import which leaves pointer to null and when ctx and it's shared state gets destroyed we will attempt to call memobj_destroy. Instead of forcing every driver to handle it, add check here. Fixes crashes with Piglit test: ext_external_objects_fd-memory-object-api-errors Fixes: 99cf9108340 ("mesa/st: Actually free the driver part of memory objects on destruction.") Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eleni Maria Stea <estea@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7403> (cherry picked from commit e02e1ccbeedf0082e0440b557f21ea9bc4c46173)
2020-11-19.pick_status.json: Mark ea326912575fad09af59486ad62d126c4ea0ede7 as backportedDylan Baker1-1/+1
2020-11-19.pick_status.json: Mark 87934f02f9da94f1a493096049c229b973e4785c as backportedDylan Baker1-1/+1
2020-11-19radv: fix shader caching with NaN fixup workaroundRhys Perry3-1/+4
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Fixes: 6f21995f986 ("radv: add new drirc option radv_enable_mrt_output_nan_fixup") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7423> (cherry picked from commit ac65d3b6b8522a25b91150a61cac1799c551c51b)
2020-11-19radv: fix shader caching with discard->demote workaroundRhys Perry3-1/+4
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Fixes: bdd75874144 ("radv: use nir_lower_discard_to_demote to work around game bugs") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7423> (cherry picked from commit 36f62494ec7148931201726dcb5f79e5d7965ae6)
2020-11-19anv: always annotate memory returned from anv_gem_mmapMarcin Ślusarz2-6/+10
anv_bo_pool_alloc expects that the memory returned by and_gem_mmap was annotated using VALGRIND_MALLOCLIKE_BLOCK, but anv_gem_mmap_offset didn't do that. Move annotation from anv_gem_mmap_legacy to common code. Fixes: 4abf0837cdb ("anv: Add support for new MMAP_OFFSET ioctl.") Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7381> (cherry picked from commit b5e2c58ad865be4d88e4d29b5461015a82633e78)
2020-11-19os: Fix open result check.Vinson Lee2-2/+2
Fix defect reported by Coverity Scan. Argument cannot be negative (NEGATIVE_RETURNS) negative_returns: f is passed to a parameter that cannot be negative. CID: 1364709 Fixes: 13fa0513569d ("auxiliary/os: add new os_get_command_line() function") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7344> (cherry picked from commit b2a21febe0416d7d5506fdc9592b7b4c10431077)
2020-11-19iris/bufmgr: Handle NULL bufmgr in iris_bufmgr_get_for_fdMichel Dänzer2-2/+3
iris_bufmgr_create can return NULL, in which case we'd crash in list_addtail. Reported by Coverity/clang (for i965, but iris code looks the same). Fixes: 7557f1605968 ("iris: share buffer managers accross screens") Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7335> (cherry picked from commit 1eda842318704ed477c7669d2c8e94d6394792b9)
2020-11-19i965/bufmgr: Handle NULL bufmgr in brw_bufmgr_get_for_fdMichel Dänzer2-2/+3
brw_bufmgr_create can return NULL, in which case we'd crash in list_addtail. Reported by Coverity/clang. Fixes: 4094558e8643 ("i965: share buffer managers across screens") Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7335> (cherry picked from commit eb61f8959e0a2de35dcfa518ea9963424fe715c4)
2020-11-19glsl: add extra pp tokens workaround and enable for CoRTimothy Arceri10-2/+29
The CTS now tests to make sure these are not allowed. However, previously drivers (including Mesa) would allow them to exist and just issue a warning. Some old applications such as Champions of Regnum seem to depend on this. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/422 Fixes: 43047384c331 ("glsl/glcpp: Promote "extra token at end of directive" from warning to error") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7361> (cherry picked from commit a09717c4de08b647657073e806bd1d5964212690) Conflicts: src/gallium/auxiliary/pipe-loader/driinfo_gallium.h src/mesa/drivers/dri/i965/intel_screen.c
2020-11-19.pick_status.json: Update to 87dc3106b077199b829a082e32ec33d0c6d400abDylan Baker1-0/+1107