aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_atomics.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-01-21 14:12:58 -0500
committerRob Clark <[email protected]>2016-02-09 17:30:33 -0500
commitced8d3e7730777ea8a264d22f83b43f7b3a5c433 (patch)
tree75eab31bc4fe51d7d4c68bdf1ae21c198925cfb9 /src/compiler/nir/nir_lower_atomics.c
parent6921762de6490fb7fa791e3fa6aff9f9f27bf40f (diff)
nir: use const_index helpers
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_atomics.c')
-rw-r--r--src/compiler/nir/nir_lower_atomics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_atomics.c b/src/compiler/nir/nir_lower_atomics.c
index 1a4458d4f84..1935a527c6f 100644
--- a/src/compiler/nir/nir_lower_atomics.c
+++ b/src/compiler/nir/nir_lower_atomics.c
@@ -70,8 +70,8 @@ lower_instr(nir_intrinsic_instr *instr,
unsigned uniform_loc = instr->variables[0]->var->data.location;
nir_intrinsic_instr *new_instr = nir_intrinsic_instr_create(mem_ctx, op);
- new_instr->const_index[0] =
- state->shader_program->UniformStorage[uniform_loc].opaque[state->shader->stage].index;
+ 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);
offset_const->value.u[0] = instr->variables[0]->var->data.offset;