Skip to content

Commit

Permalink
gsdx-ogl: drop GL_NV_depth_clamp extension
Browse files Browse the repository at this point in the history
superseeded by GL_ARB_clip_control
  • Loading branch information
gregory38 committed Sep 28, 2014
1 parent 4659184 commit 9d8d702
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
9 changes: 3 additions & 6 deletions plugins/GSdx/GLLoader.cpp
Expand Up @@ -118,8 +118,6 @@ PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC gl_MakeTextureHandleNonResidentARB = NU
PFNGLUNIFORMHANDLEUI64VARBPROC gl_UniformHandleui64vARB = NULL;
PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC gl_ProgramUniformHandleui64vARB = NULL;

PFNGLDEPTHRANGEDNVPROC gl_DepthRangedNV = NULL;

// GL4.5
PFNGLCREATETEXTURESPROC gl_CreateTextures = NULL;
PFNGLTEXTURESTORAGE2DPROC gl_TextureStorage2D = NULL;
Expand Down Expand Up @@ -173,8 +171,6 @@ namespace GLLoader {
bool found_GL_ARB_shader_image_load_store = false; // GLES3.1
bool found_GL_ARB_shader_subroutine = false;
bool found_GL_ARB_bindless_texture = false; // GL5 GPU?
// Surely recent hardware
bool found_GL_NV_depth_buffer_float = false;

// GL4.5 for the future (dx10/dx11 compatibility)
bool found_GL_ARB_clip_control = false;
Expand Down Expand Up @@ -312,7 +308,9 @@ namespace GLLoader {
#endif
#ifdef GLBINDLESS // Need to debug the code first
if (ext.compare("GL_ARB_bindless_texture") == 0) found_GL_ARB_bindless_texture = true;
#endif
// GL4.5
if (ext.compare("GL_ARB_direct_state_access") == 0) found_GL_ARB_direct_state_access = true;
if (ext.compare("GL_ARB_clip_control") == 0) found_GL_ARB_clip_control = true;

#ifdef ENABLE_GLES
fprintf(stderr, "DEBUG ext: %s\n", ext.c_str());
Expand Down Expand Up @@ -343,7 +341,6 @@ namespace GLLoader {
status &= status_and_override(found_GL_ARB_multi_bind,"GL_ARB_multi_bind");
status &= status_and_override(found_GL_ARB_bindless_texture,"GL_ARB_bindless_texture");

status &= status_and_override(found_GL_NV_depth_buffer_float,"GL_NV_depth_buffer_float");

status &= status_and_override(found_GL_ARB_clip_control, "GL_ARB_clip_control");
// Mandatory extension in DSA mode
Expand Down
3 changes: 0 additions & 3 deletions plugins/GSdx/GLLoader.h
Expand Up @@ -302,8 +302,6 @@ extern PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC gl_MakeTextureHandleNonResidentA
extern PFNGLUNIFORMHANDLEUI64VARBPROC gl_UniformHandleui64vARB;
extern PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC gl_ProgramUniformHandleui64vARB;

extern PFNGLDEPTHRANGEDNVPROC gl_DepthRangedNV;

// GL4.5
extern PFNGLCREATETEXTURESPROC gl_CreateTextures;
extern PFNGLTEXTURESTORAGE2DPROC gl_TextureStorage2D;
Expand Down Expand Up @@ -435,7 +433,6 @@ namespace GLLoader {
extern bool found_GL_ARB_shader_subroutine;
extern bool found_GL_ARB_bindless_texture;
extern bool found_GL_ARB_explicit_uniform_location;
extern bool found_GL_NV_depth_buffer_float;
extern bool found_GL_ARB_clip_control;
extern bool found_GL_ARB_direct_state_access;
}
2 changes: 0 additions & 2 deletions plugins/GSdx/GSDeviceOGL.cpp
Expand Up @@ -321,8 +321,6 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
if (GLLoader::found_GL_ARB_clip_control) {
// Change depth convention
gl_ClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE);
} else if (GLLoader::found_GL_NV_depth_buffer_float) {
gl_DepthRangedNV(-1.0f, 1.0f);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion plugins/GSdx/GSShaderOGL.cpp
Expand Up @@ -403,7 +403,7 @@ std::string GSShaderOGL::GenGlslHeader(const std::string& entry, GLenum type, co
header += "#define ENABLE_BINDLESS_TEX\n";
}

if (GLLoader::found_GL_NV_depth_buffer_float || GLLoader::found_GL_ARB_clip_control) {
if (GLLoader::found_GL_ARB_clip_control) {
header += "#define ZERO_TO_ONE_DEPTH\n";
}

Expand Down
2 changes: 0 additions & 2 deletions plugins/GSdx/GSWnd.cpp
Expand Up @@ -121,8 +121,6 @@ void GSWndGL::PopulateGlFunction()
*(void**)&(gl_UniformHandleui64vARB) = GetProcAddress("glUniformHandleui64vARB", true);
*(void**)&(gl_ProgramUniformHandleui64vARB) = GetProcAddress("glProgramUniformHandleui64vARB", true);

*(void**)&(gl_DepthRangedNV) = GetProcAddress("glDepthRangedNV", true);

// GL4.5
*(void**)&(gl_CreateTextures) = GetProcAddress("glCreateTextures", true);
*(void**)&(gl_TextureStorage2D) = GetProcAddress("glTextureStorage2D", true);
Expand Down

0 comments on commit 9d8d702

Please sign in to comment.