mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-16 05:27:57 +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)),
|
: asCtx(std::move(pAsCtx)),
|
||||||
executor(state),
|
executor(state),
|
||||||
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, macroState, executor)),
|
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, macroState, executor)),
|
||||||
maxwellDma(state, *this),
|
maxwellDma(state, *this, executor),
|
||||||
keplerCompute(state, *this),
|
keplerCompute(state, *this),
|
||||||
inline2Memory(asCtx),
|
inline2Memory(asCtx),
|
||||||
gpfifo(state, *this, numEntries) {}
|
gpfifo(state, *this, numEntries) {}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||||
// Copyright © 2022 yuzu Emulator Project (https://github.com/yuzu-emu/yuzu/)
|
// 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/format.h>
|
||||||
#include <gpu/texture/layout.h>
|
#include <gpu/texture/layout.h>
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
@ -10,8 +11,8 @@
|
|||||||
#include "maxwell_dma.h"
|
#include "maxwell_dma.h"
|
||||||
|
|
||||||
namespace skyline::soc::gm20b::engine {
|
namespace skyline::soc::gm20b::engine {
|
||||||
MaxwellDma::MaxwellDma(const DeviceState &state, ChannelContext &channelCtx)
|
MaxwellDma::MaxwellDma(const DeviceState &state, ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor)
|
||||||
: channelCtx(channelCtx), syncpoints(state.soc->host1x.syncpoints) {}
|
: channelCtx(channelCtx), syncpoints(state.soc->host1x.syncpoints), executor(executor) {}
|
||||||
|
|
||||||
__attribute__((always_inline)) void MaxwellDma::CallMethod(u32 method, u32 argument) {
|
__attribute__((always_inline)) void MaxwellDma::CallMethod(u32 method, u32 argument) {
|
||||||
Logger::Verbose("Called method in Maxwell DMA: 0x{:X} args: 0x{:X}", method, 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
executor.Execute();
|
||||||
if (registers.launchDma->multiLineEnable) {
|
if (registers.launchDma->multiLineEnable) {
|
||||||
if (registers.launchDma->srcMemoryLayout == Registers::LaunchDma::MemoryLayout::Pitch &&
|
if (registers.launchDma->srcMemoryLayout == Registers::LaunchDma::MemoryLayout::Pitch &&
|
||||||
registers.launchDma->dstMemoryLayout == Registers::LaunchDma::MemoryLayout::BlockLinear)
|
registers.launchDma->dstMemoryLayout == Registers::LaunchDma::MemoryLayout::BlockLinear)
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
|
namespace skyline::gpu::interconnect {
|
||||||
|
class CommandExecutor;
|
||||||
|
}
|
||||||
|
|
||||||
namespace skyline::soc::gm20b {
|
namespace skyline::soc::gm20b {
|
||||||
struct ChannelContext;
|
struct ChannelContext;
|
||||||
}
|
}
|
||||||
@ -17,6 +21,7 @@ namespace skyline::soc::gm20b::engine {
|
|||||||
private:
|
private:
|
||||||
host1x::SyncpointSet &syncpoints;
|
host1x::SyncpointSet &syncpoints;
|
||||||
ChannelContext &channelCtx;
|
ChannelContext &channelCtx;
|
||||||
|
gpu::interconnect::CommandExecutor &executor;
|
||||||
|
|
||||||
void HandleMethod(u32 method, u32 argument);
|
void HandleMethod(u32 method, u32 argument);
|
||||||
|
|
||||||
@ -246,7 +251,7 @@ namespace skyline::soc::gm20b::engine {
|
|||||||
static_assert(sizeof(Registers) == (EngineMethodsEnd * 0x4));
|
static_assert(sizeof(Registers) == (EngineMethodsEnd * 0x4));
|
||||||
#pragma pack(pop)
|
#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);
|
void CallMethod(u32 method, u32 argument);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user