mesa/glsl: introduce a remap table for uniform locations
authorTapani Pälli <tapani.palli@intel.com>
Thu, 6 Mar 2014 09:00:17 +0000 (11:00 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 10 Mar 2014 07:46:24 +0000 (09:46 +0200)
commit56b1be4399d76c0fe5ddf099a7ac5b45ab58e8cf
tree0ee265183905dec2e7c8d5679c5014e07f1bdb21
parentaa0d95a08dbf8f0e3ed66b624ccbc60753b61ef1
mesa/glsl: introduce a remap table for uniform locations

Patch adds a remap table for uniforms that is used to provide a mapping
from application specified uniform location to actual location in the
UniformStorage. Existing UniformLocationBaseScale usage is removed as
table can be used to set sequential values for array uniform elements.

This mapping helps to implement GL_ARB_explicit_uniform_location so that
uniforms locations can be reorganized and handled in a more easy manner.

v2: small fixes + rename parameters for merge and split functions (Ian)
    improve documentation, remove old check for location bounds (Eric)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/ir_uniform.h
src/glsl/link_uniforms.cpp
src/mesa/main/mtypes.h
src/mesa/main/shaderobj.c
src/mesa/main/uniform_query.cpp
src/mesa/main/uniforms.h