[Mesa-dev] [PATCH 5/6] ptn: use const_index helpers
Rob Clark
robdclark at gmail.com
Thu Jan 21 11:48:31 PST 2016
From: Rob Clark <robclark at freedesktop.org>
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/mesa/program/prog_to_nir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index ce6f699..a2440ec 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -927,7 +927,7 @@ ptn_add_output_stores(struct ptn_compile *c)
nir_intrinsic_instr *store =
nir_intrinsic_instr_create(b->shader, nir_intrinsic_store_var);
store->num_components = glsl_get_vector_elements(var->type);
- store->const_index[0] = (1 << store->num_components) - 1;
+ nir_intrinsic_set_write_mask(store, (1 << store->num_components) - 1);
store->variables[0] =
nir_deref_var_create(store, c->output_vars[var->data.location]);
@@ -998,7 +998,7 @@ setup_registers_and_variables(struct ptn_compile *c)
nir_intrinsic_instr *store =
nir_intrinsic_instr_create(shader, nir_intrinsic_store_var);
store->num_components = 4;
- store->const_index[0] = WRITEMASK_XYZW;
+ nir_intrinsic_set_write_mask(store, WRITEMASK_XYZW);
store->variables[0] = nir_deref_var_create(store, fullvar);
store->src[0] = nir_src_for_ssa(f001);
nir_builder_instr_insert(b, &store->instr);
--
2.5.0
More information about the mesa-dev
mailing list