gpu: Refactor to take RendererBase instead of RasterizerInterface.

This commit is contained in:
bunnei
2019-01-07 23:32:02 -05:00
parent 7b2041a32e
commit 85b2c3b051
3 changed files with 9 additions and 6 deletions

View File

@@ -130,7 +130,7 @@ struct System::Impl {
is_powered_on = true;
gpu_core = std::make_unique<Tegra::GPU>(renderer->Rasterizer());
gpu_core = std::make_unique<Tegra::GPU>(*renderer);
cpu_core_manager.Initialize(system);

View File

@@ -9,7 +9,7 @@
#include "video_core/engines/maxwell_compute.h"
#include "video_core/engines/maxwell_dma.h"
#include "video_core/gpu.h"
#include "video_core/rasterizer_interface.h"
#include "video_core/renderer_base.h"
namespace Tegra {
@@ -24,7 +24,8 @@ u32 FramebufferConfig::BytesPerPixel(PixelFormat format) {
UNREACHABLE();
}
GPU::GPU(VideoCore::RasterizerInterface& rasterizer) {
GPU::GPU(VideoCore::RendererBase& renderer) : renderer{renderer} {
auto& rasterizer{renderer.Rasterizer()};
memory_manager = std::make_unique<Tegra::MemoryManager>();
dma_pusher = std::make_unique<Tegra::DmaPusher>(*this);
maxwell_3d = std::make_unique<Engines::Maxwell3D>(rasterizer, *memory_manager);

View File

@@ -13,8 +13,8 @@
#include "video_core/memory_manager.h"
namespace VideoCore {
class RasterizerInterface;
}
class RendererBase;
} // namespace VideoCore
namespace Tegra {
@@ -117,7 +117,7 @@ enum class EngineID {
class GPU final {
public:
explicit GPU(VideoCore::RasterizerInterface& rasterizer);
explicit GPU(VideoCore::RendererBase& renderer);
~GPU();
struct MethodCall {
@@ -173,6 +173,8 @@ private:
std::unique_ptr<Engines::MaxwellDMA> maxwell_dma;
/// Inline memory engine
std::unique_ptr<Engines::KeplerMemory> kepler_memory;
VideoCore::RendererBase& renderer;
};
} // namespace Tegra