David Rosca [Wed, 27 Sep 2023 14:17:51 +0000 (16:17 +0200)]
gallium/auxiliary: Fix coordinates clamp in util_compute_blit
Fixes:
7c8e1596d6e ("gallium/auxiliary: Fix util_compute_blit half texel offset with scaling")
Acked-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123>
(cherry picked from commit
e9091b1f5c2ef50aba36f5e71fb6cf88ffc31cbb)
David Rosca [Wed, 27 Sep 2023 12:40:12 +0000 (14:40 +0200)]
gallium/auxiliary/vl: Fix coordinates clamp in compute shaders
Fixes:
a6a43963ed0 ("gallium/auxiliary/vl: Clamp coordinates in compute shaders")
Acked-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123>
(cherry picked from commit
ef0546152fd1aed1d4175097c6361860c42f459e)
Jesse Natalie [Fri, 3 Nov 2023 16:43:45 +0000 (09:43 -0700)]
nir_lower_mem_access_bit_sizes: Fix write-mask-constrained 3-byte stores as atomics
The code here handled stores of actual 3-byte values (8-bit, 3-component), but didn't
correctly handle stores of larger 8-bit vectors that were constrained by write mask to
just 3 bytes. In that case, the pad-to-vec4 step was unnecessary and problematic.
Seen in CL CTS test_basic vector_swizzle test group for char3 with CLOn12.
Fixes:
c70d94a8 ("nir_lower_mem_access_bit_sizes: Support unaligned stores via a pair of atomics")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26034>
(cherry picked from commit
cd0cff951a5b7c74d704198b5abfdb40b267cbdc)
Rhys Perry [Tue, 14 Nov 2023 16:03:45 +0000 (16:03 +0000)]
docs: fix RADV_THREAD_TRACE_CACHE_COUNTERS default
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes:
dbab98d9d63d ("radv: enable RADV_THREAD_TRACE_CACHE_COUNTERS by default")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26193>
(cherry picked from commit
c4ee639ca0378f094e63738697812ecfa191bbf1)
Sagar Ghuge [Wed, 5 Jul 2023 02:06:24 +0000 (19:06 -0700)]
anv: Flush data cache while clearing depth using HIZ_CCS_WT
Patch fxes ESO shadow pass ground corruption on Arc A750. In the colour
pass where the rendering corruption first appears, the depth resource
was used as a "PS - Texture". Immediately afterwards there's a Barrier
where it goes from
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL =>
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
immediately following that there's a Clear from vkCmdBeginRendering
which appears to be a HiZ clear. Things work when using AUX_USAGE_HIZ
but AUX_USAGE_HIZ_CCS_WT (XXX: and AUX_USAGE_HIZ_CCS?) doesn't work.
current thinking is this is related to
14015264727 where we had to add
HDC and DC flushes to CCS and MCS fast clears. Maybe HiZ clears with
CCS also have similar problems? The docs don't appear to indicate that
but the docs were also wrong for color clears until recently...
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9277
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9444
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22717>
(cherry picked from commit
648c0c159d865a8a30f0b524b33db6d932e4e234)
Tapani Pälli [Mon, 31 Jul 2023 07:43:15 +0000 (10:43 +0300)]
iris: add data cache flush for pre hiz op
This fixes various failing Piglit tests on DG2.
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22717>
(cherry picked from commit
e4db19afa72b3dc2a33acc6435f714176adc6df1)
Sagar Ghuge [Thu, 9 Nov 2023 01:33:40 +0000 (17:33 -0800)]
anv: Write timestamp using MI_FLUSH_DW on blitter
On Blitter engine, we don't support PIPE_CONTROL, we have to update
memory locations using the MI_FLUSH_DW command.
v2:
- Handle video queue (Lionel)
Fixes:
056b0cb87f2 ("anv: add video engine support in various places")
Fixes:
5112b421462 ("anv: Handle end of pipe with MI_FLUSH_DW on transfer queue")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26121>
(cherry picked from commit
8c9a7f77303b5acb4555a8c41b897da891fbe2da)
Eric Engestrom [Wed, 15 Nov 2023 16:34:18 +0000 (16:34 +0000)]
Friedrich Vock [Sun, 12 Nov 2023 20:00:04 +0000 (21:00 +0100)]
vulkan: Don't use set_foreach_remove when destroying pipeline caches
set_foreach_remove assumes no entries have been removed. That assumption
only holds if no errors occur, since pipeline cache objects can get
removed if an error occurs during deserialization.
This fixes
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
crashing on RADV.
Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26164>
(cherry picked from commit
8ffdad731cd8d8900c10810b61283afffa142f29)
Eric Engestrom [Wed, 15 Nov 2023 16:32:14 +0000 (16:32 +0000)]
Mary Guillemard [Thu, 2 Nov 2023 10:37:31 +0000 (06:37 -0400)]
zink: Check for VK_EXT_extended_dynamic_state3 before setting A2C
Fix crashes for piglit alpha-to-coverage tests when
VK_EXT_extended_dynamic_state3 is not supported (like on Venus)
Fixes:
736577871b9 ("zink: check for cbuf0 writes before setting A2C")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26003>
(cherry picked from commit
fe159c85de81a12e895342d003821aa4f25db8d5)
Rob Clark [Sun, 12 Nov 2023 19:08:28 +0000 (11:08 -0800)]
freedreno: Always attach bo to submit
Even if app triggers undefined behaviour by using a rsc on multiple
contexts without a flush, we still should attach the bo to the batch.
Fixes:
b43e5aec0d2c ("freedreno/batch: Move submit bo tracking to batch")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26162>
(cherry picked from commit
4807c1e173e8aef4cba7ba60e6ed38248cb4d7a9)
Marek Olšák [Sun, 5 Nov 2023 16:42:33 +0000 (11:42 -0500)]
radeonsi/gfx11: don't set OREO_MODE to fix rare corruption
This is recommended by hw people.
Fixes:
19a59f05a47 - radeonsi/gfx11: program db render control register
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25941>
(cherry picked from commit
3f108e7615213051466af4ed688e94ce6ddde065)
antonino [Mon, 6 Nov 2023 21:52:35 +0000 (22:52 +0100)]
vulkan: use instance allocator for `object_name` in some objects
The allocator passed to VkDevice won't be available once it is destroyed
and thefore it cannot be used to allocate `object_name` for instance
level objects such as `VkInstance` or `VkPhysicalDevice` or else there
would be no way of deallocating it when those objects are destroyed.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26085>
(cherry picked from commit
2d49f834b20d705d901414f6fc2b1fec019689c4)
Eric Engestrom [Mon, 13 Nov 2023 20:04:53 +0000 (20:04 +0000)]
Roman Stratiienko [Thu, 9 Nov 2023 21:27:46 +0000 (23:27 +0200)]
v3d: Don't implicitly clear the content of the imported buffer
v3d driver will implicitly clear the buffer's content on the first write
operation. This clearing operation is helpful for allocated buffers,
initializing them with zeros instead of having memory garbage.
Also, this avoids reading the buffer from the RAM to the GPU cache
before rendering, making the first write operation slightly faster.
The clearing operation should not happen for imported buffers where
the buffer may already contain valuable data and the user may want
to render into the buffer only partially.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26136>
(cherry picked from commit
56451ce773c11094a8c08fdc6b500bb8bdcf37e1)
Connor Abbott [Thu, 2 Nov 2023 11:03:35 +0000 (12:03 +0100)]
ir3/ra: Don't swap killed sources for early-clobber destination
We have an optimization to try to swap regular live intervals with
killed sources when evicting them fails in order to make a contiguous
space for the destination to fit in, but this doesn't work when the
destination is early-clobber.
Fixes
dEQP-GLES31.functional.synchronization.inter_invocation.image_atomic_read_write
on a650+.
Fixes: d4b5d2a ("ir3/ra: Use killed sources in register eviction")
Closes: #8886
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26004>
(cherry picked from commit
04ffef15da1903c7f2497e24d96f742e476b3e8d)
Lionel Landwerlin [Wed, 8 Nov 2023 14:40:49 +0000 (16:40 +0200)]
isl: disable MCS compression on R9G9B9E5
Not supported according to the docs and will trigger an assert
isl_get_render_compression_format().
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26112>
(cherry picked from commit
d4499c4cb26b87876f0ee16562a4c5b2bd4f8860)
Paulo Zanoni [Fri, 8 Sep 2023 22:10:33 +0000 (15:10 -0700)]
vulkan: fix potential memory leak in create_rect_list_pipeline()
I was playing around with possible improvements to STACK_ARRAY(), and
one of my experiments made gcc point us that we were not freeing
'stages'.
Fixes:
514c10344e6f ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26041>
(cherry picked from commit
17e135d3d4a4bb1d835aba6ffdf1997e23360843)
Eric Engestrom [Fri, 10 Nov 2023 14:45:03 +0000 (14:45 +0000)]
Eric Engestrom [Fri, 10 Nov 2023 14:42:58 +0000 (14:42 +0000)]
Eric Engestrom [Wed, 8 Nov 2023 18:50:58 +0000 (18:50 +0000)]
VERSION: bump for 23.3.0-rc3
Eric Engestrom [Wed, 8 Nov 2023 18:20:43 +0000 (18:20 +0000)]
José Roberto de Souza [Thu, 12 Oct 2023 20:38:57 +0000 (13:38 -0700)]
anv: Add missing ANV_BO_ALLOC_EXTERNAL flags when calling anv_device_import_bo()
This flag is required to properly calculate the PAT index of the
imported BO.
Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26099>
(cherry picked from commit
72ba0677f824d46d0f656eef07b99f5b5ab6ebe5)
Corentin Noël [Mon, 6 Nov 2023 13:29:56 +0000 (14:29 +0100)]
frontends/va: Remove wrong use of ProfileToPipe
The `context->templat.profile` variable is already of enum pipe_video_profile.
Fixes:
0996ec3fc6e ("frontends/va: Add profile param when querying PIPE_VIDEO_CAP_ENC_QUALITY_LEVEL")
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26067>
(cherry picked from commit
f4ed92a8236f611b5a8be9f542d81c5a5e11578a)
Rhys Perry [Fri, 3 Nov 2023 15:25:48 +0000 (15:25 +0000)]
radv: disable gs_fast_launch=2 by default
This currently causes severe performance problems in Remnant 2 and
Alan Wake 2.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes:
28ebe62af2cb ("radv: enable mesh shader gs_fast_launch=2 and multi-row export")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10071
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26090>
(cherry picked from commit
2011b678c538b451eef5a1986adee7e25d6ee04f)
Yiwei Zhang [Mon, 6 Nov 2023 19:41:18 +0000 (11:41 -0800)]
zink: apply can_do_invalid_linear_modifier to Venus
This unblocks Xwayland with zink-on-venus + sommelier wayland proxy.
- For glamor, zink uses linear modifier.
- For Virgl clients, classic 3d resource is used and sommelier fixes
the modifier and stride infos no matter wl-drm or dma-buf protocol.
- For Venus clients:
- via the legacy wl-drm protocol, invalid modifier is passed via
sommelier, and host recovers the tiling in the way dealing with
modifier unaware clients (e.g. I915_GEM_GET_TILING). For hosts
unable to recover, they assume linear and venus forces linear on
legacy path.
- via the new zwp_linux_dmabuf_feedback_v1 (version 3/4) protocol,
explicit modifier is used, and zink handles that without issues.
This doesn't deserve a driconfig as zink-on-venus to support xserver
itself already requires special enough integration beyond a config.
Reported-by: Igor Torrente <igor.torrente@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10066
Fixes:
1c3db3e39a7 ("zink: blow up broken xservers more reliably")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26082>
(cherry picked from commit
551f61bdb3fc408809f3b15643f9f399bc19beac)
Eric Engestrom [Wed, 8 Nov 2023 11:56:14 +0000 (11:56 +0000)]
Sviatoslav Peleshko [Fri, 3 Nov 2023 01:13:50 +0000 (03:13 +0200)]
nir/loop_analyze: Fix inverted condition handling in iterations calculation
In the tagged commit, we stopped actually inverting the condition, and
instead relied on the "invert_cond" flag. But we missed a few places
where this flag should've been handled too.
Also, add a few more tests to make sure this won't regress in the future.
Fixes:
99a7a664 ("nir/loop_analyze: Change invert_cond instead of changing the condition")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10012
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26024>
(cherry picked from commit
aa33ca0a52591961f8ae01dc253354462ed17c18)
Erik Faye-Lund [Mon, 6 Nov 2023 11:51:48 +0000 (12:51 +0100)]
panfrost: use perf_debug instead of open-coding
We don't need to open-code perf_debug here...
Fixes:
bc55d150a91 ("panfrost: Add support for AFBC packing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26063>
(cherry picked from commit
385b81c8c25360a3838958cf6af9b31871a96d29)
Alyssa Rosenzweig [Thu, 12 Oct 2023 19:45:28 +0000 (15:45 -0400)]
agx: Fix fragment side effects scheduling
We can't move discards across side effects, or the side effect might not happen.
Fixes KHR-GLES31.core.shader_image_load_store.basic-allFormats-load-fs
regression. Sigh.
CI is up next.
Fixes:
119e5b9719a ("agx: Schedule for register pressure")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056>
(cherry picked from commit
7b92c6310586e3b17eb922b442561b64cb3b1aff)
Mary Guillemard [Fri, 3 Nov 2023 11:23:25 +0000 (12:23 +0100)]
venus: skip bind sparse info when checking for feedback query
Fix an assertion when using vkQueueBindSparse.
Fixes:
7fbf608f2da ("venus: append query feedback at submission time")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26027>
(cherry picked from commit
f71f5cf8562da4d13d5eb9220edecb6dad5b8ccf)
Vlad Schiller [Thu, 2 Nov 2023 08:08:01 +0000 (08:08 +0000)]
pvr: Fix VK_EXT_texel_buffer_alignment
In the commit that enabled the extension, I forgot to add the required
properties, which made some tests to fail.
Fixes:
649ebbb0fb7 ("pvr: Implement VK_EXT_texel_buffer_alignment")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26002>
(cherry picked from commit
1dd1c9d610dbe0fffd8708977afc0aa88d4a457c)
Samuel Pitoiset [Thu, 2 Nov 2023 09:40:00 +0000 (10:40 +0100)]
nir: fix inserting the break instruction for partial loop unrolling
If the break in the original loop isn't in the first top-level if,
this would have re-inserted it in the wrong block.
Fixes this by re-inserting the break block to the corresponding break
block in the new loop by using the remap hashtable.
fossils-db (NAVI21):
Totals from 88 (0.11% of 79330) affected shaders:
Instrs: 109602 -> 109929 (+0.30%); split: -0.10%, +0.40%
CodeSize: 570968 -> 573332 (+0.41%); split: -0.08%, +0.49%
Latency: 1682510 -> 1682505 (-0.00%); split: -0.01%, +0.01%
Copies: 12832 -> 12746 (-0.67%); split: -1.54%, +0.87%
Branches: 2879 -> 2930 (+1.77%)
Deathloop and F1 2023 are affected but I'm not aware of any issues
for these two games.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10001
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26009>
(cherry picked from commit
abfd208cb047b24802938576d0f5bd1a7f809eb6)
Eric Engestrom [Tue, 7 Nov 2023 13:27:57 +0000 (13:27 +0000)]
Karol Herbst [Sun, 5 Nov 2023 14:01:22 +0000 (15:01 +0100)]
rusticl/queue: fix implicit flushing of queue dependencies
Needed by Davinci Resolve.
There are two parts to this fix:
1. flush dependencies also on flush, not just finish
2. move the dependency checking logic into Queue::flush as otherwise we
miss required implicit flushes.
Fixes:
8616c0a52c7 ("rusticl/event: flush queues from dependencies")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26053>
(cherry picked from commit
8cbb84dc428ff805abc514d810faebe64bb03cdb)
Karol Herbst [Sun, 5 Nov 2023 18:28:49 +0000 (19:28 +0100)]
rusticl/queue: do not send empty lists of event to worker queue
This saves us a few CPU cycles and makes properly fixing implicit flushes
less expensive.
Fixes:
8616c0a52c7 ("rusticl/event: flush queues from dependencies")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26053>
(cherry picked from commit
52e41d4c97947a1b0c2c86c3b6491958716e998b)
David Rosca [Tue, 31 Oct 2023 09:13:52 +0000 (10:13 +0100)]
radeonsi: Fix offset for linear surfaces on GFX < 9
Fixes:
86262b6eac0 ("radeonsi,radv: fix usages of surf_pitch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9949
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10073
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25970>
(cherry picked from commit
bf364cbdb40f044d2a11b6fe5636e8a039fdad81)
Mauro Rossi [Sat, 14 Oct 2023 19:39:37 +0000 (21:39 +0200)]
Android.mk: disable android-libbacktrace to build with Android 14
Android libbacktrace is not available in Android 14
Fixes the following build error:
FAILED: src/util/libmesa_util.a.p/u_debug_stack_android.cpp.o
...
../src/util/u_debug_stack_android.cpp:28:10: fatal error: 'backtrace/Backtrace.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Cc: mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963>
(cherry picked from commit
95ad0c750c5891dab3a678f26a74c95edfed87c9)
Mauro Rossi [Sat, 14 Oct 2023 19:51:24 +0000 (21:51 +0200)]
Android.mk: filter out cflags to build with Android 14 bundled clang
Android 14 uses prebuild clang version 17.0.2
By filtering these cflags there are no building errors on previous Android releases.
Fixes the following building errors:
../src/c11/time.h:54:8: error: redefinition of 'timespec'
struct timespec
^
/media/bigblissdrive/u-x86/out/soong/.intermediates/bionic/libc/libc/android_vendor.34_x86_x86_64_shared/gen/include/bits/timespec.h:46:8: note: previous definition is here
struct timespec {
^
1 error generated.
In file included from ../src/util/disk_cache.c:50:
../src/util/disk_cache.h:86:4: error: use of undeclared identifier 'Dl_info'
Dl_info info;
^
...
./src/util/disk_cache.h:114:30: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
_mesa_sha1_update(ctx, build_id_data(note), build_id_length(note));
^~~~~~~~~~~~~~~~~~~
10 errors generated.
../src/intel/perf/intel_perf.c:91:10: error: call to undeclared function 'major'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
maj = major(sb.st_rdev);
^
../src/intel/perf/intel_perf.c:92:10: error: call to undeclared function 'minor'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
min = minor(sb.st_rdev);
^
2 errors generated.
../src/intel/vulkan/anv_allocator.c:295:13: error: call to undeclared function 'futex_wake'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
futex_wake(&table->state.end, INT_MAX);
^
...
../src/intel/vulkan/anv_allocator.c:711:7: error: call to undeclared function 'futex_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
futex_wait(&pool->block.end, block.end, NULL);
^
6 errors generated.
Cc: mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963>
(cherry picked from commit
520e79a3b5841db034d6d962870432d21fd0989c)
Eric Engestrom [Mon, 6 Nov 2023 09:37:38 +0000 (09:37 +0000)]
Daniel Stone [Fri, 3 Nov 2023 15:50:58 +0000 (15:50 +0000)]
ci: Try really hard to print final result string
a630 has been completing jobs, and then corrupting the very last line of
UART output - the one where we pass the overall result back from the DUT
to the job. The bare-metal monitor will wait for this line to appear,
never see it, and then the job times out.
Since this line is the most critical one of all to get out, just spam
the prints to try to make sure they get through.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26032>
(cherry picked from commit
80b87c18d1630dd622bf58e56f3fb3f39e9fb8ef)
Felix DeGrood [Tue, 31 Oct 2023 23:15:37 +0000 (23:15 +0000)]
anv: remove CS_FLUSH from query regression
Fixes performance regression introduced by prior refactoring of
pipe control code that unnecessarily added CS_FLUSH to query start
and end. Issue was diagnosed by Ben L (thank you!)
Confirmed this restores performance on:
* Borderlands3 +2%
* Payday +3%
* Factorio +3%
* HogwartsLegacy +4%
* Ghostrunner +7%
Fixes:
6dc95685 (convert genX_query pipe controls to use pc helper)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25983>
(cherry picked from commit
aa23120e4fc674d7da42c4895aa204f300155105)
José Expósito [Fri, 3 Nov 2023 13:15:06 +0000 (14:15 +0100)]
zink: Fix crash on zink_create_screen error path
The `zink_internal_create_screen()` function can fail before
`screen->loader_lib` and/or `screen->instance` are initialized.
The `zink_destroy_screen()` doesn't check those cases and crashes.
The error was found by Fedora's CI. The back trace is available at [1].
[1] https://bodhi.fedoraproject.org/updates/FEDORA-2023-
c39f82c465
Fixes:
0c2045553fe4 ("zink: use screen destructor for creation fails")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26029>
(cherry picked from commit
8a635e516ebb12411de8055c3405f36be43269b3)
Yonggang Luo [Wed, 1 Nov 2023 20:43:10 +0000 (04:43 +0800)]
nvk: Should use alignment instead of align
align is a function, don't know why align > 0 is working
Fixes:
87686a22205 ("nvk: Rework side-band data upload")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26035>
(cherry picked from commit
5e9dcffffde8b4ecf78531c0285a0d296e1fc7a9)
Eric Engestrom [Sat, 4 Nov 2023 14:16:31 +0000 (14:16 +0000)]
David Rosca [Thu, 2 Nov 2023 08:29:25 +0000 (09:29 +0100)]
frontends/va: Map decoder and postproc surfaces for reading
If application requests to map surface that was most recently used
as decoder or postproc target and also doesn't explicitly set the
map flags (vaMapBuffer2) it's very likely the intent is to read from
this surface, so we need to map it as such.
This fixes regression on radeonsi where mapping NV12 surfaces for
reading would fail with applications using vaDeriveImage. The reason
for this is that the VA frontend doesn't allow vaDeriveImage for
interlaced surfaces so the applications would use vaGetImage fallback,
but radeonsi doesn't allocate NV12 surfaces as interlaced anymore.
This also fixes mapping other formats surfaces (P010, RGBx, ...)
for reading, which never worked before.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9935
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10048
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26008>
(cherry picked from commit
c638e61ef5e2e7de097a9b5850eff75022330f68)
Rob Clark [Wed, 1 Nov 2023 16:42:21 +0000 (09:42 -0700)]
freedreno/drm: Fix race in zombie import
The check for the zombie case (racing with final unref of the bo vs
removal from table) must be atomic.
Fixes spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread
Fixes:
a192923f99e1 ("freedreno/drm: Restart import on zombie race")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25995>
(cherry picked from commit
6ac133c646dd4f6f9d8f644b24da6aeae95c1ce3)
antonino [Thu, 2 Nov 2023 17:03:41 +0000 (18:03 +0100)]
nir: don't take the derivative of the array index in `nir_lower_tex`
Previosuly when lowering to txd for sampler array the index would be
derived as well, therefore the resulting derivative would have been a
vec with one more component than what the txd instruction expects.
This patch truncates the coordinate vector in this case to make sure the
index is not derived.
Fixes:
b154a4154b4 ("nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26012>
(cherry picked from commit
4a627af0e3670d409d8140c1f9ee1c7ac86b5ddf)
Gert Wollny [Thu, 2 Nov 2023 20:39:42 +0000 (21:39 +0100)]
r600/sfn: Fixup component count only if intrinsic has it
Fixes: 33d878e
r600/sfn: Handle load_global in 64 to vec2 lowering
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
(cherry picked from commit
28b79b2ea5d13f2499d78f903a335383bb38e5c1)
Gert Wollny [Thu, 2 Nov 2023 20:24:17 +0000 (21:24 +0100)]
r600: Link with libgalliumvl, when enabling rusticl this is needed
Fixes:
33673bcc2ab84de0b1ff35519e7d7a58ef572fba
rusticl: stop linking with libgalliumvl
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
(cherry picked from commit
1662897294a3b6b0f8b6004163c016722c634651)
Karol Herbst [Thu, 2 Nov 2023 19:41:25 +0000 (20:41 +0100)]
nvc0: implement PIPE_CAP_TIMER_RESOLUTION
This allows rusticl to create profiling queues.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10042
Fixes:
660f2eabe11 ("gallium: add PIPE_CAP_TIMER_RESOLUTION")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26016>
(cherry picked from commit
7b419215048d63b33d3693206a7319d933c075d8)
Connor Abbott [Thu, 2 Nov 2023 17:29:31 +0000 (18:29 +0100)]
v3d/ci: Remove minetest trace
For the same reason as the previous commit. For examples of commits
causing spurious changes see
8019a1b9 and
d89ca14e.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25864>
(cherry picked from commit
2313a517d2ddb6395eab802949b2f8461397b1d0)
Connor Abbott [Tue, 24 Oct 2023 10:23:28 +0000 (12:23 +0200)]
freedreno/ci: Remove minetest trace
I've repeatedly seen minor pixel changes due to changes that only affect
RA decisions, most recently in !22072. We changed the trace to hopefully
remove a use of texture() in control flow, but it seems there are more,
or the problem is something slightly different like reading
uninitialized values. On the other hand minetest has never actually
caught an issue for me that some other trace hasn't also caught. Just
remove it.
Cc: mesa-stable
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25864>
(cherry picked from commit
16214710caaacf4fb8539498a3eb774644921249)
Faith Ekstrand [Wed, 19 Apr 2023 22:18:45 +0000 (17:18 -0500)]
nir: Handle wildcards with casts in copy_prop_vars
If we're propagating a copy from a cast where the copy copies an entire
array, we end up with something like &((S *)ssa_N)->f[*] in the source
where a wildcard has a cast in its parent chain. If we then try to
propagate the read into a non-wildcard array load, we have to specialize
the wildcard. This breaks because nir_build_deref_follower() doesn't
handle casts. Since we know a priori that, because wildcards are only
generated by copy_deref on arrays, we cannot have a cast with a wildcard
parent so simply chasing the source deref to the first wildcard will
ensure that any casts in the deref are handled properly.
Fixes:
ba2bd20f8732 ("nir: Rework opt_copy_prop_vars to use deref instructions")
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
(cherry picked from commit
15ab4d397fbd24ac09daab03cc9cd0b750dbace2)
Yiwei Zhang [Wed, 1 Nov 2023 08:14:00 +0000 (01:14 -0700)]
venus: fix query feedback batch leak and race upon submission
Summary:
- fixed the combined query batches leak
- fixed the race condition of accessing feedback cmd pool
- very scoped code refactor
Cc: 23.3 <mesa-stable>
Fixes:
5b24ab91e43 ("venus: switch to unconditionally deferred query feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25988>
(cherry picked from commit
ae3b022fa0568e048ce2013affbd2ca60cc42ec6)
Rob Clark [Thu, 2 Nov 2023 14:29:51 +0000 (07:29 -0700)]
tu/virtio: Fix timeline semaphore support
Fixes:
f17c5297d7a0 ("tu: Add virtgpu support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25981>
(cherry picked from commit
ceeab44fd1ff116b5a3906044fc33588b65dcbda)
Rob Clark [Thu, 2 Nov 2023 14:29:23 +0000 (07:29 -0700)]
tu/msm: Fix timeline semaphore support
Fixes:
daefc6e2a40b ("turnip: prep work for timeline semaphore support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25981>
(cherry picked from commit
79b907f9412971b8f6316e1de757a2c3cfdbc603)
Rhys Perry [Wed, 11 Oct 2023 13:46:20 +0000 (14:46 +0100)]
radv: skip radv_remove_varyings for mesh shaders
Fixes compilation of a Talos Principle 2 shader.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes:
9fa9782c1790 ("radv: stop compiling a noop FS when the application doesn't provide a FS")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25659>
(cherry picked from commit
0a418561dab43a41f21ab209367f88c2ed9eb4a5)
Rhys Perry [Wed, 11 Oct 2023 13:43:03 +0000 (14:43 +0100)]
radv: call lower_array_deref_of_vec before lower_io_arrays_to_elements
nir_lower_io_arrays_to_elements does not support array derefs of vectors,
even when nir_deref_instr_is_known_out_of_bounds is fixed.
They can occur with mesh shaders.
Found by inspection.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25659>
(cherry picked from commit
ed12be533e2673b08e958be32fbe5d6af2737fbc)
Faith Ekstrand [Wed, 1 Nov 2023 20:38:35 +0000 (15:38 -0500)]
nir: add deref follower builder for casts.
This fixes intel_clc builds with llvm 17 on gfx125_bvh_build_DFS_DFS
where it dies in the lower indirect derefs pass.
Co-authored-by: Dave Airlie <airlied@redhat.com>
Fixes:
4a4e1757381c ("nir: Support deref instructions in lower_var_copies")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25536>
(cherry picked from commit
6388896985da7495ad0968322491953894d29637)
Gert Wollny [Wed, 25 Oct 2023 20:30:37 +0000 (22:30 +0200)]
r600: Add callbacks for get_driver_uuid and get_device_uuid
v2: Evaluate driver ID dynamically (Adam Jackson)
v3: Align the stars (Triang3l)
v4: include "r600" in driver ID for UUID evaluation (Triang3l)
v5: remove unused local variable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10040
CC: mesa-stable
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25895>
(cherry picked from commit
3ab51c7ebd1e7a65bd928b6142423123c7552927)
LingMan [Sat, 4 Nov 2023 11:51:51 +0000 (12:51 +0100)]
rusticl: Show an error message if the version of bindgen can't be detected
bindgen 0.69.0 broke the `--version` switch, resulting in misleading errors about requiring at
least bindgen 0.62 or about unexpected arguments.
Ideally the build system would fetch the correct bindgen version automatically like cargo does.
Until then, provide a hopefully more helpful error message to the user.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26046>
(cherry picked from commit
1f1ec1c6bcc2a32a3c1df8c2cc7a2f4e7139b7ec)
LingMan [Tue, 24 Oct 2023 03:47:06 +0000 (05:47 +0200)]
rusticl: Show an error message if the build is attempted with an outdated bindgen version
Ideally the build system would fetch the correct bindgen version automatically like cargo does.
Until then, provide an error message that is hopefully more helpful than whatever cryptic error the
build runs into otherwise.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9457
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10029
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25859>
(cherry picked from commit
1cc26e8b6657b5097995470ced9ae9cc7b6f01b9)
Eric Engestrom [Sat, 4 Nov 2023 14:09:43 +0000 (14:09 +0000)]
Eric Engestrom [Wed, 1 Nov 2023 17:27:10 +0000 (17:27 +0000)]
VERSION: bump for 23.3.0-rc2
Samuel Pitoiset [Mon, 30 Oct 2023 13:04:38 +0000 (14:04 +0100)]
radv: emit COMPUTE_PIPELINESTAT_ENABLE for CS invocations on ACE
This register seems needed to enable compute shader shader invocations
on GFX7. On GFX8+ it's working fine without emitting this register but
I think it doesn't hurt.
This fixes dEQP-VK.query_pool.statistics_query.*_cq on GFX7.
Fixes:
a9945216ba2 ("radv: fix COMPUTE_SHADER_INVOCATIONS query on compute queue")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25957>
(cherry picked from commit
17daa08dff0cf9479b27ed7402de61336607ec10)
Samuel Pitoiset [Mon, 30 Oct 2023 11:50:56 +0000 (12:50 +0100)]
radv: fix compute shader invocations query on compute queue on GFX6
Looks like GFX6 always writes the number of compute shader invocations
at offset 0 when used on compute queue.
This fixes dEQP-VK.query_pool.statistics_query.*_cq on GFX6.
Fixes:
a9945216ba2 ("radv: fix COMPUTE_SHADER_INVOCATIONS query on compute queue")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25957>
(cherry picked from commit
9a0a77cb53d0d31c7a090d06ac905d69e9c1131c)
Eric Engestrom [Wed, 1 Nov 2023 14:52:52 +0000 (14:52 +0000)]
Samuel Pitoiset [Mon, 30 Oct 2023 14:26:15 +0000 (15:26 +0100)]
radv: bind the non-dynamic graphics state from the pipeline unconditionally
The following sequence is valid (although weird) but many other drivers
(including RADV) were broken:
- bind pipeline with some static state
- set state command for that static state (to a bad value)
- bind the same pipeline again
- draw
Fixes new dEQP-VK.dynamic_state.*.double_static_bind.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25954>
(cherry picked from commit
e4a1bc70dd739ca8addddc940af08312b038e288)
Karol Herbst [Fri, 27 Oct 2023 21:27:15 +0000 (23:27 +0200)]
rusticl/mesa/screen: do not derefence the entire pipe_screen struct
Apparently the dereferences made tsan report data races on the pipe_screen
object.
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25944>
(cherry picked from commit
f7830240acc43280154dacd0ab075dcaa0051da8)
Eric Engestrom [Wed, 1 Nov 2023 12:48:13 +0000 (12:48 +0000)]
Juston Li [Tue, 26 Sep 2023 23:36:58 +0000 (16:36 -0700)]
venus: switch to unconditionally deferred query feedback
All commands that make queries available have feedback cmds batched
and stored during recording. At submission time, for each batch
(SubmitInfo) these feedback cmds are recorded in a cmd buffer that is
appended after the last original cmd buffer (but before
semaphore/fence feedback).
Query reset cmds are deferred as well and also remove any prior feedback
cmds for queries its resetting within the batch.
Cc: 23.3 <mesa-stable>
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25413>
(cherry picked from commit
5b24ab91e43a54b4f4081db52ebf6653b97e72bb)
Juston Li [Tue, 26 Sep 2023 23:29:17 +0000 (16:29 -0700)]
venus: append query feedback at submission time
Cc: 23.3 <mesa-stable>
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25413>
(cherry picked from commit
7fbf608f2dac486b23030d3b48dd10bb453d9eb8)
Juston Li [Tue, 26 Sep 2023 23:04:18 +0000 (16:04 -0700)]
venus: track/recycle appended query feedback cmds
Link the query feedback cmd lifecycle to a cmd in the batch so that when
that last cmd gets reset/freed, we assert its safe to reset the query
feedback cmd. The cmd is then placed on the free list for reuse.
Some edge cases if the the last cmd is simultaneous or gets resubmitted.
Cc: 23.3 <mesa-stable>
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25413>
(cherry picked from commit
d2a626787e559dad9105243be9e5043c9230853c)
Juston Li [Tue, 26 Sep 2023 22:09:54 +0000 (15:09 -0700)]
venus: support deferred query feedback recording
Add function to alloc a cmd buffer and record all the deferred query
feedback cmds into it at submission time.
Cc: 23.3 <mesa-stable>
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25413>
(cherry picked from commit
6dcf033dc30e52c1557999bf7588cf0e1c5dcc8c)
Juston Li [Tue, 26 Sep 2023 22:34:56 +0000 (15:34 -0700)]
venus: refactor out common cmd feedback functions
defered query feedback cmds have similaries with timeline semaphore
feedback so refactor out some common functions for reuse
Cc: 23.3 <mesa-stable>
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25413>
(cherry picked from commit
99807b3db65e107fc35f9419979600fcec7b8230)
Juston Li [Tue, 26 Sep 2023 22:24:17 +0000 (15:24 -0700)]
venus: add helper function to get cmd handle
rename previous vn_get_cmd_handle as that was getting cmd
handles from the temp storage cmd_handle buffer.
Cc: 23.3 <mesa-stable>
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25413>
(cherry picked from commit
2ea6f935ce554c5a1666648a284406db8edc3cc7)
Lionel Landwerlin [Mon, 30 Oct 2023 15:57:32 +0000 (17:57 +0200)]
anv: fix corner case of mutable descriptor pool creation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
63e91148b7 ("anv: Enable VK_VALVE_mutable_descriptor_type")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10065
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25958>
(cherry picked from commit
cdca0b2ce4d603d4f5914d7a1e37923a6a959541)
Eric Engestrom [Tue, 31 Oct 2023 14:33:11 +0000 (14:33 +0000)]
Danylo Piliaiev [Thu, 26 Oct 2023 15:11:30 +0000 (17:11 +0200)]
tu: Fix reading of stale (V)PC_PRIMITIVE_CNTL_0
PC_PRIMITIVE_CNTL_0 is not set in a draw state and may be changed
by 3d blits, so we have to re-emit it a the start of a renderpass.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9941
Fixes:
7be8d0f7f490ea58c89798efca7e45b84dc395da
("tu: Use common dirty tracking for PC_PRIMITIVE_CNTL_0")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25918>
(cherry picked from commit
cdbb8b541266b1095c9565eef6d115adac73c1aa)
Samuel Pitoiset [Tue, 3 Oct 2023 15:34:06 +0000 (17:34 +0200)]
radv: fix a synchronization issue with primitives generated query on RDNA1-2
Only RDNA1-2 are affected because RADV needs to handle the legacy vs
NGG path for this query, and the NGG results are stored with 2 extra
64-bit values.
Fixes flakes with
dEQP-VK.transform_feedback.primitives_generated_query.* since VKCTS
1.3.7.0.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25862>
(cherry picked from commit
7d96fe853e1b007293054645caf54ade77a77c90)
Iago Toral Quiroga [Mon, 16 Oct 2023 14:38:31 +0000 (16:38 +0200)]
v3d,v3dv: fix MMU error from hardware prefetch after ldunifa
ldunifa works exactly the same as ldunif: the hw will prefetch the
next 4 bytes after a read, so if a buffer is exactly a multiple of
a page size and a shader uses ldunifa to read exactly the last 4 bytes
the prefetch will read out of bounds and spam the error on the kernel
log. Avoid that by allocating extra bytes in this scenario.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25752>
(cherry picked from commit
82bef62c17c79b298601fd565ce558c5282a88b7)
Karol Herbst [Fri, 27 Oct 2023 13:53:19 +0000 (15:53 +0200)]
zink: deallocate global_bindings array
Fixes:
a6e9e0f0d77 ("zink: add set_global_binding")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25937>
(cherry picked from commit
2f34a1db5883a2e5178371d8295f711bd754a1e1)
Karol Herbst [Wed, 25 Oct 2023 21:17:22 +0000 (23:17 +0200)]
rusticl/mesa: pass PIPE_BIND_LINEAR in resource_create_texture_from_user
Host pointer allocations are all linear laid out, so just tell the drivers
in case they don't assume this implicitly.
Fixes:
71a9af49107 ("rusticl/mem: support read/write/copy ops for images")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25937>
(cherry picked from commit
7f08036abc5dd361b2161660f2f7efce8df86056)
Marek Olšák [Fri, 20 Oct 2023 21:54:34 +0000 (17:54 -0400)]
radeonsi: initialize perfetto in the right place
Compute contexts don't execute the second half of the function.
Fixes:
a164e147e91 - radeonsi: Add perfetto support in radeonsi
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10043
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Tested-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25873>
(cherry picked from commit
276b9b13cf4d073c8a6faa18f41952d2f826679d)
Caio Oliveira [Thu, 26 Oct 2023 22:10:36 +0000 (15:10 -0700)]
anv: Fix leak when compiling internal kernels
Cc: mesa-stable
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25928>
(cherry picked from commit
9d73bfc9cdd127a52d07bf8b60e66c5a9495890e)
Mike Blumenkrantz [Thu, 26 Oct 2023 15:34:26 +0000 (11:34 -0400)]
zink: check for cbuf0 writes before setting A2C
VUID-vkCmdDrawMultiIndexedEXT-alphaToCoverageEnable-08919 requires
a cbuf0 write for A2C to be active
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25938>
(cherry picked from commit
736577871b939573af400e4e64ebfe18863d49af)
Mike Blumenkrantz [Thu, 26 Oct 2023 19:50:06 +0000 (15:50 -0400)]
radv: correctly return oom from the device when failing to create a cs
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25927>
(cherry picked from commit
c4283e32e3e8d96987358620aa43483a79eea08b)
Mike Blumenkrantz [Thu, 26 Oct 2023 20:22:27 +0000 (16:22 -0400)]
zink: add more locking for compute pipelines
if multiple contexts are accessing this all at once then this needs
more locking to avoid unsynchronized cache access
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25929>
(cherry picked from commit
f8909e7d55e86c7db55f4b9482f94c993f5e2529)
Karol Herbst [Thu, 26 Oct 2023 16:50:37 +0000 (18:50 +0200)]
rusticl/queue: Only take a weak ref to the last Event
This resolves a memory leak when the application drops its last reference
to the queue, but never waits explicitly.
The problem was, that the queue was refed by QueueState::last and that ref
only gets dropped on a blocking wait. This is problematic as non user
Event objects also hold a ref on the Queue they are created on, therefore
causing a cyclic ref relation.
In order to resolve it, just use a weak reference. A failure of upgrading
the Weak ref is not an issue as in this case we'd only wait on an already
destroyed or processed event. The worker thread already makes sure
everything stays in sync.
Fixes:
5b3ff7e3f3d ("rusticl/queue: overhaul of the queue+event handling")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25926>
(cherry picked from commit
9a3af6e1d8a88ff5c919d33966e97168fe780a86)
Karol Herbst [Sun, 22 Oct 2023 19:50:35 +0000 (21:50 +0200)]
radv: fix buffers in vkGetDescriptorEXT with size not aligned to 4
The range alignment didn't happen through GetDescriptorEXT as it called
write_buffer_descriptor directly. So simply move the align
from write_buffer_descriptor_impl into write_buffer_descriptor.
Fixes:
46e0c77582d ("radv: implement VK_EXT_descriptor_buffer")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25837>
(cherry picked from commit
1c619b668d69c66521d1da8edd97e518d6d61857)
Karol Herbst [Sun, 22 Oct 2023 14:49:42 +0000 (16:49 +0200)]
zink: lower fisnormal as it requires the Kernel Cap
I didn't check if it's a valid vulkan SPIR-V opcode and turns out it isn't
Fixes:
82eed326f47 ("zink: support more nir opcodes")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25837>
(cherry picked from commit
01b6ccccc6af3111da4466d083335ed5f0646a5e)
Karol Herbst [Mon, 23 Oct 2023 17:17:16 +0000 (19:17 +0200)]
rusticl/mem: properly set pipe_image_view::access
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25837>
(cherry picked from commit
abd8ef84ff4034a8f159f4743dc025dbfde8b837)
Karol Herbst [Tue, 24 Oct 2023 19:28:02 +0000 (21:28 +0200)]
rusticl/device: restrict param_max_size further
It's kinda pointless to have it too big, it also causes weird shaders to
be generated and causes stack overflows in `nir_opt_gcm`.
Nothing needs big values here anyway.
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25837>
(cherry picked from commit
694001eef70e220c709523cd71aad4b7b7c6c8db)
Karol Herbst [Sun, 22 Oct 2023 14:53:54 +0000 (16:53 +0200)]
rusticl/device: restrict image_buffer_size
It's pointless to advertise more than CL_DEVICE_MAX_MEM_ALLOC_SIZE and
also the CTS tests against this.
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25837>
(cherry picked from commit
9b6ac56d72d6d74cfe85ed9caff663f841dd6def)
Mike Blumenkrantz [Thu, 26 Oct 2023 16:36:14 +0000 (12:36 -0400)]
mesa/st/texture: match width+height for texture downloads of cube textures
some drivers require this
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25914>
(cherry picked from commit
ee1039877c14b9671e08342585bd0e2f4a6decb6)
Mike Blumenkrantz [Thu, 26 Oct 2023 16:05:16 +0000 (12:05 -0400)]
zink: unset explicit_xfb_buffer for non-xfb shaders
this catches duplicated xfb when generated geometry shaders are used
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25914>
(cherry picked from commit
df74ea771782966009def93339d0f4a1d94d12a1)
Mike Blumenkrantz [Thu, 26 Oct 2023 15:54:40 +0000 (11:54 -0400)]
aux/u_transfer_helper: set rendertarget bind for msaa staging resource
this matches other resources created with staging blit-like mechanics
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25914>
(cherry picked from commit
87e3720b66aeef08351dc578863360c587514d53)
Mike Blumenkrantz [Thu, 26 Oct 2023 15:33:47 +0000 (11:33 -0400)]
zink: only emit xfb execution mode for last vertex stage
this is otherwise illegal
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25914>
(cherry picked from commit
694ebe8c7228aa5a2c427cd33b0d6fdf3360174d)