Commit graph

18848 commits

Author SHA1 Message Date
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
08dbab0600 radv: rename shader arg descriptor_sets to descriptors
It's more generic and descriptor heaps will use it too.

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
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
0ff1ce4ac5 radv: use force_indirect_desc_sets when creating RT prologs
This is cleaner and this field has been added exactly for that.

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:02 +00:00
Samuel Pitoiset
055b10a75c radv: do not initialize HiZ on transfer queue on RDNA4
Emitting compute dispatches on SDMA would just hang.

This fixes pending depth/stencil copy tests on transfer queue with
RADV_PERFTEST=transfer_queue.

Fixes: e6c485afb0 ("radv: initialize HiZ metadata during image layout transitions")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37795>
2025-10-10 12:50:02 +00:00
Samuel Pitoiset
aeec53f020 radv,radeonsi: use new ac_cmdbuf macros
But keep them behind existing macros for consistency until all macros
are moved to common code.

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
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
9ff4750eaf ac/cmdbuf: introduce ac_cmdbuf
This will be shared by both drivers.

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:14 +00:00
Samuel Pitoiset
a7ae26c96c ac/sqtt: use void pointers for start/stop CS
Similar to BOs which are different structs between drivers.

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:14 +00:00
Samuel Pitoiset
12cccb2f75 radv: remove useless radeon_cmdbuf forwarded declaration
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:13 +00:00
Rhys Perry
c63c695149 radv: move nir_opt_algebraic loop for NGG culling earlier
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Totals from 6913 (8.66% of 79825) affected shaders: (Navi21)
Instrs: 5373319 -> 5358717 (-0.27%); split: -0.30%, +0.03%
CodeSize: 27448536 -> 27345464 (-0.38%); split: -0.41%, +0.03%
SpillSGPRs: 982 -> 998 (+1.63%)
Latency: 22998827 -> 23011602 (+0.06%); split: -0.13%, +0.19%
InvThroughput: 4663749 -> 4664809 (+0.02%); split: -0.00%, +0.03%
VClause: 120845 -> 120461 (-0.32%); split: -0.49%, +0.17%
SClause: 119068 -> 116064 (-2.52%); split: -2.71%, +0.18%
Copies: 456590 -> 456450 (-0.03%); split: -0.19%, +0.16%
Branches: 145555 -> 145559 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 300465 -> 301154 (+0.23%); split: -0.01%, +0.24%
VALU: 3064127 -> 3064210 (+0.00%); split: -0.00%, +0.00%
SALU: 891257 -> 886368 (-0.55%); split: -0.71%, +0.16%
SMEM: 190500 -> 184624 (-3.08%); split: -3.11%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:54:11 +00:00
Marek Olšák
3fe651f607 nir: remove load_smem_amd
replaced by load_global_amd + ACCESS_SMEM_AMD

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:54:11 +00:00
Daniel Schürmann
3ae2f12eb4 ac/nir: switch load_smem_amd to use load_global
Totals from 24920 (31.21% of 79839) affected shaders: (Navi48)

