glsl/ir_builder: Add a new swizzle_for_size() function.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Jul 2012 03:59:29 +0000 (20:59 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 12 Jul 2012 17:20:20 +0000 (10:20 -0700)
commitd9da350a8334201400a43d105b92fce2bd6a5f32
tree60e76ef1eae2e71532b1a03b503fab8a72493a1f
parent0bb3d4ba54f98f4d45abe598dabc905f08055cd5
glsl/ir_builder: Add a new swizzle_for_size() function.

This swizzles away unwanted components, while preserving the order of
the ones that remain.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/ir_builder.cpp
src/glsl/ir_builder.h