glthread: add marshal_call_after and remove custom glFlush and glEnable code

Instead of implementing marshalling manually, this XML property allows us
to insert additional code into code-generated functions.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
This commit is contained in:
Marek Olšák
2020-02-20 18:15:42 -05:00
committed by Marge Bot
parent 4970199d11
commit d510e652d4
6 changed files with 15 additions and 95 deletions
+4 -9
View File
@@ -2377,7 +2377,8 @@
<glx rop="138" handcode="client"/>
</function>
<function name="Enable" es1="1.0" es2="2.0" marshal="custom">
<function name="Enable" es1="1.0" es2="2.0"
marshal_call_after='if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) _mesa_glthread_disable(ctx, "Enable(DEBUG_OUTPUT_SYNCHRONOUS)");'>
<param name="cap" type="GLenum"/>
<glx rop="139" handcode="client"/>
</function>
@@ -2386,14 +2387,8 @@
<glx sop="108" handcode="true"/>
</function>
<!-- TODO: Flush is marshalled synchronously as a temporary hack
since we don't yet have a hook into SwapBuffers.
NOTE: when we remove this hack, we'll still have to handle Flush
specially to ensure that it causes all previous commands to get
delivered to the server thread.
-->
<function name="Flush" es1="1.0" es2="2.0" marshal="custom">
<function name="Flush" es1="1.0" es2="2.0"
marshal_call_after="_mesa_glthread_flush_batch(ctx);">
<glx sop="142" handcode="true"/>
</function>