From: Imre Deak Date: Fri, 30 Mar 2012 12:48:44 +0000 (+0300) Subject: gles: don't call unsupported glGetHandleARB X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=d40b012ed523669eaf8dcf25c6d5cdea2d32e084;p=apitrace gles: don't call unsupported glGetHandleARB GLES doesn't support this call, so do not call it. Signed-off-by: Imre Deak Signed-off-by: José Fonseca --- diff --git a/glstate.cpp b/glstate.cpp index 9c3d4d5..0d5a5f3 100644 --- a/glstate.cpp +++ b/glstate.cpp @@ -135,7 +135,7 @@ void dumpCurrentContext(std::ostream &os) Context context; dumpParameters(json, context); - dumpShadersUniforms(json); + dumpShadersUniforms(json, context); dumpTextures(json, context); dumpFramebuffer(json, context); diff --git a/glstate_internal.hpp b/glstate_internal.hpp index ddc802e..aab7f98 100644 --- a/glstate_internal.hpp +++ b/glstate_internal.hpp @@ -58,7 +58,7 @@ void dumpEnum(JSONWriter &json, GLenum pname); void dumpParameters(JSONWriter &json, Context &context); -void dumpShadersUniforms(JSONWriter &json); +void dumpShadersUniforms(JSONWriter &json, Context &context); void dumpTextures(JSONWriter &json, Context &context); diff --git a/glstate_shaders.cpp b/glstate_shaders.cpp index 90e5d0a..11286fb 100644 --- a/glstate_shaders.cpp +++ b/glstate_shaders.cpp @@ -491,12 +491,15 @@ dumpArbProgramUniforms(JSONWriter &json, GLenum target, const char *prefix) void -dumpShadersUniforms(JSONWriter &json) +dumpShadersUniforms(JSONWriter &json, Context &context) { GLint program = 0; glGetIntegerv(GL_CURRENT_PROGRAM, &program); - GLhandleARB programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB); + GLhandleARB programObj = 0; + if (!context.ES && !program) { + programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB); + } json.beginMember("shaders"); json.beginObject();