diff options
author | Vinson Lee <vlee@freedesktop.org> | 2013-06-24 22:50:30 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2013-06-25 18:45:01 -0700 |
commit | 61bfed2d0998065bdb20f3f67e1591f8d5005ba6 (patch) | |
tree | b906ff16d3e30d70a0cc41736c08c0d701a91892 /src/mesa/main/uniforms.h | |
parent | 0b994961ff58654f330c51caacf9698f7dafd6b6 (diff) | |
download | external_mesa3d-61bfed2d0998065bdb20f3f67e1591f8d5005ba6.zip external_mesa3d-61bfed2d0998065bdb20f3f67e1591f8d5005ba6.tar.gz external_mesa3d-61bfed2d0998065bdb20f3f67e1591f8d5005ba6.tar.bz2 |
glsl: Fix gl_shader_program::UniformLocationBaseScale assert.
commit 26d86d26f9f972b19c7040bdb1b1daf48537ef3e 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>
Diffstat (limited to 'src/mesa/main/uniforms.h')
-rw-r--r-- | src/mesa/main/uniforms.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h index 14fe26d..9223917 100644 --- a/src/mesa/main/uniforms.h +++ b/src/mesa/main/uniforms.h @@ -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; } |