gsdx ogl: reduce requirement for SW renderer

Clip Control is only used for the HW renderer.

It will help Nvidia DX10 GPU on Windows. Potentially old AMD GPU too.
Unfortunately Ivy bridge still misses texture copy

Note on Linux, you can use the free Mesa driver.

Otherwise, it is time to save money for a future upgrade :)
This commit is contained in:
Gregory Hainaut 2017-04-04 18:37:26 +02:00
parent df32564bef
commit 5b91dc45e0
5 changed files with 7 additions and 3 deletions

View File

@ -410,6 +410,7 @@ namespace GLLoader {
}
bool status = true;
bool required_for_hw = (theApp.GetCurrentRendererType() == GSRendererType::OGL_HW);
// Bonus
status &= status_and_override(found_GL_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic");
@ -429,7 +430,7 @@ namespace GLLoader {
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");
// GL4.5
status &= status_and_override(found_GL_ARB_clip_control, "GL_ARB_clip_control", true);
status &= status_and_override(found_GL_ARB_clip_control, "GL_ARB_clip_control", required_for_hw);
status &= status_and_override(found_GL_ARB_direct_state_access, "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.

View File

@ -370,6 +370,7 @@ namespace GLLoader {
// GL
extern bool found_geometry_shader;
extern bool found_GL_ARB_clip_control;
extern bool found_GL_ARB_gpu_shader5;
extern bool found_GL_ARB_shader_image_load_store;
extern bool found_GL_ARB_clear_texture;

View File

@ -489,7 +489,8 @@ bool GSDeviceOGL::Create(const std::shared_ptr<GSWnd> &wnd)
// This extension allow FS depth to range from -1 to 1. So
// gl_position.z could range from [0, 1]
// Change depth convention
glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE);
if (GLLoader::found_GL_ARB_clip_control && glClipControl)
glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE);
// ****************************************************************
// HW renderer shader

View File

@ -167,7 +167,7 @@ void GSWndGL::PopulateGlFunction()
GL_EXT_LOAD_OPT(glCreateSamplers);
GL_EXT_LOAD_OPT(glCreateProgramPipelines);
GL_EXT_LOAD(glClipControl);
GL_EXT_LOAD_OPT(glClipControl);
GL_EXT_LOAD_OPT(glTextureBarrier);
GL_EXT_LOAD_OPT(glGetTextureSubImage);

View File

@ -341,6 +341,7 @@ void GSdxApp::Init()
m_default_configuration["osd_max_log_messages"] = "3";
m_default_configuration["override_geometry_shader"] = "-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";