ptn: use const_index helpers
authorRob Clark <robclark@freedesktop.org>
Thu, 21 Jan 2016 18:49:07 +0000 (13:49 -0500)
committerRob Clark <robclark@freedesktop.org>
Tue, 9 Feb 2016 22:30:33 +0000 (17:30 -0500)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/program/prog_to_nir.c

index ebcc5288c2e07833f1e28161cf44f4f151a6ba3d..29e5d3075c920272f85e7124df99b3715949dbc1 100644 (file)
@@ -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);