From d7a3c585ae682ee2ef76a4ea9c3f09b82525ff91 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Sat, 13 Dec 2025 12:16:07 +1000 Subject: [PATCH] fix(dma): allow pipelined transfers to prevent assertion failures Remove strict assertion on data_transfer_type and allow PIPELINED transfers (treating them as NON_PIPELINED). Some games like Marvel Cosmic Invasion use pipelined transfers, causing crashes. Fixes assertion at maxwell_dma.cpp:76 Signed-off-by: Zephyron --- src/video_core/engines/maxwell_dma.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index a62089528..e6dbef8cb 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -73,7 +73,17 @@ void MaxwellDMA::Launch() { // TODO(Subv): Perform more research and implement all features of this engine. const LaunchDMA& launch = regs.launch_dma; ASSERT(launch.interrupt_type == LaunchDMA::InterruptType::NONE); - ASSERT(launch.data_transfer_type == LaunchDMA::DataTransferType::NON_PIPELINED); + + // Handle pipelined transfers: treat as non-pipelined for now + // Some games (e.g., Marvel Cosmic Invasion) use pipelined transfers + if (launch.data_transfer_type != LaunchDMA::DataTransferType::NON_PIPELINED && + launch.data_transfer_type != LaunchDMA::DataTransferType::PIPELINED) { + UNIMPLEMENTED_IF_MSG(launch.data_transfer_type != LaunchDMA::DataTransferType::NONE, + "Unsupported data transfer type: {}", + static_cast(launch.data_transfer_type.Value())); + ReleaseSemaphore(); + return; + } if (launch.multi_line_enable) { const bool is_src_pitch = launch.src_memory_layout == LaunchDMA::MemoryLayout::PITCH;