nir/builder: only read meaningful channels in nir_swizzle()
authorConnor Abbott <connor.w.abbott@intel.com>
Mon, 3 Aug 2015 22:04:13 +0000 (15:04 -0700)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 23 Nov 2015 07:36:12 +0000 (08:36 +0100)
commitfb93dd7aa8f2cac520bbbd3fc2af807bd2573480
tree49bf9cf49c13a0c5ca41fef898e5b920dfd9170a
parentd982922b184930a4ceed1d97b772cce5c371865d
nir/builder: only read meaningful channels in nir_swizzle()

This way the caller doesn't have to initialize all 4 channels when they
aren't using them.

v2: Fix signed/unsigned comparison warning (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/nir_builder.h