diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index a5d7da51f07..5224b039ab6 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -278,7 +278,7 @@ get_uniform_rows_cols(const struct gl_program_parameter *p, *cols = p->Size; } else { - *rows = p->Size / 4 + 1; + *rows = (p->Size + 3) / 4; if (p->Size % 4 == 0) *cols = 4; else