From ffaefc82d3060e76f0829761249c9f588f868a9d Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Thu, 7 Jul 2022 17:52:57 +0530 Subject: [PATCH] Call all flush callbacks prior to `CommandExecutor` submission The flush callbacks inside `CommandExecutor` weren't being called prior to submission as they should've been, this fixes that by calling them. It additionally removes the requirement to manually flush Maxwell3D at the end of `ChannelGpfifo` pushbuffers as it's a flush callback and will automatically be called by `Submit`. Co-authored-by: Billy Laws --- .../main/cpp/skyline/gpu/interconnect/command_executor.cpp | 6 ++++++ app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) 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 9711ede1..42a0b621 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.cpp @@ -316,6 +316,9 @@ namespace skyline::gpu::interconnect { } void CommandExecutor::Submit() { + for (const auto &callback : flushCallbacks) + callback(); + if (!nodes.empty()) { TRACE_EVENT("gpu", "CommandExecutor::Submit"); SubmitInternal(); @@ -330,6 +333,9 @@ namespace skyline::gpu::interconnect { } void CommandExecutor::SubmitWithFlush() { + for (const auto &callback : flushCallbacks) + callback(); + if (!nodes.empty()) { TRACE_EVENT("gpu", "CommandExecutor::SubmitWithFlush"); SubmitInternal(); diff --git a/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp b/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp index a3320061..c901d159 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/gpfifo.cpp @@ -336,7 +336,6 @@ namespace skyline::soc::gm20b { break; } - channelCtx.maxwell3D->FlushEngineState(); channelCtx.executor.Submit(); }