From b0852488193f6b3d4c841410adc7b997b6a8d495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Sun, 31 Mar 2024 08:32:32 +0200 Subject: [PATCH] nir/gather_info: Record per-primitive outputs without variables. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, this information would have been lost when the shader has no I/O variables. Signed-off-by: Timur Kristóf Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir/nir_gather_info.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index f86bbd645cd..fc885c4d3a8 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -594,6 +594,8 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader, } else { shader->info.outputs_written |= slot_mask; shader->info.outputs_written_16bit |= slot_mask_16bit; + if (instr->intrinsic == nir_intrinsic_store_per_primitive_output) + shader->info.per_primitive_outputs |= slot_mask; if (!nir_src_is_const(*nir_get_io_offset_src(instr))) { shader->info.outputs_accessed_indirectly |= slot_mask; shader->info.outputs_accessed_indirectly_16bit |= slot_mask_16bit;