summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-01-05 05:34:24 -0800
committerKenneth Graunke <[email protected]>2016-01-06 21:22:06 -0800
commit3e8f644ed31809ff558dc635581ba7abf6a16776 (patch)
treed167aca55dda8a13b0417fe9c299428af55fca4a
parent8d4039ecdb167771d4b085f70b9666438be1c6ad (diff)
glsl: Disallow vectorization of vector_insert/extract.
vector_insert takes a vector, a scalar location, and a scalar value, and produces a new vector with that component updated. As such, it can't be vectorized properly. vector_extract takes a vector and a scalar location, and returns that scalar component of the vector. Vectorization doesn't really make any sense. Treating both as horizontal operations makes sure the vectorizer won't try to touch these. Found by inspection. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/glsl/ir.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index c56c95994b8..a728c036e6b 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1724,6 +1724,8 @@ public:
return operation == ir_binop_all_equal ||
operation == ir_binop_any_nequal ||
operation == ir_binop_dot ||
+ operation == ir_binop_vector_extract ||
+ operation == ir_triop_vector_insert ||
operation == ir_quadop_vector;
}