From 2ce146e28fec18b7782f2847fe7f2599ac76fdaf Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 30 Oct 2022 16:41:04 +0000 Subject: [PATCH] Don't crash on the Grp0SetSubDevMask TertOp Used by Vulkan games to set the SLI mask, not applicable to the switch. --- app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp b/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp index 5be67c7a..aec94650 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp @@ -315,9 +315,14 @@ namespace skyline::soc::gm20b { } else if (methodHeader.secOp == PushBufferMethodHeader::SecOp::NonIncMethod) [[unlikely]] { return dispatchCalls.operator()(); } else if (methodHeader.secOp == PushBufferMethodHeader::SecOp::EndPbSegment) [[unlikely]] { - return true; + return true; + } else if (methodHeader.secOp == PushBufferMethodHeader::SecOp::Grp0UseTert) { + if (methodHeader.tertOp == PushBufferMethodHeader::TertOp::Grp0SetSubDevMask) + return false; + + throw exception("Unsupported pushbuffer method TertOp: {}", static_cast(methodHeader.tertOp)); } else { - throw exception("Unsupported pushbuffer method SecOp: {}", static_cast(methodHeader.secOp)); + throw exception("Unsupported pushbuffer method SecOp: {}", static_cast(methodHeader.secOp)); } }};