diff options
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index d90fb1d68df..c5ef16810a2 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -464,7 +464,8 @@ scan_declaration(struct tgsi_shader_info *info, } } } else if (file == TGSI_FILE_SAMPLER) { - info->samplers_declared |= 1 << reg; + STATIC_ASSERT(sizeof(info->samplers_declared) * 8 >= PIPE_MAX_SAMPLERS); + info->samplers_declared |= 1u << reg; } else if (file == TGSI_FILE_SAMPLER_VIEW) { unsigned target = fulldecl->SamplerView.Resource; assert(target < TGSI_TEXTURE_UNKNOWN); |