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 <robdclark@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Rob Clark
2018-04-06 08:28:53 -04:00
parent 1d94aa1987
commit c4457113e9

View File

@@ -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;