]> git.cworth.org Git - apitrace/blobdiff - glretrace.py
Move tracers to wrappers subdirectory.
[apitrace] / glretrace.py
index 864639356e8e484b950f048a1b8f6eaaee586568..d91c8a25fe2ec2e68d39c89c15a2ada41e1b5f90 100644 (file)
@@ -391,7 +391,8 @@ class GlRetracer(Retracer):
         # Handle pointer with offsets into the current pack pixel buffer
         # object.
         if function.name in self.pack_function_names and arg.output:
-            self.extractOpaqueArg(function, arg, arg_type, lvalue, rvalue)
+            assert isinstance(arg_type, (stdapi.Pointer, stdapi.Array, stdapi.Blob, stdapi.Opaque))
+            print '    %s = static_cast<%s>((%s).toPointer());' % (lvalue, arg_type, rvalue)
             return
 
         if arg.type is glapi.GLlocation \
@@ -414,6 +415,12 @@ class GlRetracer(Retracer):
             print '        samples = max_samples;'
             print '    }'
 
+        # These parameters are referred beyond the call life-time
+        # TODO: Replace ad-hoc solution for bindable parameters with general one
+        if function.name in ('glFeedbackBuffer', 'glSelectBuffer') and arg.output:
+            print '    _allocator.bind(%s);' % arg.name
+
+
 
 if __name__ == '__main__':
     print r'''