Samuel Pitoiset
ab2c8af634
radv: add radv_shader_info::ps::uses_fbfetch_output
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124 >
2024-08-23 12:20:02 +00:00
Samuel Pitoiset
541a204733
radv: use the Mesa-specifc dynamic rendering flag for meta operations
...
Meta operations never use subpass input attachments.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124 >
2024-08-23 12:20:02 +00:00
Samuel Pitoiset
421c42170e
radv: stop emitting DB_COUNT_CONTROL in the GFX preamble
...
This is already emitted as part of the occlusion query state and this
state is dirty when a cmdbuf begins.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788 >
2024-08-23 09:50:40 +00:00
Samuel Pitoiset
e3e28bb514
radv: stop emitting PA_SC_CLIPRECT_RULE in the GFX preamble
...
It's already emitted as part of the discard rectangle state and all
dynamic states are dirty when a cmdbuf begins
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788 >
2024-08-23 09:50:40 +00:00
Samuel Pitoiset
4662483535
radv: stop emitting DB_RENDER_OVERRIDE in the GFX preamble
...
It's already emitted as part of the depth clamp enable state and all
dynamic states are dirty when a cmdbuf begins.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788 >
2024-08-23 09:50:40 +00:00
Samuel Pitoiset
cd57411aaa
radv: remove redundant PA_SU_PRIM_FILTER_CNTL in the GFX preamble
...
It's already emitted below.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788 >
2024-08-23 09:50:40 +00:00
David Rosca
6e2ae9c581
radeonsi/vcn: Use pipe header params in H264 header encoder
...
This now supports writing all fields as we get them on input from
packed headers.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672 >
2024-08-23 10:00:02 +02:00
David Rosca
af849516f0
radeonsi/vcn: Use pipe header params in HEVC header encoder
...
This now supports writing all fields as we get them on input from
packed headers.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672 >
2024-08-23 10:00:02 +02:00
David Rosca
32c6a61e2b
radeonsi/vcn: Switch to app DPB management for H264 and HEVC encode
...
This removes the internal DPB management logic, which was unnecessary as
it was duplicating what applications already do, and it was also causing
issues when the internal DPB would de-sync from application DPB (eg.
driver removes reference that application still intends to use).
DPB is now dynamically resized instead of using fixed number of slots.
This also saves a lot of memory with HEVC encoding, as that was always
using the max_references which va frontend sets to 15.
Move reconstructed pictures to the end of the context and meta buffers
to ensure resizing works correctly.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672 >
2024-08-23 09:59:58 +02:00
Timothy Arceri
038b3c24d7
ci: bump piglit version
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30752 >
2024-08-23 14:55:21 +10:00
Daniel Stone
4bcd57b0b5
ci/amd: Move manual/nightly jobs to postmerge stage
...
Create a new stage called amd-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784 >
2024-08-22 15:35:18 +00:00
Rhys Perry
7b92e11e16
aco: forget valu delays after certain s_waitcnt_depctr/LDSDIR
...
fossil-db (navi31):
Totals from 55242 (69.58% of 79395) affected shaders:
Instrs: 40507666 -> 40138006 (-0.91%); split: -0.91%, +0.00%
CodeSize: 212516104 -> 211025880 (-0.70%); split: -0.70%, +0.00%
Latency: 281643258 -> 281628053 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 46370668 -> 46369637 (-0.00%); split: -0.00%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23337 >
2024-08-22 13:57:01 +00:00
Rhys Perry
30396ba604
aco: move insert_delay_alu to after insert_NOPs
...
s_delay_alu doesn't affect any hazards, but hazard workarounds don't
update s_delay_alu and so can make the s_delay_alu affect the wrong
instructions.
fossil-db (navi31):
Totals from 55777 (70.25% of 79395) affected shaders:
Instrs: 40740011 -> 40765017 (+0.06%)
CodeSize: 213768484 -> 213870856 (+0.05%); split: -0.00%, +0.05%
Latency: 283713083 -> 283714959 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 46551791 -> 46551835 (+0.00%); split: -0.00%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23337 >
2024-08-22 13:57:01 +00:00
Rhys Perry
807651561e
aco: split insert_wait_states into two
...
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23337 >
2024-08-22 13:57:00 +00:00
Samuel Pitoiset
d5efbc7f1c
radv/amdgpu: fix CS padding for non-GFX/COMPUTE queues
...
I forgot that SDMA and VIDEO existed somehow.
Fixes: d690f293c6 ("radv/winsys: pad gfx and compute IBs with only one NOP")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30769 >
2024-08-22 11:10:29 +00:00
Samuel Pitoiset
322227ba17
radv: use a sized NOP packet for the DGC preamble
...
This is faster than a pile of 1-dword NOPs. Note that GFX6 actually
supports type-3 NOP as long as the size is more than the header which
is always the case for the DGC preamble.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30748 >
2024-08-21 18:08:45 +00:00
Samuel Pitoiset
6fa1bf3b88
radv: pad GFX preambles IBs with only one NOP
...
This is optimal.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30743 >
2024-08-21 14:55:04 +00:00
Samuel Pitoiset
d690f293c6
radv/winsys: pad gfx and compute IBs with only one NOP
...
1-dword NOPs are slow and it's better to emit a sized NOP packet when
possible.
Based on RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30743 >
2024-08-21 14:55:04 +00:00
Konstantin
19d633af0b
radv: Handle repeated instructions when splitting disassembly
...
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30734 >
2024-08-21 13:38:53 +00:00
Konstantin
1cf507b806
radv: Handle instruction encodings > 8 bytes when splitting disassembly
...
Choosing the wrong instruction length prevents
radv_dump_annotated_shader from matching waves.
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30734 >
2024-08-21 13:38:53 +00:00
Rhys Perry
db39685e31
aco: validate temporary reachability
...
These errors are nicer to read than the ones from live variable analysis.
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/30440 >
2024-08-21 10:47:20 +00:00
Rhys Perry
39270a8be3
aco: preserve SSA in try_eliminate_scc_copy
...
Otherwise, there is no definition of this temporary. Fixes fail in future
validation.
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/30440 >
2024-08-21 10:47:20 +00:00
Rhys Perry
d81d5b7d00
aco: use dominance helpers
...
This makes the passes slightly faster.
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/30440 >
2024-08-21 10:47:20 +00:00
Rhys Perry
d91e634c13
aco: calculate indices from dominance tree
...
This lets us do fast dominance checks.
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/30440 >
2024-08-21 10:47:20 +00:00
Samuel Pitoiset
b66229ac64
radv: add a small comment describing the DGC implementation
...
It's quite complex.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737 >
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
1048da8dd0
radv: refactor the DGC helpers to determine cmdbuf size
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737 >
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
ca447a7a7e
radv: pass a dgc_cmdbuf parameter to more dgc helpers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737 >
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
8027f98443
radv: add a small helper to determine the index type with DGC
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737 >
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
aad503ecfa
aco: fix bogus assert in RT prolog on GFX11+
...
in_scratch_offset isn't defined on GFX11+ and only useful on < GFX9.
Fixes: bd525f4282 ("aco: Fix 1D->2D dispatch conversion on <gfx9")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30717 >
2024-08-19 21:07:31 +00:00
Konstantin Seurer
d3ff76d27b
radv: Synchronize shader dumping
...
When RADV_DEBUG=shaders is set, printing e.g. different NIR shaders from
different threads at the same time makes the output unreadable. Use a mutex
to synchronize shader dumping so that all shaders get printed in once piece.
Since we're writing everything to a file or terminal anyway, the
performance impact of forcing singlethreaded compilation is negligible.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25215 >
2024-08-19 12:29:59 +00:00
Friedrich Vock
bd525f4282
aco: Fix 1D->2D dispatch conversion on <gfx9
...
out_args->scratch_offset and in_wg_id_x will alias on <gfx9.
To avoid the conversion code reading a garbage WG ID, move the
scratch/ring offset writing to the very end.
Fixes: 1e354172 ("radv,aco: Convert 1D ray launches to 2D")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30707 >
2024-08-17 17:01:10 +00:00
Marek Olšák
665eae51ef
amd: update addrlib
...
There are some changes in ac_surface.c to make this work.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30507 >
2024-08-16 21:44:32 +00:00
Dave Airlie
b30462535b
radv/video: add KHR_video_maintenance1 support
...
This just adds support for allowing worst case image sizing with no
specified profiles and for using inline queries.
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30671 >
2024-08-16 13:38:03 +10:00
Dave Airlie
fc137ecaca
radv/video: handle inline queries for vulkan video encode.
...
This handles the new inlines queries for VK_KHR_video_maintenance1
(Decode doesn't do queries on AMD at the moment).
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30671 >
2024-08-16 13:35:22 +10:00
David Rosca
b48bc87783
radv/video: Add support for 12-bit AV1 decode
...
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30551 >
2024-08-16 02:41:30 +00:00
Rhys Perry
aafb49f56b
aco: set prefer_remove for gfx9- too
...
This is a hint that the branch is worth removing. Assume that's the case,
regardless of the gfx level.
fossil-db (vega10):
Totals from 22 (0.03% of 63053) affected shaders:
Instrs: 23927 -> 23856 (-0.30%)
CodeSize: 125096 -> 124812 (-0.23%)
Latency: 138258 -> 137765 (-0.36%)
InvThroughput: 55900 -> 55884 (-0.03%)
Branches: 391 -> 320 (-18.16%)
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/30321 >
2024-08-15 16:00:19 +00:00
Rhys Perry
9f1a5645cf
aco: completely skip branches if they're never taken
...
fossil-db (navi21):
Totals from 196 (0.25% of 79395) affected shaders:
Instrs: 101902 -> 101706 (-0.19%)
CodeSize: 576988 -> 576232 (-0.13%)
Latency: 750344 -> 750280 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 119170 -> 119161 (-0.01%)
Branches: 3933 -> 3737 (-4.98%)
fossil-db (vega10):
Totals from 585 (0.93% of 63053) affected shaders:
Instrs: 346877 -> 346292 (-0.17%)
CodeSize: 1810600 -> 1808260 (-0.13%)
Latency: 1817743 -> 1814233 (-0.19%)
InvThroughput: 652142 -> 651944 (-0.03%)
Branches: 5087 -> 4502 (-11.50%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321 >
2024-08-15 16:00:19 +00:00
Rhys Perry
c29d9f1184
aco: only remove branch jumping over SMEM/barrier if it's never taken
...
SMEM might be an invalid access, and barriers are probably expensive.
fossil-db (navi21):
Totals from 126 (0.16% of 79395) affected shaders:
Instrs: 2764965 -> 2765377 (+0.01%)
CodeSize: 15155348 -> 15156788 (+0.01%)
Latency: 17604293 -> 17604296 (+0.00%)
Branches: 105211 -> 105623 (+0.39%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321 >
2024-08-15 16:00:19 +00:00
Rhys Perry
b934255510
aco: split selection_control_remove into rarely_taken and never_taken
...
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321 >
2024-08-15 16:00:18 +00:00
Connor Abbott
de1d36d054
ci: Uprev VK-CTS to 1.3.9.0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29766 >
2024-08-15 09:01:26 +00:00
Connor Abbott
bc1521e601
ci: Move two failing loader-related tests to all-skips.txt
...
There's no value testing these tests in CI until the loader is upgraded,
so don't force every driver to add them to their fails list.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29766 >
2024-08-15 09:01:26 +00:00
Samuel Pitoiset
cf0884d161
radv/meta: create DGC prepare pipeline on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
3a4ce4a5a3
radv/meta: simplify initializing bufimage pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
586d6cb588
radv/meta: create cleari layouts on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
1dfb6e19d5
radv/meta: create itoi layouts on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
bd00446bb0
radv/meta: create btoi layouts on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
f1b8e7fa73
radv/meta: create itob layouts on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
db94ee1e64
radv/meta: create blit2d layouts on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
2352cb2244
radv/meta: remove unused parameter from some blit init functions
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
eabbd077cc
radv/meta: simplify initializing DCC comp-to-single pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640 >
2024-08-14 08:48:53 +00:00