[Mesa-dev] [PATCH] i965: expose sRGB visuals and EGL_KHR_gl_colorspace

Tapani Pälli tapani.palli at intel.com
Mon Sep 4 16:55:42 UTC 2017


Hi;

On 09/04/2017 06:42 PM, Emil Velikov wrote:
> Hi Tapani,
> 
> On 4 September 2017 at 14:11, Tapani Pälli <tapani.palli at intel.com> wrote:
>> Patch exposes sRGB visuals and adds DRI integer query support for
>> __DRI2_RENDERER_HAS_FRAMEBUFFER_SRGB. Further changes make sure that
>> we mark if the app explicitly wanted sRGB and for these framebuffers
>> we don't turn sRGB off in intel_gles3_srgb_workaround. This way we
>> keep compatibility for existing applications relying on default sRGB
>> and only add more visual support.
>>
>> With this change, following dEQP tests start to pass:
>>
>>     dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb
>>     dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb
>>
>> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> There's a couple of minor suggestions below. With those
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> 
> Please me a couple of days so I can test this with KDE/Plasma.
> Just in case ... ;-)
> 
>> @@ -1504,10 +1511,12 @@ intelCreateBuffer(__DRIscreen *dri_screen,
>>      /* setup the hardware-based renderbuffers */
>>      rb = intel_create_winsys_renderbuffer(screen, rgbFormat, num_samples);
>>      _mesa_attach_and_own_rb(fb, BUFFER_FRONT_LEFT, &rb->Base.Base);
>> +   rb->explicit_srgb = is_srgb ? true : false;
> Both variables are of type bool, so this can be:
> rb->explicit_srgb = is_srgb;

oops yes of course, I think I had originally something more complicated ..

>>
>>      if (mesaVis->doubleBufferMode) {
>>         rb = intel_create_winsys_renderbuffer(screen, rgbFormat, num_samples);
>>         _mesa_attach_and_own_rb(fb, BUFFER_BACK_LEFT, &rb->Base.Base);
>> +      rb->explicit_srgb = is_srgb ? true : false;
> Ditto.
> 
>>      }
>>
>>      /*
>> @@ -1854,6 +1863,9 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
>>         MESA_FORMAT_B8G8R8A8_UNORM,
>>         MESA_FORMAT_B8G8R8X8_UNORM,
>>
>> +      MESA_FORMAT_B8G8R8A8_SRGB,
>> +      MESA_FORMAT_B8G8R8X8_SRGB,
>> +
> I was going to mention - you need more, yet it seems like my earlier
> patch never got a reply [1]
> If you've got a few minutes a pair of eyes would be appreciated.
> 
> -Emil
> [1] https://patchwork.freedesktop.org/patch/169660/
> 

Thanks Emil, I will spend some time with your patch tomorrow!


More information about the mesa-dev mailing list