[virglrenderer-devel] [PATCH 1/1] Use regular blit if both buffers are sRGB

Robert Tarasov tutankhamen at chromium.org
Tue Apr 3 21:19:55 UTC 2018


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
---
 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 30db1b9..dd2fd33 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -5914,7 +5914,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 */
-- 
2.17.0.484.g0c8726318c-goog



More information about the virglrenderer-devel mailing list