summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniform_query.cpp
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2012-05-07 14:15:53 +0300
committerOliver McFadden <[email protected]>2012-05-14 19:13:43 +0300
commit60e8a4944081b42127b3de11b599f417c091307a (patch)
treeeb9c1e4587e353b3df25fa7a5aaa78096d21853f /src/mesa/main/uniform_query.cpp
parent8969de7e986265168532fbfec7557fd9bf632012 (diff)
mesa: GLES specifies restrictions on uniform matrix transpose.
GL_INVALID_VALUE is generated if transpose is not GL_FALSE. http://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r--src/mesa/main/uniform_query.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index da41ee84c9c..08d330a52cb 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -782,6 +782,16 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
return;
}
+ /* GL_INVALID_VALUE is generated if `transpose' is not GL_FALSE.
+ * http://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml */
+ if (ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2) {
+ if (transpose) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glUniformMatrix(matrix transpose is not GL_FALSE)");
+ return;
+ }
+ }
+
if (ctx->Shader.Flags & GLSL_UNIFORMS) {
log_uniform(values, GLSL_TYPE_FLOAT, components, vectors, count,
bool(transpose), shProg, location, uni);