From 45bf40989c024d514e80a633356ba03d2c6201a8 Mon Sep 17 00:00:00 2001 From: Robert Tarasov Date: Tue, 3 Apr 2018 14:19:55 -0700 Subject: [PATCH] vrend: Use regular blit if both buffers are sRGB We don't need to use gl blend if both source and target buffers are in sRGB and colorspace transformation isn't requiqred. Fixes this test: dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_srgb8_alpha8 Tested-by: Jakob Bornecrantz Reviewed-by: Jakob Bornecrantz Signed-off-by: Jakob Bornecrantz --- src/vrend_renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 8e8f6f8..32a4961 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -5906,7 +5906,8 @@ static void vrend_renderer_blit_int(struct vrend_context *ctx, !vrend_format_is_ds(dst_res->base.format)) use_gl = true; - if (util_format_is_srgb(src_res->base.format)) + if (util_format_is_srgb(src_res->base.format) && + !util_format_is_srgb(dst_res->base.format)) use_gl = true; /* different depth formats */