On Mon, Oct 26, 2015 at 2:01 PM, Jason Ekstrand <[email protected]> wrote: > On Mon, Oct 26, 2015 at 8:26 AM, Rob Clark <[email protected]> wrote: >> From: Rob Clark <[email protected]> >> >> This will be used by clone. Possibly useful elsewhere. The list link >> will only be valid in ssa case, it fits in the padding in the union >> left from the larger nir_reg_src. > > We already have a use_link. It seems perfectly reasonable to me to > overload it in the middle of a copy operation.
I guess, only since we resolve src->ssa ptrs before nir_add_defs_uses(), that could work.. BR, -R > --Jason > >> Signed-off-by: Rob Clark <[email protected]> >> --- >> src/glsl/nir/nir.h | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h >> index 2d9c94c..fb60340 100644 >> --- a/src/glsl/nir/nir.h >> +++ b/src/glsl/nir/nir.h >> @@ -528,7 +528,12 @@ typedef struct nir_src { >> >> union { >> nir_reg_src reg; >> - nir_ssa_def *ssa; >> + struct { >> + /* used in clone to track unresolved ssa src's: */ >> + struct list_head link; >> + >> + nir_ssa_def *ssa; >> + }; >> }; >> >> bool is_ssa; >> -- >> 2.5.0 >> _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
