aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_format_convert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_format_convert.h')
-rw-r--r--src/compiler/nir/nir_format_convert.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_format_convert.h b/src/compiler/nir/nir_format_convert.h
index 23f85ada8d8..a9de69e695f 100644
--- a/src/compiler/nir/nir_format_convert.h
+++ b/src/compiler/nir/nir_format_convert.h
@@ -214,8 +214,8 @@ _nir_format_norm_factor(nir_builder *b, const unsigned *bits,
nir_const_value factor[NIR_MAX_VEC_COMPONENTS];
memset(factor, 0, sizeof(factor));
for (unsigned i = 0; i < num_components; i++) {
- assert(bits[i] < 32);
- factor[i].f32 = (1ul << (bits[i] - is_signed)) - 1;
+ assert(bits[i] <= 32);
+ factor[i].f32 = (1ull << (bits[i] - is_signed)) - 1;
}
return nir_build_imm(b, num_components, 32, factor);
}