From 43d4f7a227eaa01ea4be32e598682abc912e8e83 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 27 Feb 2013 14:28:16 -0800 Subject: mesa: Add support for asynchronous glDraw* on GL core. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Acked-by: Timothy Arceri Acked-by: Marek Olšák Tested-by: Dieter Nützel Tested-by: Mike Lothian --- src/mapi/glapi/gen/gl_marshal.py | 4 ++++ src/mapi/glapi/gen/marshal_XML.py | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/mapi') diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py index 3b9868f9a1f..1a633435001 100644 --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -244,6 +244,10 @@ class PrintCode(gl_XML.gl_print_base): self.print_sync_dispatch(func) out('}') + if func.marshal == 'draw': + out('/* We relied on all vertex and index data being in VBOs */') + out('assert(ctx->API == API_OPENGL_CORE);') + out('}') def print_async_body(self, func): diff --git a/src/mapi/glapi/gen/marshal_XML.py b/src/mapi/glapi/gen/marshal_XML.py index 9d5688decac..d56e4dda4af 100644 --- a/src/mapi/glapi/gen/marshal_XML.py +++ b/src/mapi/glapi/gen/marshal_XML.py @@ -64,12 +64,7 @@ class marshal_function(gl_XML.gl_function): 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,7 @@ 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'): return 'sync' if p.count_parameter_list: # Parameter size is determined by enums; haven't -- cgit v1.2.3