Samuel Pitoiset
1f078f02d1
radv: update configuring SPI_PS_IN_CONTROL on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29482 >
2024-05-31 08:02:33 +00:00
Samuel Pitoiset
640613f5a3
radv: update configuring GE_CNTL.PRIM_GRP_SIZE_GFX11 on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29482 >
2024-05-31 08:02:33 +00:00
Samuel Pitoiset
0412b8c02b
radv: update configuring SPI_SHADER_PGM_RSRC4_{HS,GS,PS} on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29482 >
2024-05-31 08:02:33 +00:00
Samuel Pitoiset
e080ce9004
radv: do not enable MEM_ORDERED on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29482 >
2024-05-31 08:02:33 +00:00
Mike Blumenkrantz
2aaa6ebba1
build/amd: add amd-use-llvm build option
...
this allows amd drivers to disable llvm support while still allowing
llvmpipe/lavapipe to be built
by disabling llvm support in amd drivers, the load times for these drivers
decreases by 5-10ms
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Mike Lothian <mike@fireburn.co.uk >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28969 >
2024-05-30 19:05:00 +00:00
Timur Kristóf
ad033506aa
radv: Ignore mediump IO flag.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29435 >
2024-05-30 12:57:20 +00:00
Samuel Pitoiset
aa0f9e356f
radv: update NUM_THREAD_FULL bitfields on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29417 >
2024-05-30 11:05:04 +00:00
Samuel Pitoiset
45b6b0cafb
radv: enable GE_CNTL.DIS_PG_SIZE_ADJUST_FOR_STRIP on GFX12
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29417 >
2024-05-30 11:05:04 +00:00
Samuel Pitoiset
c6ffde61cc
radv: update NUM_THREAD_FULL bitfields
...
They are similar but it avoids confusion when looking at RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29417 >
2024-05-30 11:05:03 +00:00
Konstantin Seurer
b31919f36e
radv: Return a block from radv_replay_shader_arena_block
...
ret_block is only set to NULL.
Fixes: 28be0cc
("radv: Add locking to radv_replay_shader_arena_block")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29455 >
2024-05-29 09:10:47 +00:00
Samuel Pitoiset
33ae2275bf
radv: apply the workaround for no PS inpputs and LDS on GFX11 only
...
GFX12 doesn't seem affected according to RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29426 >
2024-05-28 13:59:31 +00:00
Konstantin Seurer
9fe34a3204
radv: Remove uses_dynamic_rt_callable_stack
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28619 >
2024-05-28 12:23:45 +00:00
Konstantin Seurer
1038f48dd1
radv: Replace is_rt_shader with RADV_SHADER_TYPE_RT_PROLOG
...
The flag was only used for identifying the rt prolog.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28619 >
2024-05-28 12:23:45 +00:00
Konstantin Seurer
28be0cca45
radv: Add locking to radv_replay_shader_arena_block
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29169 >
2024-05-28 07:11:02 +00:00
Georg Lehmann
cc404d45ff
aco: remove perfwarn
...
This didn't do anything useful.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29270 >
2024-05-21 13:31:23 +00:00
Konstantin Seurer
406dda70e7
radv: Zero initialize capture replay group handles
...
radv_serialized_shader_arena_block is not tightly packed and using an
initializer list leaves the gaps uninitialized.
cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28961 >
2024-05-12 10:28:27 +00:00
Konstantin Seurer
df82221bb3
radv: Remove arenas from capture_replay_arena_vas
...
Avoids an use after free when looking up an arena.
cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28961 >
2024-05-12 10:28:27 +00:00
Konstantin Seurer
e050abc961
radv: Fix radv_shader_arena_block list corruption
...
Remove it from the previous list befor adding it to a new one.
cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28961 >
2024-05-12 10:28:27 +00:00
Marek Olšák
58a5de5c34
amd: add gfx12 register definitions into the register header generator
...
The generator renamed some definitions to resolve conflicts.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29007 >
2024-05-11 22:14:05 -04:00
Samuel Pitoiset
c6a22dd05c
radv: precompute NGG register values
...
To make emission faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29031 >
2024-05-09 06:29:29 +00:00
Samuel Pitoiset
751e5d8bd7
radv: move common registers between VS/GS and NGG
...
For more clarity.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29031 >
2024-05-09 06:29:29 +00:00
Faith Ekstrand
ac500495ac
radv: Use vk_physical_device_get_spirv_capabilities()
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Iván Briano <ivan.briano@intel.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905 >
2024-05-09 01:14:23 +00:00
Faith Ekstrand
c1eaa03904
spirv: Drop the SubgroupUniformControlFlow check
...
It's just a vtn_fail_if() and there's no actual cap for it. It's not
really gaining us much to have the check.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Iván Briano <ivan.briano@intel.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905 >
2024-05-09 01:14:22 +00:00
Faith Ekstrand
eed3b56402
spirv: Move the old AMD extensions out of capabilities
...
These aren't real capabilities. They control whether or not we turn on
the extended instruction sets for these instruction types.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Iván Briano <ivan.briano@intel.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905 >
2024-05-09 01:14:22 +00:00
Samuel Pitoiset
c9162034bc
radv: precompute DB_SHADER_CONTROL for fragment shaders later
...
To regroup all precomputed register values.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022 >
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
c658ed5136
radv: precompute vertex shader register values
...
To make emission faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022 >
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
4b53d36f0d
radv: precompute legacy GS register values
...
To make emission faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022 >
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
fa9b0ee86c
radv: precompute mesh shader register values
...
To make emission faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022 >
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
7f7ef10bea
radv: precompute fragment shader register values
...
To make emission faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022 >
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
e5bc4d85bb
radv: precompute existing legacy GS register values later
...
To precompute all registers at the same place.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022 >
2024-05-06 18:00:02 +00:00
Daniel Schürmann
ce51e48cb6
radv: move nir_opt_dead_cf() before nir_opt_loop()
...
This can avoid unnecessary CF transformations.
Totals from 557 (0.70% of 79395) affected shaders: (GFX11)
MaxWaves: 12020 -> 12028 (+0.07%)
Instrs: 4237096 -> 4234110 (-0.07%); split: -0.08%, +0.01%
CodeSize: 21731952 -> 21719556 (-0.06%); split: -0.06%, +0.00%
VGPRs: 40492 -> 40480 (-0.03%)
SpillSGPRs: 467 -> 416 (-10.92%)
Latency: 25704891 -> 25684156 (-0.08%); split: -0.10%, +0.02%
InvThroughput: 5545224 -> 5542998 (-0.04%); split: -0.06%, +0.02%
VClause: 107850 -> 107838 (-0.01%); split: -0.02%, +0.01%
SClause: 90450 -> 90440 (-0.01%); split: -0.05%, +0.04%
Copies: 292714 -> 291354 (-0.46%); split: -0.50%, +0.03%
Branches: 133630 -> 133617 (-0.01%); split: -0.01%, +0.00%
PreSGPRs: 42299 -> 42104 (-0.46%); split: -0.48%, +0.02%
PreVGPRs: 36396 -> 36393 (-0.01%); split: -0.02%, +0.01%
VALU: 2321811 -> 2321192 (-0.03%); split: -0.03%, +0.01%
SALU: 505001 -> 503289 (-0.34%); split: -0.35%, +0.01%
SMEM: 132622 -> 132640 (+0.01%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28150 >
2024-05-03 13:01:29 +00:00
Daniel Schürmann
4453971fbb
radv: mark nir_opt_loop() as not idempotent
...
This pass misses opportunities because foreach_list_typed_safe()
might point to disconnected cf_nodes after some optimization got
applied. No fossil-db changes.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28150 >
2024-05-03 13:01:29 +00:00
Samuel Pitoiset
66d4188ec5
radv: store cb_shader_mask for fragment shaders and epilogs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28976 >
2024-05-03 06:29:05 +00:00
Samuel Pitoiset
3b41fbd4b8
radv: precompute compute/task shader register values
...
To make emission faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29014 >
2024-05-03 06:07:46 +00:00
Samuel Pitoiset
fb323ae46b
radv: rework the number of tess patches computation
...
This uses the same helper as RadeonSI which seems more robust and more
optimal (eg. it reduces the number of patches to increase occupancy).
fossils-db (NAVI21):
Totals from 638 (0.80% of 79395) affected shaders:
MaxWaves: 13182 -> 13142 (-0.30%)
Instrs: 419446 -> 419322 (-0.03%); split: -0.08%, +0.05%
CodeSize: 2261408 -> 2261200 (-0.01%); split: -0.06%, +0.05%
VGPRs: 32560 -> 32600 (+0.12%)
LDS: 4648960 -> 5343232 (+14.93%); split: -1.67%, +16.61%
Latency: 4812105 -> 4811141 (-0.02%); split: -0.04%, +0.02%
InvThroughput: 1159924 -> 1153998 (-0.51%); split: -0.60%, +0.09%
VClause: 7837 -> 7871 (+0.43%); split: -0.36%, +0.79%
SClause: 9378 -> 9381 (+0.03%); split: -0.21%, +0.25%
Copies: 28451 -> 28211 (-0.84%); split: -0.97%, +0.13%
PreVGPRs: 25404 -> 25411 (+0.03%); split: -0.06%, +0.09%
VALU: 278086 -> 277975 (-0.04%); split: -0.11%, +0.07%
SALU: 43657 -> 43617 (-0.09%)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28015 >
2024-04-23 17:20:40 +00:00
Konstantin
23c167f826
radv: Canonicalize addresses in radv_find_shader
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759 >
2024-04-20 08:29:23 +00:00
Samuel Pitoiset
87fde606cf
radv: use SPDX-License-Identifier
...
Only files under src/amd/vulkan/** are concerned.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28599 >
2024-04-08 07:17:31 +00:00
Samuel Pitoiset
6e4f26827c
radv: move radv_get_user_sgpr() to radv_shader.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Rhys Perry
c3c138b10f
radv: optimize msad_4x8 to mqsad_4x8
...
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/26251 >
2024-04-05 11:01:39 +00:00
Samuel Pitoiset
69b911bc53
radv: remove radv_private.h
...
This file was a giant mess and I'm very happy to remove it entirely.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
d1d04cfeaa
radv: add radv_nir_to_llvm.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551 >
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
9a7afbfa13
radv: add radv_printf.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551 >
2024-04-04 16:35:15 +00:00
Timur Kristóf
8d97c3bd06
radv: Increase maximum allowed PS params for enabling NGG culling.
...
The original limits were chosen very conservatively because at
that time we didn't have a good understanding on the perf impact
of shader culling.
Since then, we've seen some use cases that have a higher amount
of PS params but still benefit from shader culling.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751 >
2024-04-04 16:09:18 +00:00
Timur Kristóf
4464e6baff
radv: Slightly refactor the determination of max_ps_params.
...
It now uses has_dedicated_vram and gfx_level to detect GFX10.3+
discrete GPUs, which should also include GFX11 now.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751 >
2024-04-04 16:09:18 +00:00
Samuel Pitoiset
db736ebf53
radv: implement VK_EXT_device_address_binding_report
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28373 >
2024-04-03 08:48:36 +00:00
Samuel Pitoiset
57dd6691df
radv: pass a radv_physical_device to radv_use_llvm_for_stage()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28519 >
2024-04-02 13:55:52 +00:00
Samuel Pitoiset
b35b2718be
radv: remove radv_physical_device::instance
...
Get the instance object using the base object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
e2c29c9bb6
radv: remove radv_device::instance
...
Use the physical device to access the instance.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
896c9cf486
radv: remove radv_device::physical_device
...
Get the logical device object using the base object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
310597cab6
radv: rename radv_physical_device::rad_info to info
...
The extra rad_ prefix isn't necessary and it's longer to type.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500 >
2024-04-01 16:35:09 +00:00