ac/nir/ngg: fix nogs culling scratch size

Should be in bytes not dwords.

Fixes: e97f0463a8 ("ac/nir: Implement NGG deferred attribute culling in NIR.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17593>
This commit is contained in:
Qiang Yu 2022-07-07 19:40:48 +08:00 committed by Marge Bot
parent 5050db0b55
commit 0b7ef846b3

View file

@ -1128,7 +1128,7 @@ add_deferred_attribute_culling(nir_builder *b, nir_cf_list *original_extracted_c
unsigned total_es_lds_bytes = pervertex_lds_bytes * nogs_state->max_es_num_vertices;
unsigned max_num_waves = nogs_state->max_num_waves;
unsigned ngg_scratch_lds_base_addr = ALIGN(total_es_lds_bytes, 8u);
unsigned ngg_scratch_lds_bytes = DIV_ROUND_UP(max_num_waves, 4u);
unsigned ngg_scratch_lds_bytes = ALIGN(max_num_waves, 4u);
nogs_state->total_lds_bytes = ngg_scratch_lds_base_addr + ngg_scratch_lds_bytes;
nir_function_impl *impl = nir_shader_get_entrypoint(b->shader);