We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4049 - EGL: Request sRGB framebuffer in correct place.
Summary: EGL: Request sRGB framebuffer in correct place.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 20:41 UTC by Deve
Modified: 2018-01-17 21:10 UTC (History)
1 user (show)

See Also:


Attachments
Request sRGB framebuffer in correct place (2.56 KB, patch)
2018-01-16 20:41 UTC, Deve
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Deve 2018-01-16 20:41:22 UTC
Created attachment 3142 [details]
Request sRGB framebuffer in correct place

SDL2 asks for sRGB framebuffer in wrong place when using EGL.

The EGL_GL_COLORSPACE_KHR is an attribute for eglCreate*Surface.

As written in EGL_KHR_gl_colorspace documentation:

    Accepted as an attribute name by eglCreateWindowSurface,
    eglCreatePbufferSurface and eglCreatePixmapSurface

        EGL_GL_COLORSPACE_KHR                   0x309D

    Accepted as attribute values for EGL_GL_COLORSPACE_KHR by
    eglCreateWindowSurface, eglCreatePbufferSurface and
    eglCreatePixmapSurface

        EGL_GL_COLORSPACE_SRGB_KHR              0x3089
        EGL_GL_COLORSPACE_LINEAR_KHR            0x308A

I'm sending a patch that solves the issue.
Comment 1 Sam Lantinga 2018-01-17 21:10:09 UTC
Added, thanks!
https://hg.libsdl.org/SDL/rev/a01af1a724b3