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
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
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
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
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
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
Samuel Pitoiset
9c591d0c27
radv/meta: rework creating blit 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
978599a052
radv/meta: simplify radv_meta_blit2d_normal_dst()
...
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:52 +00:00
Samuel Pitoiset
d776f3d3f9
radv: allow VK_EXT_vertex_input_dynamic_state with DGC
...
It should be supported now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29831 >
2024-08-14 07:47:12 +00:00
Samuel Pitoiset
55b497ef19
radv: add support for dynamic vertex input state with DGC
...
DGC preprocessing is disabled for VBOs, so the dynamic vertex input
should always be initialized. Null VBO descriptors are slightly
different when used with dynamic VS inputs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29831 >
2024-08-14 07:47:12 +00:00
Samuel Pitoiset
d8861d52a2
radv: add a helper to set shader stage key robustness info
...
For future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643 >
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
7a5b40a2ff
radv: cleanup robustness with vk_pipeline_robustness_state_fill()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643 >
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
cdf21c5ce5
radv: fix handling view index from device index
...
This feature is marginal but VKCTS recently got coverage and most of
the implementations were broken, including RADV.
Fixes recent tests
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.view_index_from_device_index_.*
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30642 >
2024-08-14 06:54:03 +00:00
Samuel Pitoiset
5d367aba7b
radv: stop re-initializing HTILE for non-compressed to compressed transitions
...
Decompressing HTILE should also reset the HTILE metadata to initial
state which means that re-initializing it for non-compressed to
compressed transitions is redundant.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30122 >
2024-08-13 06:16:03 +00:00
Friedrich Vock
70fc5987d4
radv/rt: Don't atomicAdd local prefix sums
...
This only gets written to by one invocation at a time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30483 >
2024-08-09 18:12:52 +00:00
Friedrich Vock
a3df3ebab4
radv/rt: Only do ploc atomicCompSwap once per workgroup
...
There is no need to do this for every invocation in the wave.
Improves GravityMark scores by 5%.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30483 >
2024-08-09 18:12:52 +00:00
Timur Kristóf
f917b81665
radv: Stop assigning linked driver locations.
...
The ac/nir passes are now able to map memory locations for the I/O
intrinsics without relying on driver location (intrinsic base).
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29812 >
2024-08-08 16:55:02 +00:00
Timur Kristóf
6d83389a39
ac/nir/esgs: Add gs_inputs_read to ES output lowering.
...
This commit just adds the field, it will be taken into use
in a following commit.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29812 >
2024-08-08 16:55:02 +00:00
Timur Kristóf
b5f53fdf32
ac/nir/tess: Add tcs_inputs_read to LS output lowering.
...
This commit just adds the field, it will be taken into use
in a following commit.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29812 >
2024-08-08 16:55:02 +00:00
Timur Kristóf
a8d78f889e
radv: Add gs/hs_inputs_read field for linked LS and ES.
...
This will be used in the following commits to determine the
memory locations for LS/HS and ES/GS linking.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29812 >
2024-08-08 16:55:02 +00:00
Alyssa Rosenzweig
048173a55a
radv: use glsl function name for dFdxfine
...
since fddx isn't a name used anywhere now
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565 >
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
530498cb83
treewide: use new-style derivative builders
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565 >
2024-08-08 15:26:07 +00:00
Georg Lehmann
97aa3464b9
radv/rt: remove one VALU from traversal loop
...
Not much, but something, I guess?
Foz-DB Navi31:
Totals from 93 (0.12% of 79395) affected shaders:
MaxWaves: 1338 -> 1354 (+1.20%)
Instrs: 3689907 -> 3689721 (-0.01%); split: -0.01%, +0.00%
CodeSize: 18921812 -> 18922920 (+0.01%); split: -0.00%, +0.01%
VGPRs: 9012 -> 8988 (-0.27%)
Latency: 23153748 -> 23167640 (+0.06%)
InvThroughput: 4490882 -> 4493136 (+0.05%)
Copies: 287888 -> 287728 (-0.06%)
VALU: 2022082 -> 2021916 (-0.01%)
SALU: 458904 -> 459064 (+0.03%)
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30342 >
2024-07-25 20:24:23 +00:00
Marek Olšák
709ebd8293
amd: expose nir_io_mix_convergent_flat_with_interpolated
...
The drivers need to invert how they gather flat inputs.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895 >
2024-07-23 16:13:17 +00:00
Marek Olšák
b2d32ae246
nir: add nir_intrinsic_load_per_primitive_input, split from io_semantics flag
...
Instead of having 1 bit in nir_io_semantics indicating a per-primitive
FS input, add a dedicated intrinsic for it.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895 >
2024-07-23 16:13:16 +00:00
Samuel Pitoiset
1846eed38b
radv/meta: create the layout for clear depth/stencil on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262 >
2024-07-19 14:53:44 +00:00
Samuel Pitoiset
7c62f53b83
radv/meta: rework getting depth stencil clear pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262 >
2024-07-19 14:53:44 +00:00
Samuel Pitoiset
cfd9d550d8
radv/meta: create the layout for clear color on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30262 >
2024-07-19 14:53:44 +00:00