[PATCH v2 05/18] retrace: substitute gl*Pointer instead of gl*PointerBounds calls

Imre Deak imre.deak at intel.com
Tue May 15 07:11:00 PDT 2012


The gl*PointerBounds calls are present at least in the Android EGL
implementation, but other EGL implementations might not have them.
Except the range checking they provide, they are equivalent to the
gl*Pointer functions, so for retracing use these instead.

Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 retrace/glretrace.py |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/retrace/glretrace.py b/retrace/glretrace.py
index 69a6dce..7b415e4 100644
--- a/retrace/glretrace.py
+++ b/retrace/glretrace.py
@@ -171,6 +171,13 @@ class GlRetracer(Retracer):
         'glUnmapObjectBufferATI',
     ])
 
+    pointer_bounds_functions = {
+            'glVertexPointerBounds',
+            'glTexCoordPointerBounds',
+            'glNormalPointerBounds',
+            'glColorPointerBounds',
+    }
+
     def retraceFunctionBody(self, function):
         is_array_pointer = function.name in self.array_pointer_function_names
         is_draw_array = function.name in self.draw_array_function_names
@@ -211,7 +218,12 @@ class GlRetracer(Retracer):
             print '    glretrace::frame_complete(call);'
             return
 
-        Retracer.retraceFunctionBody(self, function)
+        if function.name in self.pointer_bounds_functions:
+            func_name = function.name[:-6]
+            subst_func = filter(lambda x:x.name == func_name, glapi.glapi.functions)[0]
+            Retracer.retraceFunctionBody(self, subst_func)
+        else:
+            Retracer.retraceFunctionBody(self, function)
 
         # Post-snapshots
         if function.name in ('glFlush', 'glFinish'):
-- 
1.7.5.4



More information about the apitrace mailing list