From c0ebe85a740ac9b325343a08bd7165702175c76f Mon Sep 17 00:00:00 2001 From: Calchan Date: Fri, 5 Sep 2025 16:08:35 +0200 Subject: [PATCH] Revert forced warp shuffle to fix some games (#385) Metroid Prime Remastered, Prince of Persia The Lost Crown, and maybe some others. A few testers and I couldn't find any game that this broke, but it fixed these two above and they said they got fewer artifacts from a few others. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/385 Reviewed-by: crueter Reviewed-by: MaranBr Co-authored-by: Calchan Co-committed-by: Calchan --- .../maxwell/translate/impl/warp_shuffle.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/warp_shuffle.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/warp_shuffle.cpp index b904821619..972eec8276 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/warp_shuffle.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/warp_shuffle.cpp @@ -7,7 +7,6 @@ #include "common/bit_field.h" #include "common/common_types.h" #include "shader_recompiler/frontend/maxwell/translate/impl/impl.h" -#include namespace Shader::Maxwell { namespace { @@ -37,17 +36,6 @@ enum class ShuffleMode : u64 { } } -bool IsKONA() { - std::ifstream machineFile("/sys/devices/soc0/machine"); - if (machineFile.is_open()) { - std::string line; - std::getline(machineFile, line); - if (line == "KONA") - return true; - } - return false; -} - void Shuffle(TranslatorVisitor& v, u64 insn, const IR::U32& index, const IR::U32& mask) { union { u64 insn; @@ -59,10 +47,7 @@ void Shuffle(TranslatorVisitor& v, u64 insn, const IR::U32& index, const IR::U32 const IR::U32 result{ShuffleOperation(v.ir, v.X(shfl.src_reg), index, mask, shfl.mode)}; v.ir.SetPred(shfl.pred, v.ir.GetInBoundsFromOp(result)); - if (IsKONA()) - v.X(shfl.dest_reg, v.ir.Imm32(0xffffffff)); // This fixes the freeze for Retroid / Snapdragon SD865 - else - v.X(shfl.dest_reg, result); + v.X(shfl.dest_reg, result); } } // Anonymous namespace