Re: [Mesa-dev] [PATCH] nv50/ir: copy over value's register id when resolving merge of a phi
Sounds reasonable. Reviewed-by: Samuel PitoisetOn 10/12/2016 02:51 AM, Ilia Mirkin wrote: The offset needs to be properly copied over to the phi value, otherwise it will get assigned to the base of the merge instead of the proper location. Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 7e64f7c..d36c853 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -1905,8 +1905,10 @@ GCRA::resolveSplitsAndMerges() // their registers should be identical. if (v->getInsn()->op == OP_PHI || v->getInsn()->op == OP_UNION) { Instruction *phi = v->getInsn(); -for (int phis = 0; phi->srcExists(phis); ++phis) +for (int phis = 0; phi->srcExists(phis); ++phis) { phi->getSrc(phis)->join = v; + phi->getSrc(phis)->reg.data.id = v->reg.data.id; +} } reg += v->reg.size; } -- -Samuel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] nv50/ir: copy over value's register id when resolving merge of a phi
The offset needs to be properly copied over to the phi value, otherwise it will get assigned to the base of the merge instead of the proper location. Signed-off-by: Ilia MirkinCc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 7e64f7c..d36c853 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -1905,8 +1905,10 @@ GCRA::resolveSplitsAndMerges() // their registers should be identical. if (v->getInsn()->op == OP_PHI || v->getInsn()->op == OP_UNION) { Instruction *phi = v->getInsn(); -for (int phis = 0; phi->srcExists(phis); ++phis) +for (int phis = 0; phi->srcExists(phis); ++phis) { phi->getSrc(phis)->join = v; + phi->getSrc(phis)->reg.data.id = v->reg.data.id; +} } reg += v->reg.size; } -- 2.7.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev