diff options
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 | ||