diff options
author | Kenneth Graunke <[email protected]> | 2014-04-08 16:55:23 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-04-11 12:39:37 -0700 |
commit | ae2a03b5736037128fb071595717f300d5b3afd5 (patch) | |
tree | 9a3aec47ed45d1bcb20f5b85077f9e5c19e4e556 /src/glsl/opt_flip_matrices.cpp | |
parent | 625cf8c874950a38e7afb404345611f0fad4d490 (diff) |
glsl: Try vectorizing when seeing a repeated assignment to a channel.
When considering assignment expressions like:
v.x += u.x;
v.x += u.x;
the vectorizer would incorrectly keep going, attempting to find more
instructions to vectorize. It would overwrite the saved assignment
to point at the second one, and increment channels a second time,
resulting in try_vectorize thinking the expression was a vec2 instead of
a float.
Instead, if we see a repeated assignment to a channel, just try to
vectorize everything we've found so far. This clears the saved state
so it will start over.
Fixes Piglit's repeated-channel-assignments.vert.
Cc: "10.1" <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/opt_flip_matrices.cpp')
0 files changed, 0 insertions, 0 deletions