Georg Lehmann
eff0998064
radv: use radv_nir_opt_tid_function to create inverse_ballot
...
Foz-DB Navi21:
Totals from 542 (0.68% of 79395) affected shaders:
Instrs: 617316 -> 616259 (-0.17%); split: -0.19%, +0.02%
CodeSize: 3347852 -> 3320040 (-0.83%); split: -0.85%, +0.02%
VGPRs: 21864 -> 21824 (-0.18%); split: -0.29%, +0.11%
SpillSGPRs: 207 -> 199 (-3.86%)
Latency: 4900847 -> 4895665 (-0.11%); split: -0.11%, +0.01%
InvThroughput: 860278 -> 857272 (-0.35%); split: -0.35%, +0.00%
SClause: 21251 -> 21169 (-0.39%); split: -0.40%, +0.01%
Copies: 57759 -> 58881 (+1.94%); split: -0.06%, +2.00%
Branches: 20854 -> 20365 (-2.34%); split: -2.36%, +0.01%
PreSGPRs: 20785 -> 20774 (-0.05%)
PreVGPRs: 17309 -> 17212 (-0.56%)
VALU: 379885 -> 378180 (-0.45%); split: -0.45%, +0.00%
SALU: 87522 -> 88664 (+1.30%); split: -0.02%, +1.32%
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24650 >
2024-07-17 15:04:38 +00:00
Georg Lehmann
39de178656
radv: use radv_nir_opt_tid_function for shuffles
...
The main motivation were open coded clustered inclusive scans
and clustered broadcasts in the gdeflate decompression shader used by
DirectStorage.
Foz-DB Navi21 (only the_last_of_us_part1 is affected):
Totals from 8 (0.01% of 79395) affected shaders:
Instrs: 6230 -> 5438 (-12.71%)
CodeSize: 33376 -> 29148 (-12.67%)
Latency: 77017 -> 72917 (-5.32%)
InvThroughput: 10190 -> 9280 (-8.93%)
Copies: 566 -> 569 (+0.53%)
PreSGPRs: 528 -> 524 (-0.76%)
PreVGPRs: 232 -> 230 (-0.86%)
VALU: 2889 -> 2616 (-9.45%)
SALU: 1748 -> 1491 (-14.70%); split: -14.82%, +0.11%
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24650 >
2024-07-17 15:04:38 +00:00
Georg Lehmann
ca88783318
radv/nir: add a pass to optimize shuffle/booleans dependent only on tid/consts
...
This pass uses constant folding to determine which invocation is read by shuffle
for each invocation. Then, it detects patterns in the result and uses more
a specialized intrinsic if possible.
For booleans it creates inverse_ballot.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24650 >
2024-07-17 15:04:38 +00:00
Josh Simmons
2b99906e5b
radv: Fix shader mask for SQ_WGP SPM counters
...
Signed-off-by: Josh Simmons <josh@nega.tv>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30200 >
2024-07-16 16:10:11 +00:00
Daniel Schürmann
79875737cc
radv: use NIR loop invariant code motion pass
...
Totals from 3469 (4.37% of 79395) affected shaders: (GFX11)
MaxWaves: 78690 -> 78622 (-0.09%); split: +0.03%, -0.11%
Instrs: 11093592 -> 11092346 (-0.01%); split: -0.09%, +0.07%
CodeSize: 57979444 -> 58077232 (+0.17%); split: -0.12%, +0.29%
VGPRs: 257892 -> 258336 (+0.17%); split: -0.08%, +0.25%
SpillSGPRs: 2958 -> 2521 (-14.77%); split: -32.83%, +18.05%
Latency: 135247583 -> 134446992 (-0.59%); split: -0.61%, +0.02%
InvThroughput: 25654328 -> 25478620 (-0.68%); split: -0.73%, +0.05%
VClause: 244799 -> 244499 (-0.12%); split: -0.17%, +0.05%
SClause: 313323 -> 315081 (+0.56%); split: -0.40%, +0.96%
Copies: 835953 -> 842457 (+0.78%); split: -0.38%, +1.15%
Branches: 330136 -> 330210 (+0.02%); split: -0.03%, +0.05%
PreSGPRs: 193374 -> 200277 (+3.57%); split: -0.38%, +3.95%
PreVGPRs: 223947 -> 224227 (+0.13%); split: -0.02%, +0.15%
VALU: 6312413 -> 6314841 (+0.04%); split: -0.02%, +0.06%
SALU: 1222275 -> 1227329 (+0.41%); split: -0.26%, +0.67%
VMEM: 408421 -> 408412 (-0.00%)
SMEM: 430966 -> 430399 (-0.13%)
VOPD: 2482 -> 2440 (-1.69%); split: +0.44%, -2.14%
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28783 >
2024-07-16 12:29:08 +00:00
Dave Airlie
814a2da2f4
radv/video: advertise mutable/extended for dst video images.
...
This allows zink video to create planar image views if needed.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30203 >
2024-07-16 07:04:15 +00:00
Samuel Pitoiset
8863704c6b
radv/meta: add a helper to create descriptor set layout
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
3d322b787e
radv/meta: add a helper to create pipeline layout
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
c6a626e000
radv/meta: add a helper to create compute pipeline
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
bf3b2d2912
radv/meta: remove useless checks for NULL handles before destroying
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
4deb138e7d
radv/meta: remove unused number of rectangles for internal operations
...
It was always 1.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
ecd3bbf826
radv/meta: remove redundant check for hw resolve pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
76e4edefbf
radv/meta: remove unnecessary blit2d_dst_temps struct
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Samuel Pitoiset
e739d0e5bb
radv/meta: remove non-valuable comments
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30187 >
2024-07-16 06:17:07 +00:00
Josh Simmons
1ced840632
radv: Add RADV_PROFILE_PSTATE envvar
...
Enable selecting the specific pstate to enter when using thread tracing
and when acquiring the profiling lock for performance queries.
Signed-off-by: Josh Simmons <josh@nega.tv>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30139 >
2024-07-15 20:32:01 +00:00
Samuel Pitoiset
15a3aff0f1
radv: use zero allocation for the device queues
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
5fa22f9fec
radv: regroup all tools initialization in one helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
9d2751bbde
radv: add radv_device_init_rmv()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
27a90f1f29
radv: add helpers for init/deinit device fault detection
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
351fba7ee3
radv: add radv_device_init_trap_handler()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
4ab6357c42
radv: simplify keeping shader info for GPU hangs debugging
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
fe09a6d72b
radv: add helpers for init/deinit RGP
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
033084c912
radv: add helpers for init/deinit device memory cache
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
01339c6c93
radv: add radv_device_init_perf_counter()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Samuel Pitoiset
5657f21fcf
radv: destroy the perf counter BO in radv_device_finish_perf_counter()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30153 >
2024-07-15 09:34:42 +02:00
Josh Simmons
c68408d195
radv: Fix crash when using SQTT and NO_COMPUTE
...
Signed-off-by: Josh Simmons <josh@nega.tv>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30177 >
2024-07-15 07:05:40 +00:00
Samuel Pitoiset
0a6852907d
radv: fix marking RADV_DYNAMIC_COLOR_ATTACHMENT_MAP as dirty
...
Due to the cmdbuf dirty split.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30119 >
2024-07-12 06:37:52 +00:00
Rhys Perry
4b36668575
radv: remove unecessary nir_remove_unused_varyings cleanup passes
...
I think the comment meant to refer to nir_remove_unused_varyings.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25590 >
2024-07-10 19:11:38 +00:00
Samuel Pitoiset
56aa1ac74b
radv: use ac_is_reduction_mode_supported()
...
This reduces the number of formats that support filter min/max
reduction on <= GFX8 due to some hw limitations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30074 >
2024-07-10 07:57:42 +00:00
Samuel Pitoiset
2d29b8b01e
radv: disable VK_EXT_sampler_filter_minmax on TAHITI and VERDE
...
Ported from RadeonSI.
This also explains all the flakes on Tahiti, see
9329f2c15b for reference.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30074 >
2024-07-10 07:57:42 +00:00
Samuel Pitoiset
4994c0fa94
radv: use blake3 for hashing pipeline layouts
...
This should also be faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30089 >
2024-07-10 07:35:19 +00:00
Samuel Pitoiset
51c6910ba7
radv: use blake3 for hashing descriptor set layouts
...
It's faster than sha1, up to 28% with 1M of bindings.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9476
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30089 >
2024-07-10 07:35:18 +00:00
Samuel Pitoiset
2c28ed7c5c
radv: remove radv_descriptor_set_layout::shader_stages
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30089 >
2024-07-10 07:35:18 +00:00
Samuel Pitoiset
d1c97a1a50
radv: rework generating all graphics state for compiling pipelines
...
This introduces a new helper that will be used to generate a graphics
pipeline hash from a pCreateInfo struct only. Similar to RT.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30049 >
2024-07-09 05:48:31 +00:00
Samuel Pitoiset
8f102c9d61
radv: stop passing a pipeline to some graphics related helpers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30049 >
2024-07-09 05:48:30 +00:00
Samuel Pitoiset
1a3b3b845b
radv: simplify determining when a VS prolog is needed
...
Only if a VS is compiled without the vertex input state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Samuel Pitoiset
7608aada6f
radv: simplify determining when the rasterization primitive is unknown
...
Either if the vertex input state is missing, or if no TES/GS/MS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Samuel Pitoiset
0c0ecc90c4
radv: move radv_hash_shaders() to radv_graphics_pipeline.c
...
And rename it for consistency with compute/RT hash functions.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Samuel Pitoiset
b51af513dd
radv: remove unnecessary radv_pipeline_has_ngg() function
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Samuel Pitoiset
b5193c8937
radv: remove unused get_vs_output_info() function
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Samuel Pitoiset
b43b71450c
radv: simplify importing libraries with retained shaders
...
It's possible to use create_flags directly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Samuel Pitoiset
6aba052f82
radv: remove unused parameter to radv_pipeline_import_retained_shaders()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30045 >
2024-07-05 13:33:24 +00:00
Konstantin Seurer
0208927bcf
radv: Always use dynamic line smoothing
...
Static enablement is too complex for a feature that is barely used.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26833 >
2024-07-05 08:58:53 +00:00
Konstantin Seurer
d571e19966
radv: Fix smooth lines with dynamic polygon mode and topology
...
Non-line modes need to disable the smoothing paths. (overrasterization,
shader code)
Fixes: 85cbdba ("radv: add support for smooth lines")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9393
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26833 >
2024-07-05 08:58:53 +00:00
Samuel Pitoiset
dc89028bbc
radv: advertise VK_KHR_maintenance7
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29956 >
2024-07-03 12:39:01 +00:00
Qiang Yu
3151f5ec47
nir: add filter parameter to nir_lower_array_deref_of_vec
...
To be used by latter commits to limit the lowering to specific
variables.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29799 >
2024-07-03 02:06:56 +00:00
Samuel Pitoiset
6326cc4a5e
radv: use radv_get_user_sgpr() more in DGC
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29980 >
2024-07-01 16:54:09 +00:00
Samuel Pitoiset
598e85b3e9
radv: use the graphics pipeline from the DGC info
...
Doesn't change anything because it's required to bind one graphics
pipeline before using DGC but it's cleaner.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29980 >
2024-07-01 16:54:09 +00:00
Samuel Pitoiset
4c8d44aed0
radv: move radv_CmdPreprocessGeneratedCommandsNV() to radv_cmd_buffer.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29980 >
2024-07-01 16:54:09 +00:00
Samuel Pitoiset
e7f6388ac7
radv: use radv_dgc_with_task_shader() more
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29980 >
2024-07-01 16:54:09 +00:00