For DRI adding a __DRIdrawable sRGB gamma attribute appears to be the
way to go. There's __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE already for
__DRIconfig which appears to be unused. That could be used for the
capability flag. Implementing it in the gallium EGL backend seems more
straightforward, once
I failed to consider that premultiplied sRGB color channels can be
stored two ways. The friendly way, to_srgb_gamma(color * alpha) and
what applications actually use, to_srgb_gamma(color) * alpha. That
might affect this proposal.
On Thu, Sep 27, 2012 at 3:49 PM, Brian Paul wrote:
> Just some quic
Just some quick comments.
I think the term "GAMMA" should be omitted. I'm no expert but I'm not
sure that sRGB is strictly a gamma function. The GL_EXT_texture_sRGB
spec says "The sRGB color space roughly corresponds to 2.2 gamma
correction." Also, the term GAMMA doesn't appear in any of th
EGL_GAMMA_SRGB_BIT should be changed to a boolean EGL config attribute
so it can be optionally sorted by eglChooseConfig. It should be sorted
after EGL_COLOR_BUFFER_TYPE and true values would be preferred. This
sorting should be optional and is done so compositing window managers
can sample the fra
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
wrote:
> Hello,
>
Hello,
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 g