OSDN Git Service

glsl: Add gl_shader_program::UniformLocationBaseScale
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 10 Jun 2013 17:35:05 +0000 (10:35 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Thu, 13 Jun 2013 15:18:04 +0000 (08:18 -0700)
commitc8cc27c980acf031bb314eb85121983b7af5dc11
tree6a6b01e6d01a3bb491c13a400cb9000ebad4e483
parentfb494ce30366ad6b63762cb7e17e80f69e543e31
glsl: Add gl_shader_program::UniformLocationBaseScale

This is used by _mesa_uniform_merge_location_offset and
_mesa_uniform_split_location_offset to determine how the base and offset
are packed.  Previously, this value was hard coded as (1U<<16) in those
functions via the shift and mask contained therein.  The value is still
(1U<<16), but it can be changed in the future.

The next patch dynamically generates this value.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-and-tested-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 26d86d26f9f972b19c7040bdb1b1daf48537ef3e)
src/glsl/link_uniforms.cpp
src/mesa/main/mtypes.h
src/mesa/main/shaderobj.c
src/mesa/main/uniforms.h