summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2009-02-12 13:30:01 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2009-02-12 13:30:01 +0000
commitf5cca127b0ddcfe36b8dc98a5f405979e8afe673 (patch)
treebec660101870ab224af8908f01ce18f6564c3368 /src/gallium/auxiliary
parent6fe421cf4634033bc7e75375e1d981bd235e2e51 (diff)
tgsi: keep immediate file info uptodate
Make sure the stats for TGSI_FILE_IMMEDIATE are uptodate. Previously we just had immediate_count, but file_*[TGSI_FILE_IMMEDIATE] were bogus.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index d02205a63e..c535788819 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -151,7 +151,14 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
break;
case TGSI_TOKEN_TYPE_IMMEDIATE:
- info->immediate_count++;
+ {
+ uint reg = info->immediate_count++;
+ uint file = TGSI_FILE_IMMEDIATE;
+
+ info->file_mask[file] |= (1 << reg);
+ info->file_count[file]++;
+ info->file_max[file] = MAX2(info->file_max[file], (int)reg);
+ }
break;
default: