glsl: Fix gl_shader_program::UniformLocationBaseScale assert.

commit 26d86d26f9 added
gl_shader_program::UniformLocationBaseScale. According to the code
comments in that commit, UniformLocationBaseScale "must be >=1".

UniformLocationBaseScale is of type unsigned. Coverity reported a "Macro
compares unsigned to 0" defect as well.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Vinson Lee
2013-06-24 22:50:30 -07:00
parent 0b994961ff
commit 61bfed2d09
+1 -1
View File
@@ -272,7 +272,7 @@ static inline GLint
_mesa_uniform_merge_location_offset(const struct gl_shader_program *prog,
unsigned base_location, unsigned offset)
{
assert(prog->UniformLocationBaseScale >= 0);
assert(prog->UniformLocationBaseScale >= 1);
assert(offset < prog->UniformLocationBaseScale);
return (base_location * prog->UniformLocationBaseScale) + offset;
}