src/mesa: add GL_NV_half_float extension support (v2)
[mesa.git] / src / mapi / glapi / gen / gl_API.xml
index b3511665280d4cc80d42c12a271454722143b5f6..432749adaaff13d445a9ec59059c32ece7bb4a56 100644 (file)
     <type name="double"  size="8"  float="true"    glx_name="FLOAT64"/>
     <type name="clampd"  size="8"  float="true"    glx_name="FLOAT64"/>
 
+    <type name="halfNV"  size="2"  float="true"    glx_name="FLOAT16"/>
     <type name="float"   size="4"  float="true"    glx_name="FLOAT32"/>
     <type name="clampf"  size="4"  float="true"    glx_name="FLOAT32"/>
 
         <glx sop="108" handcode="true"/>
     </function>
 
+    <!-- Shared contexts have to wait for glthread to finish execution after glFlush,
+         so that other contexts can see the effect of previous GL calls when glFlush returns.
+         This is harmless if the contexts run on different threads, because we only stall
+         1 thread that's asynchronous anyway. It's worse when the contexts run on the same
+         thread, but that's not a good use of multiple contexts.
+    -->
     <function name="Flush" es1="1.0" es2="2.0"
-              marshal_call_after="_mesa_glthread_flush_batch(ctx);">
+              marshal_call_after="_mesa_glthread_flush_batch(ctx); if (ctx->Shared->RefCount > 1) _mesa_glthread_finish(ctx);">
         <glx sop="142" handcode="true"/>
     </function>
 
 
 <xi:include href="NV_viewport_swizzle.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="NV_half_float.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 <xi:include href="GL4x.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 </OpenGLAPI>