i965: Respect GL_TEXTURE_SRGB_DECODE_EXT in GenerateMipmaps()
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 29 Oct 2018 22:29:10 +0000 (15:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Oct 2018 19:59:53 +0000 (12:59 -0700)
commit337a808062c756b474ee80a9ac04b5a3dbbeb67e
tree09eba7c7f25286e963adf7096261a717b9f997b3
parente4e0fd5ffe1de9078ac8906155e1a80ca2006994
i965: Respect GL_TEXTURE_SRGB_DECODE_EXT in GenerateMipmaps()

Apparently, we're supposed to look at the texture object's built-in
sampler object's sRGB decode setting in order to decide whether to
decode/downsample/re-encode, or simply downsample as-is.  Previously,
I had always done the decoding/encoding.

Fixes SKQP's Skia_Unit_Tests.SRGBMipMaps test.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/brw_generate_mipmap.c