diff options
author | Dave Airlie <[email protected]> | 2012-01-06 12:21:54 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-01-11 08:08:12 +0000 |
commit | f7e3e46f72fffe4b83cd3f922173ff28e9ab9c7c (patch) | |
tree | bcf2ef2a68fb66ec2a2cf52f001fbf9997c65578 /src/gallium/auxiliary/tgsi/tgsi_scan.c | |
parent | 40c5987ed84f9f0b8bb1f707bb13c1aafc39330a (diff) |
tgsi_scan: add support to count number of output clip distances
Just add support to the scanner to count the number of clip distances.
Signed-off-by: Dave Airlie <[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 97d74e4a9f9..e4e9c032e02 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -191,6 +191,10 @@ tgsi_scan_shader(const struct tgsi_token *tokens, info->output_semantic_index[reg] = (ubyte)fulldecl->Semantic.Index; info->num_outputs++; + if (procType == TGSI_PROCESSOR_VERTEX && + fulldecl->Semantic.Name == TGSI_SEMANTIC_CLIPDIST) { + info->num_written_clipdistance += util_bitcount(fulldecl->Declaration.UsageMask); + } /* extra info for special outputs */ if (procType == TGSI_PROCESSOR_FRAGMENT && fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION) |