diff options
author | Brian Paul <[email protected]> | 2016-03-26 11:46:53 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-03-29 18:13:46 -0600 |
commit | 86e1768c13d67945f4a9549820e711b70ff2aba7 (patch) | |
tree | 07f56e90f3b496c6686d430bd816dc11629f16bf /src/gallium/auxiliary/tgsi/tgsi_scan.h | |
parent | 6775268b61b1943c85f5a1a30ce330d34003e328 (diff) |
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 <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 76d8925119e..31adce7a603 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -65,6 +65,7 @@ struct tgsi_shader_info int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */ int const_file_max[PIPE_MAX_CONSTANT_BUFFERS]; unsigned samplers_declared; /**< bitmask of declared samplers */ + ubyte sampler_targets[PIPE_MAX_SHADER_SAMPLER_VIEWS]; /**< TGSI_TEXTURE_x values */ ubyte input_array_first[PIPE_MAX_SHADER_INPUTS]; ubyte input_array_last[PIPE_MAX_SHADER_INPUTS]; |