mesa/st: add support for dynamic sampler offsets
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 6 Aug 2014 04:43:29 +0000 (00:43 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 12 Aug 2014 12:52:14 +0000 (08:52 -0400)
commit6174f491707607e4ad2eca3fc159ec55be8635fd
tree9649ef5f8583c5f456bae456ebe067da80623a71
parent83012b50854c795294b4b9e8b2766bb5258dafea
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>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_ureg.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp