mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
radv: stop overallocating LDS for VS/TES when NGG streamout is enabled
The number of shader outputs should only be considered when the
shader has XFB, otherwise we are overallocating LDS.
fossils-db (GFX1100):
Totals from 16602 (12.31% of 134913) affected shaders:
LDS: 17000448 -> 8500224 (-50.00%)
Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19801>
(cherry picked from commit 499abeba60)
This commit is contained in:
parent
1e46b971c9
commit
c0bc23f194
2 changed files with 3 additions and 2 deletions
|
|
@ -400,7 +400,7 @@
|
|||
"description": "radv: stop overallocating LDS for VS/TES when NGG streamout is enabled",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1349,10 +1349,11 @@ setup_ngg_lds_layout(struct radv_device *device, nir_shader *nir, struct radv_sh
|
|||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_INSTANCE_ID);
|
||||
bool uses_primtive_id =
|
||||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_ID);
|
||||
bool streamout_enabled = nir->xfb_info && device->physical_device->use_ngg_streamout;
|
||||
unsigned pervertex_lds_bytes =
|
||||
ac_ngg_nogs_get_pervertex_lds_size(stage,
|
||||
nir->num_outputs,
|
||||
device->physical_device->use_ngg_streamout,
|
||||
streamout_enabled,
|
||||
info->outinfo.export_prim_id,
|
||||
false, /* user edge flag */
|
||||
info->has_ngg_culling,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue