summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-26 17:38:22 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-28 10:25:13 +0200
commit48400e0bd6f29eb590dc726ba482856d16f1b3e5 (patch)
tree0f3e60cdf2d3ffdab5efe6a683ccc13cab265559 /src
parent34e5b39f37f6bd43676b3422b058c4df464c5ee7 (diff)
mesa: add KHR_no_error support for glBindAttribLocation()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/gl_API.xml2
-rw-r--r--src/mesa/main/shader_query.cpp11
-rw-r--r--src/mesa/main/shaderapi.h3
3 files changed, 15 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index d2810952501..64078c44166 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -5301,7 +5301,7 @@
<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 *"/>
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 9086a904f3d..0f66f757038 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -97,6 +97,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)
{
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index ccc38d9f75e..b2229f7ced6 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -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 *);