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 <erik.faye-lund@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
macos/master
Erik Faye-Lund 6 years ago
parent 300b914595
commit 6f1adc2be8
  1. 2
      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);
}
}

Loading…
Cancel
Save