summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_atomics.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-13 20:25:39 -0700
committerJason Ekstrand <[email protected]>2016-04-13 20:25:39 -0700
commit12f88ba32a14ea79134f4e995a55149f078a2f27 (patch)
tree9070861dced23d0ad7dbec598bfd96b686eb7bf1 /src/compiler/nir/nir_lower_atomics.c
parent79fbec30fc16399ede9385ef52cb62cefbb388f4 (diff)
parent171a570f388b2895d14f6d5418c99573cffd6369 (diff)
Merge remote-tracking branch 'public/master' into vulkan
Diffstat (limited to 'src/compiler/nir/nir_lower_atomics.c')
-rw-r--r--src/compiler/nir/nir_lower_atomics.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_atomics.c b/src/compiler/nir/nir_lower_atomics.c
index 70381a7968a..b2ea31888f8 100644
--- a/src/compiler/nir/nir_lower_atomics.c
+++ b/src/compiler/nir/nir_lower_atomics.c
@@ -74,7 +74,8 @@ lower_instr(nir_intrinsic_instr *instr,
nir_intrinsic_set_base(new_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);
+ nir_load_const_instr *offset_const =
+ nir_load_const_instr_create(mem_ctx, 1, 32);
offset_const->value.u32[0] = instr->variables[0]->var->data.offset;
nir_instr_insert_before(&instr->instr, &offset_const->instr);
@@ -95,7 +96,7 @@ lower_instr(nir_intrinsic_instr *instr,
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);
+ nir_load_const_instr_create(mem_ctx, 1, 32);
atomic_counter_size->value.u32[0] = child_array_elements * ATOMIC_COUNTER_SIZE;
nir_instr_insert_before(&instr->instr, &atomic_counter_size->instr);