Skip to contentSkip to conversation

New: GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken

Bug 36965 [email protected] 1 participant 9 messages May 8, 2011 – Nov 2, 2012

lore
Share & tools
lore
#0 lore raw

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

Summary: GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken
Product: Mesa
Version: 7.10
Platform: All
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
AssignedTo: [email protected]
ReportedBy: [email protected]

The GL extension GL_EXT_texture_sRGB (which is in OpenGL 2.1 core) defines the texture formats GL_SRGB and friends and specifies that sampling such a texture automatically converts the values from non-linear RGB (sRGB) to linear RGB.

However, this conversion is not performed; the textures are sampled as if they were normal GL_RGB textures. This results in wrong colors (e.g. in the Bino 3D video player: far too bright).

I'm running Ubuntu 11.04 on x86_64 and get the following version info from GL:
OpenGL version: 2.1 Mesa 7.10.2
OpenGL renderer: Gallium 0.4 on AMD RV710
OpenGL vendor: X.Org

If you need more information, please let me know.

[This is the same as bug 32323, but re-reported for newer Mesa versions]

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken

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

--- Comment #1 from Pavel Ondračka <[email protected]> 2011-05-12 09:11:08 PDT --- I see similar problems in Starcraft 2, there are also over bright textures which go away when MESA_EXTENSION_OVERRIDE="-GL_EXT_texture_sRGB_decode" is set.
OpenGL renderer string: Gallium 0.4 on ATI RV530
OpenGL version string: 2.1 Mesa 7.11-devel (git-32a95cb)

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken

In reply to [email protected]

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

--- Comment #2 from Pavel Ondračka <[email protected]> 2011-05-12 09:18:11 PDT --- BTW this should be probably a mesa core bug, right?

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken

In reply to [email protected]

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

--- Comment #3 from Martin Lambers <[email protected]> 2011-05-12 10:20:51 PDT --- (In reply to comment #2)

Quoted 1 line

BTW this should be probably a mesa core bug, right?

There is code in Mesa to handle SRGB textures correctly, see
http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/texgetimage.c lines 223-301.

I guess drivers can override this, but I don't know the internal structure of Mesa.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken (glean/texture_srgb broken too)

In reply to [email protected]

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

Marek Olšák <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|GL_EXT_texture_sRGB         |GL_EXT_texture_sRGB
                   |(included in OpenGL 2.1) is |(included in OpenGL 2.1) is
                   |broken                      |broken (glean/texture_srgb
                   |                            |broken too)

--- Comment #4 from Marek Olšák <[email protected]> 2011-05-12 12:50:02 PDT --- There is a lot of other code which plays role in handling sRGB textures. I don't think getteximage.c is relevant to this issue(s).

Nevertheless, it looks like Pavel's and Martin's issues are different bugs.

Pavel reported that GL_EXT_texture_sRGB_decode, which is only in 7.11, is broken specifically on r300g, but other drivers might be affected as well and it definitely looks like a Mesa core bug. Pavel, could you please add it as a new bug against Mesa core?

Martin's issue is likely related to the fact that piglit/glean/texture_srgb fails on r600g. Taking a look at it might be a good start.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken (glean/texture_srgb broken too)

In reply to [email protected]

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

--- Comment #5 from Pavel Ondračka <[email protected]> 2011-05-12 14:07:59 PDT --- (In reply to comment #4)

Quoted 10 lines

There is a lot of other code which plays role in handling sRGB textures. I don't think getteximage.c is relevant to this issue(s).

Nevertheless, it looks like Pavel's and Martin's issues are different bugs.

Pavel reported that GL_EXT_texture_sRGB_decode, which is only in 7.11, is broken specifically on r300g, but other drivers might be affected as well and it definitely looks like a Mesa core bug. Pavel, could you please add it as a new bug against Mesa core?

Reported against mesa core as bug 37150.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken (glean/texture_srgb broken too)

In reply to [email protected]

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

--- Comment #6 from Andreas Boll <[email protected]> --- (In reply to comment #4)

Quoted 5 lines

There is a lot of other code which plays role in handling sRGB textures. I don't think getteximage.c is relevant to this issue(s).

Nevertheless, it looks like Pavel's and Martin's issues are different bugs.

Quoted 7 lines

Pavel reported that GL_EXT_texture_sRGB_decode, which is only in 7.11, is broken specifically on r300g, but other drivers might be affected as well and it definitely looks like a Mesa core bug. Pavel, could you please add it as a new bug against Mesa core?

Martin's issue is likely related to the fact that piglit/glean/texture_srgb fails on r600g. Taking a look at it might be a good start.

the piglit passes for me on my rv770 with mesa from git (470952f)

@Martin: Can you test with a newer version of mesa (9.0 or mesa from git)?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken (glean/texture_srgb broken too)

In reply to [email protected]

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

--- Comment #7 from Martin Lambers <[email protected]> ---
I don't have access anymore to the AMD graphics card that originally exposed the problem for me.

I can only confirm that the problem does not exist with Mesa 9.0 (from Ubuntu 12.10) with an Intel Sandybridge GPU:
OpenGL Version: 3.0 Mesa 9.0
OpenGL Renderer: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL Vendor: Intel Open Source Technology Center

Thanks for your work.

Martin

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

[Bug 36965] GL_EXT_texture_sRGB (included in OpenGL 2.1) is broken (glean/texture_srgb broken too)

In reply to [email protected]

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

Andreas Boll <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel