[Mesa-dev] [PATCH v5 0/3] Add and enable extension EXT_sRGB_write_control

Gert Wollny gert.wollny at collabora.com
Thu Nov 1 17:11:03 UTC 2018


Am Donnerstag, den 01.11.2018, 12:32 -0400 schrieb Ilia Mirkin:
> 
> > 
> > It is not different, this extension was specifically written to
> > bring GLES on par with GL in this asspect (although with a
> > different default). 
[...]

> EXT_framebuffer_sRGB is a desktop GL ext. EXT_sRGB_write_control is a
> GLES ext that was meant to provide the same functionality in GLES
Didn't I just write that? 

> You could have hardware that supports neither, or hardware that
> supports both. The differences appear to be at the API level, not at
> the hardware capability level.
That may be so or not (as I said, I don't know why GLES didn't include
this functionality right from the start), but EXT_sRGB_write_control is
locgially different from EXT_framebuffer_sRGB, and I actually think
that it is better to add another flag that names the extension, so that
the code is easier to understand. One example: 

   if (_mesa_is_desktop_gl(st->ctx) ||
       st->ctx->Extensions.EXT_sRGB_write_control)

vs. 

   if (_mesa_is_desktop_gl(st->ctx) ||
       st->ctx->Extensions.EXT_framebuffer_sRGB)

The first one makes it very clear what is going on, with the second
piece of code I have to search to figure out why the desktop extension
EXT_framebuffer_sRGB enables something that is not provided by desktop
GL.

That said, I just saw that there was some cruft left in the second
patch. so I'll have to resubmit it. 

Best, 
Gert


More information about the mesa-dev mailing list