diff options
author | Timothy Arceri <[email protected]> | 2017-12-12 13:52:50 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-12-13 13:20:28 +1100 |
commit | cab5513b4705a7f29fefe52fefb88952a9a19f4d (patch) | |
tree | cfc7ce921a7c64e21737f6babce57a1ad32144cd /src/compiler | |
parent | dd119a4263452a36e9d4938a39ddbc8d6bf298f7 (diff) |
nir: fix shift for uint64_t
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_lower_io_arrays_to_elements.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |