i965: Fix EXT_texture_swizzle with a writemask in the FFFS/FP backend.
authorEric Anholt <eric@anholt.net>
Tue, 22 Nov 2011 01:46:22 +0000 (17:46 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 30 Nov 2011 00:44:51 +0000 (16:44 -0800)
commitf98bfb5d68423a4e57f78091c70288c0b558b8bd
tree8c629fbb7bfa760ee407f8a4eb2b43ba7eaddbc6
parentd84a180417d1eabd680554970f1eaaa93abcd41e
i965: Fix EXT_texture_swizzle with a writemask in the FFFS/FP backend.

I tripped over this bug in the next commit, relying on our
EXT_texture_swizzle to do some shadow sampler-related swizzling.  If a
writemask was masking out a channel of the destination that was a live
channel of the texture swizzle, it would read undefined values.

Fixes piglit ARB_fragment_program_shadow/masked.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_wm_fp.c