From 38ba963311c4dc434471b8961a90541e43573a79 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 31 Aug 2022 15:18:10 +0100 Subject: [PATCH] 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. --- app/src/main/cpp/skyline/soc/gm20b/channel.cpp | 4 +--- app/src/main/cpp/skyline/soc/gm20b/channel.h | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/cpp/skyline/soc/gm20b/channel.cpp b/app/src/main/cpp/skyline/soc/gm20b/channel.cpp index 745c267b..aacc5c43 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/channel.cpp +++ b/app/src/main/cpp/skyline/soc/gm20b/channel.cpp @@ -1,15 +1,13 @@ // SPDX-License-Identifier: MPL-2.0 // 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" namespace skyline::soc::gm20b { ChannelContext::ChannelContext(const DeviceState &state, std::shared_ptr pAsCtx, size_t numEntries) : asCtx(std::move(pAsCtx)), executor(state), - maxwell3D(std::make_unique(state, *this, macroState, executor)), + maxwell3D(state, *this, macroState, executor), fermi2D(state, *this, macroState, executor), maxwellDma(state, *this, executor), keplerCompute(state, *this), diff --git a/app/src/main/cpp/skyline/soc/gm20b/channel.h b/app/src/main/cpp/skyline/soc/gm20b/channel.h index c11f96c4..30f72525 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/channel.h +++ b/app/src/main/cpp/skyline/soc/gm20b/channel.h @@ -6,6 +6,7 @@ #include #include "macro/macro_state.h" #include "engines/engine.h" +#include "engines/maxwell_3d.h" #include "engines/fermi_2d.h" #include "engines/maxwell_dma.h" #include "engines/kepler_compute.h" @@ -13,10 +14,6 @@ #include "gpfifo.h" namespace skyline::soc::gm20b { - namespace engine::maxwell3d { - class Maxwell3D; - } - struct AddressSpaceContext; /** @@ -27,7 +24,7 @@ namespace skyline::soc::gm20b { std::shared_ptr asCtx; gpu::interconnect::CommandExecutor executor; MacroState macroState; - std::unique_ptr maxwell3D; //!< TODO: fix this once graphics context is moved into a cpp file + engine::maxwell3d::Maxwell3D maxwell3D; engine::fermi2d::Fermi2D fermi2D; engine::MaxwellDma maxwellDma; engine::KeplerCompute keplerCompute;