Samuel Pitoiset
8e03f7a8b8
radv: add radv_cmd_set_cull_mode()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:18 +00:00
Samuel Pitoiset
4663628258
radv: add radv_cmd_set_line_stipple()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:18 +00:00
Samuel Pitoiset
7cef87c57b
radv: add radv_cmd_set_depth_bias()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:17 +00:00
Samuel Pitoiset
b6105f3b5d
radv: add radv_cmd_set_primitive_restart_enable()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:17 +00:00
Samuel Pitoiset
8296373e78
radv: add radv_cmd_set_depth_clip_negative_one_to_one()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:17 +00:00
Samuel Pitoiset
2ed84bbe35
radv: add radv_cmd_set_depth_clamp_range()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:16 +00:00
Samuel Pitoiset
cd91d2f4ab
radv: add radv_cmd_set_patch_control_points()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:16 +00:00
Samuel Pitoiset
97597f65bf
radv: add radv_cmd_set_tessellation_domain_origin()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:15 +00:00
Samuel Pitoiset
091f8d53cb
radv: add radv_cmd_set_line_width()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36979 >
2025-08-27 09:22:15 +00:00
Georg Lehmann
8a5178755e
radv: reorder cmat properties according to performance
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On GFX12, int8 is twice as fast as fp16/bf16.
On GFX11, they have the same throughput, but int8 at least still uses
less registers.
Also reorder 16bit accumulators before 32bit, because they use less
registers on GFX12.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37002 >
2025-08-27 08:20:47 +00:00
Georg Lehmann
5a10142a9f
radv/nir/lower_cmat: split up larger nested switches
...
This has been annoying me for quite some while, the level of indention
makes reviewing code changes in Gitlab harder.
I think now is a good time to change this before more cmat lowering is added.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37002 >
2025-08-27 08:20:47 +00:00
Samuel Pitoiset
47cca88f3c
radv: check flush_bits before calling radv_emit_cache_flush() in the draw path
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is also faster.
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
5aba130eab
radv: check if SQTT is enabled before calling radv_describe_draw()
...
This is faster.
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
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
6d1e7c2ddf
radv: clear descriptors state dirty bit outside of the caller
...
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:13 +00:00
Samuel Pitoiset
9b912f00c7
radv: handle fbfetch output after binding graphics shaders
...
uses_fbfetch_output might be updated when a fragment shader is bound.
This would only affect ESO and I'm not sure it's possible though.
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:13 +00:00
Samuel Pitoiset
664c9697aa
radv: clear RADV_CMD_DIRTY_xxx bits outside of the caller in more cases
...
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:13 +00:00
Autumn Ashton
8e1734d2f2
radv: Allow MUTABLE_FORMAT and EXTENDED_USAGE for qp_map images
...
Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36943 >
2025-08-26 23:19:58 +00:00
Autumn Ashton
f4597930ef
radv: Support VK_IMAGE_TILING_OPTIMAL for quantization maps
...
Saw this when implementing something else, that I could just add the handling here to radv_choose_tiling in order to expose OPTIMAL.
Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36943 >
2025-08-26 23:19:58 +00:00
Samuel Pitoiset
b9221c7c89
radv: advertise VK_KHR_shader_untyped_pointers
...
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/36677 >
2025-08-26 13:47:08 +00:00
Samuel Pitoiset
c5a5c8818c
radv/nir/lower_cmat: handle untyped pointers for load/store
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36677 >
2025-08-26 13:47:07 +00:00
Samuel Pitoiset
f08ad89e44
radv: run nir_opt_memcpy before nir_opt_copy_prop_vars
...
Because nir_opt_copy_prop_vars doesn't handle casts well with
nir_intrinsic_memcpy_deref.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36677 >
2025-08-26 13:47:07 +00:00
Samuel Pitoiset
bfd84562a0
radv: run nir_lower_memcpy after spirv->nir
...
To make sure all memcpy are lowered correctly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36677 >
2025-08-26 13:47:07 +00:00
Samuel Pitoiset
944e26eae7
radv: fix hashing graphics pipeline when no stages are compiled
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's possible with GPL.
This fixes a NULL pointer dereference with updated pipeline binaries
tests in VKCTS.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36999 >
2025-08-26 07:37:40 +00:00
Dave Airlie
a6e0cbd110
radv: consolidate cooperative matrix array sizes enumeration
...
Share the code between khr and nv paths to not have to recreate it.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36544 >
2025-08-25 18:55:08 +00:00
Dave Airlie
a55c036450
radv: add support for coopmat2 flexible dimensions
...
This allows matricies that are multiples of a base size.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36544 >
2025-08-25 18:55:08 +00:00
Samuel Pitoiset
102892a458
radv: clear RADV_CMD_DIRTY_xxx bits outside of the caller in most cases
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Prevent risks if an early return is added at some point.
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:39 +00:00
Samuel Pitoiset
3ecf9a17f8
radv: stop abusing dirty_dynamic when binding a NULL fragment shader
...
RADV_DYNAMIC_RASTERIZATION_SAMPLES triggers the following states:
- FS (not needed when FS is NULL)
- MSAA (already triggered)
- BINNING (use radv_get_ps_iter_samples() on GFX9)
- OCCLUSION_QUERY (doesn't use the PS)
- DB_SHADER_CONTROL (already triggered)
- RAST_SAMPLES (use radv_get_ps_iter_samples())
- NGGC (doesn't use the PS)
So this can be simplified to BINNING (gfx9) | RAST_SAMPLES.
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
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
5dec043cee
radv: dirty the rast samples state when VRS is forced to 1x1
...
Only these two states use force_sample_iter_shading_rate.
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:37 +00:00
Samuel Pitoiset
8120d14ee0
radv: dirty RADV_CMD_DIRTY_xx states when binding sample shading state
...
This reduces the number of states that are re-emitted but the logic
is mostly duplicated because sample shading can be set from the
fragment shader or the graphics pipeline. Could be refactored
eventually.
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:34 +00:00
Samuel Pitoiset
4afff72e91
radv: dirty the rast sample states for VRS att/OOO rast
...
These fields are only used by radv_emit_rast_samples_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:32 +00:00
Samuel Pitoiset
4dd05c9a91
radv: remove dead code when setting dynamic primitive topology
...
This is already handled slightly above in the same function. Also
state->dirty isn't for RADV_DYNAMIC_xxx and there is no corresponding
RADV_CMD_DIRTY_xxx either.
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
dbcc9aa942
radv: remove radv_cmd_buffer_flush_dynamic_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
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
99b287bde5
radv: add missing L2 invalidate cache flush for non-coherent images
...
Images aren't always coherent with L2 and AMD generations have
different rules, see radv_image_is_l2_coherent() for the full picture.
This fixes a rendering issue on GFX9 because depth/stencil images
aren't coherent, but this also affects color images.
This also fixes a cache coherency issue with an ongoing extension.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12274
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36815 >
2025-08-25 07:28:50 +00:00
Konstantin Seurer
906b541567
radv/bvh: Copy parent_id during updates on GFX12
...
Fixes: cc0dc4b5 ("radv: Store parent node IDs inside nodes on GFX12")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13567
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36898 >
2025-08-24 13:45:29 +00:00
Faith Ekstrand
9a023b3615
vulkan/wsi: Make get_blit_queue return a struct vk_queue *
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:03 +00:00
Autumn Ashton
ae6ea69c85
radv: Implement VK_KHR_video_encode_quantization_map
...
Implement VK_KHR_video_encode_quantization_map on < VCN5.
Passes CTS for `*quantization_map*`.
Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: David Rosca <david.rosca@amd.com>
Closes : #13717
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36797 >
2025-08-22 16:31:59 +00:00
Georg Lehmann
8360c3e81c
radv: shrink shared arrays
...
Foz-DB Navi21:
Totals from 2 (0.00% of 80255) affected shaders:
No stat changes.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26388 >
2025-08-22 13:47:47 +00:00
David Rosca
8ac9a9afee
radv/video: Disable H264 encode 8x8 transform when CABAC is disabled
...
VCN5 only supports it with CABAC enabled.
Fixes: 960f63596f ("radv/video: Add VCN5 encode support")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36881 >
2025-08-22 12:38:23 +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
cc7b5ab0c9
radv: dirty more states when rendering begins
...
radv_get_ps_iter_samples() is used by :
- binning state
- rast samples state
- FS state
- MSAA 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:02 +00:00
Samuel Pitoiset
80e8cb196f
radv: dirty the cb render state when rendering begins
...
RADV_DYNAMIC_COLOR_BLEND_ENABLE trigger the cb render state, the db
shader control state and PS epilogs. Though, it's unecessary to re-emit
the db shader control and PS epilogs are already triggered when the
fb is dirty.
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:02 +00:00