glsl: Disallow vectorization of vector_insert/extract.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Jan 2016 13:34:24 +0000 (05:34 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jan 2016 05:22:06 +0000 (21:22 -0800)
commit3e8f644ed31809ff558dc635581ba7abf6a16776
treed167aca55dda8a13b0417fe9c299428af55fca4a
parent8d4039ecdb167771d4b085f70b9666438be1c6ad
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