aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
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/spirv
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/spirv')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c4
-rw-r--r--src/compiler/spirv/vtn_glsl450.c18
2 files changed, 11 insertions, 11 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 9a66b9a28cb..d877077fa3b 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2458,7 +2458,7 @@ get_image_coord(struct vtn_builder *b, uint32_t value)
for (unsigned i = 0; i < 4; i++)
swizzle[i] = MIN2(i, dim - 1);
- return nir_swizzle(&b->nb, coord->def, swizzle, 4, false);
+ return nir_swizzle(&b->nb, coord->def, swizzle, 4);
}
static nir_ssa_def *
@@ -2470,7 +2470,7 @@ expand_to_vec4(nir_builder *b, nir_ssa_def *value)
unsigned swiz[4];
for (unsigned i = 0; i < 4; i++)
swiz[i] = i < value->num_components ? i : 0;
- return nir_swizzle(b, value, swiz, 4, false);
+ return nir_swizzle(b, value, swiz, 4);
}
static void
diff --git a/src/compiler/spirv/vtn_glsl450.c b/src/compiler/spirv/vtn_glsl450.c
index adfdc1a790c..753e74cf73c 100644
--- a/src/compiler/spirv/vtn_glsl450.c
+++ b/src/compiler/spirv/vtn_glsl450.c
@@ -40,7 +40,7 @@ static nir_ssa_def *
build_mat2_det(nir_builder *b, nir_ssa_def *col[2])
{
unsigned swiz[2] = {1, 0 };
- nir_ssa_def *p = nir_fmul(b, col[0], nir_swizzle(b, col[1], swiz, 2, true));
+ nir_ssa_def *p = nir_fmul(b, col[0], nir_swizzle(b, col[1], swiz, 2));
return nir_fsub(b, nir_channel(b, p, 0), nir_channel(b, p, 1));
}
@@ -52,12 +52,12 @@ build_mat3_det(nir_builder *b, nir_ssa_def *col[3])
nir_ssa_def *prod0 =
nir_fmul(b, col[0],
- nir_fmul(b, nir_swizzle(b, col[1], yzx, 3, true),
- nir_swizzle(b, col[2], zxy, 3, true)));
+ nir_fmul(b, nir_swizzle(b, col[1], yzx, 3),
+ nir_swizzle(b, col[2], zxy, 3)));
nir_ssa_def *prod1 =
nir_fmul(b, col[0],
- nir_fmul(b, nir_swizzle(b, col[1], zxy, 3, true),
- nir_swizzle(b, col[2], yzx, 3, true)));
+ nir_fmul(b, nir_swizzle(b, col[1], zxy, 3),
+ nir_swizzle(b, col[2], yzx, 3)));
nir_ssa_def *diff = nir_fsub(b, prod0, prod1);
@@ -76,9 +76,9 @@ build_mat4_det(nir_builder *b, nir_ssa_def **col)
swiz[j] = j + (j >= i);
nir_ssa_def *subcol[3];
- subcol[0] = nir_swizzle(b, col[1], swiz, 3, true);
- subcol[1] = nir_swizzle(b, col[2], swiz, 3, true);
- subcol[2] = nir_swizzle(b, col[3], swiz, 3, true);
+ subcol[0] = nir_swizzle(b, col[1], swiz, 3);
+ subcol[1] = nir_swizzle(b, col[2], swiz, 3);
+ subcol[2] = nir_swizzle(b, col[3], swiz, 3);
subdet[i] = build_mat3_det(b, subcol);
}
@@ -130,7 +130,7 @@ build_mat_subdet(struct nir_builder *b, struct vtn_ssa_value *src,
for (unsigned j = 0; j < size; j++) {
if (j != col) {
subcol[j - (j > col)] = nir_swizzle(b, src->elems[j]->def,
- swiz, size - 1, true);
+ swiz, size - 1);
}
}