FramebufferManager: Copy to color format for depth readbacks on GLES

glReadPixels() with depth formats is not supported.

Should fix broken EFB access on GLES.
This commit is contained in:
Stenzek
2020-05-24 16:11:10 +10:00
parent 393ce529af
commit bf74553878
8 changed files with 14 additions and 2 deletions

View File

@ -521,6 +521,10 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
// GLES does not support logic op.
g_Config.backend_info.bSupportsLogicOp = false;
// glReadPixels() can't be used with non-color formats. But, if we support
// ARB_get_texture_sub_image (unlikely, except maybe on NVIDIA), we can use that instead.
g_Config.backend_info.bSupportsDepthReadback = g_ogl_config.bSupportsTextureSubImage;
if (GLExtensions::Supports("GL_EXT_shader_framebuffer_fetch"))
{
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchExt;