diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index 02f28c2f57..22c1e88918 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -1267,12 +1267,14 @@ void GSApp::Init() m_default_configuration["override_GL_ARB_clip_control"] = "-1"; m_default_configuration["override_GL_ARB_direct_state_access"] = "-1"; m_default_configuration["override_GL_ARB_draw_buffers_blend"] = "-1"; - m_default_configuration["override_GL_ARB_get_texture_sub_image"] = "-1"; m_default_configuration["override_GL_ARB_gpu_shader5"] = "-1"; m_default_configuration["override_GL_ARB_shader_image_load_store"] = "-1"; m_default_configuration["override_GL_ARB_sparse_texture"] = "-1"; m_default_configuration["override_GL_ARB_sparse_texture2"] = "-1"; m_default_configuration["override_GL_ARB_texture_barrier"] = "-1"; +#ifdef GL_EXT_TEX_SUB_IMAGE + m_default_configuration["override_GL_ARB_get_texture_sub_image"] = "-1"; +#endif m_default_configuration["paltex"] = "0"; m_default_configuration["png_compression_level"] = std::to_string(Z_BEST_SPEED); m_default_configuration["preload_frame_with_gs_data"] = "0"; diff --git a/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp b/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp index 4dfd86aa26..2474e91f0f 100644 --- a/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp @@ -156,7 +156,6 @@ namespace GLLoader bool found_geometry_shader = true; // we require GL3.3 so geometry must be supported by default bool found_GL_ARB_clear_texture = false; - bool found_GL_ARB_get_texture_sub_image = false; // Not yet used // DX11 GPU bool found_GL_ARB_gpu_shader5 = false; // Require IvyBridge bool found_GL_ARB_shader_image_load_store = false; // Intel IB. Nvidia/AMD miss Mesa implementation. @@ -165,6 +164,11 @@ namespace GLLoader bool found_compatible_GL_ARB_sparse_texture2 = false; bool found_compatible_sparse_depth = false; + // Not yet used +#ifdef GL_EXT_TEX_SUB_IMAGE + bool found_GL_ARB_get_texture_sub_image = false; +#endif + static void mandatory(const std::string& ext) { if (!GLExtension::Has(ext)) @@ -310,7 +314,10 @@ namespace GLLoader // Mandatory for the advance HW renderer effect. Unfortunately Mesa LLVMPIPE/SWR renderers doesn't support this extension. // Rendering might be corrupted but it could be good enough for test/virtual machine. optional("GL_ARB_texture_barrier"); + // Not yet used +#ifdef GL_EXT_TEX_SUB_IMAGE found_GL_ARB_get_texture_sub_image = optional("GL_ARB_get_texture_sub_image"); +#endif } if (vendor_id_amd) diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp index efba2677dc..732384aa8a 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp @@ -468,7 +468,7 @@ bool GSTextureOGL::Map(GSMap& m, const GSVector4i* _r, int layer) // The fastest way will be to use a PBO to read the data asynchronously. Unfortunately GS // architecture is waiting the data right now. -#if 0 +#ifdef GL_EXT_TEX_SUB_IMAGE // Maybe it is as good as the code below. I don't know // With openGL 4.5 you can use glGetTextureSubImage diff --git a/pcsx2/GS/config.h b/pcsx2/GS/config.h index a6111696a7..bdb84c5b10 100644 --- a/pcsx2/GS/config.h +++ b/pcsx2/GS/config.h @@ -28,6 +28,8 @@ //#define DISABLE_DATE +// Not yet used/experimental OpenGL extensions +//#define GL_EXT_TEX_SUB_IMAGE #if !defined(NDEBUG) || defined(_DEBUG) || defined(_DEVEL) #define ENABLE_OGL_DEBUG // Create a debug context and check opengl command status. Allow also to dump various textures/states.