summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_atomics.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-03-16 12:11:34 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2016-03-17 11:16:33 +0100
commit084b24f5582567ebf5aa94b7f40ae3bdcb71316b (patch)
treeab6e03937f655aafbec7d658dd89cd7709292f33 /src/compiler/nir/nir_lower_atomics.c
parent9076c4e289de0debf1fb2a7237bdeb9c11002347 (diff)
nir: rename nir_const_value fields to include bitsize information
Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_atomics.c')
-rw-r--r--src/compiler/nir/nir_lower_atomics.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_lower_atomics.c b/src/compiler/nir/nir_lower_atomics.c
index eefcb55a0a6..e066cf222a7 100644
--- a/src/compiler/nir/nir_lower_atomics.c
+++ b/src/compiler/nir/nir_lower_atomics.c
@@ -75,7 +75,7 @@ lower_instr(nir_intrinsic_instr *instr,
state->shader_program->UniformStorage[uniform_loc].opaque[state->shader->stage].index);
nir_load_const_instr *offset_const = nir_load_const_instr_create(mem_ctx, 1);
- offset_const->value.u[0] = instr->variables[0]->var->data.offset;
+ offset_const->value.u32[0] = instr->variables[0]->var->data.offset;
nir_instr_insert_before(&instr->instr, &offset_const->instr);
@@ -90,13 +90,13 @@ lower_instr(nir_intrinsic_instr *instr,
unsigned child_array_elements = tail->child != NULL ?
glsl_get_aoa_size(tail->type) : 1;
- offset_const->value.u[0] += deref_array->base_offset *
+ offset_const->value.u32[0] += deref_array->base_offset *
child_array_elements * ATOMIC_COUNTER_SIZE;
if (deref_array->deref_array_type == nir_deref_array_type_indirect) {
nir_load_const_instr *atomic_counter_size =
nir_load_const_instr_create(mem_ctx, 1);
- atomic_counter_size->value.u[0] = child_array_elements * ATOMIC_COUNTER_SIZE;
+ atomic_counter_size->value.u32[0] = child_array_elements * ATOMIC_COUNTER_SIZE;
nir_instr_insert_before(&instr->instr, &atomic_counter_size->instr);
nir_alu_instr *mul = nir_alu_instr_create(mem_ctx, nir_op_imul);