Samuel Pitoiset
0a2ef363a8
radv: report an message when RADV_GFX12_HIZ_WA value is invalid
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36174 >
2025-09-11 15:21:50 +00:00
Samuel Pitoiset
ec87f1338f
radv: emit more push shader registers on GFX12
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
They are supposed to be slightly faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37256 >
2025-09-11 06:47:40 +00:00
Samuel Pitoiset
9039f33a8d
Revert "radv: handle fbfetch output after binding graphics shaders"
...
This is actually wrong because if radv_handle_fbfetch_output() triggers
a decompression pass and graphics shaders (ESO) are saved/restored
they won't be updated because radv_bind_graphics_shaders() was called
before.
This fixes a very recent regression that I noticed while implementing
a new extension.
This reverts commit 9b912f00c7 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37194 >
2025-09-11 06:22:20 +00:00
Samuel Pitoiset
b69b953973
radv: add RADV_DEBUG=bo_history
...
This dumps the BO history to /tmp/radv_bo_history.log after each BO
operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37062 >
2025-09-11 06:03:15 +00:00
Samuel Pitoiset
1da270fb35
radv/amdgpu: add more helpers for managing virtual BOs
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All these new helpers will make the SMEM PRT workaround better
organized.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37193 >
2025-09-10 14:50:25 +00:00
Samuel Pitoiset
3c4168a3cc
radv/amdgpu: return OOM device when BO mapping fails
...
It's more appropriate than VK_ERROR_UNKNOWN.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37193 >
2025-09-10 14:50:24 +00:00
Konstantin Seurer
7c9e945460
radv,vulkan: Avoid a useless barrier in radv_update_bind_pipeline
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36982 >
2025-09-10 08:35:50 +00:00
Konstantin Seurer
a35dfab281
radv: Use vk_barrier_compute_w_to_compute_r more
...
vk_barrier_compute_w_to_compute_r shows up in rgp captures and is less
code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36982 >
2025-09-10 08:35:50 +00:00
Samuel Pitoiset
c739d836f7
radv: exclude dynamic vertex input stride for the late scissor workaround
...
RADV_DYNAMIC_VERTEX_INPUT_BINDING_STRIDE doesn't emit any context
registers, so it can be excluded for the late scissor workaround to
avoid re-emitting scissors all the time it's dirty.
This fixes a performance regression noticed with Cyberpunk on Vega10,
but other games are likely affected too. The late scissor workaround is
only applied on Raven/Vega10.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13828
Fixes: d7f401c2bb ("radv: bind the vertex binding strides like a normal dynamic state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37252 >
2025-09-10 07:09:48 +00:00
abdelhadi
3a41644165
aco, radv: remove line duplicate
...
Signed-off-by: abdelhadi <abdelhadims@icloud.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37243 >
2025-09-10 06:34:43 +00:00
Rhys Perry
e2181744c2
aco/tests: add barrier-to-waitcnt tests
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
0f32b573a4
aco/gfx10: skip waitcnts or use vm_vsrc(0) for workgroup lds barriers
...
fossil-db (navi21):
Totals from 36594 (45.84% of 79825) affected shaders:
Instrs: 19922581 -> 19922563 (-0.00%)
CodeSize: 103616980 -> 103616956 (-0.00%)
Latency: 69862064 -> 69053273 (-1.16%)
InvThroughput: 14607708 -> 14606308 (-0.01%); split: -0.01%, +0.00%
fossil-db (navi31):
Totals from 1641 (2.06% of 79825) affected shaders:
Instrs: 1247591 -> 1247875 (+0.02%); split: -0.00%, +0.03%
CodeSize: 6259516 -> 6260612 (+0.02%); split: -0.00%, +0.02%
Latency: 7657224 -> 7577299 (-1.04%); split: -1.05%, +0.00%
InvThroughput: 1150669 -> 1148171 (-0.22%); split: -0.22%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
ac882985c0
aco/gfx10: skip waitcnts or use vm_vsrc(0) for workgroup vmem barriers
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
145b178de2
aco: fix workgroup-scope barrier between vmem and lds
...
A barrier between two lds/vmem instructions needs to ensure that the
second starts after the first finishes, which means that we can't just
skip workgroup-scope vmem barriers if there is a lds instruction later.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
02718fd4c5
aco: use a separate event for sendmsg_rtn
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
5812c2ea89
aco: update waitcnt events for exports
...
Include primitive, dual source blend and POS4 exports.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
711c023b55
aco: remove waitcnt code for POPS
...
We now insert barriers around these instead.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
005694fe1f
aco: remove waitcnt code for SMEM stores
...
These were removed in GFX10.3 and we haven't used them in a while.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
20cd5cf5f7
aco: delay barrier waitcnt until they are needed
...
fossil-db (navi21):
Totals from 44 (0.06% of 79825) affected shaders:
Instrs: 16001 -> 15932 (-0.43%); split: -0.46%, +0.02%
CodeSize: 85800 -> 85548 (-0.29%); split: -0.30%, +0.01%
Latency: 190124 -> 173458 (-8.77%)
InvThroughput: 23605 -> 22756 (-3.60%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
843acfa50b
aco: add a separate barrier_info for release/acquire barriers
...
These can wait for different sets of accesses.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
6c446c2f83
aco: refactor waitcnt pass to use barrier_info
...
Currently there's just barrier_info_all, but more will be added later.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
21332609b9
aco: don't move acquire barriers before interlock begin
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
0ee1c137f9
aco: don't move release barriers after interlock end
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
7c056dd473
aco: add is_atomic_or_control_instr helper
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Rhys Perry
df6a3b7619
aco: reduce cost of using values defined in predecessors
...
For code like:
if (cond) {
val = load()
}
use(val)
The "use(val)" now has a similar cost to a use inside the IF.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36491 >
2025-09-09 12:34:40 +00:00
Yonggang Luo
773a7f347a
clang-format: Update the .clang-format files to conformance clang-format json-schema
...
The document is at
https://clang.llvm.org/docs/ClangFormatStyleOptions.html
The json-schema at
https://www.schemastore.org/clang-format.json
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37235 >
2025-09-09 07:04:55 +00:00
Georg Lehmann
4143f0725a
radv/nir/lower_cmat: clean up GFX11 ACC->B convert
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37213 >
2025-09-09 06:08:55 +00:00
Georg Lehmann
5c0ebcdaef
radv/nir/lower_cmat: clean up gfx12 transpose
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37213 >
2025-09-09 06:08:55 +00:00
Georg Lehmann
2da7b4bd0a
radv/nir/lower_cmat: add shuffle_xor_imm helper
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37213 >
2025-09-09 06:08:54 +00:00
Christian Gmeiner
1492de1bc3
radv: re-format using clang-format
...
No manual changes here, this is simply running
$ ninja -C build/ clang-format
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37226 >
2025-09-09 05:48:56 +00:00
Lars-Ivar Hesselberg Simonsen
ae9edb6fc0
radv/ci: Add uncovered CTS issue to gfx1201 fails
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
gfx1201 has started hitting some failures in
dEQP-VK.glsl.bfloat16.constant* that seem to be caused by a CTS issue.
Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36985 >
2025-09-08 16:54:06 +00:00
Konstantin Seurer
9a93f794cd
radv/bvh: Do not write pointer flag related data on GFX103
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On GFX103, those fields are unused. VK_BUILD_FLAG_PROPAGATE_CULL_FLAGS
is set if the fields are used so it can be used to skip writing them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37021 >
2025-09-08 12:47:18 +00:00
David Rosca
c9b2c00de6
radv: Enable VK_EXT_ycbcr_2plane_444_formats
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9486
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37174 >
2025-09-08 11:59:37 +00:00
David Rosca
5e7b6df860
radv/video: Support quantization map on VCN5
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
VCN5 needs to convert the input map image to internal format.
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37156 >
2025-09-08 10:52:06 +00:00
David Rosca
a03e055cd3
radv/video: Set rate control to default on reset
...
If we never get rate control info, we would treat it as rate control
disabled and use QP value from slice info which is always 0 for default
rate control.
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37156 >
2025-09-08 10:52:05 +00:00
David Rosca
070c3d2b89
ac/vcn: Add RADEON_VCN_IB_COMMON_OP_RESOLVEINPUTPARAMLAYOUT
...
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37156 >
2025-09-08 10:52:05 +00:00
Faith Ekstrand
446d5ef103
vulkan: Drop the driver_internal from vk_image_view_init/create()
...
It alwways comes in through the create flags now.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36957 >
2025-09-05 23:34:14 +00:00
Faith Ekstrand
1897d5d9c9
radv: Use VK_IMAGE_VIEW_CREATE_DRIVER_INTERNAL_BIT_MESA
...
This does mean having to set the flag everywhere, which is a bit
annoying, but I don't think I missed any.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36957 >
2025-09-05 23:34:12 +00:00
Timur Kristóf
78efa4157a
radv: Don't use V_370_PFP or V_028A90_PS_DONE on compute queues
...
The compute queue doesn't support these things.
This change doesn't fix any known issues, but better to be safe.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Timur Kristóf
8447a4bfca
radv: Clean up use of RELEASE_MEM on GFX7 MEC
...
MEC probably doesn't support EVENT_WRITE_EOP.
Both PAL and RadeonSI use RELEASE_MEM.
RADV used RELEASE_MEM too but "is_gfx8_mec" was very misleading.
This commit just cleans that up. No functional changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Timur Kristóf
c56c746b71
radv: Don't use EVENT_WRITE_EOS on GFX7
...
EOS events are buggy on GFX7 and can cause hangs when used
together in the same IB with CP DMA packets that use L2.
While we don't use the L2 for CP DMA copies, we still use it
with CP DMA prefetches, so the issue needs to be mitigated.
As a mitigation, avoid using EVENT_WRITE_EOS and prefer to use
the BOTTOM_OF_PIPE event instead of PS_DONE/CS_DONE, which should
be close enough.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Timur Kristóf
2f587ea8be
radv: Don't set SWITCH_ON_EOI without tessellation
...
For reference, see si_get_init_multi_vgt_param.
The SWITCH_ON_EOI bit is only needed with tessellation.
Also remove some useless lines.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Timur Kristóf
e8d1e935fb
radv/amdgpu: Don't use IB2 on GFX6 (for now)
...
GFX6 actually supports IB2, but doesn't support chaining between
chunks inside the IB2. See WaCpIb2ChainingUnsupported in PAL.
Disable IB2 on GFX6 for now.
The proper fix will be to disable use_ib in just secondary
command buffers on GFX6 and emit multiple IB2 packets in the
main command buffer. This will be implemented later.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Timur Kristóf
3056279d09
radv/amdgpu: Use correct NOP packets when unchaining a CS
...
GFX6 doesn't support single-dword PKT3 NOP packets,
so they shouldn't be used when unchaining a CS.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Timur Kristóf
132a61c6b7
radv/amdgpu: Fix crash with RADV_DEBUG=noibs
...
After a refactor last year, the noibs option stopped working
because it hits an assertion when empty IBs are submitted.
Emit a single large NOP packet to avoid submitting empty IBs.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37121 >
2025-09-05 13:42:56 +00:00
Christoph Pillmayer
f81f3c85e2
nir/opt_algebraic: Convert a + b + a to b + 2a
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This allows fusing into one FMA later.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37113 >
2025-09-05 11:39:51 +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