mesa: add KHR_no_error support for glAttachShader() and glAttachObjectARB()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 23 Jun 2017 15:01:22 +0000 (17:01 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 28 Jun 2017 08:25:12 +0000 (10:25 +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 d878a04ea097ad476362c79af1a5c0fb46fbf697..94589464c5c27a9119118463c503963902edaee9 100644 (file)
         <glx ignore="true"/>
     </function>
 
-    <function name="AttachShader" es2="2.0">
+    <function name="AttachShader" es2="2.0" no_error="true">
         <param name="program" type="GLuint"/>
         <param name="shader" type="GLuint"/>
         <glx ignore="true"/>
         <glx ignore="true"/>
     </function>
 
-    <function name="AttachObjectARB">
+    <function name="AttachObjectARB" no_error="true">
         <param name="containerObj" type="GLhandleARB"/>
         <param name="obj" type="GLhandleARB"/>
         <glx ignore="true"/>
index 796e42ddf013f7ecd8c1c3e488be0e6f7b67317a..16d9f1e64867b528f2525ae037452d5e8d77ba2e 100644 (file)
@@ -1345,6 +1345,13 @@ validate_program(struct gl_context *ctx, GLuint program)
 }
 
 
+void GLAPIENTRY
+_mesa_AttachObjectARB_no_error(GLhandleARB program, GLhandleARB shader)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   attach_shader_no_error(ctx, program, shader);
+}
+
 
 void GLAPIENTRY
 _mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
@@ -1354,6 +1361,14 @@ _mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
 }
 
 
+void GLAPIENTRY
+_mesa_AttachShader_no_error(GLuint program, GLuint shader)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   attach_shader_no_error(ctx, program, shader);
+}
+
+
 void GLAPIENTRY
 _mesa_AttachShader(GLuint program, GLuint shader)
 {
index 0a28185177da73b3e31e38680fb5161fa2497b2d..3f6c0ff0cbabe3e095e1336c96462aa7942e86b9 100644 (file)
@@ -73,6 +73,10 @@ _mesa_longest_attribute_name_length(struct gl_shader_program *shProg);
 extern void
 _mesa_shader_write_subroutine_indices(struct gl_context *ctx,
                                       gl_shader_stage stage);
+
+void GLAPIENTRY
+_mesa_AttachObjectARB_no_error(GLhandleARB, GLhandleARB);
+
 extern void GLAPIENTRY
 _mesa_AttachObjectARB(GLhandleARB, GLhandleARB);
 
@@ -154,7 +158,8 @@ _mesa_GetActiveAttrib(GLuint, GLuint, GLsizei, GLsizei *, GLint *,
 extern GLint GLAPIENTRY
 _mesa_GetAttribLocation(GLuint, const GLchar *);
 
-
+void GLAPIENTRY
+_mesa_AttachShader_no_error(GLuint program, GLuint shader);
 
 extern void GLAPIENTRY
 _mesa_AttachShader(GLuint program, GLuint shader);