glthread: add GL_DRAW_INDIRECT_BUFFER tracking and generator support
[mesa.git] / src / mapi / glapi / gen / marshal_XML.py
index 9d5688decac186fbab901da172d6823fc52c45d7..5b682c519657acd57dffd893d6d34e670ba48bb4 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 
 # Copyright (C) 2012 Intel Corporation
 #
@@ -58,18 +57,14 @@ class marshal_function(gl_XML.gl_function):
 
         # Store the "marshal" attribute, if present.
         self.marshal = element.get('marshal')
+        self.marshal_fail = element.get('marshal_fail')
 
     def marshal_flavor(self):
         """Find out how this function should be marshalled between
         client and server threads."""
         # If a "marshal" attribute was present, that overrides any
         # determination that would otherwise be made by this function.
-        if self.marshal != None:
-            if self.marshal == 'draw':
-                # TODO: as a temporary measure, do draw functions
-                # synchronously, since they may access client memory
-                # via vertex attribute pointers.
-                return 'sync'
+        if self.marshal not in (None, 'draw'):
             return self.marshal
 
         if self.exec_flavor == 'skip':
@@ -82,7 +77,9 @@ class marshal_function(gl_XML.gl_function):
         for p in self.parameters:
             if p.is_output:
                 return 'sync'
-            if p.is_pointer() and not (p.count or p.counter):
+            if (p.is_pointer() and not (p.count or p.counter)
+                and not (self.marshal == 'draw'
+                         and (p.name == 'indices' or p.name == 'indirect'))):
                 return 'sync'
             if p.count_parameter_list:
                 # Parameter size is determined by enums; haven't