From: Paul Berry Date: Wed, 7 Nov 2012 21:04:40 +0000 (-0800) Subject: glapi: Annotate functions with "marshal" attribute. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5052f45a20b1ce3ee25b8724cb6b90cd37ab45f;p=mesa.git glapi: Annotate functions with "marshal" attribute. Several API functions require special treatment in order to be marshalled to a background thread. Others can't be safely executed in a background thread and need to be executed synchronously (e.g. since they return data through a pointer argument). This annotation will be used when code generating thread marshalling code, to ensure that each function is marshalled in the correct way. Note that PixelMap functions are marked as synchronous for now since their pointer may be relative to buffer on the GPU, so we'll need special logic to marshal them properly. v2: Move description of attribute types to a comment in the dtd file. Acked-by: Timothy Arceri Acked-by: Marek Olšák Tested-by: Dieter Nützel Tested-by: Mike Lothian --- diff --git a/src/mapi/glapi/gen/ARB_base_instance.xml b/src/mapi/glapi/gen/ARB_base_instance.xml index 56de639e907..5bd6cabf9c1 100644 --- a/src/mapi/glapi/gen/ARB_base_instance.xml +++ b/src/mapi/glapi/gen/ARB_base_instance.xml @@ -8,7 +8,7 @@ - + @@ -16,7 +16,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml index 72aa62c7751..7c7a6a49588 100644 --- a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml +++ b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml @@ -8,7 +8,7 @@ - + @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/src/mapi/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml index b1c8221444a..52dba3cf3c3 100644 --- a/src/mapi/glapi/gen/ARB_draw_instanced.xml +++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml @@ -8,14 +8,14 @@ - + - + diff --git a/src/mapi/glapi/gen/EXT_transform_feedback.xml b/src/mapi/glapi/gen/EXT_transform_feedback.xml index 2aa26ad7251..bbb44866f91 100644 --- a/src/mapi/glapi/gen/EXT_transform_feedback.xml +++ b/src/mapi/glapi/gen/EXT_transform_feedback.xml @@ -108,7 +108,7 @@ - + diff --git a/src/mapi/glapi/gen/gl_API.dtd b/src/mapi/glapi/gen/gl_API.dtd index 78226513c46..133bc042aa9 100644 --- a/src/mapi/glapi/gen/gl_API.dtd +++ b/src/mapi/glapi/gen/gl_API.dtd @@ -38,7 +38,8 @@ es2 CDATA "none" deprecated CDATA "none" exec NMTOKEN #IMPLIED - desktop (true | false) "true"> + desktop (true | false) "true" + marshal NMTOKEN #IMPLIED> @@ -120,6 +121,14 @@ param: offset data should be padded to the next even number of dimensions. For example, this will insert an empty "height" field after the "width" field in the protocol for TexImage1D. + marshal - One of "sync", "async", "draw", or "custom", defaulting to + async unless one of the arguments is something we know we can't + codegen for. If "sync", we finish any queued glthread work and call + the Mesa implementation directly. If "async", we queue the function + call to be performed by glthread. If "custom", the prototype will be + 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). glx: rop - Opcode value for "render" commands diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 2c5444475f9..ce9ad172dc4 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -2366,11 +2366,19 @@ - + - + + + @@ -2598,21 +2606,21 @@ - + - + - + @@ -3141,7 +3149,7 @@ - + @@ -3159,14 +3167,14 @@ - + - + @@ -3723,7 +3731,7 @@ - + @@ -4716,7 +4724,7 @@ - + @@ -8089,7 +8097,7 @@ - + @@ -8137,13 +8145,13 @@ - + - + @@ -10199,7 +10207,7 @@ - + @@ -11209,7 +11217,7 @@ - + @@ -11218,7 +11226,7 @@ - +