From 9598417f4242538d7bd005935399f02584c71bba Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 19 Apr 2016 18:58:25 +0200 Subject: [PATCH] gsdx-ogl: GL_ARB_copy_image is now mandatory --- plugins/GSdx/GLLoader.cpp | 5 ++--- plugins/GSdx/GLLoader.h | 1 - plugins/GSdx/GSDeviceOGL.cpp | 15 +++++---------- plugins/GSdx/GSWnd.cpp | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/plugins/GSdx/GLLoader.cpp b/plugins/GSdx/GLLoader.cpp index 05ea67d22e..39820231a3 100644 --- a/plugins/GSdx/GLLoader.cpp +++ b/plugins/GSdx/GLLoader.cpp @@ -163,8 +163,6 @@ namespace GLLoader { bool found_geometry_shader = true; // we require GL3.3 so geometry must be supported by default bool found_GL_EXT_texture_filter_anisotropic = false; bool found_GL_ARB_clear_texture = false; // Miss AMD Mesa (otherwise seems SW) - // DX10 GPU limited driver (SW) - bool found_GL_ARB_copy_image = false; // DX11 GPU bool found_GL_ARB_draw_buffers_blend = false; // Not supported on AMD R600 (80 nm class chip, HD2900). Nvidia requires FERMI. Intel SB bool found_GL_ARB_gpu_shader5 = false; // Require IvyBridge @@ -174,6 +172,7 @@ namespace GLLoader { // Mandatory bool found_GL_ARB_buffer_storage = false; bool found_GL_ARB_clip_control = false; + bool found_GL_ARB_copy_image = false; bool found_GL_ARB_direct_state_access = false; bool found_GL_ARB_separate_shader_objects = false; bool found_GL_ARB_shading_language_420pack = false; @@ -296,7 +295,7 @@ namespace GLLoader { status &= status_and_override(found_GL_ARB_shading_language_420pack, "GL_ARB_shading_language_420pack", true); status &= status_and_override(found_GL_ARB_texture_storage, "GL_ARB_texture_storage", true); // GL4.3 - status &= status_and_override(found_GL_ARB_copy_image, "GL_ARB_copy_image"); + status &= status_and_override(found_GL_ARB_copy_image, "GL_ARB_copy_image", true); // GL4.4 status &= status_and_override(found_GL_ARB_buffer_storage,"GL_ARB_buffer_storage", true); status &= status_and_override(found_GL_ARB_clear_texture,"GL_ARB_clear_texture"); diff --git a/plugins/GSdx/GLLoader.h b/plugins/GSdx/GLLoader.h index bf9977974a..4ed6f78f0b 100644 --- a/plugins/GSdx/GLLoader.h +++ b/plugins/GSdx/GLLoader.h @@ -338,7 +338,6 @@ namespace GLLoader { extern bool in_replayer; // GL - extern bool found_GL_ARB_copy_image; extern bool found_geometry_shader; extern bool found_GL_ARB_gpu_shader5; extern bool found_GL_ARB_shader_image_load_store; diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 22bbc578e3..caf43c0712 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -974,16 +974,11 @@ void GSDeviceOGL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r GL_PUSH("CopyRect from %d to %d", sid, did); - if (GLLoader::found_GL_ARB_copy_image) { - glCopyImageSubData( sid, GL_TEXTURE_2D, - 0, r.x, r.y, 0, - did, GL_TEXTURE_2D, - 0, 0, 0, 0, - r.width(), r.height(), 1); - } else { - // Slower copy (conversion is done) - CopyRectConv(sTex, dTex, r, true); - } + glCopyImageSubData( sid, GL_TEXTURE_2D, + 0, r.x, r.y, 0, + did, GL_TEXTURE_2D, + 0, 0, 0, 0, + r.width(), r.height(), 1); GL_POP(); } diff --git a/plugins/GSdx/GSWnd.cpp b/plugins/GSdx/GSWnd.cpp index 065ba73fde..d20335073a 100644 --- a/plugins/GSdx/GSWnd.cpp +++ b/plugins/GSdx/GSWnd.cpp @@ -116,7 +116,7 @@ void GSWndGL::PopulateGlFunction() GL_EXT_LOAD_OPT(glBindImageTexture); GL_EXT_LOAD_OPT(glMemoryBarrier); // GL4.3 - GL_EXT_LOAD_OPT(glCopyImageSubData); + GL_EXT_LOAD(glCopyImageSubData); GL_EXT_LOAD_OPT(glInvalidateTexImage); GL_EXT_LOAD_OPT(glPushDebugGroup); GL_EXT_LOAD_OPT(glPopDebugGroup);