aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-04-26 14:28:54 -0700
committerDavid Marcec <dmarcecguzman@gmail.com>2018-04-26 14:28:54 -0700
commita210abc3c1f9fdb8148b0b72bd5979489e3650f0 (patch)
treeaeeb723744c4563ad608361b82dd938b062a3e09 /src/video_core/gpu.cpp
parent6f6cac9366a15d87ae5a7761b1feb80bbfdd1c18 (diff)
parent2fe9d01fa89af579b3a470dc317fa200ee30e9b2 (diff)
Merge branch 'master' of https://github.com/yuzu-emu/yuzu into service-impl
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r--src/video_core/gpu.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 9463cd5d66..9eb1439180 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