Samuel Pitoiset
49128926d6
radv: implement new input attachment information for dynamic rendering
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043 >
2025-10-31 07:51:21 +00:00
Samuel Pitoiset
18fec61c8d
radv: reverse the logic for NO_CONCURRENT_WRITES_BITS_MESA
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38043 >
2025-10-31 07:51:21 +00:00
Samuel Pitoiset
bddd7919d3
amd,radv,radeonsi: add ac_buffered_sh_regs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38000 >
2025-10-27 08:30:02 +00:00
Samuel Pitoiset
91bd46d34e
amd,radv,radeonsi: add ac_{gfx11_reg_pair,gfx12_reg}
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38000 >
2025-10-27 08:30:01 +00:00
Samuel Pitoiset
a47952d495
radv: upload and emit dynamic descriptors separately from push constants
...
Dynamic descriptors are rarely used and this will allow to do more
optimizations for push constants, like gathering the size from shaders
themselves instead of using the pipeline layout.
fossils-db (GFX1201):
Totals from 21740 (27.30% of 79646) affected shaders:
Instrs: 11186407 -> 11192061 (+0.05%); split: -0.05%, +0.10%
CodeSize: 59842068 -> 59864412 (+0.04%); split: -0.04%, +0.08%
Latency: 56333136 -> 56325208 (-0.01%); split: -0.03%, +0.02%
InvThroughput: 8576452 -> 8576516 (+0.00%); split: -0.00%, +0.00%
SClause: 279186 -> 279713 (+0.19%); split: -0.06%, +0.25%
Copies: 577854 -> 581735 (+0.67%); split: -0.28%, +0.95%
PreSGPRs: 867163 -> 866409 (-0.09%)
SALU: 1391187 -> 1395055 (+0.28%); split: -0.12%, +0.39%
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37768 >
2025-10-14 15:34:43 +00:00
Timur Kristóf
a0104c5bf6
radv: Add amd_ip_type to radv_cmd_stream
...
Specify an amd_ip_type when initializing radv_cmd_stream
so that we know which packets are valid for the HW IP type
of a given command stream.
This field should be used instead of radv_cmd_buffer::qf when
emitting packets to a command stream.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37775 >
2025-10-14 12:33:13 +00:00
Samuel Pitoiset
34b3dae3b6
radv: make radv_descriptor_get_va() a static function
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37786 >
2025-10-10 13:22:05 +00:00
Samuel Pitoiset
609ae4e647
radv: rename indirect_descriptor_sets to indirect_descriptors
...
With descriptor heap the driver will also have to emit indirect
descriptor heaps in some cases.
Rename couple of things to make them more generic.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37786 >
2025-10-10 13:22:03 +00:00
Samuel Pitoiset
902f5a8618
radv: replace radeon_cmdbuf by ac_cmdbuf completely
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36292 >
2025-10-08 18:00:15 +00:00
Samuel Pitoiset
c8245173a0
radv: pre-compute the line rasterization mode
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36988 >
2025-09-15 19:10:39 +00:00
Samuel Pitoiset
469350328c
radv: pre-compute the number of rasterization samples
...
The number of rasterization samples depend on many various states.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36988 >
2025-09-15 19:10:38 +00:00
Samuel Pitoiset
8233d9d571
radv: rename RADV_CMD_DIRTY_FS_STATE to RADV_CMD_DIRTY_PS_STATE
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's called PS everywhere else.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37087 >
2025-09-05 10:16:20 +00:00
Samuel Pitoiset
f180682441
radv: add a new dirty bit for emitting a PS epilog
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37087 >
2025-09-05 10:16:19 +00:00
Samuel Pitoiset
211e0823ec
radv: add a new dirty bit for compiling/binding a PS epilog
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37087 >
2025-09-05 10:16:18 +00:00
Samuel Pitoiset
11e5f86a94
radv: add a function to bind a PS epilog
...
The idea would be to separate compiling and emitting PS epilog in
two separate states.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37087 >
2025-09-05 10:16:17 +00:00
Samuel Pitoiset
478cbb6113
radv: remove set but unused has_nggc in radv_cmd_state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37120 >
2025-09-02 06:18:05 +00:00
Mike Blumenkrantz
213a63f236
radv: ALWAYS_INLINE radv_upload_graphics_shader_descriptors and relateds
...
Reduce the CPU overhead of these functions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37022 >
2025-09-01 08:53:02 +00:00
Samuel Pitoiset
1cbb9dc846
radv: rename DIRTY_PATCH_CONTROL_POINTS_STATE to DIRTY_LS_HS_CONFIG
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37022 >
2025-09-01 08:53:00 +00:00
Samuel Pitoiset
47d2af814f
radv: pre-compute tessellation num patches/lds size earlier
...
This will also pre-compute when the state is static but I think it's
less error prone like this and also more consistent.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37022 >
2025-09-01 08:52:59 +00:00
Samuel Pitoiset
93d3427543
radv: emit BREAK_BATCH when the PS changes also for ESO
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37022 >
2025-09-01 08:52:58 +00:00
Samuel Pitoiset
12d618ef64
radv: split RADV_CMD_DIRTY_NGGC_STATE in two states
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37022 >
2025-09-01 08:52:55 +00:00
Samuel Pitoiset
d29087d353
radv: use the dynamic state to store vertex input state
...
This is also a dynamic state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37025 >
2025-08-28 17:46:26 +00:00
Samuel Pitoiset
3eed98d122
radv: move VBO misaligned/unaligned info to radv_vertex_input_state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37025 >
2025-08-28 17:46:25 +00:00
Samuel Pitoiset
9a5c540b75
radv: use the dynamic state to store vertex binding strides
...
This is a dynamic state. This also replaces the stride by a 16-bit
value because it's required to not exceed
VkPhysicalDeviceLimits::maxVertexInputBindingStride which is defined
to 2048.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37025 >
2025-08-28 17:46:24 +00:00
Samuel Pitoiset
a3f9d85270
radv: add a new state for forced VRS rates
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37005 >
2025-08-27 06:19:14 +00:00
Samuel Pitoiset
19c712c8ef
radv: rename rast_prim to vgt_outprim_type everywhere
...
To avoid confusion between the primitive topology and the output
rasterized primitive.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912 >
2025-08-25 12:17:38 +00:00
Samuel Pitoiset
12f8508363
radv: add a new dirty bit for the VGT prim state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912 >
2025-08-25 12:17:31 +00:00
Samuel Pitoiset
4096009ea1
radv: add a new dirty bit for the patch control points state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912 >
2025-08-25 12:17:30 +00:00
Samuel Pitoiset
0c3680bea3
radv: add a new dirty bit for the tess domain origin state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36912 >
2025-08-25 12:17:29 +00:00
Samuel Pitoiset
db298d1b50
radv: make radv_cmd_state::dirty a 64-bit field
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
More RADV_CMD_DIRTY states will be added later.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901 >
2025-08-22 08:12:05 +00:00
Samuel Pitoiset
772f185fc0
radv: add a new dirty bit for the scissor state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901 >
2025-08-22 08:12:05 +00:00
Samuel Pitoiset
54b79d0f50
radv: add a new dirty bit for the sample locations state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901 >
2025-08-22 08:12:04 +00:00
Samuel Pitoiset
dc3371332e
radv: add a new dirty bit for the blend constants state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901 >
2025-08-22 08:12:04 +00:00
Samuel Pitoiset
1be9cd43a8
radv: add a new dirty bit for the VS prolog state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901 >
2025-08-22 08:12:03 +00:00
Samuel Pitoiset
7694ad969e
radv: add a new dirty bit for the depth bias state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901 >
2025-08-22 08:12:00 +00:00
Samuel Pitoiset
cbe42a4c43
radv: rename RADV_CMD_DIRTY_TESS_STATE to RADV_CMD_DIRTY_TCS_TES_STATE
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875 >
2025-08-21 18:36:35 +00:00
Samuel Pitoiset
3d1efbce98
radv: add a new dirty bit for the rast samples state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875 >
2025-08-21 18:36:35 +00:00
Samuel Pitoiset
ea6cb5e7bf
radv: add a new dirty bit for the FSR state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875 >
2025-08-21 18:36:35 +00:00
Samuel Pitoiset
604296a282
radv: add a new dirty bit for the ngg culling state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875 >
2025-08-21 18:36:34 +00:00
Samuel Pitoiset
5db8a16053
radv: add a new dirty bit for the binning state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875 >
2025-08-21 18:36:32 +00:00
Samuel Pitoiset
5024c02d45
radv: precompute the depth clip enable
...
This should avoid re-emitting some states if it doesn't actually change.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36852 >
2025-08-21 08:23:04 +00:00
Samuel Pitoiset
2b5844df0e
radv: precompute the depth clamp mode
...
This should avoid re-emitting the state if it doesn't actually change.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36852 >
2025-08-21 08:23:04 +00:00
Samuel Pitoiset
413f781234
radv: add a new dirty bit for the viewport state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36852 >
2025-08-21 08:23:03 +00:00
Samuel Pitoiset
95d2f009a9
radv: emit compute pipeline with buffered SH regs on GFX12
...
This also includes RT, task shaders and DGC IES for compute.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36570 >
2025-08-19 18:01:21 +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
e6c485afb0
radv: initialize HiZ metadata during image layout transitions
...
This will allow us to enable HiZ for all levels of the image.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739 >
2025-08-12 13:48:10 +00:00
Faith Ekstrand
22a1f34728
radv: Delete radv_video_session_params
...
It was just a dummy wrapper around the runtime struct. We do, however,
have to keep at least the Create/Update entrypoints because RADV has to
do some patching for video encode. Since we're keeping Create, we keep
Destroy as well.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646 >
2025-08-11 20:34:56 +00:00
Samuel Pitoiset
a520f75229
radv: move tracked registers to radv_cmd_stream
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314 >
2025-08-08 11:49:24 +00:00
Samuel Pitoiset
e2def79e2a
radv: move context_roll_without_scissor_emitted to radv_cmd_stream
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314 >
2025-08-08 11:49:24 +00:00
Samuel Pitoiset
cc85f33b57
radv: move buffered registers for GFX12 to radv_cmd_stream
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314 >
2025-08-08 11:49:23 +00:00