summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_io.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_io.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_io.c')
-rw-r--r--src/compiler/nir/nir_lower_io.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 80c5151f0ea..11fb973a237 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -213,8 +213,8 @@ nir_lower_io_block(nir_block *block, void *void_state)
load_op(state, mode, per_vertex));
load->num_components = intrin->num_components;
- load->const_index[0] =
- intrin->variables[0]->var->data.driver_location;
+ nir_intrinsic_set_base(load,
+ intrin->variables[0]->var->data.driver_location);
if (per_vertex)
load->src[0] = nir_src_for_ssa(vertex_index);
@@ -258,11 +258,9 @@ nir_lower_io_block(nir_block *block, void *void_state)
nir_src_copy(&store->src[0], &intrin->src[0], store);
- store->const_index[0] =
- intrin->variables[0]->var->data.driver_location;
-
- /* Copy the writemask */
- store->const_index[1] = intrin->const_index[0];
+ nir_intrinsic_set_base(store,
+ intrin->variables[0]->var->data.driver_location);
+ nir_intrinsic_set_write_mask(store, nir_intrinsic_write_mask(intrin));
if (per_vertex)
store->src[1] = nir_src_for_ssa(vertex_index);