Commit graph

210391 commits

Author SHA1 Message Date
Samuel Pitoiset
9e0991eff5 radv: stop using the pipeline layout completely for DGC
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Uses the push constant size computed from shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36793>
2025-08-18 10:28:09 +02:00
Samuel Pitoiset
f229e9cb51 radv: gather push constant size from shaders for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36793>
2025-08-18 10:28:09 +02:00
Samuel Pitoiset
01c72a2539 radv: add a function to get push constant layout info for DGC
Instead of duplicating the same code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36793>
2025-08-18 10:28:09 +02:00
Samuel Pitoiset
d9281f1fb1 radv: determine the push constant size from the shader itself
To stop relying on the pipeline layout when possible.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36793>
2025-08-18 10:28:09 +02:00
Christoph Pillmayer
992fbee7be panvk: Fix preserved metadata in lower_input_attachment_load
lower_input_attachment_load inserts control flow so we should not claim
we preserve nir_metadata_control_flow.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36789>
2025-08-18 07:46:34 +00:00
Samuel Pitoiset
ce83800262 radv: remove unused forwarded declarations of pipeline layout
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:34 +00:00
Samuel Pitoiset
282186d4aa radv: add a function that uploads push constants
Similar to indirect descriptor sets logic.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:34 +00:00
Samuel Pitoiset
4e8728c4f6 radv: rework emitting push constants for less CPU overhead
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:34 +00:00
Samuel Pitoiset
81ec36edb8 radv: determine if push constants need to be uploaded earlier
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:34 +00:00
Samuel Pitoiset
47fd1803b2 radv: use radv_shader_need_indirect_descriptor_sets() more
While we are at it, move it to the appropriate header file.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:33 +00:00
Samuel Pitoiset
8f0ff009c0 radv: do not emit inlined SGPRs twice for merged shaders
This is wasteful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:33 +00:00
Samuel Pitoiset
4bd0bf7e19 radv: invalidating push constants for compute<->rt during dispatches
It's similar but a bit cleaner.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:32 +00:00
Samuel Pitoiset
104510aeb6 radv: slightly optimize indirect descriptor sets upload size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:32 +00:00
Samuel Pitoiset
fd5925868f radv: tidy up radv_flush_descriptors()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36792>
2025-08-18 07:25:31 +00:00
Yiwei Zhang
94fdc5bc47 venus: use VK_USE_PLATFORM_ANDROID_KHR when applicable
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
To stay consistent with common code gen:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36702

Besides using the spec platform guard, this change also:
- drops the guard for ANB sharedImage
- keep the gettid and disk cache guards as they are

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36802>
2025-08-18 02:36:12 +00:00
Yiwei Zhang
69de00efe2 meson/android: drop redundant libdisplay-info dep
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's only used by common wsi, but not Android.

