tgsi: collect texture sampler target info in tgsi_scan_shader()
authorBrian Paul <brianp@vmware.com>
Sat, 26 Mar 2016 17:46:53 +0000 (11:46 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 30 Mar 2016 00:13:46 +0000 (18:13 -0600)
commit86e1768c13d67945f4a9549820e711b70ff2aba7
tree07f56e90f3b496c6686d430bd816dc11629f16bf
parent6775268b61b1943c85f5a1a30ce330d34003e328
tgsi: collect texture sampler target info in tgsi_scan_shader()

Texture sample instructions specify a sampler unit and texture target
such as "1D", "2D", "CUBE", etc.  Sampler view declarations also specify
the sampler unit and texture target.

This patch checks that the texture instructions agree with the declarations
and collects the texture target type for each sampler unit.

v2: only compare instruction's texture target to the sampler view declaration
target if the instruction is a TEX instruction, not a SAMPLE instruction.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h