- Nov 23, 2020
-
-
Dylan Baker authored
-
Dylan Baker authored
-
- Nov 19, 2020
-
-
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: <mesa/mesa!6735> (cherry picked from commit 31290f98)
-
Fixes: 25fff591 - 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: <mesa/mesa!7542> (cherry picked from commit ff22fcf4)
-
Fixes: 3da91b33 - radeonsi/ngg: add VGT_FLUSH when enabling fast launch Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <mesa/mesa!7542> (cherry picked from commit 8d2876a3)
-
Other chips don't need this. Fixes: 9538b9a6 - radeonsi: add support for Sienna Cichlid Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <mesa/mesa!7542> (cherry picked from commit c4ebdf9e)
-
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 b50275a4)
-
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 51a19c83)
-
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: f97acb4b ("freedreno/ir3: disk-cache support") Part-of: <mesa/mesa!5810> (cherry picked from commit 433841d9)
-
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: <mesa/mesa!7544> (cherry picked from commit 959c2d1e)
-
The number of invocations wasn't getting incremented correctly. Fixes: 202bc38c ("draw: collect tessellation invocations statistics") Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <mesa/mesa!7597> (cherry picked from commit ce07c52b)
-
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: <mesa/mesa!7624> (cherry picked from commit 9b6516ac)
-
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: 89b98632 ("vdpau: Add support for parameters") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <mesa/mesa!7200> (cherry picked from commit 3fe5c13d)
-
Fixes: 74140c2e ("freedreno/ir3: convert over to ralloc") Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <mesa/mesa!7612> (cherry picked from commit 4b65c09d)
-
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: <mesa/mesa!7410> (cherry picked from commit 2e713313)
-
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: <mesa/mesa!7410> (cherry picked from commit 1bf539b3)
-
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <mesa/mesa!7410> (cherry picked from commit fda01502)
-
Corrects the index into the vertex_formats table for `integer` and `normalized` values other than 0 or 1. Fixes: e6448f99 ("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: <mesa/mesa!7554> (cherry picked from commit 9edb6e1b)
-
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: 8424cd8f ("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: <mesa/mesa!7538> (cherry picked from commit 6e6dab47)
-
Fixes: a8ac0bd7 "intel/fs/gen12: Workaround unwanted SEND execution..." Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <mesa/mesa!7536> (cherry picked from commit e9caba6c)
-
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: 5c075b08 ("util/set: add a set_clear function") Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!7244> (cherry picked from commit 2afdd94f)
-
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: 91f9bb99 ("freedreno: add gmem state cache") Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <mesa/mesa!7342> (cherry picked from commit cb034ae4)
-
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: 5bcaa1b9 ("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: <mesa/mesa!7360> (cherry picked from commit 7820c8c1)
-
This header uses uint32_t without including stdint.h. This worked fine by accident until a new c-source started including it. Fixes: 1bf539b3 ("mesa: Clamp some depth values in glClearBufferfv") Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <mesa/mesa!7637> (cherry picked from commit 2410def9)
-
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: mesa/mesa#3181 Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <mesa/mesa!7659> (cherry picked from commit df29d0a1)
-
Dylan Baker authored
-
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: cf170616 ("gallium: Add a util_blitter path for using a custom VS and FS.") Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <mesa/mesa!7503> (cherry picked from commit 441feda0)
-
Fix defect reported by Coverity Scan. Missing varargs init or cleanup (VARARGS) missing_va_end: va_end was not called for debugPrintInput.ap. Fixes: 69ea473e ("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: <mesa/mesa!7299> (cherry picked from commit c8630fd1)
-
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: mesa/mesa#3425 Tested-by: Simon Ser <contact@emersion.fr> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!7384> (cherry picked from commit 5194cbc7)
-
See commit ea326912 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: <mesa/mesa!7321> (cherry picked from commit 382451ff)
-
The loop variable "k" shadowed another variable in the outer scope, so this loop had no actual effect. Fixes: 52cc1f82 ("aco: improve p_create_vector RA for sub-dword operands") Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!7427> (cherry picked from commit 456beb40)
-
Fixes: d3ce8a7f "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: <mesa/mesa!7366> (cherry picked from commit d9c0f362)
-
Fixes validation error in a Dota 2 shader. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Fixes: b031c643 ("nir: Convert a bcsel with only phi node sources to a phi node") Part-of: <mesa/mesa!7426> (cherry picked from commit 233a820f)
-
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!7426> (cherry picked from commit 1df2fc9f)
-
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: f1cb3348 "nir/split_vars: Properly bail in the presence of ..." Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <mesa/mesa!6332> (cherry picked from commit 5664713d)
-
Fixes: b6d47535 ("nir/large_constants: De-duplicate constants") Closes: mesa/mesa#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: <mesa/mesa!7350> (cherry picked from commit ea81889e)
-
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: 32529e60 ("r600/eg: rework atomic counter emission with flushes") Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <mesa/mesa!7417> (cherry picked from commit 7ae81d65)
-
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: <mesa/mesa!7296> (cherry picked from commit 6b85a887)
-
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: e064d660 ("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: <mesa/mesa!7403> (cherry picked from commit 29fc115d)
-
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: 99cf9108 ("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: <mesa/mesa!7403> (cherry picked from commit e02e1ccb)
-