i965: Fix I/L/LA SNORM formats.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 26 Feb 2015 22:29:25 +0000 (14:29 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 27 Feb 2015 19:36:27 +0000 (11:36 -0800)
commit53295bebc883c5b90b4b3a2612d7cacabc94fd1b
tree6ce059ed54d75d08938e0953c262fd3295ceb1ac
parentea696be5ac097af621f10858d925a343a838be7a
i965: Fix I/L/LA SNORM formats.

_mesa_choose_tex_format (texformat.c) tries I8_SNORM, L8_SNORM, and
either L8A8_SNORM or A8L8_SNORM, none of which are supported by our
driver.  Failing that, it falls back to RGBX for luminance, and RGBA
intensity and luminance alpha.  So, we need to use swizzle overrrides
to obtain the correct values.

Fixes Piglit's EXT_texture_snorm/fbo-blending-formats and
fbo-clear-formats.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c