Commit graph

211303 commits

Author SHA1 Message Date
Dave Airlie
a55c036450 radv: add support for coopmat2 flexible dimensions
This allows matricies that are multiples of a base size.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36544>
2025-08-25 18:55:08 +00:00
Dave Airlie
7a96a928a2 nir: add coop mat flexible dimensions lowering.
This adds a generic lowering pass for coop mat flexible dimensions.

This should be suitable for all drivers that implement coop mat2 flexible dimensions
or even just lowering sw exposed sizes to hw sizes.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36544>
2025-08-25 18:55:08 +00:00
Mike Blumenkrantz
39ffc3f629 zink: when sparse unbinding, always wait on main timeline semaphore
this ensures synchronization between gfx/compute work and the sparse queue

fixes KHR-GL46.sparse_buffer_tests.BufferStorageTest_cases_*. on turnip

cc: mesa-stable

Closes: #13747
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36954>
2025-08-25 14:35:25 -04:00
Mike Blumenkrantz
2cf626d17d zink: pass ctx to sparse bind functions
no functional changes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36954>
2025-08-25 14:35:25 -04:00
Mike Blumenkrantz
c9746103f5 zink: break out unflushed batch waiting into separate function/mechanism
this is useful on its own

no functional changes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36954>
2025-08-25 14:35:25 -04:00
Mike Blumenkrantz
483d53e0e3 zink: ALWAYS_INLINE resource inlines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36954>
2025-08-25 14:35:25 -04:00
Mike Blumenkrantz
f9bf524a6d zink: inline zink_resource_access_is_write()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36954>
2025-08-25 14:35:25 -04:00
Connor Abbott
bef37336fb vulkan/queue: Fix VkTimelineSemaphoreSubmitInfo sanitization
We're supposed to completely ignore VkTimelineSemaphoreSubmitInfo if
there aren't any timeline semaphores, including the array lengths, which
is made clear by the various VUs already cited by the code. The
vkQueueSubmit() path correctly handled this when asserting but still
dereferenced pWaitSemaphoreValues unconditionally, which could lead to
dereferencing an invalid pointer if waitSemaphoreValueCount is less than
waitSemaphoreCount. The vkQueueSparseBind() path didn't even assert
correctly. Bring vkQueueSparseBind() in line with vkQueueSubmit()
and make both only dereference the wait/signal array once we've
determined it must be present. While we're here, also fix the assert in
vkQueueSubmit() to disallow a waitSemaphoreValueCount of 0 if there are
timeline semaphores present, which conversely is not allowed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36989>
2025-08-25 17:57:47 +00:00
Sagar Ghuge
2cd564c1de anv: Add missing L3 flushes
We are reading out some of the parameters from IR data structure those
have been written previously, on some platforms L3 is not coherent, so
explicitly add those flushes.

Cc: mesa-stable
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/36952>
2025-08-25 17:36:08 +00:00
Sagar Ghuge
4473e21e2f anv: Enable CS stall for ACCELERATION_STRUCTURE_COPY stage
Cc: mesa-stable
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/36952>
2025-08-25 17:36:08 +00:00
Sagar Ghuge
75d770b4f8 anv: Add missing ACCELERATION_STRUCTURE_READ in barrier handling
Cc: mesa-stable
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/36952>
2025-08-25 17:36:08 +00:00
Jesse Natalie
fee83f4fcc d3d12: Move logicop descriptor initialization to after all blits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The blit code is destructive on the framebuffer state, which means
that it can set new render targets. If you have 2 BGRA surfaces bound
for logic ops, then after setting up the surface for the first one,
the blit for the second will end up destroying + re-creating the
surface for the first one.

Let's be robust to this by putting the blit in a first pass, and
then actually initializing all of the descriptors in a second pass.

This is still woefully inefficient but at least it's correct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36945>
2025-08-25 17:21:37 +00:00
Jesse Natalie
cd3885c592 d3d12: Move logicop emulation resource from surface to resource
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36945>
2025-08-25 17:21:37 +00:00
Jesse Natalie
784f93653a d3d12: Support more logic op formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36945>
2025-08-25 17:21:36 +00:00
Jesse Natalie
91c063493d d3d12: Stop using util_framebuffer_init
For https://gitlab.freedesktop.org/mesa/mesa/-/issues/13262

