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

John Kåre Alsaker john.kare.alsaker at gmail.com
Fri Oct 5 10:09:05 PDT 2012


On Fri, Oct 5, 2012 at 12:41 AM, Eric Anholt <eric at anholt.net> wrote:
> John Kåre Alsaker <john.kare.alsaker at gmail.com> writes:
>
>> 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.
>
> Could you add a specification for this extension like other EGL
> extensions that exist out there?  I don't want to see an extension added
> to the tree without that.
That I can do.

>
> (I think you need to get new enums allocated from khronos, too.  idr?)
I would need to get them from somewhere.


More information about the mesa-dev mailing list