summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-02-09 15:35:51 -0800
committerJason Ekstrand <[email protected]>2016-02-09 16:32:38 -0800
commite01dd59b73d5787bc95ce0dfa8dfc95ba10a7581 (patch)
tree42aa3c712584ff3ae97774a84b640123cf899b5e /src/compiler
parente15f7551d11f435e13d67a4e0066d1bab44b47ed (diff)
vtn: Use const_index helpers
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/spirv/spirv_to_nir.c2
-rw-r--r--src/compiler/nir/spirv/vtn_variables.c8
2 files changed, 5 insertions, 5 deletions
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)