This just inlines the existing logic. A surface cache needs to be
introduced next.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36945>
2025-08-25 17:21:36 +00:00
Georg Lehmann
635ac758c9 aco/optimizer: don't create undef copies from p_create_vector
p_create_vector allows undef operands, p_parallelcopy doesn't.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13765
Fixes: 01d20680e2 ("aco/optimizer: generalize p_create_vector of split vector opt")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36963>
2025-08-25 16:47:38 +00:00
Georg Lehmann
8903bb4618 aco/optimizer: don't apply packed clamp to v_fma_mix
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13758
Fixes: 345bf8a2f2 ("aco/optimizer: remove label_vop3p")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36963>
2025-08-25 16:47:38 +00:00
Antonio Ospite
cde83062ad ci/android: enable cross-building nvk and panvk for Android
Enable cross-building nvk and panvk for Android to make it easier to
spot build regressions.

NOTE: nvk is built only for x86_64, and panvk is built only for aarch64.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:55 +00:00
Antonio Ospite
289913547c ci: bump DEBIAN_BUILD_TAG to include all the android/rust changes for nvk and panvk
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:55 +00:00
Antonio Ospite
ca0f0d7b95 meson: handle dep_libdrm before the driver specific libdrm modules
Handle dep_libdrm before the driver specific libdrm modules, this is for
when libdrm is built as a subproject, for example libdrm_amdgpu is only
available after dep_libdrm has been added.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:54 +00:00
Antonio Ospite
9d26eb9a2f subprojects: fix ignore exception for files under packagefiles/
Fix the rule about not ignoring files under subprojects/packagefiles/
which is not covering files in subdirectories of
subprojects/packagefiles

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:53 +00:00
Antonio Ospite
1dd1995388 nvk: silence error when cross-building for Android
When cross-building NVK for Android the compiler emits this error:

-----------------------------------------------------------------------
../src/nouveau/vulkan/nvk_image.c:1084:38: error: unused variable 'pdev' [-Werror,-Wunused-variable]
 1084 |    const struct nvk_physical_device *pdev = nvk_device_physical(dev);
      |                                      ^~~~
1 error generated.
-----------------------------------------------------------------------

Mark the variable definition as UNUSED to silence the error.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:53 +00:00
Antonio Ospite
5ae3343590 ci/android: add comment about updating tags to create-android-cross-file.sh
Add a comment about updating tags in .gitlab-ci/image-tags.yml to the
.gitlab-ci/container/create-android-cross-file.sh as it is not immediate
that it gets called from .gitlab-ci/container/debian/android_build.sh
which also requires to update DEBIAN_BUILD_TAG.

Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:53 +00:00
Antonio Ospite
3cd4cc7d07 ci/android: add rust compiler to create-android-cross-file.sh
Add rust compiler definitions to the create-android-cross-file.sh file
to be able to cross-build drivers that use Rust code.

