glsl: Clamp vector indices when lowering to swizzles
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Nov 2011 18:58:00 +0000 (10:58 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 9 Nov 2011 18:50:35 +0000 (10:50 -0800)
commit6f5c73797087c6e7842665f84e41caedea59bb65
tree7aa3e7015a88183c887fe95cb561a7c4cdea4eff
parent1d1c0fa2f31de5190909c869452ae9a2e23bba00
glsl: Clamp vector indices when lowering to swizzles

This prevents other code from seeing a swizzle of the 16th component
of a vector, for example.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42517
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Tested-by: Christian Holler <choller@mozilla.com>
src/glsl/lower_vec_index_to_swizzle.cpp