diff options
author | Ian Romanick <[email protected]> | 2013-06-10 10:35:05 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-06-12 16:30:18 -0700 |
commit | 26d86d26f9f972b19c7040bdb1b1daf48537ef3e (patch) | |
tree | e457f7c4d14e6781949bf339c09863f6cf24ba32 /src/glsl/link_uniforms.cpp | |
parent | 5097f358419c067a71e96e39764b3bb0a716bdbb (diff) |
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-and-tested-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r-- | src/glsl/link_uniforms.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 010296b6b69..84680bebd9a 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -739,6 +739,8 @@ link_assign_uniform_locations(struct gl_shader_program *prog) sizeof(prog->_LinkedShaders[i]->SamplerTargets)); } + prog->UniformLocationBaseScale = (1U<<16); + #ifndef NDEBUG for (unsigned i = 0; i < num_user_uniforms; i++) { assert(uniforms[i].storage != NULL); |