Commit graph

14122 commits

Author SHA1 Message Date
Martin Roukala (né Peres)
81230513a8 radv/ci: add a vkd3d-tahiti job
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27844>
2024-02-28 17:54:47 +00:00
Samuel Pitoiset
778ef9b133 radv: move conditional rendering for compute in radv_cmd_state
Like other conditional rendering states.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27818>
2024-02-28 17:33:29 +00:00
Samuel Pitoiset
536c44d946 radv: fix conditional rendering with direct mesh+task draws and multiview
Having to compute the predication size manually is VERY prone to errors.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27818>
2024-02-28 17:33:29 +00:00
Samuel Pitoiset
ba7b7e2d3f radv: add missing RADV_DEBUG_NO_NGG_GS to the physical device cache key
This affects shaders and they need to be recompiled.

Fixes: 69d734a8d5 ("radv: add RADV_DEBUG=nongg_gs for GFX10/GFX10.3")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27820>
2024-02-28 17:07:26 +00:00
Samuel Pitoiset
b3064f9cf4 radv: clean up MAX_ALLOWED_TILES_IN_WAVE programming
To match RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27789>
2024-02-28 11:39:33 +00:00
Ruijing Dong
5663221bdb radeonsi/vcn: data structure av1 enc long term reference.
Here it borrowed the term "long term reference" to represent
the customized reference frame rather than the default ones used.

To enable that, it needs application to leverage VAAPI existing
interface to mark a frame as "long term reference", and then
it will be preserved in the DPB for later usage. This preserved
frame later could be refered to by having its signature used in
the ref_frame_idx[] list, and the index can be indicated by
RefFrameCtrl index2, which has not been used for other purpose.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27771>
2024-02-27 20:20:45 +00:00
Samuel Pitoiset
727170fee0 radv/ci: enable RADV_PERFTEST=shader_object for vkcts-tahiti-valve
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27812>
2024-02-27 14:28:54 +00:00
Martin Roukala (né Peres)
83efcd6a72 radv/ci: add a vkcts-tahiti job
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27812>
2024-02-27 14:28:54 +00:00
Samuel Pitoiset
450b375b69 radv: disable VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 with minmax filter on GFX6
This doesn't seem supported and introduced regressions on
Pitcairn/Tahiti, but it seems fine on Bonaire (GFX7).

