mesa: Add a new function for getting the nonconst sampler array index
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 3 Aug 2014 07:55:55 +0000 (19:55 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Tue, 12 Aug 2014 07:18:55 +0000 (19:18 +1200)
commit3b48f6a4c06db57a7203d247994b05e55c9418c1
tree9c5d16428a523b05f27d02407352aba48965cc99
parent1b4761bc27a50208dba2bc028c9835fed572e696
mesa: Add a new function for getting the nonconst sampler array index

If the array index is not a constant expression, the existing support
will assume a zero offset (giving us the sampler index of the base of
the array).

For dynamically uniform indexing of sampler arrays, we need both that
and the indexing expression.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/program/sampler.cpp
src/mesa/program/sampler.h