<category name="GL_ARB_base_instance" number="107">
<function name="DrawArraysInstancedBaseInstance" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
</function>
<function name="DrawElementsInstancedBaseInstance" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
</function>
<function name="DrawElementsInstancedBaseVertexBaseInstance" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
<category name="GL_ARB_draw_elements_base_vertex" number="62">
<function name="DrawElementsBaseVertex" es2="3.2" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
</function>
<function name="DrawRangeElementsBaseVertex" es2="3.2" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="start" type="GLuint"/>
<param name="end" type="GLuint"/>
</function>
<function name="MultiDrawElementsBaseVertex" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="const GLsizei *" count="primcount"/>
<param name="type" type="GLenum"/>
</function>
<function name="DrawElementsInstancedBaseVertex" es2="3.2" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
<function name="DrawArraysIndirect" exec="dynamic" es2="3.1"
marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays_indirect(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays_indirect(ctx)">
<param name="mode" type="GLenum"/>
<param name="indirect" type="const GLvoid *"/>
</function>
<function name="DrawElementsIndirect" exec="dynamic" es2="3.1"
marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements_indirect(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements_indirect(ctx)">
<param name="mode" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="indirect" type="const GLvoid *"/>
<category name="GL_ARB_multi_draw_indirect" number="133">
<function name="MultiDrawArraysIndirect" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays_indirect(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays_indirect(ctx)">
<param name="mode" type="GLenum"/>
<param name="indirect" type="const GLvoid *"/>
<param name="primcount" type="GLsizei"/>
</function>
<function name="MultiDrawElementsIndirect" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements_indirect(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements_indirect(ctx)">
<param name="mode" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="indirect" type="const GLvoid *"/>
<category name="GL_ARB_draw_instanced" number="44">
<function name="DrawArraysInstancedARB" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
</function>
<function name="DrawElementsInstancedARB" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
<enum name="PARAMETER_BUFFER_BINDING_ARB" value="0x80EF"/>
<function name="MultiDrawArraysIndirectCountARB" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="indirect" type="GLintptr"/>
<param name="drawcount" type="GLintptr"/>
<!-- Use "...vbo_draw_arrays", because indices always come from a buffer object. -->
<function name="MultiDrawElementsIndirectCountARB" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="indirect" type="GLintptr"/>
desktop (true | false) "true"
marshal NMTOKEN #IMPLIED
marshal_fail CDATA #IMPLIED>
+ marshal_sync CDATA #IMPLIED>
marshal_count CDATA #IMPLIED>
marshal_call_after CDATA #IMPLIED>
<!ATTLIST size name NMTOKEN #REQUIRED
to switch back to the Mesa implementation and call it directly. Used
to disable glthread for GL compatibility interactions that we don't
want to track state for.
+ marshal_sync - an expression that, if it evaluates true, causes glthread
+ to sync and execute the call directly.
marshal_count - same as count, but variable_param is ignored. Used by
glthread.
marshal_call_after - insert the string at the end of the marshal function
</function>
<function name="DrawArrays" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
</function>
<function name="DrawElements" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
</function>
<function name="DrawRangeElements" es2="3.0" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="start" type="GLuint"/>
<param name="end" type="GLuint"/>
</function>
<function name="MultiDrawArrays" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="GLenum"/>
<param name="first" type="const GLint *" count="primcount"/>
<param name="count" type="const GLsizei *" count="primcount"/>
</function>
<function name="MultiDrawElementsEXT" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="GLenum"/>
<param name="count" type="const GLsizei *" count="primcount"/>
<param name="type" type="GLenum"/>
<category name="GL_IBM_multimode_draw_arrays" number="200">
<function name="MultiModeDrawArraysIBM" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_arrays(ctx)">
<param name="mode" type="const GLenum *" count="primcount"/>
<param name="first" type="const GLint *" count="primcount"/>
<param name="count" type="const GLsizei *" count="primcount"/>
</function>
<function name="MultiModeDrawElementsIBM" marshal="draw"
- marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+ marshal_sync="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
<param name="mode" type="const GLenum *" count="primcount"/>
<param name="count" type="const GLsizei *" count="primcount"/>
<param name="type" type="GLenum"/>
out('return;')
out('}')
+ if func.marshal_sync:
+ out('if ({0}) {{'.format(func.marshal_sync))
+ with indent():
+ out('_mesa_glthread_finish_before(ctx, "{0}");'.format(func.name))
+ self.print_sync_dispatch(func)
+ out('return;')
+ out('}')
+
with indent():
self.print_async_dispatch(func)
out('}')
# Store the "marshal" attribute, if present.
self.marshal = element.get('marshal')
self.marshal_fail = element.get('marshal_fail')
+ self.marshal_sync = element.get('marshal_sync')
self.marshal_call_after = element.get('marshal_call_after')
def marshal_flavor(self):