i965: Explicitely handle swizzles for MESA_FORMAT_R_SRGB8
authorGert Wollny <gert.wollny@collabora.com>
Thu, 22 Nov 2018 18:00:02 +0000 (19:00 +0100)
committerGert Wollny <gw.fossdev@gmail.com>
Wed, 28 Nov 2018 09:07:02 +0000 (10:07 +0100)
commitd8bb88d0b4d6d58c854ded1d5a6d2bc5e615902e
tree5ae406d789abbab5ba4da5a09bb6e07e7c949767
parent091295d7cb5781ddf7ca8f254471fbe896831fbc
i965: Explicitely handle swizzles for MESA_FORMAT_R_SRGB8

The format is emulated by using ISL_FORMAT_L8_SRGB, therefore we need to
force swizzles for the GBA channels. However, doing this only based on the
data type GL_RED breaks other formats, therefore, test specifically for the
format.

Fixes: c5363869d4971780401b21bb75083ef2518c12be
  i965: Force zero swizzles for unused components in GL_RED and GL_RG
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c