summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_inline_functions.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-12-24 09:42:34 -0800
committerJason Ekstrand <[email protected]>2016-12-30 12:38:04 -0800
commit134a5ad31c8d39219f241f7a7cad246a6864c74b (patch)
treef31ba3874da61a7d6a75fd13c9dc89f42339a873 /src/compiler/nir/nir_inline_functions.c
parent832dddcf91f168ab057cb5c7f6914b24ae6b864c (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/nir/nir_inline_functions.c')
-rw-r--r--src/compiler/nir/nir_inline_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_inline_functions.c b/src/compiler/nir/nir_inline_functions.c
index c36748d6cf5..b91e7bc86da 100644
--- a/src/compiler/nir/nir_inline_functions.c
+++ b/src/compiler/nir/nir_inline_functions.c
@@ -49,7 +49,7 @@ convert_deref_to_param_deref(nir_instr *instr, nir_deref_var **deref,
/* Now we make a new deref by concatenating the deref in the call's
* parameter with the deref we were given.
*/
- nir_deref_var *new_deref = nir_deref_as_var(nir_copy_deref(instr, &call_deref->deref));
+ nir_deref_var *new_deref = nir_deref_var_clone(call_deref, instr);
nir_deref *new_tail = nir_deref_tail(&new_deref->deref);
new_tail->child = (*deref)->deref.child;
ralloc_steal(new_tail, new_tail->child);