Implement the actual inline to memory engine on subch 2

Used mostly by OGL games for copying stuff around.
This commit is contained in:
Billy Laws 2022-03-20 18:05:54 +00:00 committed by PixelyIon
parent ba7111d33a
commit 0298a7b1f6
3 changed files with 14 additions and 5 deletions

View File

@ -5,9 +5,10 @@
#include "channel.h"
namespace skyline::soc::gm20b {
ChannelContext::ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> asCtx, size_t numEntries) :
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, macroState, executor)),
gpfifo(state, *this, numEntries),
executor(state),
asCtx(std::move(asCtx)){}
ChannelContext::ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> pAsCtx, size_t numEntries)
: asCtx(std::move(pAsCtx)),
executor(state),
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, macroState, executor)),
inline2Memory(asCtx),
gpfifo(state, *this, numEntries) {}
}

View File

@ -6,6 +6,7 @@
#include <gpu/interconnect/command_executor.h>
#include "macro/macro_state.h"
#include "engines/engine.h"
#include "engines/inline2memory.h"
#include "gpfifo.h"
namespace skyline::soc::gm20b {
@ -24,6 +25,7 @@ namespace skyline::soc::gm20b {
gpu::interconnect::CommandExecutor executor;
MacroState macroState;
std::unique_ptr<engine::maxwell3d::Maxwell3D> maxwell3D; //!< TODO: fix this once graphics context is moved into a cpp file
engine::Inline2Memory inline2Memory;
ChannelGpfifo gpfifo;
ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> asCtx, size_t numEntries);

View File

@ -112,6 +112,9 @@ namespace skyline::soc::gm20b {
case SubchannelId::ThreeD:
channelCtx.maxwell3D->CallMethod(method, argument);
break;
case SubchannelId::Inline2Mem:
channelCtx.inline2Memory.CallMethod(method, argument);
break;
default:
Logger::Warn("Called method 0x{:X} in unimplemented engine 0x{:X}, args: 0x{:X}", method, subChannel, argument);
break;
@ -123,6 +126,9 @@ namespace skyline::soc::gm20b {
case SubchannelId::ThreeD:
channelCtx.maxwell3D->CallMethodBatchNonInc(method, arguments);
break;
case SubchannelId::Inline2Mem:
channelCtx.inline2Memory.CallMethodBatchNonInc(method, arguments);
break;
default:
Logger::Warn("Called method 0x{:X} in unimplemented engine 0x{:X} with batch args", method, subChannel);
break;