Bug 35373 - [[GM45] OpenGL] GL_EXT_texture_sRGB_decode broken
Summary: [[GM45] OpenGL] GL_EXT_texture_sRGB_decode broken
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 16:11 UTC by Julius Schwartzenberg
Modified: 2012-03-24 10:28 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
piglit fbo-srgb-blit test results (1.37 KB, text/html)
2011-03-16 16:11 UTC, Julius Schwartzenberg
Details

Description Julius Schwartzenberg 2011-03-16 16:11:06 UTC
Created attachment 44524 [details]
piglit fbo-srgb-blit test results

It appears the implementation of the GL_EXT_texture_sRGB_decode OpenGL extension for GM45 chips is broken.

Due to this:
Newer Wine versions which use this extension for rendering will have corrupt graphics with Monkey Island 2 SE and other games. (Wine bug #26421, http://bugs.winehq.org/show_bug.cgi?id=26421)

The fbo-srgb-blit test from the piglit test suite fails. I have attached the results of this test.

My specs:
Ubuntu 10.04 Lucid
X.Org X Server 1.8.2
Intel driver version 2:2.14.0+git20110214.23f9b14d-0ubuntu0sarvatt~lucid
Mesa driver version 7.11.0+git20110315.11ee41fe-0ubuntu0sarvatt
Kernel version 2.6.38-5-generic
Comment 1 Henri Verbeet 2011-03-16 16:22:34 UTC
The issue isn't so much that EXT_texture_sRGB_decode itself is broken. Because of the way EXT_texture_sRGB_decode works, textures are now created with an sRGB internal format. This means wined3d will now potentially be affected by bugs in sRGB texture handling, even though we may disable the actual sRGB decoding.
Comment 2 Jaime Rave 2011-04-21 13:33:16 UTC
This bug is affecting a lot of games:

Call Of Dutty 4 MW
Settlers 2 10th Year edition
Civilizations IV
Left for Death 1/2
CS:Source

Using MESA_EXTENSION_OVERRIDE=-GL_EXT_texture_sRGB_decode worksaround the problem for now.
Comment 3 Md Imam Hossain 2011-06-03 23:01:09 UTC
changing importance to high since it is critical for native and WINE games on Intel graphics.
Comment 4 Eric Anholt 2011-06-05 11:32:01 UTC
imamdxl: Please do not mess with our priority fields.  Those are for us.

commit e8ea8793e3c65f7feef063c6edc7b86bf0e66997
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Jun 1 13:15:28 2011 -0700

    meta: Don't do sRGB encode for framebuffer blits on sRGB-enabled framebuffer
    
    Fixes fbo-srgb-blit.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35373
    Reviewed-by: Brian Paul <brianp@vmware.com>

commit a513bee2f247d7cf9cd8e9c3d50f2bd48f136776
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Jun 1 13:00:14 2011 -0700

    meta: Don't do srgb to linear decode when blitting srgb textures.
    
    Fixes the GL_SRGB8_ALPHA8 -> GL_RGBA8 blits in fbo-srgb-blit.c
    
    Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 5 Md Imam Hossain 2011-06-05 23:00:34 UTC
Thank you for fixing me.
Man, I love Open Source driver.
Comment 6 andreas.sturmlechner 2012-03-24 10:28:32 UTC
This is not fixed on my system (Gentoo amd64 multilib, kernel-3.3, GMA4500MHD). I get dark textures in Civ4 from wine-1.3.15 on (which is the first version of it to use the extension, I already git bisected that...) unless I set MESA_EXTENSION_OVERRIDE="-GL_EXT_texture_sRGB_decode".

The bug was first noticed using the emul-linux-x86 libs from Gentoo that provide mesa 7.11.2 binaries - even though the supposed fix is in its changelog - and is still present in natively built mesa-git. It was also confirmed by an other GM45 user.

I'm writing in here because it seems to be the exact same issue.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.