[PATCH 1/9] gles: don't call unsupported glGetHandleARB

Imre Deak imre.deak at intel.com
Wed Apr 11 08:19:31 PDT 2012


GLES doesn't support this call, so do not call it.

Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 glstate_shaders.cpp |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/glstate_shaders.cpp b/glstate_shaders.cpp
index 90e5d0a..9ee1a23 100644
--- a/glstate_shaders.cpp
+++ b/glstate_shaders.cpp
@@ -36,6 +36,7 @@
 #include "glsize.hpp"
 #include "glstate.hpp"
 #include "glstate_internal.hpp"
+#include "glretrace.hpp"
 
 
 namespace glstate {
@@ -494,9 +495,16 @@ void
 dumpShadersUniforms(JSONWriter &json)
 {
     GLint program = 0;
+    bool is_egl;
+
     glGetIntegerv(GL_CURRENT_PROGRAM, &program);
 
-    GLhandleARB programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB);
+    GLhandleARB programObj = 0;
+
+    is_egl = glretrace::context->profile == glws::PROFILE_ES1 ||
+             glretrace::context->profile == glws::PROFILE_ES2;
+    if (!is_egl && !program)
+	programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB);
 
     json.beginMember("shaders");
     json.beginObject();
-- 
1.7.5.4



More information about the apitrace mailing list