mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-14 14:28:08 +02: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>
This commit is contained in:
parent
8b8d14f906
commit
499abeba60
1 changed files with 2 additions and 1 deletions
|
|
@ -1352,10 +1352,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);
|
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_INSTANCE_ID);
|
||||||
bool uses_primtive_id =
|
bool uses_primtive_id =
|
||||||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_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 =
|
unsigned pervertex_lds_bytes =
|
||||||
ac_ngg_nogs_get_pervertex_lds_size(stage,
|
ac_ngg_nogs_get_pervertex_lds_size(stage,
|
||||||
nir->num_outputs,
|
nir->num_outputs,
|
||||||
device->physical_device->use_ngg_streamout,
|
streamout_enabled,
|
||||||
info->outinfo.export_prim_id,
|
info->outinfo.export_prim_id,
|
||||||
false, /* user edge flag */
|
false, /* user edge flag */
|
||||||
info->has_ngg_culling,
|
info->has_ngg_culling,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue