Samuel Pitoiset
0fb21e2299
amd,radv: add ac_emit_cp_indirect_buffer()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:25 +00:00
Samuel Pitoiset
3efe8ec16b
radv/amdgpu: use common emit helpers in radv_amdgpu_cs_chain_dgc_ib()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:25 +00:00
Samuel Pitoiset
50ec03054c
amd,radv,radeonsi: add ac_pm4_emit_commands()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:24 +00:00
Samuel Pitoiset
22cb7b5fe2
radv: bump image limit properties on GFX12
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14150
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974 >
2025-10-23 07:56:39 +00:00
Samuel Pitoiset
002ebb4fe5
radv: configure the screen scissor to the maximum image dimension
...
The framebuffer dimension exposed to apps is still 16k but since the
driver allows 32k image on GFX12+, meta operations might perform
operations (like a copy) using graphics.
While we are at it, use the correct bitfield for setting BR_X/BR_Y on
GFX12.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974 >
2025-10-23 07:56:38 +00:00
Samuel Pitoiset
bcde1a6650
radv: initialize image properties earlier
...
This is less error prone and it removes redundant code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974 >
2025-10-23 07:56:37 +00:00
Samuel Pitoiset
3678437ca0
radv: bump maxImageDimension3D to 8192 on GFX10+
...
This was missing and it aligns to VkImageFormatProperties.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974 >
2025-10-23 07:56:36 +00:00
Samuel Pitoiset
5c71ffbc3d
radv: bump maxImageArrayLayers to 8192 on GFX10+
...
This was missing and it aligns to VkImageFormatProperties.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37974 >
2025-10-23 07:56:36 +00:00
Samuel Pitoiset
067b05d5b9
radv: remove radv_pipeline_layout::push_constant_size
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769 >
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
d15b411262
radv: remove radv_shader_layout::push_constant_size
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769 >
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
2985322ed1
radv: gather push constant size from shaders for pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769 >
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
97dbf7b895
radv/rt: radv: gather push constant size from shaders for RT
...
And store the total push constant size to the RT prolog.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769 >
2025-10-23 07:25:41 +00:00
Samuel Pitoiset
aa44a5a4ae
radv: gather push constant size from shaders for ESO
...
Instead of using the shader layout which won't exist anymore with heap.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37769 >
2025-10-23 07:25:41 +00:00
Mel Henning
fafb81cd02
treewide: Use vk_collect_dependency_info_src_stages
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37961 >
2025-10-22 19:22:17 +00:00
Benjamin Cheng
b6d6c1af73
radv/video_enc: Cleanup slice count assert
...
This was left over when first enabling multiple slice encoding.
Fixes: 63e952ff2c ("radv/video: Support encoding multiple slices")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37999 >
2025-10-22 14:31:45 +00:00
Eric Engestrom
4ab65cdaa4
docs: update/fix vk spec urls
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37993 >
2025-10-22 09:23:34 +02:00
Konstantin Seurer
d423554e9e
radv/bvh: Pair compress triangles in more cases
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965 >
2025-10-21 19:32:55 +00:00
Konstantin Seurer
c18a7d0e2b
radv: Emit compressed primitive nodes on GFX12
...
The normal encode pass writes batches to a section in build scratch
memory. Those batches contain information about the internal node and
the primitive nodes. The encoder is split to avoid the register
pressure of the compressor and maximize occupancy.
The compressor works in two passes because one pass can not guarantee
that every primitive node (except) has at least two triangles. This
guarantee is used to advertise a smaller acceleration structure size to
the application.
During compression, every invocation processes at most two triangles.
Groups of 8 invocations are used to support the maximum triangle count
of 16 that the hardware supports.
The first step of compression is loading the triangle(s). Shared
vertices are deduplicated early to avoid doing it in the compression
loop. The compression loop tries to add triangles to a list of triangles
until the computed node size needed for storing the triangles reaches
the hardware node size. For this, each invocation first deduplicates
vertices with the triangles that have already been picked. It then
computes the node size of the picked triangles plus the candidate
triangles of the current invocation. The invocation that computed the
smallest size is added to the list.
Because it may not be possible to fit every triangle into the same node,
there can be multiple hardware nodes which are written in parallel for
optimal performance. If there are no nodes with only one triangle, all
nodes are written. If there is, compression of the batch is aborted and
the index of the batch is written to build scratch memory. The second
compression pass will repeat the steps above but only for those aborted
batches. The nodes with only one triangle can and are now merged.
It can not be determined during box node encode which triangles will be
compressed together so the encoder also has to fix up the parent box
node's child infos.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965 >
2025-10-21 19:32:55 +00:00
Konstantin Seurer
c5f9fe5e3b
radv/rra/gfx12: Properly validate geometry indices
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965 >
2025-10-21 19:32:54 +00:00
Konstantin Seurer
2ee8bfefe6
radv/bvh: Add radv_first_active_invocation
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36965 >
2025-10-21 19:32:53 +00:00
Samuel Pitoiset
7cd12e5c6a
amd: move CP emit helpers to ac_cmdbuf_cp.c/h
...
Seems more organized this way.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
e0ffc41d9a
amd,radv: move SDMA utility helpers to common code
...
Only simple ones for now. Other functions need more rework.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
4989b6e6b9
amd,radv,radeonsi: add ac_emit_cp_write_data_{head}()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
1c3754a271
radv: use ac_emit_cp_copy_data() more
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
ed7f9df864
amd: add a predicate parameter to ac_emit_cp_copy_data()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
29c2d02d64
amd,radv,radeonsi: add ac_emit_cp_load_context_reg_index()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
c7c237dd27
amd,radv,radeonsi: add ac_emit_cp_nop()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:31:13 +02:00
Samuel Pitoiset
5801986f53
amd: add missing _cp_ to some emit helpers
...
Just for consistency with other helpers.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:30:34 +02:00
Samuel Pitoiset
a0117b5e74
amd,radv: add ac_emit_cp_atomic_mem()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:30:34 +02:00
Samuel Pitoiset
93f3b36b55
radv: use ac_emit_cp_copy_data() more for perfcounters
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881 >
2025-10-21 13:30:34 +02:00
Georg Lehmann
654bd74c60
treewide: use nir_store_global alias of nir_build_store_global
...
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959 >
2025-10-21 12:37:58 +02:00
Georg Lehmann
2306cba65b
nir: remove manual nir_store_global
...
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959 >
2025-10-21 12:37:58 +02:00
Georg Lehmann
9e41a7c139
treewide: use nir_load_global alias of nir_build_load_global
...
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959 >
2025-10-21 12:37:58 +02:00
Georg Lehmann
77540cac8c
nir: remove manual nir_load_global
...
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959 >
2025-10-21 12:37:58 +02:00
Samuel Pitoiset
9ebda88e34
radv: remove an obsolete comment about SMEM stores
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ACO doesn't use SMEM store instructions.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871 >
2025-10-21 07:03:11 +00:00
Samuel Pitoiset
63099554ac
radv: simplify L2 cache flushes on < GFX12
...
To be closer to RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871 >
2025-10-21 07:03:11 +00:00
Samuel Pitoiset
52e036fa9f
radv: remove useless parameter to gfx10_cs_emit_cache_flush()
...
gfx9_eop_bug_va is always 0 on GFX10+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871 >
2025-10-21 07:03:10 +00:00
Samuel Pitoiset
c8de5a7479
radv: pass int_sel to radv_cs_emit_write_event_eop()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871 >
2025-10-21 07:03:09 +00:00
Samuel Pitoiset
eb65d17e00
radv: simplify error handling when creating descriptor pools
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917 >
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
11daa11c4e
radv: use vk_zalloc2() for allocating the descriptor pool
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917 >
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
6106d9e818
radv: simplify allocating pool entries for descriptor sets
...
A complete new strategy allocation will be implemented on top of this.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917 >
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
d4cb7d160d
radv: add a small helper to destroy descriptor pool entries
...
No need to duplicate code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917 >
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
d29959f50d
radv: remove an useless check when destroying descriptor sets
...
There is already an assertion.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917 >
2025-10-21 06:43:28 +00:00
Benjamin Cheng
b1370e1935
radv/video: Fill maxCodedExtent caps first
...
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
Later code (i.e. max qp map extent filling) depends on this.
Fixes: ae6ea69c85 ("radv: Implement VK_KHR_video_encode_quantization_map")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37940 >
2025-10-17 17:58:08 +00:00
Josh Simmons
b10c1a1952
radv: Fix crash in sqtt due to uninitalized value
...
Fixes: 772b9ce411 ("radv: Remove qf from radv_spm/sqtt/perfcounter where applicable")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37900 >
2025-10-17 06:10:46 +00:00
Samuel Pitoiset
abcaa46f6c
amd,radv,radeonsi: add ac_cmdbuf_flush_vgt_streamout()
...
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/37870 >
2025-10-16 06:31:41 +00:00
Samuel Pitoiset
679332f9a9
amd,radv,radeonsi: add ac_emit_cp_acquire_mem()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870 >
2025-10-16 06:31:40 +00:00
Samuel Pitoiset
9ad7fb8569
amd,radv,radeonsi: add ac_emit_cp_gfx_scratch()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870 >
2025-10-16 06:31:40 +00:00
Samuel Pitoiset
9ff8e71b4e
amd,radv,radeonsi: add ac_emit_cp_tess_rings()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870 >
2025-10-16 06:31:39 +00:00
Samuel Pitoiset
47a64f5b6f
amd,radv,radeonsi: add ac_emit_cp_gfx11_ge_rings()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37870 >
2025-10-16 06:31:38 +00:00