mesa: add KHR_no_error support for glBindAttribLocation()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 26 Jun 2017 15:38:22 +0000 (17:38 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 28 Jun 2017 08:25:13 +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/shader_query.cpp
src/mesa/main/shaderapi.h

index d28109525012cc7d5b00c4e6cc28ccf9b7766ba1..64078c44166ef7f1e410feac83af46eb8e26dd7f 100644 (file)
         <glx ignore="true"/>
     </function>
 
-    <function name="BindAttribLocation" es2="2.0">
+    <function name="BindAttribLocation" es2="2.0" no_error="true">
         <param name="program" type="GLuint"/>
         <param name="index" type="GLuint"/>
         <param name="name" type="const GLchar *"/>
index 9086a904f3d5b3cb91655da340578f6f0fec44a4..0f66f7570382eb04c706365d6e2fa94e23b8450d 100644 (file)
@@ -96,6 +96,17 @@ bind_attrib_location(struct gl_context *ctx,
     */
 }
 
+void GLAPIENTRY
+_mesa_BindAttribLocation_no_error(GLuint program, GLuint index,
+                                  const GLchar *name)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_shader_program *const shProg =
+      _mesa_lookup_shader_program(ctx, program);
+   bind_attrib_location(ctx, shProg, index, name, true);
+}
+
 void GLAPIENTRY
 _mesa_BindAttribLocation(GLuint program, GLuint index,
                          const GLchar *name)
index ccc38d9f75e71eb01c1a61bdaf93ea49252fbd10..b2229f7ced6a4b0903ebb26187fd1adc1bff113c 100644 (file)
@@ -143,6 +143,9 @@ extern void GLAPIENTRY
 _mesa_ValidateProgram(GLuint);
 
 
+void GLAPIENTRY
+_mesa_BindAttribLocation_no_error(GLuint program, GLuint, const GLchar *);
+
 extern void GLAPIENTRY
 _mesa_BindAttribLocation(GLuint program, GLuint, const GLchar *);