i965/fs: Assume shadow sampler swizzling is <X, X, X, 1>.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 26 Aug 2012 07:34:03 +0000 (00:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 27 Aug 2012 21:23:40 +0000 (14:23 -0700)
commit85b24b07512c5f3f05c5a3eb9561598ace97526c
tree652d2c78b8032b037b7a075212f123740ca59dfb
parentf3d0daf7ea7e42ff9ce11e8bd6fba1059a2406e8
i965/fs: Assume shadow sampler swizzling is <X, X, X, 1>.

Our previous assumption, SWIZZLE_XYZW, was completely bogus for depth
textures.  There are no Y, Z, or W components.

DEPTH_TEXTURE_MODE has three options:
- GL_LUMINANCE: <X, X, X, 1>
- GL_INTENSITY: <X, X, X, X>
- GL_ALPHA:     <0, 0, 0, X>

The default value is GL_LUMINANCE, and most applications don't seem to
alter DEPTH_TEXTURE_MODE.  Make that our precompile guess.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs.cpp