From: Keith Whitwell Date: Thu, 12 Feb 2009 13:30:01 +0000 (+0000) Subject: tgsi: keep immediate file info uptodate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5cca127b0ddcfe36b8dc98a5f405979e8afe673;p=mesa.git 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. --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index d02205a63ef..c535788819f 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: