When generating mipmap for texture, bi-linear interpolation is used to get the next mip level. If the texture is in sRGB format, we should decode sRGB to linear before the interpolation, and then re-encode it to sRGB after interpolation. Mesa doesn't follow such rules.
Steps to reproduce this bug:
1. Run latest "google-chrome-unstable" on Skylake Linux with option "--enable-unsafe-es3-apis" to enable WebGL 2.0 support.
2. open https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/misc/tex-srgb-mipmap.html?webglVersion=2
3. You will see the test fails due to some result pixles are different with the reference.
Patch awaiting review:
This was fixed by
Author: Kenneth Graunke <email@example.com>
Date: Fri Aug 12 14:48:54 2016 -0700
meta: Always do GenerateMipmaps in linear colorspace.
and is part of mesa-13.0.0.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.