diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-25 20:40:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 20:40:17 -0400 |
commit | 42d43ea741886b9592fd7dfd57c33228afacf44c (patch) | |
tree | abfeb405b9c710816ad9ea8e06ea14854c0eb4a9 /src/video_core/gpu.cpp | |
parent | d0825c951902d7aecc3c89c7f31f246b75befd95 (diff) | |
parent | 20d86d8a36dca4bf1b465193745a365c3ab9abcd (diff) |
Merge pull request #387 from Subv/maxwell_2d
GPU: Partially implemented the 2D surface copy engine
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r-- | src/video_core/gpu.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 9463cd5d6..9eb143918 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -12,7 +12,7 @@ namespace Tegra { GPU::GPU() { memory_manager = std::make_unique<MemoryManager>(); maxwell_3d = std::make_unique<Engines::Maxwell3D>(*memory_manager); - fermi_2d = std::make_unique<Engines::Fermi2D>(); + fermi_2d = std::make_unique<Engines::Fermi2D>(*memory_manager); maxwell_compute = std::make_unique<Engines::MaxwellCompute>(); } @@ -22,4 +22,16 @@ const Tegra::Engines::Maxwell3D& GPU::Get3DEngine() const { return *maxwell_3d; } +u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { + ASSERT(format != RenderTargetFormat::NONE); + + switch (format) { + case RenderTargetFormat::RGBA8_UNORM: + case RenderTargetFormat::RGB10_A2_UNORM: + return 4; + default: + UNIMPLEMENTED_MSG("Unimplemented render target format %u", static_cast<u32>(format)); + } +} + } // namespace Tegra |