From 0f921895859acfaac94e349eeeed99b91b1aa792 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Thu, 10 May 2018 13:02:57 +0200 Subject: [PATCH] Fix translucent triangles not being autosorted(?) --- core/hw/pvr/ta_vtx.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/hw/pvr/ta_vtx.cpp b/core/hw/pvr/ta_vtx.cpp index dc9506340..19d440e6f 100644 --- a/core/hw/pvr/ta_vtx.cpp +++ b/core/hw/pvr/ta_vtx.cpp @@ -1633,6 +1633,14 @@ bool UsingAutoSort() { if (((FPU_PARAM_CFG >> 21) & 1) == 0) return ((ISP_FEED_CFG & 1) == 0); - else - return ((vri(REGION_BASE) >> 29) & 1) == 0; + else { + // Hack: check several tiles instead of just the first one (Rayman, VR2) + for (u32 i = 0; i < 16; i++) + { + if (((vri(REGION_BASE + i * 24) >> 29) & 1) == 0) + return true; + } + + return false; + } }