glthread: sync in glFlush for multiple contexts
[mesa.git] / src / mapi / glapi / gen / marshal_XML.py
index d56e4dda4afcbea72be1623f015e6d240b7a580a..42c82c15e686cdfdce30a055cfb2224d8c7a6b47 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 
 # Copyright (C) 2012 Intel Corporation
 #
@@ -58,6 +57,8 @@ class marshal_function(gl_XML.gl_function):
 
         # Store the "marshal" attribute, if present.
         self.marshal = element.get('marshal')
+        self.marshal_sync = element.get('marshal_sync')
+        self.marshal_call_after = element.get('marshal_call_after')
 
     def marshal_flavor(self):
         """Find out how this function should be marshalled between
@@ -77,9 +78,11 @@ 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) and not (self.marshal == 'draw' and p.name == 'indices'):
+            if (p.is_pointer() and not (p.count or p.counter or p.marshal_count)
+                and not (self.marshal == 'draw'
+                         and (p.name == 'indices' or p.name == 'indirect'))):
                 return 'sync'
-            if p.count_parameter_list:
+            if p.count_parameter_list and not p.marshal_count:
                 # Parameter size is determined by enums; haven't
                 # written logic to handle this yet.  TODO: fix.
                 return 'sync'