summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_builtin_builder.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-05-06 10:23:26 -0500
committerJason Ekstrand <[email protected]>2019-05-24 08:38:11 -0500
commitddd08e1888cfdf7a643b8fa1ce61f77bb66aa3eb (patch)
treed7a679f59482db5f44756bbb482f55e61861d057 /src/compiler/nir/nir_builtin_builder.c
parent6c2ca2a5d33cdfc4202ebb0df54567b587ecc578 (diff)
nir/builder: Remove the use_fmov parameter from nir_swizzle
This flag has caused more confusion than good in most cases. You can validly use imov for floats or fmov for integers because, without source modifiers, neither modify their input in any way. Using imov for floats is more reliable so we go that direction. Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_builtin_builder.c')
-rw-r--r--src/compiler/nir/nir_builtin_builder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_builtin_builder.c b/src/compiler/nir/nir_builtin_builder.c
index a050306765e..8812c7a6a8a 100644
--- a/src/compiler/nir/nir_builtin_builder.c
+++ b/src/compiler/nir/nir_builtin_builder.c
@@ -32,10 +32,10 @@ nir_cross3(nir_builder *b, nir_ssa_def *x, nir_ssa_def *y)
unsigned yzx[3] = { 1, 2, 0 };
unsigned zxy[3] = { 2, 0, 1 };
- return nir_fsub(b, nir_fmul(b, nir_swizzle(b, x, yzx, 3, true),
- nir_swizzle(b, y, zxy, 3, true)),
- nir_fmul(b, nir_swizzle(b, x, zxy, 3, true),
- nir_swizzle(b, y, yzx, 3, true)));
+ return nir_fsub(b, nir_fmul(b, nir_swizzle(b, x, yzx, 3),
+ nir_swizzle(b, y, zxy, 3)),
+ nir_fmul(b, nir_swizzle(b, x, zxy, 3),
+ nir_swizzle(b, y, yzx, 3)));
}
nir_ssa_def*