diff options
| author | 2014-07-16 11:27:58 +0200 | |
|---|---|---|
| committer | 2014-07-23 00:33:08 +0200 | |
| commit | 246cb75584af281596b938f898e8a3aedbcdb62a (patch) | |
| tree | e87322b8dbcf7e7d2975bc6874f0fd3487a46eb7 /src/video_core | |
| parent | GPU: Make use of RegisterSet. (diff) | |
| download | yuzu-246cb75584af281596b938f898e8a3aedbcdb62a.tar.gz yuzu-246cb75584af281596b938f898e8a3aedbcdb62a.tar.xz yuzu-246cb75584af281596b938f898e8a3aedbcdb62a.zip | |
RegisterSet: Simplify code by using structs for register definition instead of unions.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 8d9d61ae8..50f820e4a 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -80,17 +80,17 @@ void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& | |||
| 80 | 80 | ||
| 81 | const auto& framebuffer_top = GPU::g_regs.Get<GPU::Regs::FramebufferTop>(); | 81 | const auto& framebuffer_top = GPU::g_regs.Get<GPU::Regs::FramebufferTop>(); |
| 82 | const auto& framebuffer_sub = GPU::g_regs.Get<GPU::Regs::FramebufferBottom>(); | 82 | const auto& framebuffer_sub = GPU::g_regs.Get<GPU::Regs::FramebufferBottom>(); |
| 83 | const u32 active_fb_top = (framebuffer_top.data.active_fb == 1) | 83 | const u32 active_fb_top = (framebuffer_top.active_fb == 1) |
| 84 | ? framebuffer_top.data.address_left2 | 84 | ? framebuffer_top.address_left2 |
| 85 | : framebuffer_top.data.address_left1; | 85 | : framebuffer_top.address_left1; |
| 86 | const u32 active_fb_sub = (framebuffer_sub.data.active_fb == 1) | 86 | const u32 active_fb_sub = (framebuffer_sub.active_fb == 1) |
| 87 | ? framebuffer_sub.data.address_left2 | 87 | ? framebuffer_sub.address_left2 |
| 88 | : framebuffer_sub.data.address_left1; | 88 | : framebuffer_sub.address_left1; |
| 89 | 89 | ||
| 90 | DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x", | 90 | DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x", |
| 91 | framebuffer_top.data.stride * framebuffer_top.data.height, | 91 | framebuffer_top.stride * framebuffer_top.height, |
| 92 | GPU::GetFramebufferAddr(active_fb_top), (int)framebuffer_top.data.width, | 92 | GPU::GetFramebufferAddr(active_fb_top), (int)framebuffer_top.width, |
| 93 | (int)framebuffer_top.data.height, (int)framebuffer_top.data.format); | 93 | (int)framebuffer_top.height, (int)framebuffer_top.format); |
| 94 | 94 | ||
| 95 | // TODO: This should consider the GPU registers for framebuffer width, height and stride. | 95 | // TODO: This should consider the GPU registers for framebuffer width, height and stride. |
| 96 | FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_top), m_xfb_top_flipped); | 96 | FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_top), m_xfb_top_flipped); |