diff options
author | Jason Ekstrand <[email protected]> | 2018-03-16 13:35:59 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-22 20:15:57 -0700 |
commit | eb40540b8aa30279b80fa3a879e20bbb5d16838f (patch) | |
tree | 0d88e3c7d7b889c1245ebc64c7abe5c82a2aa170 /src/compiler/spirv/vtn_cfg.c | |
parent | e5130012e4b3b276ec80e11e9d79a69a3c3a5a4c (diff) |
spirv: Use deref instructions for most variables
The only thing still using old-school drefs are function calls.
Acked-by: Rob Clark <[email protected]>
Acked-by: Bas Nieuwenhuizen <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_cfg.c')
-rw-r--r-- | src/compiler/spirv/vtn_cfg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index cea40cefc85..6e6f221040d 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -190,7 +190,7 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode, } else { /* We're a regular SSA value. */ struct vtn_ssa_value *param_ssa = - vtn_local_load(b, nir_deref_var_create(b, param)); + vtn_local_load(b, nir_build_deref_var(&b->nb, param)); struct vtn_value *val = vtn_push_ssa(b, w[2], type, param_ssa); /* Name the parameter so it shows up nicely in NIR */ @@ -643,7 +643,7 @@ vtn_handle_phis_first_pass(struct vtn_builder *b, SpvOp opcode, _mesa_hash_table_insert(b->phi_table, w, phi_var); vtn_push_ssa(b, w[2], type, - vtn_local_load(b, nir_deref_var_create(b, phi_var))); + vtn_local_load(b, nir_build_deref_var(&b->nb, phi_var))); return true; } @@ -667,7 +667,7 @@ vtn_handle_phi_second_pass(struct vtn_builder *b, SpvOp opcode, struct vtn_ssa_value *src = vtn_ssa_value(b, w[i]); - vtn_local_store(b, src, nir_deref_var_create(b, phi_var)); + vtn_local_store(b, src, nir_build_deref_var(&b->nb, phi_var)); } return true; @@ -730,7 +730,7 @@ vtn_emit_cf_list(struct vtn_builder *b, struct list_head *cf_list, if ((*block->branch & SpvOpCodeMask) == SpvOpReturnValue) { struct vtn_ssa_value *src = vtn_ssa_value(b, block->branch[1]); vtn_local_store(b, src, - nir_deref_var_create(b, b->nb.impl->return_var)); + nir_build_deref_var(&b->nb, b->nb.impl->return_var)); } if (block->branch_type != vtn_branch_type_none) { |