From 3e8f644ed31809ff558dc635581ba7abf6a16776 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke <kenneth@whitecape.org> Date: Tue, 5 Jan 2016 05:34:24 -0800 Subject: 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 <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> --- src/glsl/ir.h | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3