diff options
author | Jason Ekstrand <[email protected]> | 2017-08-28 17:33:33 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | 44681e47955687d5590779fdc44373d3fb204fdc (patch) | |
tree | 147add39a1abf8411c643b306e510fb71f14624c /src/compiler/nir/nir_opt_intrinsics.c | |
parent | 9812fce60b6ffbcd136b66bfb609143449ad3f7c (diff) |
nir: Generalize nir_intrinsic_vote_eq
The SPIR-V extension wants us to be able to do an AllEqual on any vector
or scalar type. This has two implications:
1) We need to be able to handle vectors so we switch the vote_eq
intrinsics to be vectorized intrinsics.
2) We need to handle floats which have different behavior with respect
to +-0, NaN, etc. than the integer variant so we need two variants.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_intrinsics.c')
-rw-r--r-- | src/compiler/nir/nir_opt_intrinsics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_intrinsics.c b/src/compiler/nir/nir_opt_intrinsics.c index eb394af0c10..37f08c77ef1 100644 --- a/src/compiler/nir/nir_opt_intrinsics.c +++ b/src/compiler/nir/nir_opt_intrinsics.c @@ -50,7 +50,8 @@ opt_intrinsics_impl(nir_function_impl *impl) if (nir_src_as_const_value(intrin->src[0])) replacement = nir_ssa_for_src(&b, intrin->src[0], 1); break; - case nir_intrinsic_vote_eq: + case nir_intrinsic_vote_feq: + case nir_intrinsic_vote_ieq: if (nir_src_as_const_value(intrin->src[0])) replacement = nir_imm_int(&b, NIR_TRUE); break; |