The threading for GL core is in place, but there are so few applications
actually using a core GL context that it would be nice to extend support
back. However, some of the features of compat GL (particularly user
vertex arrays) would be so expensive to track state for that we want to be
able to disable threading when we discover that the app is using them.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
deprecated CDATA "none"
exec NMTOKEN #IMPLIED
desktop (true | false) "true"
deprecated CDATA "none"
exec NMTOKEN #IMPLIED
desktop (true | false) "true"
- marshal NMTOKEN #IMPLIED>
+ marshal NMTOKEN #IMPLIED
+ marshal_fail CDATA #IMPLIED>
<!ATTLIST size name NMTOKEN #REQUIRED
count NMTOKEN #IMPLIED
mode (get | set) "set">
<!ATTLIST size name NMTOKEN #REQUIRED
count NMTOKEN #IMPLIED
mode (get | set) "set">
generated but a custom implementation will be present in marshal.c.
If "draw", it will follow the "async" rules except that "indices" are
ignored (since they may come from a VBO).
generated but a custom implementation will be present in marshal.c.
If "draw", it will follow the "async" rules except that "indices" are
ignored (since they may come from a VBO).
+ marshal_fail - an expression that, if it evaluates true, causes glthread
+ to finish and tear down before the Mesa implementation is called
+ directly. Used to disable glthread for GL compatibility interactions
+ that we don't want to track state for.
glx:
rop - Opcode value for "render" commands
glx:
rop - Opcode value for "render" commands
self.validate_count_or_return(func)
self.validate_count_or_return(func)
+ if func.marshal_fail:
+ out('if ({0}) {{'.format(func.marshal_fail))
+ with indent():
+ out('_mesa_glthread_destroy(ctx);')
+ self.print_sync_dispatch(func)
+ out('return;')
+ out('}')
+
out('if (cmd_size <= MARSHAL_MAX_CMD_SIZE) {')
with indent():
self.print_async_dispatch(func)
out('if (cmd_size <= MARSHAL_MAX_CMD_SIZE) {')
with indent():
self.print_async_dispatch(func)
# Store the "marshal" attribute, if present.
self.marshal = element.get('marshal')
# 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
def marshal_flavor(self):
"""Find out how this function should be marshalled between