From: Kenneth Graunke Date: Tue, 5 Jan 2016 13:34:24 +0000 (-0800) Subject: glsl: Disallow vectorization of vector_insert/extract. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e8f644ed31809ff558dc635581ba7abf6a16776;p=mesa.git 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 Reviewed-by: Matt Turner --- 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; }