nir: Update shader info when adding discards

vc4 is about to start using the shader info field to set up discard
handling.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Eric Anholt
2016-08-26 13:45:47 -07:00
parent fa8f87132a
commit a99d70d105
2 changed files with 4 additions and 0 deletions

View File

@@ -286,6 +286,8 @@ lower_clip_fs(nir_function_impl *impl, unsigned ucp_enables,
nir_intrinsic_discard_if);
discard->src[0] = nir_src_for_ssa(cond);
nir_builder_instr_insert(&b, &discard->instr);
b.shader->info.fs.uses_discard = true;
}
}
}