[Bug 92759] [Regression, bisected] Screen is darker than expected in Supertuxkart

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 9 14:27:30 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=92759

--- Comment #7 from Deve <deveee at gmail.com> ---
I was digging around this bug a bit. Thanks to Ilia Mirkin for the help. Here
is what I noticed:

1. This patch doesn't have a sense.

2. During looking at Supertuxkart code, I noticed that we need srgb-capable
visual for proper working. 

3. The difference in intel code, which causes this issue is in intel_screen.c
in intelCreateBuffer() function:

   if (mesaVis->redBits == 5)
      rgbFormat = MESA_FORMAT_B5G6R5_UNORM;
   else if (mesaVis->sRGBCapable)
      rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;
   else if (mesaVis->alphaBits == 0)
      rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM;
   else {
      rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;
      fb->Visual.sRGBCapable = true;
   }

Before commit 28090b30dd6b5977de085f48c620574214b6b4ba the format
MESA_FORMAT_B8G8R8X8_UNORM was not available, and thus it was using
MESA_FORMAT_B8G8R8A8_SRGB format (which is srgb-capable). Now it is using
MESA_FORMAT_B8G8R8X8_UNORM format, and thus function

    glEnable(GL_FRAMEBUFFER_SRGB) 

doesn't take effect anymore.

4. I tried to force to use srgb-capable visual by setting
GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB in supertuxkart code with glxChooseFBConfig
function, but it doesn't take any effect.

5. The ugly workaround for this issue in supertuxkart code, is to request
GLX_ALPHA_SIZE > 0. It will fallback to last case in intel code, which I
mentioned upwards:

      rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;
      fb->Visual.sRGBCapable = true;

6. The bug 91817 (https://bugs.freedesktop.org/show_bug.cgi?id=91817) seems to
be related to this bug.


Is there a proper way to force using srgb-capable visual?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20151209/831a1bae/attachment.html>


More information about the intel-3d-bugs mailing list