2013-01-14 09:15:39 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011-2013 Gregory hainaut
|
|
|
|
* Copyright (C) 2007-2009 Gabest
|
|
|
|
*
|
|
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This Program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with GNU Make; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "GLLoader.h"
|
2013-05-27 16:53:38 +00:00
|
|
|
#include "GSdx.h"
|
2013-01-14 09:15:39 +00:00
|
|
|
|
2013-07-13 11:39:45 +00:00
|
|
|
#ifndef ENABLE_GLES
|
2013-05-19 12:42:55 +00:00
|
|
|
PFNGLACTIVETEXTUREPROC gl_ActiveTexture = NULL;
|
|
|
|
PFNGLBLENDCOLORPROC gl_BlendColor = NULL;
|
|
|
|
PFNGLATTACHSHADERPROC gl_AttachShader = NULL;
|
|
|
|
PFNGLBINDBUFFERPROC gl_BindBuffer = NULL;
|
|
|
|
PFNGLBINDBUFFERBASEPROC gl_BindBufferBase = NULL;
|
|
|
|
PFNGLBINDFRAMEBUFFERPROC gl_BindFramebuffer = NULL;
|
|
|
|
PFNGLBINDSAMPLERPROC gl_BindSampler = NULL;
|
|
|
|
PFNGLBINDVERTEXARRAYPROC gl_BindVertexArray = NULL;
|
2013-08-05 20:25:25 +00:00
|
|
|
PFNGLBLENDEQUATIONSEPARATEIARBPROC gl_BlendEquationSeparateiARB = NULL;
|
|
|
|
PFNGLBLENDFUNCSEPARATEIARBPROC gl_BlendFuncSeparateiARB = NULL;
|
2013-05-19 12:42:55 +00:00
|
|
|
PFNGLBLITFRAMEBUFFERPROC gl_BlitFramebuffer = NULL;
|
|
|
|
PFNGLBUFFERDATAPROC gl_BufferData = NULL;
|
|
|
|
PFNGLCHECKFRAMEBUFFERSTATUSPROC gl_CheckFramebufferStatus = NULL;
|
|
|
|
PFNGLCLEARBUFFERFVPROC gl_ClearBufferfv = NULL;
|
|
|
|
PFNGLCLEARBUFFERIVPROC gl_ClearBufferiv = NULL;
|
2013-07-28 14:40:43 +00:00
|
|
|
PFNGLCLEARBUFFERUIVPROC gl_ClearBufferuiv = NULL;
|
2013-08-05 20:25:25 +00:00
|
|
|
PFNGLCOLORMASKIPROC gl_ColorMaski = NULL;
|
2013-05-19 12:42:55 +00:00
|
|
|
PFNGLCOMPILESHADERPROC gl_CompileShader = NULL;
|
|
|
|
PFNGLCREATEPROGRAMPROC gl_CreateProgram = NULL;
|
|
|
|
PFNGLCREATESHADERPROC gl_CreateShader = NULL;
|
|
|
|
PFNGLCREATESHADERPROGRAMVPROC gl_CreateShaderProgramv = NULL;
|
|
|
|
PFNGLDELETEBUFFERSPROC gl_DeleteBuffers = NULL;
|
|
|
|
PFNGLDELETEFRAMEBUFFERSPROC gl_DeleteFramebuffers = NULL;
|
|
|
|
PFNGLDELETEPROGRAMPROC gl_DeleteProgram = NULL;
|
|
|
|
PFNGLDELETESAMPLERSPROC gl_DeleteSamplers = NULL;
|
|
|
|
PFNGLDELETESHADERPROC gl_DeleteShader = NULL;
|
|
|
|
PFNGLDELETEVERTEXARRAYSPROC gl_DeleteVertexArrays = NULL;
|
|
|
|
PFNGLDETACHSHADERPROC gl_DetachShader = NULL;
|
|
|
|
PFNGLDRAWBUFFERSPROC gl_DrawBuffers = NULL;
|
|
|
|
PFNGLDRAWELEMENTSBASEVERTEXPROC gl_DrawElementsBaseVertex = NULL;
|
|
|
|
PFNGLENABLEVERTEXATTRIBARRAYPROC gl_EnableVertexAttribArray = NULL;
|
|
|
|
PFNGLFRAMEBUFFERRENDERBUFFERPROC gl_FramebufferRenderbuffer = NULL;
|
|
|
|
PFNGLFRAMEBUFFERTEXTURE2DPROC gl_FramebufferTexture2D = NULL;
|
|
|
|
PFNGLGENBUFFERSPROC gl_GenBuffers = NULL;
|
|
|
|
PFNGLGENFRAMEBUFFERSPROC gl_GenFramebuffers = NULL;
|
|
|
|
PFNGLGENSAMPLERSPROC gl_GenSamplers = NULL;
|
|
|
|
PFNGLGENVERTEXARRAYSPROC gl_GenVertexArrays = NULL;
|
|
|
|
PFNGLGETBUFFERPARAMETERIVPROC gl_GetBufferParameteriv = NULL;
|
|
|
|
PFNGLGETDEBUGMESSAGELOGARBPROC gl_GetDebugMessageLogARB = NULL;
|
|
|
|
PFNGLGETPROGRAMINFOLOGPROC gl_GetProgramInfoLog = NULL;
|
|
|
|
PFNGLGETPROGRAMIVPROC gl_GetProgramiv = NULL;
|
|
|
|
PFNGLGETSHADERIVPROC gl_GetShaderiv = NULL;
|
|
|
|
PFNGLGETSTRINGIPROC gl_GetStringi = NULL;
|
|
|
|
PFNGLISFRAMEBUFFERPROC gl_IsFramebuffer = NULL;
|
|
|
|
PFNGLLINKPROGRAMPROC gl_LinkProgram = NULL;
|
|
|
|
PFNGLMAPBUFFERPROC gl_MapBuffer = NULL;
|
|
|
|
PFNGLMAPBUFFERRANGEPROC gl_MapBufferRange = NULL;
|
|
|
|
PFNGLPROGRAMPARAMETERIPROC gl_ProgramParameteri = NULL;
|
|
|
|
PFNGLSAMPLERPARAMETERFPROC gl_SamplerParameterf = NULL;
|
|
|
|
PFNGLSAMPLERPARAMETERIPROC gl_SamplerParameteri = NULL;
|
|
|
|
PFNGLSHADERSOURCEPROC gl_ShaderSource = NULL;
|
|
|
|
PFNGLUNIFORM1IPROC gl_Uniform1i = NULL;
|
|
|
|
PFNGLUNMAPBUFFERPROC gl_UnmapBuffer = NULL;
|
|
|
|
PFNGLUSEPROGRAMSTAGESPROC gl_UseProgramStages = NULL;
|
|
|
|
PFNGLVERTEXATTRIBIPOINTERPROC gl_VertexAttribIPointer = NULL;
|
|
|
|
PFNGLVERTEXATTRIBPOINTERPROC gl_VertexAttribPointer = NULL;
|
2013-06-07 19:16:27 +00:00
|
|
|
PFNGLBUFFERSUBDATAPROC gl_BufferSubData = NULL;
|
2013-08-17 09:05:41 +00:00
|
|
|
PFNGLFENCESYNCPROC gl_FenceSync = NULL;
|
|
|
|
PFNGLDELETESYNCPROC gl_DeleteSync = NULL;
|
|
|
|
PFNGLCLIENTWAITSYNCPROC gl_ClientWaitSync = NULL;
|
|
|
|
PFNGLFLUSHMAPPEDBUFFERRANGEPROC gl_FlushMappedBufferRange = NULL;
|
2013-08-10 19:43:59 +00:00
|
|
|
// GL4.0
|
|
|
|
PFNGLUNIFORMSUBROUTINESUIVPROC gl_UniformSubroutinesuiv = NULL;
|
|
|
|
// GL4.1
|
2013-07-06 10:08:52 +00:00
|
|
|
PFNGLBINDPROGRAMPIPELINEPROC gl_BindProgramPipeline = NULL;
|
|
|
|
PFNGLGENPROGRAMPIPELINESPROC gl_GenProgramPipelines = NULL;
|
|
|
|
PFNGLDELETEPROGRAMPIPELINESPROC gl_DeleteProgramPipelines = NULL;
|
|
|
|
PFNGLGETPROGRAMPIPELINEIVPROC gl_GetProgramPipelineiv = NULL;
|
|
|
|
PFNGLVALIDATEPROGRAMPIPELINEPROC gl_ValidateProgramPipeline = NULL;
|
|
|
|
PFNGLGETPROGRAMPIPELINEINFOLOGPROC gl_GetProgramPipelineInfoLog = NULL;
|
2013-05-19 12:42:55 +00:00
|
|
|
// NO GL4.1
|
|
|
|
PFNGLUSEPROGRAMPROC gl_UseProgram = NULL;
|
|
|
|
PFNGLGETSHADERINFOLOGPROC gl_GetShaderInfoLog = NULL;
|
2013-05-26 13:05:03 +00:00
|
|
|
PFNGLPROGRAMUNIFORM1IPROC gl_ProgramUniform1i = NULL;
|
2013-05-19 12:42:55 +00:00
|
|
|
// NO GL4.2
|
|
|
|
PFNGLGETUNIFORMBLOCKINDEXPROC gl_GetUniformBlockIndex = NULL;
|
|
|
|
PFNGLUNIFORMBLOCKBINDINGPROC gl_UniformBlockBinding = NULL;
|
2013-05-25 14:28:16 +00:00
|
|
|
PFNGLGETUNIFORMLOCATIONPROC gl_GetUniformLocation = NULL;
|
2013-08-03 08:29:01 +00:00
|
|
|
// GL4.3
|
|
|
|
PFNGLCOPYIMAGESUBDATAPROC gl_CopyImageSubData = NULL;
|
2013-07-28 14:40:43 +00:00
|
|
|
// GL4.2
|
|
|
|
PFNGLBINDIMAGETEXTUREPROC gl_BindImageTexture = NULL;
|
|
|
|
PFNGLMEMORYBARRIERPROC gl_MemoryBarrier = NULL;
|
2013-08-03 08:29:01 +00:00
|
|
|
PFNGLTEXSTORAGE2DPROC gl_TexStorage2D = NULL;
|
2013-08-02 16:38:12 +00:00
|
|
|
// GL4.4
|
2013-08-03 08:29:01 +00:00
|
|
|
PFNGLCLEARTEXIMAGEPROC gl_ClearTexImage = NULL;
|
|
|
|
PFNGLBINDTEXTURESPROC gl_BindTextures = NULL;
|
|
|
|
PFNGLBUFFERSTORAGEPROC gl_BufferStorage = NULL;
|
2013-08-17 08:57:52 +00:00
|
|
|
// GL_ARB_bindless_texture (GL5?)
|
|
|
|
PFNGLGETTEXTURESAMPLERHANDLEARBPROC gl_GetTextureSamplerHandleARB = NULL;
|
|
|
|
PFNGLMAKETEXTUREHANDLERESIDENTARBPROC gl_MakeTextureHandleResidentARB = NULL;
|
|
|
|
PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC gl_MakeTextureHandleNonResidentARB = NULL;
|
|
|
|
PFNGLUNIFORMHANDLEUI64VARBPROC gl_UniformHandleui64vARB = NULL;
|
|
|
|
PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC gl_ProgramUniformHandleui64vARB = NULL;
|
2014-01-31 21:30:54 +00:00
|
|
|
|
|
|
|
PFNGLDEPTHRANGEDNVPROC gl_DepthRangedNV = NULL;
|
2013-07-13 11:39:45 +00:00
|
|
|
#endif
|
2013-01-14 09:15:39 +00:00
|
|
|
|
|
|
|
namespace GLLoader {
|
|
|
|
|
2013-05-19 12:42:55 +00:00
|
|
|
bool fglrx_buggy_driver = false;
|
2013-07-11 17:08:42 +00:00
|
|
|
bool nvidia_buggy_driver = false;
|
2013-12-30 10:15:01 +00:00
|
|
|
bool intel_buggy_driver = false;
|
2013-07-28 14:40:43 +00:00
|
|
|
bool in_replayer = false;
|
2013-07-11 17:08:42 +00:00
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
// Optional
|
2013-05-19 12:42:55 +00:00
|
|
|
bool found_GL_ARB_separate_shader_objects = false;
|
2013-05-27 16:53:38 +00:00
|
|
|
bool found_geometry_shader = true;
|
2013-08-03 08:29:01 +00:00
|
|
|
bool found_only_gl30 = false; // Drop it when mesa support GLSL330
|
2013-08-17 08:57:52 +00:00
|
|
|
bool found_GL_ARB_clear_texture = false; // Don't know if GL3 GPU can support it
|
2013-08-03 08:29:01 +00:00
|
|
|
bool found_GL_ARB_buffer_storage = false;
|
2013-08-28 08:44:16 +00:00
|
|
|
bool found_GL_ARB_explicit_uniform_location = false; // need by subroutine
|
2013-08-03 08:29:01 +00:00
|
|
|
// GL4 hardware
|
2013-08-17 08:57:52 +00:00
|
|
|
bool found_GL_ARB_copy_image = false; // Not sure actually maybe GL3 GPU can do it
|
2013-06-16 16:33:08 +00:00
|
|
|
bool found_GL_ARB_gpu_shader5 = false;
|
2013-07-28 14:40:43 +00:00
|
|
|
bool found_GL_ARB_shader_image_load_store = false;
|
2013-08-10 19:43:59 +00:00
|
|
|
bool found_GL_ARB_shader_subroutine = false;
|
2013-08-17 08:57:52 +00:00
|
|
|
bool found_GL_ARB_bindless_texture = false; // GL5 GPU?
|
2014-02-01 11:11:14 +00:00
|
|
|
// Surely recent hardware
|
|
|
|
bool found_GL_NV_depth_buffer_float = false;
|
2013-08-03 08:29:01 +00:00
|
|
|
|
|
|
|
// Mandatory for FULL GL (but optional for GLES)
|
2013-08-17 08:57:52 +00:00
|
|
|
bool found_GL_ARB_multi_bind = false; // Not yet. Wait Mesa & AMD drivers. Note might be deprecated by bindless_texture
|
2013-08-03 08:29:01 +00:00
|
|
|
bool found_GL_ARB_shading_language_420pack = false; // Not yet. Wait Mesa & AMD drivers
|
|
|
|
|
|
|
|
// Mandatory
|
|
|
|
bool found_GL_ARB_texture_storage = false;
|
|
|
|
|
|
|
|
static bool status_and_override(bool& found, const std::string& name, bool mandatory = false)
|
|
|
|
{
|
|
|
|
if (!found) {
|
|
|
|
fprintf(stderr, "INFO: %s is not supported\n", name.c_str());
|
|
|
|
if(mandatory) return false;
|
2014-02-01 11:11:14 +00:00
|
|
|
} else {
|
|
|
|
fprintf(stderr, "INFO: %s is supported\n", name.c_str());
|
2013-08-03 08:29:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string opt("override_");
|
|
|
|
opt += name;
|
|
|
|
|
|
|
|
if (theApp.GetConfig(opt.c_str(), -1) != -1) {
|
|
|
|
found = !!theApp.GetConfig(opt.c_str(), -1);
|
|
|
|
fprintf(stderr, "Override %s detection (%s)\n", name.c_str(), found ? "Enabled" : "Disabled");
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2013-05-19 12:42:55 +00:00
|
|
|
|
2013-01-14 09:15:39 +00:00
|
|
|
bool check_gl_version(uint32 major, uint32 minor) {
|
2013-05-19 12:42:55 +00:00
|
|
|
|
|
|
|
const GLubyte* s = glGetString(GL_VERSION);
|
2013-07-28 14:40:43 +00:00
|
|
|
if (s == NULL) {
|
|
|
|
fprintf(stderr, "Error: GLLoader failed to get GL version\n");
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-19 12:42:55 +00:00
|
|
|
|
2013-06-11 11:14:26 +00:00
|
|
|
const char* vendor = (const char*)glGetString(GL_VENDOR);
|
|
|
|
fprintf(stderr, "Supported Opengl version: %s on GPU: %s. Vendor: %s\n", s, glGetString(GL_RENDERER), vendor);
|
|
|
|
|
|
|
|
// Name change but driver is still bad!
|
|
|
|
if (strstr(vendor, "ATI") || strstr(vendor, "Advanced Micro Devices"))
|
2013-05-19 12:42:55 +00:00
|
|
|
fglrx_buggy_driver = true;
|
2013-07-11 17:08:42 +00:00
|
|
|
if (strstr(vendor, "NVIDIA Corporation"))
|
|
|
|
nvidia_buggy_driver = true;
|
2013-12-30 09:30:10 +00:00
|
|
|
if (strstr(vendor, "Intel"))
|
|
|
|
intel_buggy_driver = true;
|
2013-01-14 09:15:39 +00:00
|
|
|
|
|
|
|
GLuint dot = 0;
|
|
|
|
while (s[dot] != '\0' && s[dot] != '.') dot++;
|
|
|
|
if (dot == 0) return false;
|
|
|
|
|
|
|
|
GLuint major_gl = s[dot-1]-'0';
|
|
|
|
GLuint minor_gl = s[dot+1]-'0';
|
|
|
|
|
2013-07-12 21:12:34 +00:00
|
|
|
#ifndef ENABLE_GLES
|
2013-05-27 16:53:38 +00:00
|
|
|
if ( (major_gl < 3) || ( major_gl == 3 && minor_gl < 2 ) ) {
|
2013-08-14 10:18:38 +00:00
|
|
|
fprintf(stderr, "Geometry shaders are not supported. Required openGL 3.2\n");
|
2013-05-27 16:53:38 +00:00
|
|
|
found_geometry_shader = false;
|
|
|
|
}
|
2013-12-30 09:30:10 +00:00
|
|
|
if (nvidia_buggy_driver || intel_buggy_driver) {
|
2013-07-11 17:08:42 +00:00
|
|
|
fprintf(stderr, "Buggy driver detected. Geometry shaders will be disabled\n");
|
|
|
|
found_geometry_shader = false;
|
|
|
|
}
|
2013-05-27 16:53:38 +00:00
|
|
|
if (theApp.GetConfig("override_geometry_shader", -1) != -1) {
|
|
|
|
found_geometry_shader = !!theApp.GetConfig("override_geometry_shader", -1);
|
|
|
|
fprintf(stderr, "Override geometry shaders detection\n");
|
|
|
|
}
|
2013-05-27 18:02:27 +00:00
|
|
|
if ( (major_gl == 3) && minor_gl < 3) {
|
|
|
|
// Opensource driver spotted
|
|
|
|
found_only_gl30 = true;
|
|
|
|
}
|
2013-07-12 21:12:34 +00:00
|
|
|
#else
|
|
|
|
found_geometry_shader = false;
|
|
|
|
#endif
|
2013-01-14 09:15:39 +00:00
|
|
|
if ( (major_gl < major) || ( major_gl == major && minor_gl < minor ) ) {
|
2013-05-19 09:19:20 +00:00
|
|
|
fprintf(stderr, "OPENGL %d.%d is not supported\n", major, minor);
|
2013-01-14 09:15:39 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool check_gl_supported_extension() {
|
|
|
|
int max_ext = 0;
|
|
|
|
glGetIntegerv(GL_NUM_EXTENSIONS, &max_ext);
|
|
|
|
|
2013-05-19 09:19:20 +00:00
|
|
|
if (gl_GetStringi && max_ext) {
|
2013-01-14 09:15:39 +00:00
|
|
|
for (GLint i = 0; i < max_ext; i++) {
|
2013-05-19 09:19:20 +00:00
|
|
|
string ext((const char*)gl_GetStringi(GL_EXTENSIONS, i));
|
2013-01-14 09:15:39 +00:00
|
|
|
if (ext.compare("GL_ARB_separate_shader_objects") == 0) {
|
2013-05-19 12:42:55 +00:00
|
|
|
if (!fglrx_buggy_driver) found_GL_ARB_separate_shader_objects = true;
|
2013-06-01 09:29:57 +00:00
|
|
|
else fprintf(stderr, "Buggy driver detected, GL_ARB_separate_shader_objects will be disabled\n");
|
2013-01-14 09:15:39 +00:00
|
|
|
}
|
2013-06-01 09:29:57 +00:00
|
|
|
if (ext.compare("GL_ARB_shading_language_420pack") == 0) found_GL_ARB_shading_language_420pack = true;
|
|
|
|
if (ext.compare("GL_ARB_texture_storage") == 0) found_GL_ARB_texture_storage = true;
|
|
|
|
if (ext.compare("GL_ARB_copy_image") == 0) found_GL_ARB_copy_image = true;
|
2013-06-16 16:33:08 +00:00
|
|
|
if (ext.compare("GL_ARB_gpu_shader5") == 0) found_GL_ARB_gpu_shader5 = true;
|
2014-02-01 11:11:14 +00:00
|
|
|
if (ext.compare("GL_NV_depth_buffer_float") == 0) found_GL_NV_depth_buffer_float = true;
|
2014-02-08 11:05:26 +00:00
|
|
|
if (ext.compare("GL_ARB_explicit_uniform_location") == 0) found_GL_ARB_explicit_uniform_location = true;
|
|
|
|
if (ext.compare("GL_ARB_multi_bind") == 0) found_GL_ARB_multi_bind = true;
|
|
|
|
|
|
|
|
// Only enable this extension on nvidia
|
|
|
|
if (nvidia_buggy_driver && ext.compare("GL_ARB_shader_image_load_store") == 0) found_GL_ARB_shader_image_load_store = true;
|
|
|
|
|
2013-08-10 19:43:59 +00:00
|
|
|
#if 0
|
2013-08-28 08:44:16 +00:00
|
|
|
// Erratum: on nvidia implementation, gain is very nice : 42.5 fps => 46.5 fps
|
|
|
|
//
|
2013-08-10 19:43:59 +00:00
|
|
|
// Strangely it doesn't provide the speed boost as expected.
|
|
|
|
// Note: only atst/colclip was replaced with subroutine for the moment. It replace 2000 program switch on
|
|
|
|
// colin mcrae 3 by 2100 uniform, but code is slower!
|
|
|
|
//
|
|
|
|
// Current hypothesis: the validation of useprogram is done in the "driver thread" whereas the extra function calls
|
|
|
|
// are done on the overloaded main threads.
|
|
|
|
// Apitrace profiling shows faster GPU draw times
|
|
|
|
|
|
|
|
if (ext.compare("GL_ARB_shader_subroutine") == 0) found_GL_ARB_shader_subroutine = true;
|
|
|
|
#endif
|
2013-08-03 08:29:01 +00:00
|
|
|
#ifdef GL44 // Need to debug the code first
|
2013-10-24 20:54:27 +00:00
|
|
|
// Need to check the clean (in particular of depth/stencil texture)
|
2013-08-02 16:38:12 +00:00
|
|
|
if (ext.compare("GL_ARB_clear_texture") == 0) found_GL_ARB_clear_texture = true;
|
2013-10-24 20:54:27 +00:00
|
|
|
// FIXME unattach context case + perf
|
2013-08-03 08:29:01 +00:00
|
|
|
if (ext.compare("GL_ARB_buffer_storage") == 0) found_GL_ARB_buffer_storage = true;
|
2013-08-02 16:38:12 +00:00
|
|
|
#endif
|
2013-08-17 08:57:52 +00:00
|
|
|
#ifdef GLBINDLESS // Need to debug the code first
|
|
|
|
if (ext.compare("GL_ARB_bindless_texture") == 0) found_GL_ARB_bindless_texture = true;
|
|
|
|
#endif
|
2013-08-02 16:38:12 +00:00
|
|
|
|
2013-07-12 21:12:34 +00:00
|
|
|
#ifdef ENABLE_GLES
|
|
|
|
fprintf(stderr, "DEBUG ext: %s\n", ext.c_str());
|
|
|
|
#endif
|
2013-01-14 09:15:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
bool status = true;
|
2013-07-12 21:12:34 +00:00
|
|
|
#ifndef ENABLE_GLES
|
2013-08-03 08:29:01 +00:00
|
|
|
fprintf(stderr, "\n");
|
2013-01-14 09:15:39 +00:00
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
status &= status_and_override(found_GL_ARB_separate_shader_objects,"GL_ARB_separate_shader_objects");
|
|
|
|
status &= status_and_override(found_GL_ARB_gpu_shader5,"GL_ARB_gpu_shader5");
|
|
|
|
status &= status_and_override(found_GL_ARB_shader_image_load_store,"GL_ARB_shader_image_load_store");
|
|
|
|
status &= status_and_override(found_GL_ARB_clear_texture,"GL_ARB_clear_texture");
|
|
|
|
status &= status_and_override(found_GL_ARB_buffer_storage,"GL_ARB_buffer_storage");
|
2013-08-10 19:43:59 +00:00
|
|
|
status &= status_and_override(found_GL_ARB_shader_subroutine,"GL_ARB_shader_subroutine");
|
2013-08-28 08:44:16 +00:00
|
|
|
status &= status_and_override(found_GL_ARB_explicit_uniform_location,"GL_ARB_explicit_uniform_location");
|
2013-05-27 16:53:38 +00:00
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
status &= status_and_override(found_GL_ARB_texture_storage, "GL_ARB_texture_storage", true);
|
|
|
|
status &= status_and_override(found_GL_ARB_shading_language_420pack,"GL_ARB_shading_language_420pack");
|
|
|
|
status &= status_and_override(found_GL_ARB_multi_bind,"GL_ARB_multi_bind");
|
2013-08-17 08:57:52 +00:00
|
|
|
status &= status_and_override(found_GL_ARB_bindless_texture,"GL_ARB_bindless_texture");
|
2013-08-03 08:29:01 +00:00
|
|
|
|
2014-02-01 11:11:14 +00:00
|
|
|
status &= status_and_override(found_GL_NV_depth_buffer_float,"GL_NV_depth_buffer_float");
|
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
fprintf(stderr, "\n");
|
2013-07-12 21:12:34 +00:00
|
|
|
#endif
|
2013-05-26 13:05:03 +00:00
|
|
|
|
2013-08-03 08:29:01 +00:00
|
|
|
return status;
|
2013-01-14 09:15:39 +00:00
|
|
|
}
|
|
|
|
}
|