[Mesa-dev] Adding support for sRGB KHR images to EGL

John Kåre Alsaker john.kare.alsaker at gmail.com
Sat Sep 29 06:18:19 PDT 2012


I would like add support for sRGB KHR images to EGL. This is primarily
so Wayland compositors can create sRGB views of client buffers, but
there's nothing preventing it from being useful in other cases.

To allow this I propose a new EGL attribute which can be passed to
eglCreateImageKHR, EGL_GAMMA_MESA. It can have two values,
EGL_LINEAR_MESA (the default) and EGL_SRGB_MESA. These values can be
shared with my other EGL extension proposal
(http://lists.freedesktop.org/archives/mesa-dev/2012-September/027888.html).
When EGL_SRGB_MESA is passed, the image must be created with a sRGB
view or the function should return an error.

To implement this in DRI for Wayland buffers it requires changes to
the __DRIimageExtension structure. The fromPlanar function either has
to be modified, or a new function could be introduced.

- John Kåre


More information about the mesa-dev mailing list