diff options
author | Marek Olšák <[email protected]> | 2016-08-24 19:08:01 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-29 14:16:57 +0200 |
commit | d301efb400accee1c6be790756d80957c7d04754 (patch) | |
tree | 48d6a2434004b6ca73a650ce930bdae0fb457fd6 /src/gallium/auxiliary/tgsi/tgsi_scan.c | |
parent | 5f0ea3db16706968278da99cccc511e5b53e190d (diff) |
tgsi/scan: remember sampler view types
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 0167e22affd..a3b0d9f4129 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -497,13 +497,17 @@ scan_declaration(struct tgsi_shader_info *info, info->samplers_declared |= 1u << reg; } else if (file == TGSI_FILE_SAMPLER_VIEW) { unsigned target = fulldecl->SamplerView.Resource; + unsigned type = fulldecl->SamplerView.ReturnTypeX; + assert(target < TGSI_TEXTURE_UNKNOWN); if (info->sampler_targets[reg] == TGSI_TEXTURE_UNKNOWN) { /* Save sampler target for this sampler index */ info->sampler_targets[reg] = target; + info->sampler_type[reg] = type; } else { /* if previously declared, make sure targets agree */ assert(info->sampler_targets[reg] == target); + assert(info->sampler_type[reg] == type); } } else if (file == TGSI_FILE_IMAGE) { if (fulldecl->Image.Resource == TGSI_TEXTURE_BUFFER) |