diff options
author | Matt Turner <[email protected]> | 2017-06-22 12:20:18 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-07-20 16:56:49 -0700 |
commit | 742cc6118a8d76870c707667a945269122aa0f21 (patch) | |
tree | cd41e61559afc2139ec98325eb329a2e98ec9be1 /src/compiler/nir/nir_opt_intrinsics.c | |
parent | d4c9d6a3b2cef577454d9c911fc96d5f678d9955 (diff) |
nir: Support lowering vote intrinsics
... trivially (as allowed by the spec!) by reusing the existing
nir_opt_intrinsics code.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_intrinsics.c')
-rw-r--r-- | src/compiler/nir/nir_opt_intrinsics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_opt_intrinsics.c b/src/compiler/nir/nir_opt_intrinsics.c index 9055c98dd33..bdb46e9300b 100644 --- a/src/compiler/nir/nir_opt_intrinsics.c +++ b/src/compiler/nir/nir_opt_intrinsics.c @@ -48,7 +48,7 @@ opt_intrinsics_impl(nir_function_impl *impl) 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); @@ -56,7 +56,7 @@ opt_intrinsics_impl(nir_function_impl *impl) } 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); |