Fixes: 2c870bbe20 ("build: Add dependency on libdisplay-info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36795>
2025-08-17 14:40:36 +00:00
Martin Roukala (né Peres)
81a79234d8 radv/ci: disable hang detection in navi31-vkcts
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This has caused at least 2 unrelated MRs to fail a merge, so the
expectation that the GPU would not hang is clearly wrong and needs to
be updated.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36804>
2025-08-17 13:36:33 +03:00
Emma Anholt
a5d514c5f3 tu: Move the BO implicit sync flag handling to a BO allocation flag.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This lets us set NO_IMPLICIT per bo for non-implicit-sync BOs (which gets
checked when we're submitting with an implicit sync BO present).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19309>
2025-08-16 22:26:41 +00:00
Emma Anholt
4dcf32c56e wsi/drm: Don't request implicit sync if we're doing implicit sync ourselves.
This will avoid kernel overhead on tu (implicit syncs every BO) and radv
(implicit syncs the swapchain BOs) for doing implicit synchronization on
non-explicit-sync WSI backends (old X11 and Wayland, KHR_display without
!36591, and headless).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19309>
2025-08-16 22:26:41 +00:00
Emma Anholt
8f67d59725 wsi/drm: Do the dma_buf_semaphore setup at swapchain creation time.
Less work at present time, and will let us make decisions about implicit
sync up front.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19309>
2025-08-16 22:26:41 +00:00
Emma Anholt
a377d32fdc vulkan/wsi: Add a test for kernel 6.0 sync file import/export ioctls.
We'll use this in DRM WSI to decide if we need the implicit_sync flag on
swapchain image creation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19309>
2025-08-16 22:26:40 +00:00
Emma Anholt
61fb238a4d vulkan/wsi: Add comments about the WSI's syncing, and KHR_display stuff.
I have spent so long orienting myself in this code, more than once, that
it's time to leave some clues for next time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19309>
2025-08-16 22:26:40 +00:00
Emma Anholt
071a7e5f8f tu: Disable LRZ writes after most stencil-write operations.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
As explained in the comment, stencil can have a similar dependency on
later LRZ writes to how blending does.  Fixes
dEQP-VK.imageless_framebuffer.depth_stencil with TU_DEBUG=gmem,forcebin
(so you get LRZ filled during binning of the single draw call that
happened)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13533
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36660>
2025-08-16 21:56:30 +00:00
Yiwei Zhang
07cee75c39 venus: layer vkQueueSubmit2 over vkQueueSubmit w/o sync2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This helps with common wsi code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36799>
2025-08-16 19:14:17 +00:00
Faith Ekstrand
1b2acf9006 vulkan: Drop implicit sync support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This gets rid of the internal wsi_memory_signal_submit_info structure
used to indicate implicit sync through vkQueueSubmit() as well as the
handling in vk_queue.c and vk_device::create_sync_for_memory.  Nothing
is using any of this anymore.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
16520cfdf1 vulkan/wsi: Stop setting wsi_memory_signal_submit_info
There are no longer any drivers implementing the back-end hooks for this
so there's no point in setting it from WSI.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
9cf6f14b88 vulkan/wsi: Drop signal_fence/semaphore_with_memory
Intel was the only drivers setting this and how they don't so we can get
rid of the flag and the associated code.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
334466d907 dozen: Drop dzn_create_sync_for_memory()
It creates a dymmy sync so there's no point.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
7b945df668 hasvk: Dead code anv_bo_sync
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
9944be0be9 hasvk/wsi: Stop requesting signal_*_with_memory
Now that we require the dma-buf sync file import/export path, these
legacy paths should never be invoked so we can stop requesting them.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
9cf4872475 hasvk: Require Linux 6.0 for dma-buf sync file import/export
This also implies all the other syncobj features we care about so those
become dead code.  We'll delete them in following commits.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:47 -04:00
Faith Ekstrand
5f7c6b2810 hasvk: Require HAS_EXEC_TIMELINE_FENCES
i915 has had support for timeline syncobjs for a long time.  We might as
well require it at this point.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
3ec62d3a09 hasvk: Require HAS_EXEC_CAPTURE
This feature is almost as old as the Vulkan driver itself.  We've
required newer kernels for a long time.  There's no point in having this
feature bit kicking around.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
5802d2c090 hasvk: Require HAS_EXEC_ASYNC
This feature is as old as the Vulkan driver itself.  We've required
newer kernels for a long time.  There's no point in having this feature
bit kicking around.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
57aceb96aa anv: Dead code anv_bo_sync
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
7ebe93aa9f anv/wsi: Stop requesting signal_*_with_memory
Now that we require the dma-buf sync file import/export path, these
legacy paths should never be invoked so we can stop requesting them.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
affee04bd9 anv: Require Linux 6.0 for dma-buf sync file import/export
This also implies all the other syncobj features we care about so those
become dead code.  We'll delete them in following commits.

We don't need a check for Xe because the Xe driver was merged into Linux
6.8 while dma-buf sync file import/export landed in 6.0.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
d7416ebc19 intel/gem: Add an intel_gem_supports_dma_buf_sync_file() helper
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
8044f16bd6 anv/i915: Require HAS_EXEC_TIMELINE_FENCES
i915 has had support for timeline syncobjs for a long time.  We might as
well require it at this point.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
cb5a2eafd5 anv/i915: Require HAS_EXEC_CAPTURE
This feature is almost as old as the Vulkan driver itself.  We've
required newer kernels for a long time.  There's no point in having this
feature bit kicking around.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
f28eb1bae6 anv/i915: Require HAS_EXEC_ASYNC
This feature is as old as the Vulkan driver itself.  We've required
newer kernels for a long time.  There's no point in having this feature
bit kicking around.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Faith Ekstrand
94931fd4f4 anv: Set the Shader capability when compiling the FP64 shader
Otherwise the SPIR-V parser prints a warning the first time the driver
is loaded after a fresh compile.

Fixes: 91b62e9868 ("anv: Use spirv_capabilities for the float64 shader")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
2025-08-16 00:04:46 -04:00
Yiwei Zhang
403a62a9e5 venus: stop consuming wsi_memory_signal_submit_info
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Dropped in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36800>
2025-08-15 20:32:24 -07:00
Konstantin Seurer
cc0dc4b566 radv: Store parent node IDs inside nodes on GFX12
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Saves some space.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36691>
2025-08-15 13:00:32 +00:00
Georg Lehmann
8c20947f69 amd/ci: update checksums for restricted traces
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35970 seems to have
caused tiny differences for one pixel in each of the traces.
Kind of unexpected, but not exactly concerning either.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36784>
2025-08-15 11:34:56 +00:00
Konstantin Seurer
0d73aeea27 radv: Add RADV_DEBUG=validatevas for address validation in nir
The option creates a buffer where each bit stores whether the
corresponding 4096 byte memory section has been allocated. The helper
radv_build_is_valid_va allows for querying the validity of addresses
inside a nir shader which can be useful for debugging.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34392>
2025-08-15 10:32:35 +00:00
Konstantin Seurer
be4be884e1 radv: Rename radv_printf files to radv_debug_nir
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34392>
2025-08-15 10:32:34 +00:00
Yonggang Luo
fcab92d557 util: Now DETECT_ARCH_X86_64 can be safely used in rounding.h
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36744>
2025-08-15 09:27:19 +00:00
Yonggang Luo
219905aec7 util: Add DETECT_ARCH_ARM64EC for defined(_M_ARM64EC) equivalent
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36744>
2025-08-15 09:27:19 +00:00
Yonggang Luo
9beb0e90b4 util: Update DETECT_ARCH_X86_64 to exclude _M_ARM64EC
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36744>
2025-08-15 09:27:19 +00:00