From e01dd59b73d5787bc95ce0dfa8dfc95ba10a7581 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 9 Feb 2016 15:35:51 -0800 Subject: vtn: Use const_index helpers --- src/compiler/nir/spirv/spirv_to_nir.c | 2 +- src/compiler/nir/spirv/vtn_variables.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/nir/spirv/spirv_to_nir.c b/src/compiler/nir/spirv/spirv_to_nir.c index c0dd92c36a4..a7efa196832 100644 --- a/src/compiler/nir/spirv/spirv_to_nir.c +++ b/src/compiler/nir/spirv/spirv_to_nir.c @@ -2048,7 +2048,7 @@ vtn_handle_barrier(struct vtn_builder *b, SpvOp opcode, nir_intrinsic_instr_create(b->shader, intrinsic_op); if (opcode == SpvOpEmitStreamVertex || opcode == SpvOpEndStreamPrimitive) - intrin->const_index[0] = w[1]; + nir_intrinsic_set_stream_id(intrin, w[1]); nir_builder_instr_insert(&b->nb, &intrin->instr); } diff --git a/src/compiler/nir/spirv/vtn_variables.c b/src/compiler/nir/spirv/vtn_variables.c index 5ca24201498..31bf416ff5e 100644 --- a/src/compiler/nir/spirv/vtn_variables.c +++ b/src/compiler/nir/spirv/vtn_variables.c @@ -193,7 +193,7 @@ _vtn_local_load_store(struct vtn_builder *b, bool load, nir_deref_var *deref, intrin->num_components, NULL); inout->def = &intrin->dest.ssa; } else { - intrin->const_index[0] = (1 << intrin->num_components) - 1; + nir_intrinsic_set_write_mask(intrin, (1 << intrin->num_components) - 1); intrin->src[0] = nir_src_for_ssa(inout->def); } @@ -392,7 +392,7 @@ _vtn_load_store_tail(struct vtn_builder *b, nir_intrinsic_op op, bool load, int src = 0; if (!load) { - instr->const_index[0] = (1 << instr->num_components) - 1; /* write mask */ + nir_intrinsic_set_write_mask(instr, (1 << instr->num_components) - 1); instr->src[src++] = nir_src_for_ssa((*inout)->def); } @@ -400,8 +400,8 @@ _vtn_load_store_tail(struct vtn_builder *b, nir_intrinsic_op op, bool load, * constant block for now. */ if (op == nir_intrinsic_load_push_constant) { - instr->const_index[0] = 0; - instr->const_index[1] = 128; + nir_intrinsic_set_base(instr, 0); + nir_intrinsic_set_range(instr, 128); } if (index) -- cgit v1.2.3