tgsi_scan_shader(const struct tgsi_token *tokens,
struct tgsi_shader_info *info)
{
- uint procType;
+ uint procType, i;
struct tgsi_parse_context parse;
memset(info, 0, sizeof(*info));
+ for (i = 0; i < TGSI_FILE_COUNT; i++)
+ info->file_max[i] = -1;
/**
** Setup to begin parsing input shader
/* only first 32 regs will appear in this bitfield */
info->file_mask[file] |= (1 << i);
info->file_count[file]++;
+ info->file_max[file] = MAX2(info->file_max[file], i);
if (file == TGSI_FILE_INPUT) {
info->input_semantic_name[info->num_inputs]
uint file_mask[TGSI_FILE_COUNT]; /**< bitmask of declared registers */
uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */
+ int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */
uint immediate_count; /**< number of immediates declared */