diff options
| author | 2018-08-28 12:28:57 -0400 | |
|---|---|---|
| committer | 2018-08-28 12:28:57 -0400 | |
| 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.gz yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.tar.xz yuzu-4d7e1662c84ef65f7da5a27b0473125cc6759d5c.zip | |
Merge pull request #1193 from lioncash/priv
gpu: Make memory_manager private
Diffstat (limited to 'src/video_core/gpu.cpp')
| -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) { | |||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { | 24 | GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { |
| 25 | memory_manager = std::make_unique<MemoryManager>(); | 25 | memory_manager = std::make_unique<Tegra::MemoryManager>(); |
| 26 | maxwell_3d = std::make_unique<Engines::Maxwell3D>(rasterizer, *memory_manager); | 26 | maxwell_3d = std::make_unique<Engines::Maxwell3D>(rasterizer, *memory_manager); |
| 27 | fermi_2d = std::make_unique<Engines::Fermi2D>(*memory_manager); | 27 | fermi_2d = std::make_unique<Engines::Fermi2D>(*memory_manager); |
| 28 | maxwell_compute = std::make_unique<Engines::MaxwellCompute>(); | 28 | maxwell_compute = std::make_unique<Engines::MaxwellCompute>(); |
| @@ -31,14 +31,22 @@ GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { | |||
| 31 | 31 | ||
| 32 | GPU::~GPU() = default; | 32 | GPU::~GPU() = default; |
| 33 | 33 | ||
| 34 | const Engines::Maxwell3D& GPU::Maxwell3D() const { | 34 | Engines::Maxwell3D& GPU::Maxwell3D() { |
| 35 | return *maxwell_3d; | 35 | return *maxwell_3d; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | Engines::Maxwell3D& GPU::Maxwell3D() { | 38 | const Engines::Maxwell3D& GPU::Maxwell3D() const { |
| 39 | return *maxwell_3d; | 39 | return *maxwell_3d; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | MemoryManager& GPU::MemoryManager() { | ||
| 43 | return *memory_manager; | ||
| 44 | } | ||
| 45 | |||
| 46 | const MemoryManager& GPU::MemoryManager() const { | ||
| 47 | return *memory_manager; | ||
| 48 | } | ||
| 49 | |||
| 42 | u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | 50 | u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { |
| 43 | ASSERT(format != RenderTargetFormat::NONE); | 51 | ASSERT(format != RenderTargetFormat::NONE); |
| 44 | 52 | ||