summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-11-17 15:50:00 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2016-04-11 08:27:04 +0200
commit41a39e338470d2b0e1b78e5e45d673f64f4dc418 (patch)
treee474bea8bc9b8841a62e2f998dd84322157af051 /src/compiler
parent40d1b671a96247c3dca55114127cd92ead60441f (diff)
nir/locals_to_regs: adapt to different bit sizes
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_lower_locals_to_regs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_locals_to_regs.c b/src/compiler/nir/nir_lower_locals_to_regs.c
index 0438802d3b2..cda652d135f 100644
--- a/src/compiler/nir/nir_lower_locals_to_regs.c
+++ b/src/compiler/nir/nir_lower_locals_to_regs.c
@@ -119,6 +119,7 @@ get_reg_for_deref(nir_deref_var *deref, struct locals_to_regs_state *state)
nir_register *reg = nir_local_reg_create(state->impl);
reg->num_components = glsl_get_vector_elements(tail->type);
reg->num_array_elems = array_size > 1 ? array_size : 0;
+ reg->bit_size = glsl_get_bit_size(glsl_get_base_type(tail->type));
_mesa_hash_table_insert_pre_hashed(state->regs_table, hash, deref, reg);
nir_array_add(&state->derefs_array, nir_deref_var *, deref);