From 6f1adc2be85272ca9ce3f88073ee9a245eecda19 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 26 Apr 2019 10:12:49 +0200 Subject: [PATCH] renderer: also enable floating-point readback with extension The GL_EXT_color_buffer_float exptension spec defines that glReadPixels can be done with the combination of GL_RGBA and GL_FLOAT, which matches what OpenGL ES 3.2 allows. So let's enable the readback-format in this case. Thanks to Gert Wollny for pointing this out. Signed-off-by: Erik Faye-Lund Reviewed-By: Gert Wollny --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index f590a96..1a326f9 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -8840,7 +8840,7 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c set_format_bit(&caps->v2.supported_readback_formats, VIRGL_FORMAT_R32G32B32A32_SINT); set_format_bit(&caps->v2.supported_readback_formats, VIRGL_FORMAT_R32G32B32A32_UINT); - if (gles_ver >= 32) + if (gles_ver >= 32 || epoxy_has_gl_extension("GL_EXT_color_buffer_float")) set_format_bit(&caps->v2.supported_readback_formats, VIRGL_FORMAT_R32G32B32A32_FLOAT); } }