VERY experimental Nintendo Switch 2 emulator
C++
[video_core] gate Mesa EXIT terminator detection behind non-proprietary driver (#4151)
xbzkbdf60d79a0f4
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cppindex cf9c80fba6..4d5db7e511 100644--- a/src/video_core/shader_environment.cpp+++ b/src/video_core/shader_environment.cpp@@ -255,8 +255,7 @@ std::optional<u64> GenericEnvironment::TryFindSize() {static constexpr u64 SELF_BRANCH_A = 0xE2400FFFFF87000FULL;static constexpr u64 SELF_BRANCH_B = 0xE2400FFFFF07000FULL;- static constexpr u64 MESA_EXIT_MASK = 0xFFF00000000F001FULL;- static constexpr u64 MESA_EXIT_VALUE = (0xE30ULL << 52) | (0x7ULL << 16) | 0xFULL;+ static constexpr u64 EXIT_VALUE = 0xE30000000007000FULL;code.resize(MAXIMUM_SIZE / INST_SIZE);@@ -271,7 +270,7 @@ std::optional<u64> GenericEnvironment::TryFindSize() {if (inst == SELF_BRANCH_A || inst == SELF_BRANCH_B) {return offset + index;}- if ((inst & MESA_EXIT_MASK) == MESA_EXIT_VALUE) {+ if (!is_proprietary_driver && inst == EXIT_VALUE) {return offset + index + INST_SIZE;}}