[Mesa-dev] Adding support for sRGB framebuffers to EGL
John Kåre Alsaker
john.kare.alsaker at gmail.com
Wed Sep 26 01:19:44 PDT 2012
The way this would interact with ARB_framebuffer_sRGB is that the
EGL's surface EGL_GAMMA attribute would be ignored. If a EGL config
has the EGL_GAMMA_SRGB_BIT, it is required to support sRGB for the
default OpenGL framebuffer.
On Tue, Sep 25, 2012 at 5:58 PM, John Kåre Alsaker
<john.kare.alsaker at gmail.com> wrote:
> I would like add support for sRGB framebuffers to EGL. Here are my
> proposed changes to EGL:
> A new EGL_SURFACE_TYPE bit:
> EGL_GAMMA_SRGB_BIT - This format supports sRGB framebuffers. This also
> means that ARB_framebuffer_sRGB is supported for this format.
> New values:
> EGL_GAMMA_LINEAR - The gamma is linear.
> EGL_GAMMA_SRGB - The gamma is as defined by the sRGB standard.
> New EGL surface attribute:
> EGL_GAMMA - The gamma of the surface's framebuffer. The default value
> is EGL_GAMMA_LINEAR.
> When the surface's EGL_GAMMA attribute's value is EGL_GAMMA_SRGB and
> this is supported by
> the format, reads from this framebuffer will be converted from sRGB
> gamma and writes will
> be converted to sRGB gamma. This may not apply to all functions in the
> client API.
> There may be something related to the ARB_framebuffer_sRGB extension
> in EGL already, in
> which case someone should link me to it.
> There's two assumptions behind this proposal. One is that you won't
> support sRGB only
> formats. The other is that linear gamma and sRGB gamma format support
> is the same.
> This means that window systems can't add a new linear gamma format
> without adding an sRGB
> format and the other way around.
> I'd like some comments on this proposal and tips on how it could be
> implemented in the
> mess that is DRI.
> John Kåre
More information about the mesa-dev