diff options
author | Ian Romanick <[email protected]> | 2015-08-31 18:30:48 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-09-02 16:24:17 -0700 |
commit | a6976f09727014730f45ec27c714c6a8140e074a (patch) | |
tree | dd8911817d5c328ab4e946dce54fff6e4b14fc70 /src/mesa/main/uniform_query.cpp | |
parent | 882aab00abb226c103b8c6fe514247334b4d2d04 (diff) |
mesa: Pass the type to _mesa_uniform_matrix as a glsl_base_type
This matches _mesa_uniform, and it enables the bug fix in the next
patch.
v2: s/type/basicType/ in the assert in _mesa_uniform_matrix.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]> [v1]
Cc: Dave Airlie <[email protected]>
Cc: "10.6 11.0" <[email protected]>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r-- | src/mesa/main/uniform_query.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 10266189259..fc2b5f57758 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -873,7 +873,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, GLuint cols, GLuint rows, GLint location, GLsizei count, GLboolean transpose, - const GLvoid *values, GLenum type) + const GLvoid *values, enum glsl_base_type basicType) { unsigned offset; unsigned vectors; @@ -892,8 +892,8 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, return; } - assert(type == GL_FLOAT || type == GL_DOUBLE); - size_mul = type == GL_DOUBLE ? 2 : 1; + assert(basicType == GLSL_TYPE_FLOAT || basicType == GLSL_TYPE_DOUBLE); + size_mul = basicType == GLSL_TYPE_DOUBLE ? 2 : 1; assert(!uni->type->is_sampler()); vectors = uni->type->matrix_columns; @@ -948,7 +948,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, if (!transpose) { memcpy(&uni->storage[elements * offset], values, sizeof(uni->storage[0]) * elements * count * size_mul); - } else if (type == GL_FLOAT) { + } else if (basicType == GLSL_TYPE_FLOAT) { /* Copy and transpose the matrix. */ const float *src = (const float *)values; @@ -965,7 +965,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, src += elements; } } else { - assert(type == GL_DOUBLE); + assert(basicType == GLSL_TYPE_DOUBLE); const double *src = (const double *)values; double *dst = (double *)&uni->storage[elements * offset].f; |