From 96d8676d5b467aa07dbcbb0067fe6590a9d622a1 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Mon, 25 Jul 2022 20:43:35 +0530 Subject: [PATCH] Fix `SubmitWithFlush` not updating `MegaBuffer` cycle The `CommandExecutor`'s `MegaBuffer` was not being updated with the latest `FenceCycle` on being flushed in `SubmitWIthFlush`, this led to the megabuffer being overwritten prior to its GPU-side usage being complete. This commit fixes that by replacing the cycle to the latest cycle and prevents any races that occurred prior. --- app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp index ef158128..fd780b8b 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp @@ -350,6 +350,7 @@ namespace skyline::gpu::interconnect { TRACE_EVENT("gpu", "CommandExecutor::SubmitWithFlush"); SubmitInternal(); cycle = activeCommandBuffer.Reset(); + megaBuffer.ReplaceCycle(cycle); megaBuffer.Reset(); } ResetInternal();