mesa: add KHR_no_error support to glLinkProgram()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Jul 2017 09:41:31 +0000 (11:41 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 2 Aug 2017 10:54:31 +0000 (12:54 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/shaderapi.c
src/mesa/main/shaderapi.h

index 7afcc5db65dcf9f099b78c731dc4534559eba1d5..18a78dc315b10453a698c00fff67c892d418b021 100644 (file)
         <glx ignore="true"/>
     </function>
 
-    <function name="LinkProgram" es2="2.0">
+    <function name="LinkProgram" es2="2.0" no_error="true">
         <param name="program" type="GLuint"/>
         <glx ignore="true"/>
     </function>
index 1c564d317049e145e1ede7d501a10e83c56ff652..6dd617be7e5e727a1506a88f09aad7a642b8774f 100644 (file)
@@ -1242,6 +1242,13 @@ link_program_error(struct gl_context *ctx, struct gl_shader_program *shProg)
 }
 
 
+static void
+link_program_no_error(struct gl_context *ctx, struct gl_shader_program *shProg)
+{
+   link_program(ctx, shProg, true);
+}
+
+
 void
 _mesa_link_program(struct gl_context *ctx, struct gl_shader_program *shProg)
 {
@@ -1702,6 +1709,17 @@ _mesa_IsShader(GLuint name)
 }
 
 
+void GLAPIENTRY
+_mesa_LinkProgram_no_error(GLuint programObj)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_shader_program *shProg =
+      _mesa_lookup_shader_program(ctx, programObj);
+   link_program_no_error(ctx, shProg);
+}
+
+
 void GLAPIENTRY
 _mesa_LinkProgram(GLuint programObj)
 {
index b76e57ee39d643a029cc8b437ce955a7e1e07a57..7915248e391df623fce4372a9333eeda90c2ac00 100644 (file)
@@ -131,6 +131,9 @@ _mesa_IsProgram(GLuint name);
 extern GLboolean GLAPIENTRY
 _mesa_IsShader(GLuint name);
 
+void GLAPIENTRY
+_mesa_LinkProgram_no_error(GLuint programObj);
+
 extern void GLAPIENTRY
 _mesa_LinkProgram(GLuint programObj);