Fixes: 926d9f1cef ("radv: support minmax filter for more formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27760>
2024-02-27 09:23:53 +01:00
Dave Airlie
d103b76ad6 radv/video: add VK_KHR_video_decode_av1 support.
This adds support for AV1 decode to radv, there are likely some
cleanups necessary.

Co-author: Charlie Turner <cturner@igalia.com>
(I wrote the initial mesa extension, and Charlie ported it to
the KHR extension and kept it up to date and fixed CTS things)

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 15:03:54 +10:00
Dave Airlie
7c0e0b7462 radv/video: use proper struct sizes for decoder structs.
This just cleans it up before av1 lands.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 15:00:52 +10:00
Dave Airlie
0466453d31 radv: rename it_ptr to it_probs_ptr in advance of adding av1
This is just a rename, just to make the name more meaningful.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 15:00:39 +10:00
Dave Airlie
d599391ac9 radv/video: use vcn ip version in more places.
This parallels changes made to the radeonsi code, but since we have uvd
in here as well we still use family in some places.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 14:59:42 +10:00
Dave Airlie
03f18be607 radv/video: fix filling out decode operations.
This just makes it consistent with the extension.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 14:59:42 +10:00
Samuel Pitoiset
4071c399a2 radv: compute the total LDS usage in gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
d85311b120 radv: compute NGG scratch LDS base in gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
0570d40d5b radv: determine NGG culling info before NGG info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
e3863a22bb radv: pass radv_shader_info to gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
4db0952639 radv: pass gfx10_ngg_info to gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
beb2e7df68 radv: determine NGG query info before linking shader info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
64f46c83a3 radv: use so.num_outputs to determine if NGG shaders need XFB queries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
7f8a84a024 radv: do not set gs.has_pipeline_stat_query twice for NGG GS
It's already initialized in gather_shader_info_gs().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
6c1e82e309 radv: remove unused parameter in gfx10_get_ngg_query_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Konstantin Seurer
d95c30b6ec ac/parese_ib: Handle more packets
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
ebbbca005e ac/parse_ib: Handle 32bit PKT3_DISPATCH_INDIRECT addrs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
fea21e5649 ac/parse_ib: Annotate addresses with UAF/OOB info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
badd2131b5 ac/parse_ib: Dump the ADDR field of PKT3_SET_BASE
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
160d18b273 ac/parse_ib: Add and use print_addr
Writes the whole address on one line.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Samuel Pitoiset
3004923ae3 radv: add support for conditional rendering on the compute queue with DGC
Conditional rendering is annoying to implement on ACE because there is
no predication packet like on GFX. With DGC it's even worse because
ACE is missing the IB2 packet which means it's not possible to predicate
the DGC IB entirely.

The provided solution is to always run the DGC prepare shader if
conditional rendering is enabled in order to generate a cmdbuf which
only contains NOPs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27673>
2024-02-22 17:32:58 +00:00
Samuel Pitoiset
f843027c22 radv: store/reset conditional rendering user info in the helpers
This also correctly initialize predication_op when the hw doesn't
support 32-bit predicate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27673>
2024-02-22 17:32:58 +00:00
Samuel Pitoiset
f9787864e0 radv: remove a TODO about adding mesh/task queries on GFX11
It's implemented and it's passing dEQP-VK.mesh_shader.ext.query.*.
Though, it's not enabled yet because task shader can still randomly
hang on RDNA3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
35e0c88f49 radv: add support for task shader invocations queries on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
b24e07e9ed radv: add support for mesh primitives queries on GFX11
This is natively supported with new pipeline statistics.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
4a6c18f503 radv: only enable emulated mesh/task shader invocations on GFX10.3
This shouldn't be enabled on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
c1418dcb3d radv: re-emit more states when a shader compiled separately is bound
Shader configs are combined and they need to be re-emitted. Doesn't
fix anything known but this was obviously incorrect.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
dc42ad4c6a radv: simplify emitting VGT_ESGS_RING_ITEMSIZE for ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
78be19fc72 radv: rename radv_emit_shaders() to radv_emit_graphics_shaders()
Also RADV_CMD_DIRTY_SHADERS to ~ADV_CMD_DIRTY_GRAPHICS_SHADERS for
consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
76ccf71587 radv: simplify binding the GS copy shader with ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
59b0f7b6b7 radv: free NIR shaders when creating linked shaders with ESO
This was leaking memory too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27715>
2024-02-22 07:48:02 +00:00
Samuel Pitoiset
77f036d574 radv: fix a big memleak with VK_EXT_shader_object
Shaders and binaries weren't freed at all!

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27715>
2024-02-22 07:48:02 +00:00
Samuel Pitoiset
e88a5842b2 radv: remove the union in radv_shader_object
It's actually more annoying to deal with.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27715>
2024-02-22 07:48:02 +00:00
Samuel Pitoiset
9ae8f0f9d7 radv: fix indirect dispatches on compute queue with conditional rendering on GFX7
COND_EXEC needs to happen right before PKT3_DISPATCH_INDIRECT.

Like this combination will probably never happen but better to have
it fixed anyways.

Fixes: 5c03cdbd02 ("radv: fix indirect dispatches on the compute queue on GFX7")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27655>
2024-02-22 07:23:43 +00:00
Samuel Pitoiset
776f4523f9 radv: fix binary shaders compatibility with ESO
RADV needs to assume that all features that affect shaders might be
enabled. Note that disable_trunc_coord is specific to DXVK and
mesh_shader_queries is still disabled by default.

This fixes dEQP-VK.shader_object.binary.device_features.* on GFX10+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
f123a04256 radv: introduce a per physical device cache key
This introduces a new level cache key for physical device. The main
motivation is for shader object because the Vulkan spec says:

"Guaranteed compatibility of shader binaries is expressed through a
 combination of the shaderBinaryUUID and shaderBinaryVersion members of
 the VkPhysicalDeviceShaderObjectPropertiesEXT structure queried from a
 physical device. Binary shaders retrieved from a physical device with
 a certain shaderBinaryUUID are guaranteed to be compatible with all
 other physical devices reporting the same shaderBinaryUUID and the
 same or higher shaderBinaryVersion."

Meaning that with ESO, the driver needs to compile shaders for the
worst case with every possible logical device features enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
c303d399ff radv: initialize disk cache slightly later when creating a physical device
This will allow us to use a per physical device cache key.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
0543394bfa radv: move mesh_fast_launch_2 to radv_physical_device
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Rhys Perry
d0595e4805 aco/ra: fix GFX9- writelane
061b8bfd29 moved handling of fixed operands earlier, but it should have
moved the fixing of writelane operands earlier too.

This fixes Crucible's func.uniform-subgroup.exclusive.imin64 on GFX8.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 061b8bfd29 ("aco/ra: rework fixed operands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27583>
2024-02-21 12:40:14 +00:00
Rhys Perry
53800191a3 aco/ra: don't initialize assigned in initializer list
According to Valgrind, vcc/m0 are uninitialized and this fixes it.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27583>
2024-02-21 12:40:14 +00:00
Samuel Pitoiset
a5bdc4b19a radv: fix a compilation warning in radv_bind_graphics_shaders()
../src/amd/vulkan/radv_cmd_buffer.c: In function ‘radv_bind_graphics_shaders’:
../src/amd/vulkan/radv_cmd_buffer.c:9366:65: warning: array subscript -1 is below array bounds of ‘struct radv_shader *[14]’ [-Warray-bounds=]
 9366 |    cmd_buffer->state.last_vgt_shader = cmd_buffer->state.shaders[last_vgt_api_stage];

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27670>
2024-02-20 08:47:18 +00:00
Samuel Pitoiset
2deaf632e2 radv: use radv_shader_info for computing NGG LDS layout
This should be similar.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00