diff options
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r-- | src/mesa/shader/shader_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index c2c58fffde3..2b5d5ec5853 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1493,7 +1493,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, return; } - if (index + offset > program->Parameters->Size) { + if (index + offset > (GLint) program->Parameters->Size) { /* out of bounds! */ return; } @@ -1557,7 +1557,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, /* if the uniform is bool-valued, convert to 1.0 or 0.0 */ if (is_boolean_type(program->Parameters->Parameters[index].DataType)) { for (i = 0; i < elems; i++) { - uniformVal[i] = uniformVal[i] ? 1.0 : 0.0; + uniformVal[i] = uniformVal[i] ? 1.0f : 0.0f; } } } |