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

Summary: EGL: Request sRGB framebuffer in correct place.
Product: SDL Reporter: Deve <deveee>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: deveee
Version: HG 2.1   
Hardware: All   
OS: Linux   
Attachments: Request sRGB framebuffer in correct place

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