From 433fe2022c9898ce0eb3731d1c8906b38a1cbffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Thu, 11 Apr 2024 10:15:47 +0200 Subject: [PATCH] nir/gather_info: Clear per-primitive I/O masks at the beginning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: b0852488193f6b3d4c841410adc7b997b6a8d495 Signed-off-by: Timur Kristóf Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir/nir_gather_info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index cc8dff46fdc..4e7c38d94e1 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -991,6 +991,8 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint) shader->info.outputs_accessed_indirectly = 0; shader->info.patch_inputs_read_indirectly = 0; shader->info.patch_outputs_accessed_indirectly = 0; + shader->info.per_primitive_inputs = 0; + shader->info.per_primitive_outputs = 0; shader->info.uses_resource_info_query = false; @@ -1026,7 +1028,6 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint) gather_func_info(entrypoint, shader, visited_funcs, dead_ctx); ralloc_free(dead_ctx); - shader->info.per_primitive_outputs = 0; shader->info.per_view_outputs = 0; nir_foreach_shader_out_variable(var, shader) { if (var->data.per_primitive) { @@ -1043,7 +1044,6 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint) } } - shader->info.per_primitive_inputs = 0; if (shader->info.stage == MESA_SHADER_FRAGMENT) { nir_foreach_shader_in_variable(var, shader) { if (var->data.per_primitive) {