Georg Lehmann
5e6e3c7f89
nir: rename to nir_opt_16bit_tex_image
...
Not sure what I was thinking when I wrote this pass (probably not much),
but opt makes more sense and matches other nir passes.
Fold is usually used for constants, and this pass handles more than those.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28662 >
2024-04-11 06:10:33 +00:00
Samuel Pitoiset
9840607f4b
radv: rework and add a helper for hashing a compute pipeline
...
It should be similar to the previous hashing method but it allows us
to get a hash directly from a pCreateInfo for future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651 >
2024-04-10 20:05:22 +00:00
Samuel Pitoiset
05cd85afc6
radv: add a helper for hashing pipelines
...
Similar between graphics/compute/raytracing pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651 >
2024-04-10 20:05:22 +00:00
Samuel Pitoiset
c6cb3b3b93
radv/rt: remove dead code about intersection shaders in radv_pipeline_get_shader_key()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651 >
2024-04-10 20:05:22 +00:00
Georg Lehmann
1f4662cc4e
radv: move alu
...
The stats are decent now that aco has an ILP scheduler
Foz-DB Navi31:
Totals from 73549 (92.59% of 79439) affected shaders:
MaxWaves: 2226952 -> 2229352 (+0.11%); split: +0.21%, -0.10%
Instrs: 44690384 -> 44905884 (+0.48%); split: -0.10%, +0.58%
CodeSize: 232666088 -> 233474808 (+0.35%); split: -0.10%, +0.45%
VGPRs: 2998036 -> 2986936 (-0.37%); split: -0.58%, +0.21%
SpillSGPRs: 7176 -> 7170 (-0.08%); split: -0.53%, +0.45%
SpillVGPRs: 1124 -> 1068 (-4.98%); split: -5.07%, +0.09%
Scratch: 6981632 -> 6977792 (-0.06%)
Latency: 297998345 -> 298541597 (+0.18%); split: -0.35%, +0.53%
InvThroughput: 49162321 -> 49039572 (-0.25%); split: -0.46%, +0.21%
VClause: 881737 -> 884147 (+0.27%); split: -0.35%, +0.62%
SClause: 1371928 -> 1373973 (+0.15%); split: -0.78%, +0.92%
Copies: 2920492 -> 2927281 (+0.23%); split: -0.84%, +1.08%
Branches: 890209 -> 890121 (-0.01%); split: -0.03%, +0.02%
PreSGPRs: 2376670 -> 2377251 (+0.02%); split: -0.25%, +0.28%
PreVGPRs: 2229634 -> 2208966 (-0.93%); split: -1.04%, +0.11%
VALU: 25124040 -> 25127521 (+0.01%); split: -0.07%, +0.08%
SALU: 4343167 -> 4361062 (+0.41%); split: -0.23%, +0.65%
VMEM: 1582363 -> 1582245
(-0.01%); split: -0.01%, +0.00%
VOPD: 8709 -> 8708 (-0.01%); split: +2.35%, -2.37%
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27032 >
2024-04-10 17:05:59 +00:00
Georg Lehmann
d9a8ab0e01
radv: sink alu
...
The stats are decent now that aco has an ILP scheduler.
Foz-DB Navi31:
Totals from 50743 (63.88% of 79439) affected shaders:
MaxWaves: 1504722 -> 1506408 (+0.11%); split: +0.12%, -0.01%
Instrs: 37550246 -> 37543687 (-0.02%); split: -0.12%, +0.10%
CodeSize: 194277496 -> 194253004 (-0.01%); split: -0.11%, +0.10%
VGPRs: 2266056 -> 2254320 (-0.52%); split: -0.57%, +0.06%
SpillSGPRs: 7893 -> 6861 (-13.07%); split: -14.03%, +0.95%
SpillVGPRs: 1359 -> 1124 (-17.29%)
Scratch: 7006720 -> 6981632 (-0.36%)
Latency: 268082325 -> 267597538 (-0.18%); split: -0.57%, +0.39%
InvThroughput: 43592221 -> 43287284 (-0.70%); split: -1.14%, +0.44%
VClause: 759701 -> 761164 (+0.19%); split: -0.24%, +0.43%
SClause: 1133209 -> 1138406 (+0.46%); split: -0.32%, +0.78%
Copies: 2639405 -> 2632081 (-0.28%); split: -0.81%, +0.53%
Branches: 830411 -> 831358 (+0.11%); split: -0.02%, +0.13%
PreSGPRs: 1802510 -> 1798852 (-0.20%); split: -0.57%, +0.36%
PreVGPRs: 1755801 -> 1747642 (-0.46%); split: -0.51%, +0.04%
VALU: 20974500 -> 20967009 (-0.04%); split: -0.08%, +0.04%
SALU: 3901240 -> 3900098 (-0.03%); split: -0.23%, +0.20%
VMEM: 1397890 -> 1397486 (-0.03%)
VOPD: 4837 -> 4902 (+1.34%); split: +2.03%, -0.68%
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27032 >
2024-04-10 17:05:58 +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
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
0388df3d08
radv: replace RADV_FROM_HANDLE by VK_FROM_HANDLE
...
It was exactly the same thing.
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:45 +00:00
Samuel Pitoiset
195383a5ec
radv: add radv_rmv.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
987f3351b3
radv: add radv_pipeline_rt.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526 >
2024-04-03 13:32:54 +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
Samuel Pitoiset
ce1c32e358
radv: rename radv_physical_device variables to pdev everywhere
...
Shorter and more consistent.
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
e7206bcdb2
radv: implement alpha-to-one
...
This was missing and it's useful for Zink.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28434 >
2024-04-01 10:50:51 +00:00
Alyssa Rosenzweig
a6123a80da
nir/opt_shrink_vectors: shrink some intrinsics from start
...
If the backend supports it, intrinsics with a component() are straightforward to
shrink from the start. Notably helps vectorized I/O.
v2: add an option for this and enable only on grown up backends, because some
backends ignore the component() parameter.
RADV GFX11:
Totals from 921 (1.16% of 79439) affected shaders:
Instrs: 616558 -> 615529 (-0.17%); split: -0.30%, +0.14%
CodeSize: 3099864 -> 3095632 (-0.14%); split: -0.25%, +0.11%
Latency: 2177075 -> 2160966 (-0.74%); split: -0.79%, +0.05%
InvThroughput: 299997 -> 298664 (-0.44%); split: -0.47%, +0.02%
VClause: 16343 -> 16395 (+0.32%); split: -0.01%, +0.32%
SClause: 10715 -> 10714 (-0.01%)
Copies: 24736 -> 24701 (-0.14%); split: -0.37%, +0.23%
PreVGPRs: 30179 -> 30173 (-0.02%)
VALU: 353472 -> 353439 (-0.01%); split: -0.03%, +0.02%
SALU: 40323 -> 40322 (-0.00%)
VMEM: 25353 -> 25352 (-0.00%)
AGX:
total instructions in shared programs: 2038217 -> 2038049 (<.01%)
instructions in affected programs: 10249 -> 10081 (-1.64%)
total alu in shared programs: 1593094 -> 1592939 (<.01%)
alu in affected programs: 7145 -> 6990 (-2.17%)
total fscib in shared programs: 1589254 -> 1589102 (<.01%)
fscib in affected programs: 7217 -> 7065 (-2.11%)
total bytes in shared programs: 13975666 -> 13974722 (<.01%)
bytes in affected programs: 65942 -> 64998 (-1.43%)
total regs in shared programs: 592758 -> 591187 (-0.27%)
regs in affected programs: 6936 -> 5365 (-22.65%)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev > (v1)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28004 >
2024-03-12 18:17:17 +00:00
Daniel Schürmann
67ea2eb97a
radv: fix initialization of radv_shader_layout->use_dynamic_descriptors
...
Fixes: 66eaca3a0a
('radv: introduce radv_shader_layout for per-stage descriptor layout')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27898 >
2024-03-01 09:06:33 +00:00
Samuel Pitoiset
f123a04256
radv: introduce a per physical device cache key
...
This introduces a new level cache key for physical device. The main
motivation is for shader object because the Vulkan spec says:
"Guaranteed compatibility of shader binaries is expressed through a
combination of the shaderBinaryUUID and shaderBinaryVersion members of
the VkPhysicalDeviceShaderObjectPropertiesEXT structure queried from a
physical device. Binary shaders retrieved from a physical device with
a certain shaderBinaryUUID are guaranteed to be compatible with all
other physical devices reporting the same shaderBinaryUUID and the
same or higher shaderBinaryVersion."
Meaning that with ESO, the driver needs to compile shaders for the
worst case with every possible logical device features enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632 >
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
1dbb859b3b
radv: add radv_shader_stage::next_stage field
...
This allows to init radv_shader_info correctly when the next stage is
known, this is mostly for ESO. Though, next_stage could be used in
other places too.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930 >
2024-01-26 08:56:54 +00:00
Konstantin Seurer
e83ef27ba6
radv: Vectorize load_global_constant
...
Totals from 325 (0.38% of 84845) affected shaders:
Instrs: 2883767 -> 2880939 (-0.10%); split: -0.10%, +0.00%
CodeSize: 15388396 -> 15364976 (-0.15%); split: -0.16%, +0.00%
Latency: 20212583 -> 20197719 (-0.07%); split: -0.20%, +0.13%
InvThroughput: 5489738 -> 5489551 (-0.00%); split: -0.14%, +0.14%
VClause: 104225 -> 103944 (-0.27%); split: -0.30%, +0.03%
SClause: 71616 -> 71612 (-0.01%); split: -0.01%, +0.01%
Copies: 252143 -> 252284 (+0.06%); split: -0.10%, +0.15%
Branches: 117826 -> 117821 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 23502 -> 23506 (+0.02%)
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27084 >
2024-01-18 21:30:39 +00:00
Samuel Pitoiset
c5a5ab46c9
radv: remove radv_generate_pipeline_key()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27073 >
2024-01-17 12:08:24 +00:00
Samuel Pitoiset
ffe997d71d
radv: add radv_pipeline_get_shader_key()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036 >
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
844004c335
radv: cleanup radv_generate_pipeline_key()
...
Move everything in the same loop to prepare for a new helper.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036 >
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
082c524f86
radv: pass radv_shader_stage_key to radv_pipeline_stage_init()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036 >
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
08b8356111
radv: add shader_version to radv_shader_stage_key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036 >
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
20fdbc7a44
radv: add keep_statistic_info to radv_shader_stage_key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036 >
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
b555f9451c
radv: introduce radv_graphics_state_key
...
This struct only contains graphics related state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
b888677dcf
radv: add vertex_robustness1 to radv_shader_stage_key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e1a73a53d
radv: add optimisations_disabled to radv_shader_stage_key
...
At some point, we will probably have a VK_SHADER_CREATE_xxx flag
matching the pipeline one. So, I think it's more like a per-shader
field. It can also be useful to disable optimisations per stage when
debugging.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
3a776f036f
radv: use radv_shader_stage_key directly with pre-existing fields
...
More fields will be moved to radv_shader_stage_key but start using it
with pre-existing fields.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
28e330c245
radv: add radv_shader_stage_key to radv_shader_stage
...
For storing the per-stage key information like robustness etc. This
will fit well with ESO as well.
For pipelines, they are copied from radv_pipeline_key, similarly to
the radv_pipeline_layout/radv_shader_layout pair.
This will also allow us to kill radv_pipeline_key for compute/rt
pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
cff2a3aafc
radv: move radv_pipeline_key::mesh_fast_launch_2 to the per-device cache key
...
This is a global thing.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
18349692d0
radv/nir: pass radv_shader_stage to some radv_nir_xxx() functions
...
Instead of passing separate parameters for args, layout, info etc.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007 >
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6f6905fc94
radv: move all per-device keys from radv_pipeline_key to radv_device_cache_key
...
radv_device_cache_key contains everything per-device, while
radv_pipeline_key is more like per-pipeline keys.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948 >
2024-01-11 08:37:36 +00:00
Samuel Pitoiset
4d44cea3e0
radv: introduce radv_device_cache_key for per-device cache compiler options
...
This replaces RADV_HASH_SHADER_xxx by radv_device_cache_key which is
a new struct that contains per-device compiler options. More options
will be moved there.
Blake3 is used to replace sha1.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948 >
2024-01-11 08:37:36 +00:00
Samuel Pitoiset
10a25f39df
radv: move RADV_HASH_SHADER_KEEP_STATISTICS to radv_pipeline_key
...
This is more like a per-pipeline option.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948 >
2024-01-11 08:37:35 +00:00
Samuel Pitoiset
4455c79299
radv: add missing disable_shrink_image_store to the pipeline key
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26948 >
2024-01-11 08:37:35 +00:00
Samuel Pitoiset
58d2a78dba
radv: move dri options to radv_instance::drirc
...
To make it clearer that such an option is a per-application option.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26946 >
2024-01-10 10:07:40 +00:00
Konstantin Seurer
77b9a6f9e2
radv/rt: Use radv_shader for compiled shaders
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:19 +01:00
Konstantin Seurer
8198805e1f
radv: Skip compiling chit and miss shaders
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25224 >
2024-01-07 21:28:06 +01:00
Bas Nieuwenhuizen
eaf61adea5
radv: Add option to clear LDS at the end of a shader.
...
Only shaders which explicitly allow shared memory are included for
now. The pass is very late to avoid optimizations removing the stores
and to ensure the clear gets added after MS outputs get loaded from LDS.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26679 >
2023-12-20 09:15:45 +00:00
Samuel Pitoiset
8a5106f91a
radv: move RADV_HASH_SHADER_xxx flags to radv_pipeline.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26713 >
2023-12-19 09:48:34 +00:00
Tatsuyuki Ishi
533ec9843e
radv: Precompute shader max_waves.
...
Doing it at bind-time causes a 1.4% overhead (among all driver calls) in
Overwatch 2. !24502 mentions that it can be precomputed in case overhead
is a concern, so do it here.
max_waves is stored directly in the radv_shader struct, because
ac_shader_config conforms to LLVM ABI and we cannot add anything custom,
and radv_shader_info needs to be determined from NIR only.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26692 >
2023-12-18 14:31:25 +00:00
Samuel Pitoiset
a39c3920fb
radv: cleanup ac_nir_lower_ps options
...
To make it clear that some fields aren't used with PS epilogs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26663 >
2023-12-14 08:18:46 +00:00
Friedrich Vock
f1817ab7e0
radv,vtn,driconf: Add and use radv_rt_ssbo_non_uniform workaround for Crysis 2/3 Remastered
...
Crysis 2 and 3 Remastered's RT shaders non-uniformly index into SSBO
descriptor arrays without specifying the NonUniformEXT qualifier on the
relevant access chains/load ops. This leads to artifacts around objects.
To add insult to injury, the game fails to provide a meaningful
applicationName/engineName in the Vulkan part of the DX11-Vulkan interop
solution used for RT. Both of these fields are set to "nvpro-sample"
(perhaps the code has been copied from NVIDIA's sample applications).
Therefore, fall back to executable name matching.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9883
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26391 >
2023-12-12 21:16:39 +00:00
Samuel Pitoiset
5b01285cfb
radv: determine if MRTZ needs to be exported via PS epilogs
...
For GFX11 only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413 >
2023-12-06 11:49:31 +00:00