diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-05-17 21:12:21 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-05-17 21:13:02 -0500 |
| commit | 39c9516197c208bb918ce87b968ad32e703b4413 (patch) | |
| tree | 9ed2b8dc9176491f399b2b4db389ce3415063a53 /Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | |
| parent | c30d00e904e4aeabc1e8e18a1cb52b19496148a1 (diff) | |
[Android] Qualcomm driver has a bug where it returns an invalid length for GL_INFO_LOG_LENGTH with glGetShaderiv. Qualcomm drivers seem to max out at ~512bytes returned from glGetShaderInfoLog so this is a reasonable max.
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 1b5ab26c73..1c85177352 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -334,6 +334,12 @@ GLuint ProgramShaderCache::CompileSingleShader (GLuint type, const char* code ) if (compileStatus != GL_TRUE || (length > 1 && DEBUG_GLSL)) { GLsizei charsWritten; +#ifdef USE_GLES3 + // This is a bug in the Qualcomm OpenGL Driver + // The length returned is garbage length so we need to set a default max + // XXX: Check if qualcomm driver here + length = 1024; // Qualcomm driver maxes out at 512 bytes returned from glGetShaderInfoLog anyway +#endif GLchar* infoLog = new GLchar[length]; glGetShaderInfoLog(result, length, &charsWritten, infoLog); ERROR_LOG(VIDEO, "PS Shader info log:\n%s", infoLog); @@ -527,7 +533,7 @@ void ProgramShaderCache::CreateHeader ( void ) , v==GLSLES3 ? "300 es" : v==GLSL_120 ? "120" : v==GLSL_130 ? "130" : "140" , v==GLSLES3 ? "precision highp float;" : "" - , v<=GLSL_130 ? "#extension GL_ARB_texture_rectangle : enable" : "#define texture2DRect texture" + , v==GLSLES3 ? "" : v<=GLSL_130 ? "#extension GL_ARB_texture_rectangle : enable" : "#define texture2DRect texture" , g_ActiveConfig.backend_info.bSupportsGLSLUBO && v<GLSL_140 ? "#extension GL_ARB_uniform_buffer_object : enable" : "" , v==GLSL_120 ? "attribute" : "in" , v==GLSL_120 ? "attribute" : "out" |
