diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index c35eff25ba8..4a2b3540639 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -585,8 +585,11 @@ scan_declaration(struct tgsi_shader_info *info, int buffer; unsigned index, target, type; - /* only first 32 regs will appear in this bitfield */ - info->file_mask[file] |= (1 << reg); + /* + * only first 32 regs will appear in this bitfield, if larger + * bits will wrap around. + */ + info->file_mask[file] |= (1u << (reg & 31)); info->file_count[file]++; info->file_max[file] = MAX2(info->file_max[file], (int)reg); |