From 0b7ef846b3ddfe6e7964d95332cba79e69c8163a Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Thu, 7 Jul 2022 19:40:48 +0800 Subject: [PATCH] ac/nir/ngg: fix nogs culling scratch size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should be in bytes not dwords. Fixes: e97f0463a8f ("ac/nir: Implement NGG deferred attribute culling in NIR.") Reviewed-by: Timur Kristóf Signed-off-by: Qiang Yu Part-of: --- src/amd/common/ac_nir_lower_ngg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_lower_ngg.c b/src/amd/common/ac_nir_lower_ngg.c index e7b2dbf53bf..bde19321669 100644 --- a/src/amd/common/ac_nir_lower_ngg.c +++ b/src/amd/common/ac_nir_lower_ngg.c @@ -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);