diff options
author | Jason Ekstrand <[email protected]> | 2016-12-24 09:42:34 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-12-30 12:38:04 -0800 |
commit | 134a5ad31c8d39219f241f7a7cad246a6864c74b (patch) | |
tree | f31ba3874da61a7d6a75fd13c9dc89f42339a873 /src/compiler/spirv/vtn_variables.c | |
parent | 832dddcf91f168ab057cb5c7f6914b24ae6b864c (diff) |
nir: Make nir_copy_deref follow the "clone" pattern
We rename it to nir_deref_clone, re-order the sources to match the other
clone functions, and expose nir_deref_var_clone. This past part, in
particular, lets us get rid of quite a few lines since we no longer have
to call nir_copy_deref and wrap it in deref_as_var.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index be64dd95506..de7c8fe1f76 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -186,8 +186,7 @@ _vtn_local_load_store(struct vtn_builder *b, bool load, nir_deref_var *deref, nir_intrinsic_store_var; nir_intrinsic_instr *intrin = nir_intrinsic_instr_create(b->shader, op); - intrin->variables[0] = - nir_deref_as_var(nir_copy_deref(intrin, &deref->deref)); + intrin->variables[0] = nir_deref_var_clone(deref, intrin); intrin->num_components = glsl_get_vector_elements(tail->type); if (load) { |