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
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.
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.
changing importance to high since it is critical for native and WINE games on Intel graphics.
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>
Thank you for fixing me. Man, I love Open Source driver.
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.