Instrs: 22044185 -> 22413945 (+1.68%); split: -0.01%, +1.68%
CodeSize: 117211728 -> 118623656 (+1.20%); split: -0.01%, +1.21%
VGPRs: 1199008 -> 1198948 (-0.01%)
SpillSGPRs: 7421 -> 7365 (-0.75%); split: -0.78%, +0.03%
SpillVGPRs: 2177 -> 2184 (+0.32%); split: -0.09%, +0.41%
Scratch: 7037952 -> 7038208 (+0.00%)
Latency: 155140452 -> 155530877 (+0.25%); split: -0.02%, +0.27%
InvThroughput: 23601713 -> 23634131 (+0.14%); split: -0.01%, +0.15%
VClause: 458456 -> 458575 (+0.03%); split: -0.09%, +0.11%
SClause: 651928 -> 649405 (-0.39%); split: -1.26%, +0.87%
Copies: 1681110 -> 1677057 (-0.24%); split: -0.42%, +0.17%
Branches: 515419 -> 515322 (-0.02%); split: -0.02%, +0.00%
PreSGPRs: 992903 -> 990545 (-0.24%); split: -0.24%, +0.00%
VALU: 11971995 -> 11967962 (-0.03%); split: -0.04%, +0.00%
SALU: 3247576 -> 3476720 (+7.06%); split: -0.03%, +7.08%
VMEM: 821046 -> 821056 (+0.00%); split: -0.00%, +0.00%
SMEM: 988476 -> 988779 (+0.03%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:54:11 +00:00
Daniel Schürmann
2622a3bc47 radv,radeonsi: call ac_nir_lower_global_access and nir_lower_int64 for gs copy shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:54:08 +00:00
Daniel Schürmann
50fcfe6bd8 radv: delay nir_opt_shrink_vectors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:54:05 +00:00
Daniel Schürmann
fdd6bdf03d ac/nir_lower_global_access: don't assume pack_64_2x32 is the same as u2u64
It might also be the expanded base address.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:53:58 +00:00
Daniel Schürmann
0209065229 ac/nir_lower_global_access: require no_unsigned wrap when extracting from 32-bit additions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:53:58 +00:00
Daniel Schürmann
c82d70d3ec radv: delay lowering int64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:53:53 +00:00
Daniel Schürmann
eda8fc1e90 radv: delay lowering global access
Totals from 21 (0.03% of 79839) affected shaders: (Navi48)

Instrs: 30258 -> 30249 (-0.03%); split: -0.05%, +0.02%
CodeSize: 159660 -> 159552 (-0.07%); split: -0.07%, +0.01%
Latency: 188154 -> 188131 (-0.01%); split: -0.02%, +0.00%
SClause: 251 -> 252 (+0.40%)
SMEM: 619 -> 598 (-3.39%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36936>
2025-10-08 08:53:53 +00:00
Rhys Perry
20af16b4d8 aco: use MTBUF for 64-bit atomic load/store
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
A 64-bit atomic load/store should be considered entirely out-of-bounds if
any part of it is out-of-bounds. Since we implemented these as 32-bit vec2
load/store, it would have been possible for the first half to be in-bounds
while the second half is out-of-bounds.

From 9.6.1. Robust Buffer Access of Vulkan 1.4.324 specification:
> Any non-atomic access to a uniform, storage, uniform texel, or storage
> texel buffer wider than 32-bits may be treated as multiple 32-bit
> accesses that are separately bounds checked.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36602>
2025-10-07 17:41:31 +00:00
Rhys Perry
f905acfada aco: remove barrier acquire/release workaround
This existed since ccfe9813fb because NIR
had no atomic loads/stores. This is no longer the case.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36602>
2025-10-07 17:41:31 +00:00
Rhys Perry
271b135b03 aco: set atomic semantic for atomic load/store
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36602>
2025-10-07 17:41:30 +00:00
Rhys Perry
74b807cf58 aco: only workaround load tearing for atomic loads
For non-atomic loads, this situation would require a data race.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36602>
2025-10-07 17:41:30 +00:00
Timur Kristóf
c473b0b551 radv/amdgpu: Allow IB2 when primary CS isn't chained
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The primary CS doesn't need to use chaining in order to use IB2.
Allow using IB2 packets when chaining is disabled.

Rationale for this patch:
When chaining is enabled (the default), this patch removes a
useless check.
When chaining is disabled (by noibchaining), this patch allows us
to use IB2 without chaining.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:02 +00:00
Timur Kristóf
503963c08c radv/amdgpu: Support IB2 without chaining, enable on GFX6
GFX6 supports IB2 but not chaining within an IB2.

To use IB2 on GFX6, disable chaining in secondary CS,
and emit an IB2 packet for each secondary IB.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:02 +00:00
Timur Kristóf
92ba76710d ac/gpu_info: Add can_chain_ib2 field to ac_gpu_info
GFX6 supports IB2, but not chaining inside IB2.
It only supports chaining in IB1.
See waCpIb2ChainingUnsupported in PAL.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:01 +00:00
Timur Kristóf
2091db2461 radv/amdgpu: Small cleanup of counting submitted IBs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:01 +00:00
Timur Kristóf
fd5c50664e radv/amdgpu: Emit a single 4 dword NOP in chainable CS buffers
This is a small optimization that should slightly reduce the CP
overhead for all GPUs as we now only emit a single NOP packet
instead of 4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:01 +00:00
Timur Kristóf
e6a1355bd5 radv/amdgpu: Add a helper function to emit NOP packets
No functional changes, just make the code a bit easier to read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:00 +00:00
Timur Kristóf
e20080315b radv/amdgpu: Don't assert chaining match when copying secondary IB
This assertion is useless.

In this code path it is not relevant whether or not the primary
CS support chaining. And it is already handled when the secondary
has chaining.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:49:00 +00:00
Timur Kristóf
df58cac660 radv: Rename RADV_DEBUG=noibs to noibchaining
Clarify what it actually means.
Also fix the documentation in envvars.rst to better describe it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:48:59 +00:00
Timur Kristóf
3902cffab7 radv/amdgpu: Rename use_ib to chain_ib
All CS always use IBs, so the naming was confusing.

Rename these fields to chain_ib to better reflect
what it actually means, which is enabling chaining:
radv_amdgpu_winsys::use_ib_bos
radv_amdgpu_cs::chain_ib

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37280>
2025-10-07 15:48:59 +00:00
Georg Lehmann
84f26ed117 nir: optimize atomic isub if supported
Foz-DB Navi48:
Totals from 1 (0.00% of 80287) affected shaders:
Instrs: 1641 -> 1637 (-0.24%)
CodeSize: 8472 -> 8456 (-0.19%)
Latency: 19132 -> 19131 (-0.01%)
InvThroughput: 9566 -> 9565 (-0.01%)
Copies: 126 -> 125 (-0.79%)
VALU: 565 -> 563 (-0.35%)
SALU: 439 -> 438 (-0.23%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37702>
2025-10-07 14:07:56 +00:00
Georg Lehmann
d514696a0c aco/isel: support nir_op_atomic_isub
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37702>
2025-10-07 14:07:56 +00:00
Georg Lehmann
65227ef325 ac/llvm: support nir_atomic_op_isub
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37702>
2025-10-07 14:07:56 +00:00
Georg Lehmann
a173e51541 aco/insert_waitcnt: don't merge waitcnts for LDS clauses
We form LDS clauses because heavily interleaving LDS and VALU leads to false
dependencies. But LDS is completely uncached, so splitting the clause with
waitcnts shouldn't hurt, it might even be beneficial because the first
LDS store can start earlier.

Foz-DB Navi48:
Totals from 170 (0.21% of 80287) affected shaders:
Instrs: 239633 -> 240148 (+0.21%)
CodeSize: 1276584 -> 1278532 (+0.15%)
Latency: 3788507 -> 3789876 (+0.04%); split: -0.01%, +0.04%
InvThroughput: 841637 -> 841694 (+0.01%); split: -0.01%, +0.02%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37701>
2025-10-07 13:12:45 +00:00
Samuel Pitoiset
c177bf81b4 radv: fix expected disk cache size for meta shaders
Math can go wrong.

If the disk cache size is too small, buckets are evicted and this
might cause stuttering when starting applications.

Fixes: 4fc856af98 ("radv: fix caching on-demand meta shaders")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13930
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37718>
2025-10-07 12:50:41 +00:00
Rhys Perry
dfa8ac6b91 aco: remove buffer_load_lds instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
They don't exist

See https://github.com/llvm/llvm-project/pull/132916

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14041
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37716>
2025-10-07 09:50:26 +00:00
Samuel Pitoiset
08ddf2f878 radv: lower embedded/immutable samplers earlier
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Lowering them earlier right after VTN would allow us to implement
embedded samplers for descriptor heap properly for merged shaders.

Non-immediate samplers are still lowered in
radv_nir_apply_pipeline_layout because they require shader arguments.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37688>
2025-10-07 09:25:28 +00:00
Samuel Pitoiset
cb746e2d84 radv: lower ycbcr tex instructions earlier
There is no real advantage to delay this lowering.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37688>
2025-10-07 09:25:27 +00:00
Samuel Pitoiset
b8bdc68933 radv/ci: update expected list of failures for VEGA10/NAVI10
Since a8f4a2a9ba ("radv/video: Check FW version before using
WRITE_MEMORY") presumably.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37733>
2025-10-07 08:06:54 +00:00
Benjamin Cheng
364a2488ad radv/video: Report extra image usages
ENCODE_SRC and DECODE_DST are transparent and can have additional
usages.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37656>
2025-10-06 21:27:48 +00:00
Benjamin Cheng
d1872c45ae radv/video: Fix video profile reporting
Use vk_video_is_profile_supported first, and add AMD specific
restrictions later.

vulkaninfo reports on Navi31:
    H.264 Decode (4:2:0 8-bit) Baseline progressive
    H.264 Decode (4:2:0 8-bit) Main progressive
    H.264 Decode (4:2:0 8-bit) High progressive
    H.264 Decode (4:2:0 8-bit) Baseline interlaced (interleaved lines)
    H.264 Decode (4:2:0 8-bit) Main interlaced (interleaved lines)
    H.264 Decode (4:2:0 8-bit) High interlaced (interleaved lines)
    H.264 Decode (monochrome 8-bit) High progressive
    H.264 Decode (monochrome 8-bit) High interlaced (interleaved lines)
    H.265 Decode (4:2:0 8-bit) Main
    H.265 Decode (4:2:0 8-bit) Main 10
    H.265 Decode (4:2:0 8-bit) Main Still Picture
    H.265 Decode (4:2:0 10-bit) Main 10
    VP9 Decode (4:2:0 8-bit) Profile 0
    VP9 Decode (4:2:0 10-bit) Profile 2
    AV1 Decode (4:2:0 8-bit) Main with film grain support
    AV1 Decode (4:2:0 8-bit) Main without film grain support
    AV1 Decode (4:2:0 10-bit) Main with film grain support
    AV1 Decode (4:2:0 10-bit) Main without film grain support
    AV1 Decode (4:2:0 12-bit) Professional with film grain support
    AV1 Decode (4:2:0 12-bit) Professional without film grain support
    AV1 Decode (monochrome 8-bit) Main with film grain support
    AV1 Decode (monochrome 8-bit) Main without film grain support
    AV1 Decode (monochrome 10-bit) Main with film grain support
    AV1 Decode (monochrome 10-bit) Main without film grain support
    AV1 Decode (monochrome 12-bit) Professional with film grain support
    AV1 Decode (monochrome 12-bit) Professional without film grain support
    H.264 Encode (4:2:0 8-bit) Baseline
    H.264 Encode (4:2:0 8-bit) Main
    H.264 Encode (4:2:0 8-bit) High
    H.265 Encode (4:2:0 8-bit) Main
    H.265 Encode (4:2:0 8-bit) Main 10
    H.265 Encode (4:2:0 8-bit) Main Still Picture
    H.265 Encode (4:2:0 10-bit) Main 10
    AV1 Encode (4:2:0 8-bit) Main
    AV1 Encode (4:2:0 10-bit) Main

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37656>
2025-10-06 21:27:48 +00:00
David Rosca
59a3ca2333 radv/video: Fix waiting on encode feedback query
Currently we wait until the second dword in feedback buffer changes
from 0 to 1, and then the rest of the feedback is read. There is no
guarantee that the rest of the feedback will be available, which can
cause bitstream size to be incorrectly returned as 0.

Add write memory command after encode, marking the query as available
to ensure the entire feedback buffer is ready.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13601
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36772>
2025-10-06 10:32:54 +00:00
David Rosca
a8f4a2a9ba radv/video: Check FW version before using WRITE_MEMORY
Move the version check to separate function so that it can
also be used elsewhere.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36772>
2025-10-06 10:32:54 +00:00
David Rosca
40c124e67a radv: Change radv_vcn_write_event to a write memory func
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36772>
2025-10-06 10:32:53 +00:00
Samuel Pitoiset
874bc09537 radv: reserve more CS space when executing DGC calls
This can trigger an assert otherwise. The space reserved before
executing DGC IBs is an arbitrary number which should be large enough
in all cases.

Found this while implementing descriptor heap.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37681>
2025-10-06 06:28:18 +00:00
Bas Nieuwenhuizen
82d06b58ad radv: use vk_drm_syncobj_copy_payloads
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Based on a patch by llyyr <llyyr.public@gmail.com>:

!36827 added the copy_sync_payloads function, but didn't enable use of
it in radv. This commit mirrors similar MRs for anv/panvk/nvk and uses
the common vk_drm_syncobj_copy_payloads function for copy_sync_payloads.

I'm not too familiar with radv internals, so there's potentially a good
reason why this isn't a good change. However, I've personally been using
this patch locally for around a month and have experienced no
regressions and around 8% uplift on vkmark test scores with a 6600 XT.

[vertex] device-local=true: 45110 -> 48489 (+7.5%)
[vertex] device-local=false: 17529 -> 17488 (-0.2%)
[texture] anisotropy=0: 44768 -> 48679 (+8.7%)
[texture] anisotropy=16: 44920 -> 48572 (+8.1%)
[shading] shading=gouraud: 44931 -> 48467 (+7.9%)
[shading] shading=blinn-phong-inf: 44849 -> 48740 (+8.7%)
[shading] shading=phong: 44695 -> 48645 (+8.8%)
[shading] shading=cel: 44809 -> 47938 (+7.0%)
[effect2d] kernel=edge: 45185 -> 47837 (+5.9%)
[effect2d] kernel=blur: 26919 -> 26762 (-0.6%)
[desktop] <default>: 40974 -> 44034 (+7.5%)
[cube] <default>: 45090 -> 49270 (+9.3%)
[clear] <default>: 41102 -> 44375 (+8.0%)

(https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37606)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37640>
2025-10-06 00:45:09 +00:00
Yinjie Yao
f0f95a9ae3 ac/parse_ib: Update vcn ib parser to include missing commands
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37672>
2025-10-03 14:44:07 +00:00
Samuel Pitoiset
38892cb558 radv: only expose AMD_device_coherent_memory if actually supported
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes an issue after a recent update to
dEQP-VK.info.device_mandatory_features.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37663>
2025-10-03 14:26:32 +00:00