glsl/linker: assign explicit uniform locations
authorTapani Pälli <tapani.palli@intel.com>
Thu, 13 Mar 2014 10:48:27 +0000 (12:48 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 16 Jun 2014 03:49:59 +0000 (06:49 +0300)
commitdd2a6519b919395cfb57e0a18be1d7ca858808e2
tree1283e882dc01cee980231f7237cd7a2ff7816161
parenteca9d160483fa04caa8c8aeb527d7e42016dfeb2
glsl/linker: assign explicit uniform locations

Patch refactors the existing uniform processing so explicit locations
are taken in to account during variable processing. These locations
are temporarily stored in gl_uniform_storage before actual locations
are set.

UNMAPPED_UNIFORM_LOC marks unset location so that we can use 0 as a
valid explicit location.

When locations are set, UniformRemapTable is first populated with
uniforms that have explicit location set (inactive and active ones),
rest are put after explicit location slots.

v2: introduce define for locations that have not been set yet (Ian)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/link_uniforms.cpp