glsl_to_tgsi: add SVIEW decl support
glsl_to_tgsi: add SVIEW decl support

Freedreno needs sampler type information to deal with int/uint textures.
To accomplish this, start creating sampler-view declarations, as
suggested here:

 http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html

create a sampler-view with index matching the sampler, to encode the
texture type (ie. SINT/UINT/FLOAT).  Ie:

   DCL SVIEW[n], 2D, UINT
   DCL SAMP[n]
   TEX OUT[1], IN[1], SAMP[n]

For tgsi texture instructions which do not take an explicit SVIEW
argument, the SVIEW index is implied by the SAMP index.

Signed-off-by: Rob Clark <6f78cdb10adbe0a7fbbf4098125a51f401c77a5f@freedesktop.org>
Reviewed-by: Roland Scheidegger <7d58aee419d6f9201d75517c885374dff5e7d848@vmware.com>
Reviewed-by: Marek Olšák <8c7344a1abdb103e79ecfd488098373070c3c70e@amd.com>
Reviewed-by: Jose Fonseca <61b5a29db2c0650f7c8510f93eece059c1b09320@vmware.com>

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler