- Oct 20, 2021
-
-
Eric Engestrom authored
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
-
this is a wild race condition, but it's possible for these to get their final unref, enter their destructor, and then get a cache hit while waiting on the lock to remove themselves from the cache in such a scenario, a second, normal check of the refcount will suffice, as the increment is atomic, and the value will otherwise be zero fixes crashes in basemark cc: mesa-stable Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <mesa/mesa!13442> (cherry picked from commit 86b3d8c6)
-
This reverts commit 27534a49 Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com> Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com> Part-of: <mesa/mesa!12979> (cherry picked from commit 5afce85f)
-
Without adding `PIPE_CONTROL_TILE_CACHE_FLUSH` into `iris_emit_pipe_control` gen12+ (UHD 750 in my case) has issues with textures. Related-to: mesa/mesa#5029 Fixes: c85ea824('iris: reduce redundant tile cache flushes') Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com> Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com> Part-of: <mesa/mesa!12979> (cherry picked from commit 0523607e)
-
Fixes: bd2662bf - mesa: add KHR_no_error support to glUniform*() functions Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <mesa/mesa!13417> (cherry picked from commit 03186773)
-
Fixes a bunch of XFB piglit tests with Zink. Cc: 21.3 mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!13437> (cherry picked from commit 572a9025)
-
Fixes few 64-bit piglit tests with Zink. Cc: 21.3 mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!13435> (cherry picked from commit e3cbb0eb)
-
It might still be read later from the streamout buffer. Fixes a regression with ext_transform_feedback-builtin-varyings gl_PointSize and Zink. Fixes: 92e1981a ("radv: Remove PSIZ output when it isn't needed.") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <mesa/mesa!13413> (cherry picked from commit 19c91a12)
-
Annotated <pthread.h> exposes too many errors in Mesa that are non-trivial to fix and keep working without FreeBSD CI. Fixes: 0d5fe24c ("macros: Add thread-safety annotation macros") Reviewed-by: Eric Engestrom <eric@engestrom.ch> Cc: mesa-stable Part-of: <mesa/mesa!9168> (cherry picked from commit 60b7c3a0)
-
gotta get those holes for caching cc: mesa-stable Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <mesa/mesa!13410> (cherry picked from commit e6655898)
-
using the draw stage here doesn't make much sense, but that's what the spec says, so let's git er done fixes dEQP-GL45.functional.compute.indirect_dispatch* on radv Cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <mesa/mesa!13381> (cherry picked from commit a2789fde)
-
there's only a few possible values for this, so just use a static array to avoid leaking Fixes: 039078fe ("zink: slight refactor of load_device_extensions()") Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <mesa/mesa!13360> (cherry picked from commit 11dd9e4e)
-
Makes hashing achieve higher hit rate, and valgrind happier. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Part-of: <mesa/mesa!13371> (cherry picked from commit ae525da0)
-
INTEL_DEBUG is defined (since 4015e187) as: #define INTEL_DEBUG __builtin_expect(intel_debug, 0) which unfortunately chops off upper 32 bits from intel_debug on platforms where sizeof(long) != sizeof(uint64_t) because __builtin_expect is defined only for the long type. Fix this by changing the definition of INTEL_DEBUG to be function-like macro with "flags" argument. New definition returns 0 or 1 when any of the flags match. Most of the changes in this commit were generated using: for c in `git grep INTEL_DEBUG | grep "&" | grep -v i915 | awk -F: '{print $1}' | sort | uniq`; do perl -pi -e "s/INTEL_DEBUG & ([A-Z0-9a-z_]+)/INTEL_DBG(\1)/" $c perl -pi -e "s/INTEL_DEBUG & (\([A-Z0-9_ |]+\))/INTEL_DBG\1/" $c done but it didn't handle all cases and required minor cleanups (like removal of round brackets which were not needed anymore). Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <mesa/mesa!13334> (cherry picked from commit d05f7b4a)
-
Patch 77c2b022 removed lowering of 64-bit vertex attribs to 32bits. This has thrown TGSI translation off the guard for 64bit attrib. This lead to fail/crash of 1000+ piglit tests. This patch basically fixes 64 bit attrib index for TGSI shader by adding placeholder for second part of a double attribute. It fixes all regressed piglit tests. A big help from Charmaine to fix this regression Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Fixes: 77c2b022 ("st/mesa: remove lowering of 64-bit vertex attribs to 32 bits") Part-of: <mesa/mesa!13363> (cherry picked from commit be6d584d)
-
The descriptor set was always 0 because it wasn't gathered by the shader info pass. This fixes CPU crashes with arb_shader_texture_image_samples-builtin-image and Zink. Cc: 21.3 mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <mesa/mesa!13411> (cherry picked from commit 5b797bd4)
-
Instead of only using the viewport extent. Closes: mesa/mesa#5344 Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!13382> (cherry picked from commit 234c69f6)
-
Fix defect reported by Coverity Scan. Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT) assign_where_compare_meant: use of "=" where "==" may have been intended Fixes: 35315c68 ("anv: Use the common wrapper for GetPhysicalDeviceFormatProperties") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!13395> (cherry picked from commit 9eb010ee)
-
This dereferences a NULL pointer and crash many tests with Zink. Fixes: 92e1981a ("radv: Remove PSIZ output when it isn't needed.") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <mesa/mesa!13378> (cherry picked from commit 61be0bd3)
-
This fixes CLs 1.2 1Darray and 2Darray images. Fixes: 589d918a ("spirv: Add 0.5 to integer coordinates for OpImageSampleExplicitLod") Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <mesa/mesa!13401> (cherry picked from commit f6ecd284)
-
This is needed for CL image hostptr support, but it's possible it could hit these paths from GL/Vulkan Fixes: 9a57dcee ("llvmpipe: add support for user memory pointers") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <mesa/mesa!13375> (cherry picked from commit 17a565e0)
-
Matches freedreno. Fixes crashes in Piglit arb_texture_view. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Cc: mesa-stable Part-of: <mesa/mesa!13394> (cherry picked from commit d31ca635)
-
The following chain of events results in an incorrectly sized buffer persisting beyond its useful lifetime, and causing visual artifacts. buffer is attached at size A window is resized to size B rendering takes place for size B window is resized back to size A swapbuffers with damage is called In this scenario, update_buffers fails to recognize that the surface it's about to commit is a different size than it has rendered. The attached_width and attached_height are set incorrectly, and periodic flickering is observed. Instead, we set a boolean flag at time of resize and use this at the time we latch the window dimensions as surface dimensions to decide whether to discard stale buffers. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <mesa/mesa!13270> (cherry picked from commit 28d12716)
-
the increment needs to happen before the comparison here Fixes: 3d6c8829 ("aux/pb: add a tolerance for reclaim failure") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!13388> (cherry picked from commit fe2674dd)
-
originally, a slab attempts to reclaim a single bo. there are two outcomes to this which can occur: * the bo is reclaimed * the bo is not reclaimed if the bo is reclaimed, great. if the bo is not reclaimed, it remains at the head of the list until it can be reclaimed. this means that any bo with a "long" work queue which makes it into a slab will effectively kill the entire slab. in a benchmarking scenario, this can occur in rapid succession, and every slab will get 1-2 suballocations before it reaches a bo that blocks long enough for a new slab to be needed. the inevitable result of this scenario is that all memory is depleted almost instantly, all because pb assumes that if the first bo in the reclaim list isn't ready, none of them can be ready for drivers like radeonsi, this happens to be a fine assumption for drivers like zink, this is entirely not workable and explodes the gpu Cc: mesa-stable Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Tested-by: Witold Baryluk <witold.baryluk@gmail.com> Part-of: <mesa/mesa!13345> (cherry picked from commit 3d6c8829)
-
Fixes dEQP-VK.pipeline.executable_properties.* on GFX6-7 when clrxdisasm isn't found. Other generations are also affected if RADV is built without LLVM. Cc: 21.3 mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de> Part-of: <mesa/mesa!13333> (cherry picked from commit aac4e1f8)
-
Scratch patching code in iris_upload_dirty_render_state (see MERGE_SCRATCH_ADDR calls) assumes that in all shader stages derived_data field stores 3DSTATE_XS packet first. This is not true for TESS_EVAL (DS), so we end up patching 3DSTATE_TE instead of 3DSTATE_DS leading to DWordLength becoming 11 instead of 9 (9 == 3DSTATE_DS.DWordLength, 2 == 3DSTATE_TE.DWordLength, and 9|2 == 11), and hardware hanging on the next instruction. Fix this by reversing the order of packets for TESS_EVAL stage. Closes: mesa/mesa#5499 Fixes: 4256f7ed ("iris: Fill out scratch base address dynamically") Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!13358> (cherry picked from commit 5387522b)
-
When eglReleaseThread() is called from application's destructor (API with __attribute__((destructor))), it crashes due to invalid memory access. In this case, _egl_TLS is freed in the flow of _eglAtExit() as below but _egl_TLS is not set to NULL. _eglDestroyThreadInfo _eglFiniTSD _eglAtExit _run_exit_handlers exit Later when the eglReleaseThread is called from application's destructor, it ends-up accessing the freed _egl_TLS pointer. eglReleaseThread -> in libEGL_mesa eglReleaseThread -> in libEGL(glvnd) destructor() -> App's destructor To resolve the invalid access, setting the _egl_TLS pointer as NULL after freeing it. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Cc: mesa-stable Closes: mesa/mesa#5466 Part-of: <mesa/mesa!13302> (cherry picked from commit 796c9ab3)
-
This is a preexisting bug but it was uncovered by 231653ea ("intel/isl: Add a max_buffer_size limit to isl_device") which added an assert(num_elements > 0) for typed buffers. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!13351> (cherry picked from commit 393fda2d)
-
Cc: mesa-stable Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <mesa/mesa!13370> (cherry picked from commit 4d777631)
-
Only gl typedefs are used. So just remove the header and update the types to the underlying types. Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <mesa/mesa!13387> (cherry picked from commit 2d58e31f)
-
Below are removed: __DRI_FRAME_TRACKING __DRI_TEX_OFFSET __DRI_GET_DRAWABLE_INFO Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <mesa/mesa!13387> (cherry picked from commit e19d9046)
-
This sets the conformance version to 0.0.0.0 for GPUs that have incomplete support for vulkan, so that it's easier to check if vulkan is fully supported by a GPU at runtime for applications/libraries. $ vulkaninfo|grep conf MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete conformanceVersion = 0.0.0.0 Signed-off-by: Clayton Craft <clayton@craftyguy.net> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!13275> (cherry picked from commit b2ef7e6d)
-
VK_ERROR_INITIALIZATION_FAILED can happen as part of device creation and isn't really an instance error in that case. VK_ERROR_EXTENSION_NOT_PRESENT, on the other hand, is always an instance thing and we should handle it as such. Fixes: 0cad3beb ("vulkan/log: Add common vk_error and vk_errorf helpers") Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <mesa/mesa!13341> (cherry picked from commit 071437d2)
-
If we don't do that we hit the assert(entry[i] != NULL) added by commit 6d44b21d ("vulkan: Fix weak symbol emulation when compiling with MSVC"). Fixes: 6d44b21d ("vulkan: Fix weak symbol emulation when compiling with MSVC") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <mesa/mesa!13355> (cherry picked from commit fd467492)
-
radv_get_modifier_flags read the format properties, doesn't write any. Setting the central format properties based on the drm format properties doesn't make any sense. Fixes: 5dee0d9d "radv: switch to VK_FORMAT_FEATURE_2_XXX/VkFormatProperties3KHR" Closes: mesa/mesa#5498 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <mesa/mesa!13357> (cherry picked from commit b4aa5a3f)
-
Mapping unimplemented entrypoints to a global function pointer variable initialized to NULL is a bit cumbersome, and actually led to a bug in the vk_xxx_dispatch_table_from_entrypoints() template: the !override case didn't have the right check on the source table entries. Instead of fixing that case, let's simplify the logic by creating a stub function and making the alternatename pragma point to this stub. This way we get rid of all those uneeded xxx_Null symbols/variables and simplify the tests in vk_xxxx_dispatch_table_from_entrypoints(). Cc: mesa-stable Fixes: 98c622a9 ("vulkan: Update dispatch table gen for Windows") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <mesa/mesa!13348> (cherry picked from commit 6d44b21d)
-
Two carchase compute shaders (shader-db) and two Fallout 4 fragment shaders (fossil-db) were helped. Based on the NIR of the shaders, all four had structures like for (i = 0; i < 1; i++) { ... for (...) { ... } } All HSW+ platforms had similar results. (Ice Lake shown) total loops in shared programs: 6033 -> 6031 (-0.03%) loops in affected programs: 4 -> 2 (-50.00%) helped: 2 HURT: 0 All Intel platforms had similar results. (Ice Lake shown) Instructions in all programs: 143692018 -> 143692006 (-0.0%) SENDs in all programs: 6947154 -> 6947154 (+0.0%) Loops in all programs: 38285 -> 38283 (-0.0%) Cycles in all programs: 8434822225 -> 8434476815 (-0.0%) Spills in all programs: 191665 -> 191665 (+0.0%) Fills in all programs: 298822 -> 298822 (+0.0%) In the presense of loop unrolling like this, the change in cycles is not accurate. v2: Rearrange the logic in the if-condition to read a little better. Suggested by Tim. Closes: #5089 Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit ae99ea6f) Part-of: <mesa/mesa!13366>
-
Eric Engestrom authored
-
Eric Engestrom authored
-