From: Timothy Arceri Date: Tue, 12 Dec 2017 02:52:50 +0000 (+1100) Subject: nir: fix shift for uint64_t X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cab5513b4705a7f29fefe52fefb88952a9a19f4d;p=mesa.git nir: fix shift for uint64_t Reviewed-by: Nicolai Hähnle --- diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c b/src/compiler/nir/nir_lower_io_arrays_to_elements.c index dca5719f114..cdf9a76a881 100644 --- a/src/compiler/nir/nir_lower_io_arrays_to_elements.c +++ b/src/compiler/nir/nir_lower_io_arrays_to_elements.c @@ -247,7 +247,7 @@ create_indirects_mask(nir_shader *shader, uint64_t *indirects, if (var->data.mode != mode) continue; - uint64_t loc_mask = 1 << var->data.location; + uint64_t loc_mask = ((uint64_t)1) << var->data.location; if (var->data.patch) { if (deref_has_indirect(&b, var, intr->variables[0])) patch_indirects[var->data.location_frac] |= loc_mask; @@ -289,7 +289,7 @@ lower_io_arrays_to_elements(nir_shader *shader, nir_variable_mode mask, nir_variable *var = intr->variables[0]->var; /* Skip indirects */ - uint64_t loc_mask = 1 << var->data.location; + uint64_t loc_mask = ((uint64_t)1) << var->data.location; if (var->data.patch) { if (patch_indirects[var->data.location_frac] & loc_mask) continue;