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
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
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
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
Samuel Pitoiset
044bafb6ac
amd: add a predicate parameter to ac_emit_cp_pfp_sync_me()
...
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:36 +00:00
Samuel Pitoiset
48b4a43e8f
amd,radv,radeonsi: add ac_emit_cp_set_predication()
...
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:36 +00:00
Samuel Pitoiset
88f53906d8
amd,radv,radeonsi: add ac_emit_cp_pfp_sync_me()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:25 +00:00
Samuel Pitoiset
7ead034a06
amd,radv,radeonsi: add ac_emit_cp_copy_data()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:25 +00:00
Samuel Pitoiset
0e358cec52
amd,radv,radeonsi: add ac_emit_cp_release_mem_pws()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:24 +00:00
Samuel Pitoiset
c45035ceb4
amd,radv,radeonsi: add ac_emit_cp_acquire_mem_pws()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:23 +00:00
Samuel Pitoiset
6329e282b8
amd,radv,radeonsi: add ac_emit_cp_wait_mem()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:23 +00:00
Samuel Pitoiset
82cbfc964a
amd,radv: add ac_emit_write_data_imm()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:20 +00:00
Samuel Pitoiset
ac262c351f
amd,radv: add ac_emit_cond_exec()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37813 >
2025-10-15 07:35:20 +00:00
Samuel Pitoiset
b2ea120732
ac,radv,radeonsi: fix programming PA_SU_PRIM_FILTER_CNTL on GFX12
...
GFX12 seems to behave slightly differently. Setting these bits to TRUE
causes zero-area triangles to not pass the primitive clipping stage.
So, the actual number of primitives output by the primitive clipping
stage was wrong.
After digging a lot, it seems PAL doesn't set these bits either on
GFX12.
CC: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36670 >
2025-08-12 07:06:36 +00:00
Samuel Pitoiset
081c7ec7b1
radv: emit PGM_HI_PS in the gfx preamble on GFX12
...
It never changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36293 >
2025-07-24 11:03:27 +00:00
Bas Nieuwenhuizen
9574089ea2
radv: Add CDNA register settings.
...
From inspection.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33963 >
2025-06-23 11:23:40 +00:00
Marek Olšák
5e487dbc49
amd: stop using CLEAR_STATE on gfx11
...
It's not allowed with user queues, so this will make it simpler to support
user queues.
There are 2 groups of registers:
- those that are never set by radv and radeonsi - those are now set
in the shared preamble
- those that are set by radv but not radeonsi - those are now set
in the radeonsi preamble
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34589 >
2025-05-02 18:40:11 +00:00
Marek Olšák
e468321bee
ac/cmdbuf: rework CB/DB cache controls for better perf
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:49 +00:00
Marek Olšák
73175ec0b6
ac/cmdbuf: split meta_*_policy to dcc and htile variables
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482 >
2025-03-06 21:10:49 +00:00
Samuel Pitoiset
8625decbcc
radv: fix fetching draw vertex data from counter buffers with transform feedback
...
counterOffset was just ignored and nobody noticed (missing VKCTS
coverage).
VGT_STRMOUT_DRAW_OPAQUE_OFFSET will do the computation in hw for us.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33407 >
2025-02-07 07:59:39 +00:00
Samuel Pitoiset
bd8575ebd3
radv: implement derivative group quads on GFX12
...
It's natively supported by the hw.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303 >
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
c039caeb53
ac/cmdbuf: program SPI_SHADER_GS_MESHLET_CTRL to 0 in the GFX12 preamble
...
Otherwise, it's derivative group quads by default.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185 >
2025-01-24 11:08:59 +00:00
Marek Olšák
e3cef02c24
radeonsi/gfx12: set DB_RENDER_OVERRIDE based on stencil state
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653 >
2024-12-16 21:54:28 +00:00
Marek Olšák
e6345e2fd3
ac: update SPI_GRP_LAUNCH_GUARANTEE_* register values for gfx12
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653 >
2024-12-16 21:54:27 +00:00
Samuel Pitoiset
927a17f30a
amd: do not emit PA_SU_PRIM_FILTER_CNTL in the common GFX preamble
...
RADV needs to adjust this register for user sample locations because
it seems possible to have a sample on the -8 coordinate.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31815 >
2024-10-25 07:41:22 +00:00
Samuel Pitoiset
2fda0db66f
ac,radeonsi,radv: add common GFX preambles
...
RADV and RadeonSI have a few differences.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30789 >
2024-08-27 14:14:57 +00:00
Georg Lehmann
05ca6e2478
amd/common: set COMPUTE_STATIC_THREAD_MGMT_SE2-3 correctly on gfx10-11
...
There is a hole between SE1 and SE2 occupied by COMPUTE_TMPRING_SIZE.
Fixes: 3c8b48e310 ("ac,radeonsi: add a function to initialize compute preambles")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29622 >
2024-06-08 19:18:53 +00:00
Samuel Pitoiset
3c8b48e310
ac,radeonsi: add a function to initialize compute preambles
...
Preambles are very similar between RADV and RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29452 >
2024-06-06 20:26:47 +00:00