diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-28 18:28:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 18:28:57 +0200 |
commit | 4d7e1662c84ef65f7da5a27b0473125cc6759d5c (patch) | |
tree | 63c9f3fc7a8a76af35e0b5890a4388a4250318a4 /src/video_core/gpu.cpp | |
parent | Merge pull request #1192 from lioncash/unused (diff) | |
parent | gpu: Make memory_manager private (diff) | |
download | yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar.gz yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar.bz2 yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar.lz yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar.xz yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar.zst yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/gpu.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 9758adcfd..e6d8e65c6 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -22,7 +22,7 @@ u32 FramebufferConfig::BytesPerPixel(PixelFormat format) { } GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { - memory_manager = std::make_unique<MemoryManager>(); + memory_manager = std::make_unique<Tegra::MemoryManager>(); maxwell_3d = std::make_unique<Engines::Maxwell3D>(rasterizer, *memory_manager); fermi_2d = std::make_unique<Engines::Fermi2D>(*memory_manager); maxwell_compute = std::make_unique<Engines::MaxwellCompute>(); @@ -31,14 +31,22 @@ GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { GPU::~GPU() = default; -const Engines::Maxwell3D& GPU::Maxwell3D() const { +Engines::Maxwell3D& GPU::Maxwell3D() { return *maxwell_3d; } -Engines::Maxwell3D& GPU::Maxwell3D() { +const Engines::Maxwell3D& GPU::Maxwell3D() const { return *maxwell_3d; } +MemoryManager& GPU::MemoryManager() { + return *memory_manager; +} + +const MemoryManager& GPU::MemoryManager() const { + return *memory_manager; +} + u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { ASSERT(format != RenderTargetFormat::NONE); |