... trivially (as allowed by the spec!) by reusing the existing
nir_opt_intrinsics code.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
bool lower_extract_byte;
bool lower_extract_word;
+ bool lower_vote_trivial;
+
/**
* Does the driver support real 32-bit integers? (Otherwise, integers
* are simulated by floats.)
case nir_intrinsic_vote_any:
case nir_intrinsic_vote_all: {
nir_const_value *val = nir_src_as_const_value(intrin->src[0]);
- if (!val)
+ if (!val && !b.shader->options->lower_vote_trivial)
continue;
replacement = nir_ssa_for_src(&b, intrin->src[0], 1);
}
case nir_intrinsic_vote_eq: {
nir_const_value *val = nir_src_as_const_value(intrin->src[0]);
- if (!val)
+ if (!val && !b.shader->options->lower_vote_trivial)
continue;
replacement = nir_imm_int(&b, NIR_TRUE);