From eff418fe577f9e775b425d1166fcdf83567e8699 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 8 Jun 2021 12:58:18 +1000 Subject: [PATCH] nir/edgeflags: update outputs written when lowering edge flags. In theory you can rerun the info gather pass, but in practice that doesn't always end well. Be consistent inside this pass and update the info. While we're here, change the inputs read to use VERT_BIT_EDGEFLAG. Reviewed-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Part-of: --- src/compiler/nir/nir_lower_passthrough_edgeflags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_passthrough_edgeflags.c b/src/compiler/nir/nir_lower_passthrough_edgeflags.c index 59b02af0aef..addd6bbeb2d 100644 --- a/src/compiler/nir/nir_lower_passthrough_edgeflags.c +++ b/src/compiler/nir/nir_lower_passthrough_edgeflags.c @@ -77,11 +77,12 @@ lower_impl(nir_function_impl *impl) in->data.location = VERT_ATTRIB_EDGEFLAG; in->data.driver_location = shader->num_inputs++; - shader->info.inputs_read |= BITFIELD64_BIT(VERT_ATTRIB_EDGEFLAG); + shader->info.inputs_read |= VERT_BIT_EDGEFLAG; out = nir_variable_create(shader, nir_var_shader_out, glsl_vec4_type(), "edgeflag_out"); out->data.location = VARYING_SLOT_EDGE; + shader->info.outputs_written |= VARYING_BIT_EDGE; def = nir_load_var(&b, in); nir_store_var(&b, out, def, 0xf);