mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 09:15:28 +03:00
Trigger command executor before DMA copies
DMA copies can use textures currently in active use on the GPU as dst/src so Execute before to prevent a deadlock
This commit is contained in:
parent
dbbc5704d2
commit
77cf33b643
@ -9,7 +9,7 @@ namespace skyline::soc::gm20b {
|
||||
: asCtx(std::move(pAsCtx)),
|
||||
executor(state),
|
||||
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, macroState, executor)),
|
||||
maxwellDma(state, *this),
|
||||
maxwellDma(state, *this, executor),
|
||||
keplerCompute(state, *this),
|
||||
inline2Memory(asCtx),
|
||||
gpfifo(state, *this, numEntries) {}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
// Copyright © 2022 yuzu Emulator Project (https://github.com/yuzu-emu/yuzu/)
|
||||
|
||||
#include <gpu/interconnect/command_executor.h>
|
||||
#include <gpu/texture/format.h>
|
||||
#include <gpu/texture/layout.h>
|
||||
#include <soc.h>
|
||||
@ -10,8 +11,8 @@
|
||||
#include "maxwell_dma.h"
|
||||
|
||||
namespace skyline::soc::gm20b::engine {
|
||||
MaxwellDma::MaxwellDma(const DeviceState &state, ChannelContext &channelCtx)
|
||||
: channelCtx(channelCtx), syncpoints(state.soc->host1x.syncpoints) {}
|
||||
MaxwellDma::MaxwellDma(const DeviceState &state, ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor)
|
||||
: channelCtx(channelCtx), syncpoints(state.soc->host1x.syncpoints), executor(executor) {}
|
||||
|
||||
__attribute__((always_inline)) void MaxwellDma::CallMethod(u32 method, u32 argument) {
|
||||
Logger::Verbose("Called method in Maxwell DMA: 0x{:X} args: 0x{:X}", method, argument);
|
||||
@ -35,6 +36,7 @@ namespace skyline::soc::gm20b::engine {
|
||||
return;
|
||||
}
|
||||
|
||||
executor.Execute();
|
||||
if (registers.launchDma->multiLineEnable) {
|
||||
if (registers.launchDma->srcMemoryLayout == Registers::LaunchDma::MemoryLayout::Pitch &&
|
||||
registers.launchDma->dstMemoryLayout == Registers::LaunchDma::MemoryLayout::BlockLinear)
|
||||
|
@ -5,6 +5,10 @@
|
||||
|
||||
#include "engine.h"
|
||||
|
||||
namespace skyline::gpu::interconnect {
|
||||
class CommandExecutor;
|
||||
}
|
||||
|
||||
namespace skyline::soc::gm20b {
|
||||
struct ChannelContext;
|
||||
}
|
||||
@ -17,6 +21,7 @@ namespace skyline::soc::gm20b::engine {
|
||||
private:
|
||||
host1x::SyncpointSet &syncpoints;
|
||||
ChannelContext &channelCtx;
|
||||
gpu::interconnect::CommandExecutor &executor;
|
||||
|
||||
void HandleMethod(u32 method, u32 argument);
|
||||
|
||||
@ -246,7 +251,7 @@ namespace skyline::soc::gm20b::engine {
|
||||
static_assert(sizeof(Registers) == (EngineMethodsEnd * 0x4));
|
||||
#pragma pack(pop)
|
||||
|
||||
MaxwellDma(const DeviceState &state, ChannelContext &channelCtx);
|
||||
MaxwellDma(const DeviceState &state, ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor);
|
||||
|
||||
void CallMethod(u32 method, u32 argument);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user