diff options
author | Nicolai Hähnle <[email protected]> | 2016-11-29 14:22:20 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-12-12 09:03:57 +0100 |
commit | cf8e9778fc784e7bd923b89351f0a551570cd8d2 (patch) | |
tree | 335ab55cde1d321715fef27ebe25ad0fa3fe84c9 /src/gallium/auxiliary/tgsi/tgsi_scan.c | |
parent | 81d0dc5e551fdc7da4cef6be482f8d2ce78f6999 (diff) |
tgsi/scan: collect information about output vertex streams
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 77fe6b37982..56b422d8e9c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -547,6 +547,23 @@ scan_declaration(struct tgsi_shader_info *info, info->output_semantic_index[reg] = (ubyte) semIndex; info->num_outputs = MAX2(info->num_outputs, reg + 1); + if (fulldecl->Declaration.UsageMask & TGSI_WRITEMASK_X) { + info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamX; + info->num_stream_output_components[fulldecl->Semantic.StreamX]++; + } + if (fulldecl->Declaration.UsageMask & TGSI_WRITEMASK_Y) { + info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamY << 2; + info->num_stream_output_components[fulldecl->Semantic.StreamY]++; + } + if (fulldecl->Declaration.UsageMask & TGSI_WRITEMASK_Z) { + info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamZ << 4; + info->num_stream_output_components[fulldecl->Semantic.StreamZ]++; + } + if (fulldecl->Declaration.UsageMask & TGSI_WRITEMASK_W) { + info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamW << 6; + info->num_stream_output_components[fulldecl->Semantic.StreamW]++; + } + switch (semName) { case TGSI_SEMANTIC_PRIMID: info->writes_primid = true; |