summaryrefslogtreecommitdiffstats
path: root/src/intel
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/intel
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/intel')
-rw-r--r--src/intel/vulkan/anv_nir_lower_input_attachments.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c b/src/intel/vulkan/anv_nir_lower_input_attachments.c
index e11b5637cda..1d6f727258a 100644
--- a/src/intel/vulkan/anv_nir_lower_input_attachments.c
+++ b/src/intel/vulkan/anv_nir_lower_input_attachments.c
@@ -86,8 +86,7 @@ try_lower_input_load(nir_function_impl *impl, nir_intrinsic_instr *load)
tex->is_array = true;
tex->is_shadow = false;
- tex->texture =
- nir_deref_as_var(nir_copy_deref(tex, &load->variables[0]->deref));
+ tex->texture = nir_deref_var_clone(load->variables[0], tex);
tex->sampler = NULL;
tex->texture_index = 0;
tex->sampler_index = 0;