[virglrenderer-devel] [PATCH 1/1] Fixes an issue with blitting of sRGB buffers
Dave Airlie
airlied at gmail.com
Wed Mar 28 02:00:47 UTC 2018
On 27 March 2018 at 08:07, Robert Tarasov <tutankhamen at chromium.org> wrote:
> Forces using vrend_render_blit_gl if one of framebuffers is in sRGB
> colorspace. Fixes following tests:
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgba8
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb10_a2
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgba4
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb5_a1
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb8
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb565
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rg8
> dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_r8
> ---
> src/vrend_renderer.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> index 02d26be..d76c93d 100644
> --- a/src/vrend_renderer.c
> +++ b/src/vrend_renderer.c
> @@ -438,6 +438,14 @@ static inline bool vrend_format_can_render(enum virgl_formats format)
> return tex_conv_table[format].bindings & VREND_BIND_RENDER;
> }
>
> +static inline bool vrend_format_is_srgb(enum virgl_formats format)
> +{
> + return (format == VIRGL_FORMAT_L8_SRGB ||
> + format == VIRGL_FORMAT_L8A8_SRGB ||
> + format == VIRGL_FORMAT_B8G8R8A8_SRGB ||
> + format == VIRGL_FORMAT_B8G8R8X8_SRGB);
This could use util_format_is_srgb couldn't it?
Dave.
More information about the virglrenderer-devel
mailing list