Samuel Pitoiset
aa709ca32c
radv/meta: convert the blit2d GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
8a104de180
radv/meta: convert the resolve GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
bc5c37fef8
radv/meta: convert the clear GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
64676f52b2
radv/meta: convert the blit GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
b3c587e429
radv/meta: convert the fast-clear GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
015e3e34a7
radv/meta: convert the HW resolve GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
e33f6b6394
radv/meta: convert the HTILE expand GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
37116720a8
radv/meta: convert the compute resolve pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
ab019f14b2
radv/meta: convert the clear image pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
db40e4a78d
radv/meta: convert the image-to-image pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
0c21ebbc89
radv/meta: convert the buffer-to-image pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
8396bf9d64
radv/meta: convert the image-to-buffer pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
f63ced7ff2
radv/meta: convert the query resolve pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
1a34e799bd
radv/meta: convert DGC pipeline layout to vk_meta
...
DGC pipelines aren't using the vk_meta helper because that would
require to compute a separate key and that's useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
27adadbe63
radv/meta: convert the DCC comp-to-single pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
23d2d76ab7
radv/meta: convert the clear HTILE mask pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
c6804016d0
radv/meta: convert the DCC decompress CS pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
a0c05dd7b5
radv/meta: convert the HTILE expand CS pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
3ff28c8f98
radv/meta: convert the DCC retile pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
4521eb1b2b
radv/meta: convert the FMASK copy pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
a3aeeab434
radv/meta: convert the FMASK expand pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
f27bee04ce
radv/meta: convert the copy VRS to HTILE pipelines to vk_meta
...
This pipeline was already always on-demand.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
88ffeb61ae
radv/meta: convert the copy/fill pipelines to vk_meta
...
This also switches these pipelines to on-demand always.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744 >
2024-12-29 18:31:49 +00:00
Samuel Pitoiset
1b68a92c59
radv: dump address binding report with RADV_DEBUG=hang
...
This contains much more info than the BO history from the winsys and
it will be helpful for debugging.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403 >
2024-12-03 08:13:13 +00:00
Connor Abbott
f8b584d6a5
vulkan/runtime,radv: Add shared BVH building framework
...
This is mostly adapted from radv's BVH building. This defines a common
"IR" for BVH trees, two algorithms for constructing it, and a callback
that the driver implements for encoding. The framework takes care of
parallelizing the different passes, so the driver just has to split the
encoding process into "stages" and implement just one part for each
stage.
The runtime changes are:
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
The radv changes are;
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433 >
2024-12-01 16:08:06 +00:00
Samuel Pitoiset
4308668a25
radv: allow shaders caching with RADV_DEBUG=hang and the trap handler
...
When debugging a game that compiles a ton of shaders at beginning, it
can be very very slow because shaders cache was disabled by default
with RADV_DEBUG=hang.
To make debugging such a game faster, let's cache shaders with
RADV_DEBUG=hang. Note that only the backend IR (ACO or LLVM) and the
disassembly are stored in the cache. To get SPIR-V and NIR, you might
need RADV_DEBUG=hang,nocache.
This also handles the trap handler.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32246 >
2024-11-27 08:04:59 +00:00
Samuel Pitoiset
9f8684359f
radv: implement VK_EXT_device_generated_commands
...
The major differences compared to the NV extensions are:
- support for the sequence index as push constants
- support for draw with count tokens (note that DrawID is zero for
normal draws)
- support for raytracing
- support for IES (only compute is supported for now)
- improved preprocessing support with the state command buffer param
The NV DGC extensions were only enabled for vkd3d-proton and it will
maintain both paths for a while, so they can be replaced by the EXT.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31383 >
2024-10-28 16:27:35 +00:00
Samuel Pitoiset
0ae880c08c
Revert "radv: implement 2D views of 3D images using 2D_ARRAY descriptors on GFX9+"
...
Using view3dAs2dArray changes the tiling and it's slower (-7.5% in
Silent Hill 2 Remake) than using 3D tiling. The previous implementation
was the best one regarding performance (it's also what RadeonSI does).
Sadly it seems that sampler2DViewOf3D can't really be supported without
that but nobody really needs it apparently.
Also view3dAs2array is incompatible for 2D views of sparse 3D images
because sparse 3D images requires 3D tiling.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11997
This reverts commit f5805bcb8e .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31869 >
2024-10-28 12:47:38 +00:00
Samuel Pitoiset
2e66ab265d
radv: squash radv_get_memory_fd() with radv_GetMemoryFdKHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31539 >
2024-10-07 11:42:37 +00:00
Samuel Pitoiset
f5805bcb8e
radv: implement 2D views of 3D images using 2D_ARRAY descriptors on GFX9+
...
This also allows us to disable a workaround in ACO for GFX9, but it
can't be removed completely because RadeonSI needs to use it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385 >
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
32a4c9e117
radv: disable the in-memory cache when disableInternalCache is true
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812 >
2024-09-10 08:19:52 +00:00
Mike Blumenkrantz
cd7ad7bd7e
vk: rename DGC feature to DGC-NV
...
this is an NV extension, so it should have NV suffix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31015 >
2024-09-04 12:27:21 +00:00
Samuel Pitoiset
c7540d3fd6
radv: prepare for specialized DGC shaders
...
The DGC prepare shader is getting crazy and it takes a non-trivial
amount of time. Using specialized DGC shaders is cleaner and it's
faster than a pile of conditional SALU instructions.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852 >
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
7a5b40a2ff
radv: cleanup robustness with vk_pipeline_robustness_state_fill()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643 >
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
5361a50d54
radv/meta: stop creating similar pipeline layouts for depth decompress
...
Only the pipeline depends on the number of samples.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262 >
2024-07-19 14:53:44 +00:00
Samuel Pitoiset
9c1fa23adf
radv/meta: remove the depth resummarize operation
...
This has never been used and if we need at some point, we can just
re-introduce it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233 >
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
a9f4931a91
ac,radv,radeonsi: a function that sets mutable CB surface fields
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29378 >
2024-05-28 08:49:53 +00:00
Samuel Pitoiset
07c6fdb878
radv: use the common helper for initializing CB surfaces
...
This adds GFX12 support implicitly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29342 >
2024-05-27 17:04:26 +02:00
Samuel Pitoiset
ed30b320c8
radv: use the common helper for initializing DS surfaces
...
This adds GFX12 support implicitly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29329 >
2024-05-23 15:47:14 +00:00
Samuel Pitoiset
e9a390cb94
radv: replace db_{z,stencil}_{read,write}_base by db_{depth,stencil}_base
...
Both read/write register values are similar.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29329 >
2024-05-23 15:47:14 +00:00
Samuel Pitoiset
50ef8600bc
radv: pass radv_physical_device to radv_emit_default_sample_locations()
...
To emit PA_SC_CENTROID_0 which changed on GFX12.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29215 >
2024-05-17 08:04:02 +00:00
Konstantin
2b2f67aa2b
radv: Use a struct for the trace_bo layout
...
Now we can use the members on the CPU side and offsetof on the GPU side
instead of magic offsets.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28838 >
2024-04-25 10:20:03 +00:00
Samuel Pitoiset
095e3af2b0
radv: add RADV_DEBUG=psocachestats to report per-pipeline cache hits/misses
...
This can be useful to make sure precompilation works as expected.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829 >
2024-04-22 13:54:05 +00:00
Samuel Pitoiset
f6d9772010
radv: determine if the cache is disabled at device creation time
...
It's a cleanup but also for future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:37 +00:00
Chia-I Wu
18e6bb322e
radv: fix 2d/3d image copy on compute queue
...
build_nir_itoi_compute_shader did not handle copies between 2D and 3D
images.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28605 >
2024-04-09 18:15:41 +00:00
Samuel Pitoiset
87fde606cf
radv: use SPDX-License-Identifier
...
Only files under src/amd/vulkan/** are concerned.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28599 >
2024-04-08 07:17:31 +00:00
Samuel Pitoiset
a29fda1ba0
radv: move radv_printf_data to radv_printf.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
e133fb7c3b
radv: move code related to sample positions to radv_device.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551 >
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
150ce13273
radv: add radv_device.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526 >
2024-04-03 13:32:54 +00:00