[Mesa-dev] [Mesa-dev RESEND 13/26] mesa: add KHR_no_error support to glLinkProgram()

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Aug 1 09:11:47 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mapi/glapi/gen/gl_API.xml |  2 +-
 src/mesa/main/shaderapi.c     | 18 ++++++++++++++++++
 src/mesa/main/shaderapi.h     |  3 +++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 7afcc5db65..18a78dc315 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -5492,7 +5492,7 @@
         <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>
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 1c564d3170..6dd617be7e 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -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)
 {
@@ -1703,6 +1710,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)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index b76e57ee39..7915248e39 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -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);
 
-- 
2.13.3



More information about the mesa-dev mailing list