summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r--src/video_core/gpu.cpp14
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
24GPU::GPU(VideoCore::RasterizerInterface& rasterizer) { 24GPU::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
32GPU::~GPU() = default; 32GPU::~GPU() = default;
33 33
34const Engines::Maxwell3D& GPU::Maxwell3D() const { 34Engines::Maxwell3D& GPU::Maxwell3D() {
35 return *maxwell_3d; 35 return *maxwell_3d;
36} 36}
37 37
38Engines::Maxwell3D& GPU::Maxwell3D() { 38const Engines::Maxwell3D& GPU::Maxwell3D() const {
39 return *maxwell_3d; 39 return *maxwell_3d;
40} 40}
41 41
42MemoryManager& GPU::MemoryManager() {
43 return *memory_manager;
44}
45
46const MemoryManager& GPU::MemoryManager() const {
47 return *memory_manager;
48}
49
42u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { 50u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
43 ASSERT(format != RenderTargetFormat::NONE); 51 ASSERT(format != RenderTargetFormat::NONE);
44 52