nir/builder: Add a nir_imm_true/false helpers

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Jason Ekstrand
2018-10-19 09:35:49 -05:00
parent 249e32ab17
commit ff45649bc2
8 changed files with 37 additions and 14 deletions

View File

@@ -86,7 +86,7 @@ lower_udiv64_mod64(nir_builder *b, nir_ssa_def *n, nir_ssa_def *d,
* this is always true within the if statement.
*/
if (n->num_components == 1)
need_high_div = nir_imm_int(b, NIR_TRUE);
need_high_div = nir_imm_true(b);
nir_ssa_def *log2_d_lo = nir_ufind_msb(b, d_lo);