aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-07-31 15:35:22 -0700
committerEric Anholt <[email protected]>2015-08-14 11:39:18 -0700
commitd50c182671a6aa315c83b5e203655e902996c0e7 (patch)
treecc4912d1d231d5362f9b3925bd55efe5f02b7283 /src
parent9e6dc5b64d5e931c7ebc272096eccab102b75d76 (diff)
nir: Don't try to scalarize unpack ops.
Avoids regressions in vc4 when trying to do our blending in NIR. v2: Add the other unpack ops I meant to when writing the original commit message. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/nir/nir_lower_alu_to_scalar.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_lower_alu_to_scalar.c b/src/glsl/nir/nir_lower_alu_to_scalar.c
index 5d15fb2bc32..efbe9e7175f 100644
--- a/src/glsl/nir/nir_lower_alu_to_scalar.c
+++ b/src/glsl/nir/nir_lower_alu_to_scalar.c
@@ -100,6 +100,21 @@ lower_alu_instr_scalar(nir_alu_instr *instr, void *mem_ctx)
*/
return;
+ case nir_op_unpack_unorm_4x8:
+ case nir_op_unpack_snorm_4x8:
+ case nir_op_unpack_unorm_2x16:
+ case nir_op_unpack_snorm_2x16:
+ /* There is no scalar version of these ops, unless we were to break it
+ * down to bitshifts and math (which is definitely not intended).
+ */
+ return;
+
+ case nir_op_unpack_half_2x16:
+ /* We could split this into unpack_half_2x16_split_[xy], but should
+ * we?
+ */
+ return;
+
LOWER_REDUCTION(nir_op_fdot, nir_op_fmul, nir_op_fadd);
LOWER_REDUCTION(nir_op_ball_fequal, nir_op_feq, nir_op_iand);
LOWER_REDUCTION(nir_op_ball_iequal, nir_op_ieq, nir_op_iand);