i965: Use swizzles to force alpha to 1.0 for RED, RG, or RGB textures.
i965: Use swizzles to force alpha to 1.0 for RED, RG, or RGB textures.

We may be using a texture with actual RGBA storage for these formats, so force
the alpha value read to 1.0.

This commit fixes the following piglit (sub) tests:

	ARB_texture_float/fb-blending-formats
		GL_RGB16F_ARB
	EXT_framebuffer_object/fbo-blending-formats
                GL_RGB10
		GL_RGB12
	        GL_RGB16
	EXT_texture_snorm/fbo-blending-formats
		GL_RGB16_SNORM
		GL_RGB8_SNORM
		GL_RGB_SNORM

These test improvements depend on the previous commit as well. That commit
smashes alpha to 1.0 for the case of ReadPixels (so fixes "FBO testing" as
reported by this test), while this commit smashes alpha to 1.0 for the case of
texturing (fixed the "window testing" as reported by this test).

Note: Haswell bypasses this swizzle code, so may require an independent fix
for this bug.

Reviewed-by: Eric Anholt <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@anholt.net>

metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,zeux/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer