Samuel Pitoiset
00afc4e353
radv: advertise Vulkan 1.4 on GFX8+
...
GFX6-7 can't support Vulkan 1.4 because indexTypeUint8 isn't supported
in hardware, and emulating features for very old hardware isn't the
option I would personally choose.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
db61d45b94
radv: add new Vulkan 1.4 features/properties
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
75691dd59c
radv: promote VK_EXT_pipeline_robustness to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
7892e8600b
radv: promote VK_KHR_shader_subgroup_rotate to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
8c2ff0a80b
radv: promote VK_KHR_push_descriptor to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
e20d5173fd
radv: promote VK_KHR_map_memory2 to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
5b9ebe331c
radv: promote VK_KHR_maintenance6 to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
54cd43f93e
radv: promote VK_KHR_maintenance5 to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
81798d9ebe
radv: promote VK_KHR_line_rasterization to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
5917f70a6e
radv: promote VK_KHR_index_type_uint8 to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
64101baecf
radv: promote VK_KHR_global_priority to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:54 +00:00
Samuel Pitoiset
ac26c5af52
radv: promote VK_KHR_dynamic_rendering_local_read to core 1.4 API
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432 >
2024-12-03 10:21:54 +00:00
Samuel Pitoiset
3d804851be
radv: try to detect use-after-free with address binding report
...
This performs some very basic verifications with the faulty VA we get
from the kernel. This will probably be improved over time.
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
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
Samuel Pitoiset
1ae6fcfbaf
radv: add a small helper to dump VM fault with the GPU hang report
...
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
Samuel Pitoiset
f8af89aaa0
radv: add address binding report support for BOs imported with a ptr
...
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
Samuel Pitoiset
723cbc95d8
radv: add address binding report support for BOs imported with a fd
...
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
Faith Ekstrand
2fae75b278
treewide: Stop putting enum in front of Vulkan enum types
...
The Vulkan headers add typedefs to fix aliasing issues whenever a type
gets renamed. However, C doesn't allow "enum typedef" so this doesn't
work if people stick the "enum" keyword in front.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433 >
2024-12-02 17:22:49 +00:00
David Rosca
308bae950f
ac/surface: Add RADEON_SURF_VIDEO_REFERENCE
...
Select supported swizzle mode for VCN DPB surfaces.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303 >
2024-12-02 13:48:22 +00:00
Rhys Perry
fd19ff0b9e
aco: force linear for event_vmem_sample and event_vmem_bvh
...
I don't know if this issue affects GFX12, but workaround it anyway to be
safe.
fossil-db (gfx1200):
Totals from 3463 (4.36% of 79395) affected shaders:
Instrs: 9794280 -> 9833253 (+0.40%); split: -0.00%, +0.40%
CodeSize: 52306040 -> 52457988 (+0.29%); split: -0.01%, +0.30%
Latency: 90549385 -> 93617517 (+3.39%); split: -0.00%, +3.39%
InvThroughput: 13189030 -> 13602942 (+3.14%); split: -0.00%, +3.14%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32373 >
2024-12-02 10:13:39 +00:00
Rhys Perry
86c63b29bc
aco/gfx12: insert wait between VMEM WaW
...
https://github.com/llvm/llvm-project/pull/105549
fossil-db (gfx1200):
Totals from 1783 (2.25% of 79395) affected shaders:
Instrs: 7398391 -> 7404566 (+0.08%); split: -0.00%, +0.08%
CodeSize: 38862456 -> 38886364 (+0.06%); split: -0.00%, +0.06%
Latency: 83191513 -> 84211504 (+1.23%); split: -0.00%, +1.23%
InvThroughput: 15185936 -> 15345744 (+1.05%); split: -0.01%, +1.06%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32373 >
2024-12-02 10:13:39 +00:00
Benjamin Cheng
e9d9c67eab
radv/video: enable by default on vcn2/3 with latest fw
...
The latest FW in the linux-firmware repo provides the required features
to pass all the CTS tests.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32407 >
2024-12-02 08:30:08 +00:00
David Rosca
76e3004fef
radv/video: Always use setup reference slot when valid
...
Reviewed-by: Benjamin Cheng <ben@bcheng.me >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10977
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414 >
2024-12-02 06:26:34 +00:00
David Rosca
ef6facac15
radv/video: Fix IB signature checksum
...
Reviewed-by: Benjamin Cheng <ben@bcheng.me >
Fixes: 152b06acd8 ("ac/vcn: allow sq signature package to be skipped")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414 >
2024-12-02 06:26:34 +00:00
Connor Abbott
8fe3674df8
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 20:08:35 +01: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
Arseny Kapoulkine
6a3944a195
radv: On GFX11, use box sorting heuristic based on ray flags
...
Use box with largest ray interval for shadow rays (terminate on first
hit) as it maximizes the probability of finding some object in that box;
for reflection (closest hit) rays, use midpoint instead, which defers
processing of larger boxes the ray origin is in in favor of smaller
boxes closer to origin.
Since the sorting mode must be uniform, when terminate_on_first_hit flag
is divergent, we leave it as closest.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32416 >
2024-12-01 05:20:58 +00:00
Hans-Kristian Arntzen
6370acbead
radv: Add sparse mappings to radv_check_va.py.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146 >
2024-11-29 12:57:42 +00:00
Hans-Kristian Arntzen
cb15b34295
radv/winsys: Report VA mappings in bo_log too.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146 >
2024-11-29 12:57:42 +00:00
Benjamin Cheng
323b59a5b5
radv/video: support event for pre-VCN4 decode queues
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400 >
2024-11-29 10:03:48 +10:00
Benjamin Cheng
1689d88e4a
radv/video: support event for pre-VCN4 encode queues
...
Prior to VCN4, the encode queue is separate from the decode queue. For
encode, the WRITE_MEMORY command can be executed with similar framing as
for VCN4, but notably there is no signature support, so it must be
skipped.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400 >
2024-11-29 10:02:14 +10:00
Benjamin Cheng
152b06acd8
ac/vcn: allow sq signature package to be skipped
...
This is preparing for radv event support on pre-VCN4 encode queues.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400 >
2024-11-29 10:01:49 +10:00
Timur Kristóf
2089bf7b57
radv: Use default 0 for undefined builtin PS inputs.
...
The previous code not only left them undefined, but also
didn't increment the array index, so subsequent PS inputs
would be broken after the undefined one.
Note that this doesn't affect any valid Vulkan apps, but it makes
the code a bit simpler and it makes undefined inputs a little more
forgiving, at no expense for valid PS.
This code actually uncovers a bug in Zink, so I'm also documenting
the failing Zink test case.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.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/32220 >
2024-11-28 18:14:57 +00:00
Timur Kristóf
b0b1a07193
radv: Remove now unused num_prim_interp from shader_info.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.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/32220 >
2024-11-28 18:14:57 +00:00
Timur Kristóf
12b9b461e5
radv: Emit SPI_PS_IN_CONTROL when emitting PS inputs on GFX10.3.
...
GFX10.3 keeps track of per-vertex and per-primitive PS inputs
separately in NUM_INTERP / NUM_PRIM_INTERP,
which we only really know when emitting the inputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.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/32220 >
2024-11-28 18:14:57 +00:00
Timur Kristóf
e2b8c4a9ac
radv, aco: Consolidate num_interp + num_prim_interp into num_inputs.
...
num_inputs contains the total number of FS inputs.
Note that this also fixes a bug where some calculations in RADV
and ACO were missing the per-primitive attributes from the LDS
usage of PS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.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/32220 >
2024-11-28 18:14:57 +00:00
Timur Kristóf
e5a9ae912b
radv: Slightly simplify potentially per-primitive FS inputs.
...
Add export_prim_id_per_primitive for mesh shaders.
This prepares to also configure some of these to be per-primitive
in the future, even in the traditional pipeline.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.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/32220 >
2024-11-28 18:14:56 +00:00
Timur Kristóf
930243bf36
radv: Reorder potentially per-primitive FS builtins.
...
There are some FS built-ins that can be per-vertex or
per-primitive depending on whether a mesh shader is used:
primitive ID (implicit in VS), layer and viewport.
However, the HW requires per-primitive FS inputs to be ordered last.
This causes bugs when the same unlinked FS is used together
with VS/TES/GS and MS (with unlinked ESO or fast-linked GPL).
To solve this problem, we reorder the FS inputs so that these
potentially per-primitive inputs go after per-vertex inputs but
before per-primitive inputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.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/32220 >
2024-11-28 18:14:56 +00:00
Rhys Perry
4c3809e7fc
aco: use small_vec in RegCounterMap
...
This seems to be a little faster.
insert_NOPs (navi31):
Difference at 95.0% confidence
-11.484 +/- 6.13377
-1.62767% +/- 0.860593%
(Student's t, pooled s = 5.71913)
insert_NOPs (gfx1200):
Difference at 95.0% confidence
-35.6745 +/- 4.97972
-8.1236% +/- 1.10453%
(Student's t, pooled s = 4.6431)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32374 >
2024-11-28 17:07:34 +00:00
Rhys Perry
7a500c8b22
aco: make small_vec copyable
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32374 >
2024-11-28 17:07:34 +00:00
David Rosca
489ba819b0
radeonsi/vcn: Support tiling for JPEG decode
...
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32301 >
2024-11-28 08:52:37 +00:00
Samuel Pitoiset
9bae92f659
radv: add support for capturing RGP per-submit
...
This is pretty basic but it can be enabled with MESA_VK_TRACE=rgp and
MESA_VK_TRACE_PER_SUBMIT=1.
Can be useful for compte-only workloads.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12202
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370 >
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
f3272f0044
radv: add new start/stop sqtt helpers for capturing with SQTT
...
They will be also used for per-submit captures.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370 >
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
df52c70b8a
radv: finish tools after cleaning meta resources
...
Otherwise, the number of registered RGP pipelines could be non-zero
and this will assert.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370 >
2024-11-28 07:03:21 +00:00
Eric Engestrom
a37d5dcd63
radv/ci: use deqp-vk-main in radv jobs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168 >
2024-11-27 20:38:05 +00:00
Pierre-Eric Pelloux-Prayer
272addc672
ac/nir: remove prim_stride_ret arg from ngg_build_streamout_buffer_info
...
This is not used outside of this function, so declare it as a local
variable instead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281 >
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
9f4ab06842
glx: return BadMatch for invalid reset notification strategy
...
The specification doesn't say which error should be reported, but
piglit expects BadMatch:
/* The GLX_ARB_create_context_robustness spec does not say what error
* code should be generated. However, similar cases (e.g., valid GL
* versions) specify BadMatch. This is also the behavior of NVIDIA's
* closed-source driver.
*/
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281 >
2024-11-27 19:00:20 +00:00
Georg Lehmann
fd669fa69d
aco/optimizer: label fcanonicalize like a copy if there is nothing to flush
...
Allows copy propagation into non alu instructions like phis.
Foz-DB Navi21:
Totals from 138 (0.17% of 79395) affected shaders:
Instrs: 308135 -> 307792 (-0.11%); split: -0.12%, +0.01%
CodeSize: 1567924 -> 1566484 (-0.09%); split: -0.10%, +0.01%
VGPRs: 9696 -> 9720 (+0.25%)
Latency: 1162719 -> 1161663 (-0.09%); split: -0.10%, +0.00%
InvThroughput: 256944 -> 256590 (-0.14%); split: -0.15%, +0.01%
VClause: 5631 -> 5626 (-0.09%); split: -0.14%, +0.05%
Copies: 29962 -> 30028 (+0.22%); split: -0.10%, +0.32%
Branches: 8241 -> 8237 (-0.05%)
PreVGPRs: 7800 -> 7797 (-0.04%)
VALU: 216243 -> 215898 (-0.16%); split: -0.17%, +0.01%
SALU: 30768 -> 30767 (-0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32355 >
2024-11-27 15:14:31 +00:00
Konstantin
8197d744f5
radv: Do not overwrite VRS rates when doing fast clears
...
Fixes a whole bunch of VRS tests on navi24.
cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318 >
2024-11-27 14:45:31 +00:00
Konstantin
1a3f6c586c
radv/printf: Guard against helper invocations
...
Helper invocations can allocate printf buffer space but they do not
write any data which can cause crashes in radv_dump_printf_data.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318 >
2024-11-27 14:45:31 +00:00