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
13a9f27432
ac/nir: do not assume mesh cull flag is 1bit
...
It will no longer be 1bit after a nir/lower_io bug is fixed.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36966 >
2025-08-27 08:46:33 +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
Arseny Kapoulkine
bb3727ce5a
ac/rgp: Warn when RGP capture can't be saved without libelf
...
Without this, mesa build on some distros may silently produce a version
of radv that silently refuses to save RGP traces
Signed-off-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36960 >
2025-08-26 00:42:16 +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
Georg Lehmann
635ac758c9
aco/optimizer: don't create undef copies from p_create_vector
...
p_create_vector allows undef operands, p_parallelcopy doesn't.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13765
Fixes: 01d20680e2 ("aco/optimizer: generalize p_create_vector of split vector opt")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36963 >
2025-08-25 16:47:38 +00:00
Georg Lehmann
8903bb4618
aco/optimizer: don't apply packed clamp to v_fma_mix
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13758
Fixes: 345bf8a2f2 ("aco/optimizer: remove label_vop3p")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36963 >
2025-08-25 16:47:38 +00:00
Eric Engestrom
fa74e939bf
ci/piglit: automatically use LAVA proxy
...
This avoids having to hardcode the proxy in the traces `download-url` or
jobs setting `PIGLIT_REPLAY_EXTRA_ARGS` and accidentally overriding the
default args when the author meant to append.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36955 >
2025-08-25 14:52:38 +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
Georg Lehmann
791a57805c
aco: fix ra validation for flat/global/scratch/ds load sbyte_d16
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 18a53230eb ("aco: don't check dst_bitsize in apply_load_extract")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36964 >
2025-08-25 10:09:16 +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
951b187b95
nir: Use nir_def_block in more places
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36746 >
2025-08-24 14:03:10 +00:00
Konstantin Seurer
9df7b48d2f
nir: Use nir_def_as_* in more places
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36746 >
2025-08-24 14:03:09 +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
Daniel Schürmann
219c53e6fc
aco/ra: don't clear lateKill operands in get_reg_create_vector()
...
Fixes: 08f088479a ('aco/ra: set late-kill for operands of temporary p_create_vector')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36871 >
2025-08-22 15:25:04 +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
Valentine Burley
a2e7fbc351
radeonsi/ci: Fix radeonsi-vangogh-glcts job definition
...
If the pre-merge job is derived from the nightly job, it inherits
`.no-auto-retry`, which prevents Marge from retrying the job on flakes.
Reversing the order in which the pre-merge and nightly jobs derive from
each other fixes this.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36928 >
2025-08-22 12:15:18 +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