Drop usage of unique_ptr for Maxwell3D

Since graphics context is being replaced and split into cpp files there will no longer be any circular includes that previously prevented this.
This commit is contained in:
Billy Laws 2022-08-31 15:18:10 +01:00
parent 90db743c56
commit 38ba963311
2 changed files with 3 additions and 8 deletions

View File

@ -1,15 +1,13 @@
// SPDX-License-Identifier: MPL-2.0 // SPDX-License-Identifier: MPL-2.0
// Copyright © 2021 Skyline Team and Contributors (https://github.com/skyline-emu/) // Copyright © 2021 Skyline Team and Contributors (https://github.com/skyline-emu/)
#include "engines/maxwell_3d.h" //TODO: remove
#include "engines/fermi_2d.h" //TODO: remove
#include "channel.h" #include "channel.h"
namespace skyline::soc::gm20b { namespace skyline::soc::gm20b {
ChannelContext::ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> pAsCtx, size_t numEntries) ChannelContext::ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> pAsCtx, size_t numEntries)
: asCtx(std::move(pAsCtx)), : asCtx(std::move(pAsCtx)),
executor(state), executor(state),
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, macroState, executor)), maxwell3D(state, *this, macroState, executor),
fermi2D(state, *this, macroState, executor), fermi2D(state, *this, macroState, executor),
maxwellDma(state, *this, executor), maxwellDma(state, *this, executor),
keplerCompute(state, *this), keplerCompute(state, *this),

View File

@ -6,6 +6,7 @@
#include <gpu/interconnect/command_executor.h> #include <gpu/interconnect/command_executor.h>
#include "macro/macro_state.h" #include "macro/macro_state.h"
#include "engines/engine.h" #include "engines/engine.h"
#include "engines/maxwell_3d.h"
#include "engines/fermi_2d.h" #include "engines/fermi_2d.h"
#include "engines/maxwell_dma.h" #include "engines/maxwell_dma.h"
#include "engines/kepler_compute.h" #include "engines/kepler_compute.h"
@ -13,10 +14,6 @@
#include "gpfifo.h" #include "gpfifo.h"
namespace skyline::soc::gm20b { namespace skyline::soc::gm20b {
namespace engine::maxwell3d {
class Maxwell3D;
}
struct AddressSpaceContext; struct AddressSpaceContext;
/** /**
@ -27,7 +24,7 @@ namespace skyline::soc::gm20b {
std::shared_ptr<AddressSpaceContext> asCtx; std::shared_ptr<AddressSpaceContext> asCtx;
gpu::interconnect::CommandExecutor executor; gpu::interconnect::CommandExecutor executor;
MacroState macroState; MacroState macroState;
std::unique_ptr<engine::maxwell3d::Maxwell3D> maxwell3D; //!< TODO: fix this once graphics context is moved into a cpp file engine::maxwell3d::Maxwell3D maxwell3D;
engine::fermi2d::Fermi2D fermi2D; engine::fermi2d::Fermi2D fermi2D;
engine::MaxwellDma maxwellDma; engine::MaxwellDma maxwellDma;
engine::KeplerCompute keplerCompute; engine::KeplerCompute keplerCompute;