Compare commits

...

2 Commits

Author SHA1 Message Date
lightningterror
3265c2a614 GS-ogl: Put GL_ARB_get_texture_sub_image code under a define.
Code is currently disabled, no need to check for the extension.
2021-11-03 16:37:55 +01:00
lightningterror
f798401e93 GS-ogl: Remove checks for extensions we don't yet use.
They serve no purpose, no need to check unless we actually use them

GL_ARB_compute_shader,
GL_ARB_shader_storage_buffer_object,
GL_ARB_texture_view,
GL_ARB_vertex_attrib_binding,
GL_ARB_multi_bind
2021-11-03 16:37:55 +01:00
4 changed files with 14 additions and 21 deletions

View File

@@ -1262,22 +1262,19 @@ void GSApp::Init()
m_default_configuration["osd_monitor_enabled"] = "0";
m_default_configuration["osd_max_log_messages"] = "2";
m_default_configuration["override_geometry_shader"] = "-1";
m_default_configuration["override_GL_ARB_compute_shader"] = "-1";
m_default_configuration["override_GL_ARB_copy_image"] = "-1";
m_default_configuration["override_GL_ARB_clear_texture"] = "-1";
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_multi_bind"] = "-1";
m_default_configuration["override_GL_ARB_shader_image_load_store"] = "-1";
m_default_configuration["override_GL_ARB_shader_storage_buffer_object"] = "-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_view"] = "-1";
m_default_configuration["override_GL_ARB_vertex_attrib_binding"] = "-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";

View File

@@ -156,22 +156,19 @@ 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.
bool found_GL_ARB_shader_storage_buffer_object = false;
bool found_GL_ARB_compute_shader = false;
bool found_GL_ARB_texture_view = false; // maybe older gpu can support it ?
// Mandatory in the future
bool found_GL_ARB_multi_bind = false;
bool found_GL_ARB_vertex_attrib_binding = false;
// In case sparse2 isn't supported
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,20 +307,17 @@ namespace GLLoader
found_GL_ARB_gpu_shader5 = optional("GL_ARB_gpu_shader5");
// GL4.2
found_GL_ARB_shader_image_load_store = optional("GL_ARB_shader_image_load_store");
// GL4.3
found_GL_ARB_compute_shader = optional("GL_ARB_compute_shader");
found_GL_ARB_shader_storage_buffer_object = optional("GL_ARB_shader_storage_buffer_object");
found_GL_ARB_texture_view = optional("GL_ARB_texture_view");
found_GL_ARB_vertex_attrib_binding = optional("GL_ARB_vertex_attrib_binding");
// GL4.4
found_GL_ARB_clear_texture = optional("GL_ARB_clear_texture");
found_GL_ARB_multi_bind = optional("GL_ARB_multi_bind");
// GL4.5
optional("GL_ARB_direct_state_access");
// 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)

View File

@@ -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

View File

@@ -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.