This is inspired by the changes in commit 2f5db959a7 ("docs/android:
update cross file and add nvk instructions", 2025-08-01)

Also add rust and bindgen to the debian/android_build container.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:53 +00:00
David Rosca
fbbb5d15f0 ci: Add missing rust subprojects to meson/build.sh
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:52 +00:00
Mike Blumenkrantz
dfab0e952b zink: sprinkle in a bunch of MESA_TRACE_FUNC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36984>
2025-08-25 15:34:20 +00:00
Eric Engestrom
9d0203bace ci/piglit: automatically use baremetal proxy
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36955>
2025-08-25 14:52:38 +00:00
Eric Engestrom
fa74e939bf ci/piglit: automatically use LAVA proxy
This avoids having to hardcode the proxy in the traces `download-url` or
jobs setting `PIGLIT_REPLAY_EXTRA_ARGS` and accidentally overriding the
default args when the author meant to append.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36955>
2025-08-25 14:52:38 +00:00
Eric Engestrom
b4e49664f4 vmware/ci: fix caching proxy url
FDO_HTTP_CACHE_URI is not defined, but LAVA_HTTP_CACHE_URI is and is the
right URL for this.

This job is currently disabled, but fix it in preparation for when
someone eventually brings it back.

Note that this line also has another bug that will be addressed by the
next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36955>
2025-08-25 14:52:37 +00:00
Eric Engestrom
2851a305fd virgl/ci: drop invalid but overridden empty caching proxy
The variable is undefined, leading to an empty proxy being set, but
luckily it's actually overridden back to the default args, so this was
just dead code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36955>
2025-08-25 14:52:37 +00:00
Erik Faye-Lund
af203146f2 panvk: properly handle errors from utrace_context_init
Without this, I get failures in the following CTS test:
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Fixes: 05006c21dd ("panvk/utrace: Alloc utrace copy buf from userspace heap")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36980>
2025-08-25 14:15:57 +00:00
David Rosca
e1fcc403d4 radeonsi/vcn: Fix HEVC encode transform_skip with old FW
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36845>
2025-08-25 13:55:40 +00:00
David Rosca
26fc4798c1 radeonsi/vcn: Fix HEVC encode cu_qp_delta with old FW
VCN2 needs interface version bump to enable it.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36845>
2025-08-25 13:55:39 +00:00
David Rosca
e945bb3649 radeonsi/vcn: Fix compatibility with old FW for encode
The interface version can't be higher than the FW version, otherwise
FW will reject all encode jobs.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36845>
2025-08-25 13:55:39 +00:00
David Rosca
51d5c0d537 radeonsi/vcn: Disable H264/5 constrained intra pred with rate control
There is a FW issue when using constrained intra prediction with rate
control enabled, causing unexpected quality degradation.
Disable it until FW fix is available.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36837>
2025-08-25 13:34:00 +00:00
Eric Engestrom
5cde06b7b1 ci-tron: drop meaningless timestamp in initial section message
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36903>
2025-08-25 12:46:54 +00:00
Martin Roukala (né Peres)
78de1e93ee ci/ci-tron: uprev the job submission template
This brings some nice log readability improvements which were asked by
various developers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36903>
2025-08-25 12:46:54 +00:00
Samuel Pitoiset
102892a458 radv: clear RADV_CMD_DIRTY_xxx bits outside of the caller in most cases
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Prevent risks if an early return is added at some point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:39 +00:00
Samuel Pitoiset
3ecf9a17f8 radv: stop abusing dirty_dynamic when binding a NULL fragment shader
RADV_DYNAMIC_RASTERIZATION_SAMPLES triggers the following states:
- FS (not needed when FS is NULL)
- MSAA (already triggered)
- BINNING (use radv_get_ps_iter_samples() on GFX9)
- OCCLUSION_QUERY (doesn't use the PS)
- DB_SHADER_CONTROL (already triggered)
- RAST_SAMPLES (use radv_get_ps_iter_samples())
- NGGC (doesn't use the PS)

So this can be simplified to BINNING (gfx9) | RAST_SAMPLES.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:38 +00:00
Samuel Pitoiset
19c712c8ef radv: rename rast_prim to vgt_outprim_type everywhere
To avoid confusion between the primitive topology and the output
rasterized primitive.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:38 +00:00
Samuel Pitoiset
5dec043cee radv: dirty the rast samples state when VRS is forced to 1x1
Only these two states use force_sample_iter_shading_rate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:37 +00:00
Samuel Pitoiset
8120d14ee0 radv: dirty RADV_CMD_DIRTY_xx states when binding sample shading state
This reduces the number of states that are re-emitted but the logic
is mostly duplicated because sample shading can be set from the
fragment shader or the graphics pipeline. Could be refactored
eventually.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:34 +00:00
Samuel Pitoiset
4afff72e91 radv: dirty the rast sample states for VRS att/OOO rast
These fields are only used by radv_emit_rast_samples_state().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:32 +00:00
Samuel Pitoiset
4dd05c9a91 radv: remove dead code when setting dynamic primitive topology
This is already handled slightly above in the same function. Also
state->dirty isn't for RADV_DYNAMIC_xxx and there is no corresponding
RADV_CMD_DIRTY_xxx either.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:31 +00:00
Samuel Pitoiset
dbcc9aa942 radv: remove radv_cmd_buffer_flush_dynamic_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:31 +00:00
Samuel Pitoiset
12f8508363 radv: add a new dirty bit for the VGT prim state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:31 +00:00
Samuel Pitoiset
4096009ea1 radv: add a new dirty bit for the patch control points state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:30 +00:00
Samuel Pitoiset
0c3680bea3 radv: add a new dirty bit for the tess domain origin state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912>
2025-08-25 12:17:29 +00:00
Boris Brezillon
d0126f5ced panvk: Fix disjoint image memory binding
Right now, we store the last VkDeviceMemory object bound to an image in
panvk_image::mem, but this doesn't work for disjoint images where the mem
object can differ on each plane.

Move panvk_image::mem to panvk_image_plane::mem and prefix the offset
field with mem_, so it's clear the offset refers to the mem object.

Note this should only fix host copy on disjoint images, since the GPU
address was already properly set at bind time.

Fixes: 1cd61ee948 ("panvk: implement VK_EXT_host_image_copy for linear color images")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36926>
2025-08-25 11:46:48 +00:00
Yiwei Zhang
5349537cb3 meson/android: amend the condition for libbacktrace
libbacktrace compatibility has been dropped since Android 14, so the
current flags and deps shall be kept behind api level < 34.

Meanwhile, its successor, libunwindstack, has been available since
Android 11 (api level 31). So one can hook that up if needed.

Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36961>
2025-08-25 10:47:19 +00:00