nv50/ir: make edge splitting fix up phi node sources

Graphics / Mesa 3D Graphics Library / Mesa - Ilia Mirkin [alum.mit.edu] - 10 September 2015 02:11 UTC

Unfortunately nv50_ir phi nodes aren't directly connected to the CFG, so the mapping between source and the actual BB is by inbound edge order. So when manipulating edges one has to be extremely careful. We were insufficiently careful when splitting critical edges which resulted in the phi nodes being confused as to where their sources were coming from.

This primarily manifests itself with the TXL-lowering logic on nv50, when it is inside of a conditional. I've been unable to trigger the issue anywhere else so far. This resolves rendering failures in a number of games like Two Worlds 2, Trine: Enchanted Edition, Trine 2, XCOM:Enemy Unknown, Stacking. It also improves the situation in Hearthstone, Sonic Generations, and The Raven: Legacy of a Master Thief. However more work needs to be done there (splitting a lot more edges solves it, so it's some other sort of RA-related issue).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90887

a072ef8 nv50/ir: make edge splitting fix up phi node sources
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 90 +++++++++++++++++---
1 file changed, 77 insertions(+), 13 deletions(-)

Upstream: cgit.freedesktop.org


  • Share