nvc0/ir: add kepler+ support for indirect texture references

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: describe the tex arguments for fermi/kepler

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
glsl: Allow dynamically uniform sampler array indexing with 4.0/gs5

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
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>
mesa/st: add support for dynamic sampler offsets

Replace the plain sampler index with a register reference to a sampler.
We also need to keep track of the sampler array size when there is a
relative reference so that we can mark the whole array used.

To facilitate implementation, we add a separate ADDR register that
exclusively handles the sampler relative address. Other approaches would
be more invasive.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
st/mesa: fix blit-based partial TexSubImage for 1D arrays

This fixes piglit spec/EXT_texture_array/render-1darray.

Cc: mesa-stable@lists.freedesktop.org