nir: Move new edgeflag assert into the io_lowered case
[mesa.git] / src / compiler / nir / nir_lower_passthrough_edgeflags.c
index eb142ce600ce4968c2827b3416d5fab710d5541d..c048235d6fcc244aee0aa0789705a61b89317cca 100644 (file)
@@ -37,10 +37,12 @@ lower_impl(nir_function_impl *impl)
 
    /* The edge flag is the last input in st/mesa. */
    assert(shader->num_inputs == util_bitcount64(shader->info.inputs_read));
-   assert(shader->num_outputs == util_bitcount64(shader->info.outputs_written));
 
    /* Lowered IO only uses intrinsics. It doesn't use variables. */
    if (shader->info.io_lowered) {
+      assert(shader->num_outputs ==
+             util_bitcount64(shader->info.outputs_written));
+
       /* Load an edge flag. */
       nir_intrinsic_instr *load =
          nir_intrinsic_instr_create(shader, nir_intrinsic_load_input);