mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: drop GL_ARB_multi_bind
It will be replaced by DSA so let's reduce the complexity of opengl
This commit is contained in:
parent
fa43018d10
commit
8833afc2fa
|
@ -110,7 +110,6 @@ PFNGLMEMORYBARRIERPROC gl_MemoryBarrier = NU
|
|||
PFNGLTEXSTORAGE2DPROC gl_TexStorage2D = NULL;
|
||||
// GL4.4
|
||||
PFNGLCLEARTEXIMAGEPROC gl_ClearTexImage = NULL;
|
||||
PFNGLBINDTEXTURESPROC gl_BindTextures = NULL;
|
||||
PFNGLBUFFERSTORAGEPROC gl_BufferStorage = NULL;
|
||||
// GL_ARB_bindless_texture (GL5?)
|
||||
PFNGLGETTEXTURESAMPLERHANDLEARBPROC gl_GetTextureSamplerHandleARB = NULL;
|
||||
|
@ -179,7 +178,6 @@ namespace GLLoader {
|
|||
|
||||
|
||||
// Mandatory for FULL GL (but optional for GLES)
|
||||
bool found_GL_ARB_multi_bind = false; // Not yet. Wait Mesa & AMD drivers.
|
||||
bool found_GL_ARB_shading_language_420pack = false; // GLES 3.1 ???
|
||||
|
||||
// Mandatory
|
||||
|
|
|
@ -294,7 +294,6 @@ extern PFNGLTEXSTORAGE2DPROC gl_TexStorage2D;
|
|||
extern PFNGLCOPYIMAGESUBDATAPROC gl_CopyImageSubData;
|
||||
// GL4.4
|
||||
extern PFNGLCLEARTEXIMAGEPROC gl_ClearTexImage;
|
||||
extern PFNGLBINDTEXTURESPROC gl_BindTextures;
|
||||
extern PFNGLBUFFERSTORAGEPROC gl_BufferStorage;
|
||||
// GL_ARB_bindless_texture (GL5?)
|
||||
extern PFNGLGETTEXTURESAMPLERHANDLEARBPROC gl_GetTextureSamplerHandleARB;
|
||||
|
@ -429,7 +428,6 @@ namespace GLLoader {
|
|||
extern bool found_GL_ARB_gpu_shader5;
|
||||
extern bool found_GL_ARB_shader_image_load_store;
|
||||
extern bool found_GL_ARB_clear_texture;
|
||||
extern bool found_GL_ARB_multi_bind;
|
||||
extern bool found_GL_ARB_buffer_storage;
|
||||
extern bool found_GL_ARB_shader_subroutine;
|
||||
extern bool found_GL_ARB_bindless_texture;
|
||||
|
|
|
@ -1062,17 +1062,11 @@ void GSDeviceOGL::PSSetShaderResource(GLuint sr)
|
|||
if (GLState::tex_unit[0] != sr) {
|
||||
GLState::tex_unit[0] = sr;
|
||||
|
||||
if (GLLoader::found_GL_ARB_multi_bind) {
|
||||
#ifndef ENABLE_GLES
|
||||
gl_BindTextures(0, 1, &sr);
|
||||
#endif
|
||||
} else {
|
||||
gl_ActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, sr);
|
||||
gl_ActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, sr);
|
||||
|
||||
// Get back to the expected active texture unit
|
||||
gl_ActiveTexture(GL_TEXTURE0 + 3);
|
||||
}
|
||||
// Get back to the expected active texture unit
|
||||
gl_ActiveTexture(GL_TEXTURE0 + 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1082,20 +1076,14 @@ void GSDeviceOGL::PSSetShaderResources(GLuint tex[2])
|
|||
GLState::tex_unit[0] = tex[0];
|
||||
GLState::tex_unit[1] = tex[1];
|
||||
|
||||
if (GLLoader::found_GL_ARB_multi_bind) {
|
||||
#ifndef ENABLE_GLES
|
||||
gl_BindTextures(0, 2, tex);
|
||||
#endif
|
||||
} else {
|
||||
gl_ActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, tex[0]);
|
||||
gl_ActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, tex[0]);
|
||||
|
||||
gl_ActiveTexture(GL_TEXTURE0 + 1);
|
||||
glBindTexture(GL_TEXTURE_2D, tex[1]);
|
||||
gl_ActiveTexture(GL_TEXTURE0 + 1);
|
||||
glBindTexture(GL_TEXTURE_2D, tex[1]);
|
||||
|
||||
// Get back to the expected active texture unit
|
||||
gl_ActiveTexture(GL_TEXTURE0 + 3);
|
||||
}
|
||||
// Get back to the expected active texture unit
|
||||
gl_ActiveTexture(GL_TEXTURE0 + 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ void GSWndGL::PopulateGlFunction()
|
|||
*(void**)&(gl_CopyImageSubData) = GetProcAddress("glCopyImageSubData", true);
|
||||
// GL4.4
|
||||
*(void**)&(gl_ClearTexImage) = GetProcAddress("glClearTexImage", true);
|
||||
*(void**)&(gl_BindTextures) = GetProcAddress("glBindTextures", true);
|
||||
*(void**)&(gl_BufferStorage) = GetProcAddress("glBufferStorage", true);
|
||||
// GL_ARB_bindless_texture (GL5?)
|
||||
*(void**)&(gl_GetTextureSamplerHandleARB) = GetProcAddress("glGetTextureSamplerHandleARB", true);
|
||||
|
|
Loading…
Reference in New Issue