i965: Add support for and expose EXT_texture_sRGB_R8
authorGert Wollny <gert.wollny@collabora.com>
Thu, 15 Nov 2018 18:01:24 +0000 (19:01 +0100)
committerGert Wollny <gw.fossdev@gmail.com>
Mon, 19 Nov 2018 07:05:44 +0000 (08:05 +0100)
commit78fdc507a37b7174e21412cc0b2f4818dbe6b63f
treea65ea83f7ca8b2b699279d68365396dc3972c7ab
parentc5363869d4971780401b21bb75083ef2518c12be
i965: Add support for and expose EXT_texture_sRGB_R8

Emulate MESA_FORMAT_R_SRGB8 by using L8_UNORM_SRGB. This is possible
because component swizzling is handled based on the mesa format and,
hence, the a r001 swizzling can be used to correct the components.

Enables and makes pass (tested on Kabylake)

  dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.*
  dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8*

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
src/mesa/drivers/dri/i965/brw_surface_formats.c
src/mesa/drivers/dri/i965/intel_extensions.c