summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2017-06-28 14:34:14 +1000
committerTimothy Arceri <tarceri@itsqueeze.com>2017-06-29 08:54:11 +1000
commitcb209dae9919eca304213768fc73b0b91eb96cfe (patch)
tree40898bc263d29a92855796f17cd59e220b8393cd /src/mesa
parentcc88eb97e08070fb5b599c0dd3f3d3cc0b88f9a1 (diff)
mesa: add KHR_no_error support for glGetUniformLocation()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/uniforms.c11
-rw-r--r--src/mesa/main/uniforms.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 194f64a3b2c..ddfe9064c2d 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -1025,6 +1025,17 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name)
return _mesa_program_resource_location(shProg, GL_UNIFORM, name);
}
+GLint GLAPIENTRY
+_mesa_GetUniformLocation_no_error(GLuint programObj, const GLcharARB *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_shader_program *shProg =
+ _mesa_lookup_shader_program(ctx, programObj);
+
+ return _mesa_program_resource_location(shProg, GL_UNIFORM, name);
+}
+
GLuint GLAPIENTRY
_mesa_GetUniformBlockIndex(GLuint program,
const GLchar *uniformBlockName)
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index 1cee90d2a77..9236db97805 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -224,6 +224,8 @@ void GLAPIENTRY
_mesa_GetUniformdv(GLuint, GLint, GLdouble *);
GLint GLAPIENTRY
_mesa_GetUniformLocation(GLuint, const GLcharARB *);
+GLint GLAPIENTRY
+_mesa_GetUniformLocation_no_error(GLuint, const GLcharARB *);
GLuint GLAPIENTRY
_mesa_GetUniformBlockIndex(GLuint program,
const GLchar *uniformBlockName);