From 3fb1988b5b951bcf55455f6bda9a42f6d6605d05 Mon Sep 17 00:00:00 2001 From: Vitor Kiguchi Date: Mon, 5 Apr 2021 23:52:11 -0300 Subject: [PATCH] gl_rasterizer: check for GL_ARB_copy_image --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 93332b7a2..4097d0cee 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -61,6 +61,11 @@ RasterizerOpenGL::RasterizerOpenGL() "Shadow might not be able to render because of unsupported OpenGL extensions."); } + if (!GLAD_GL_ARB_copy_image) { + LOG_WARNING(Render_OpenGL, + "ARB_copy_image not supported. Some games might produce artifacts."); + } + // Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0 state.clip_distance[0] = true; @@ -772,7 +777,7 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) { } OGLTexture temp_tex; - if (need_duplicate_texture) { + if (need_duplicate_texture && GLAD_GL_ARB_copy_image) { // The game is trying to use a surface as a texture and framebuffer at the same time // which causes unpredictable behavior on the host. // Making a copy to sample from eliminates this issue and seems to be fairly cheap.