Module: Mesa
Branch: master
Commit: c4457113e9327ce16e56fbf5a38a694e04849ab3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4457113e9327ce16e56fbf5a38a694e04849ab3

Author: Rob Clark <robdcl...@gmail.com>
Date:   Fri Apr  6 08:28:53 2018 -0400

nir: add comment about nir_src_copy()

So it is more clear about when to use nir_instr_rewrite_src()

Signed-off-by: Rob Clark <robdcl...@gmail.com>
Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net>

---

 src/compiler/nir/nir.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index 8364197480..ef911540f3 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -212,6 +212,9 @@ nir_function_create(nir_shader *shader, const char *name)
    return func;
 }
 
+/* NOTE: if the instruction you are copying a src to is already added
+ * to the IR, use nir_instr_rewrite_src() instead.
+ */
 void nir_src_copy(nir_src *dest, const nir_src *src, void *mem_ctx)
 {
    dest->is_ssa = src->is_ssa;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to