diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-28 16:57:56 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-28 17:11:50 +0200 |
commit | 45fb74d2623182b38af422bc6c8a51040860143f (patch) | |
tree | ad65e21b3984d876241fc478d7624abfceb55e86 /src/video_core/gpu.cpp | |
parent | Merge pull request #1165 from bunnei/shader-cache (diff) | |
download | yuzu-45fb74d2623182b38af422bc6c8a51040860143f.tar yuzu-45fb74d2623182b38af422bc6c8a51040860143f.tar.gz yuzu-45fb74d2623182b38af422bc6c8a51040860143f.tar.bz2 yuzu-45fb74d2623182b38af422bc6c8a51040860143f.tar.lz yuzu-45fb74d2623182b38af422bc6c8a51040860143f.tar.xz yuzu-45fb74d2623182b38af422bc6c8a51040860143f.tar.zst yuzu-45fb74d2623182b38af422bc6c8a51040860143f.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); |