summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Tony Wasserka2014-07-16 09:22:08 +0200
committerGravatar Tony Wasserka2014-07-23 00:33:08 +0200
commitcb6f97b2eb129da599f297a605b669b34bccc8e2 (patch)
tree8af43f3bd81c9745841b3fa1229964b45fcbdd29 /src
parentRenderer: Add a few TODOs. (diff)
downloadyuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.gz
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.xz
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.zip
Renderer: Respect the active_fb GPU register.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 064f47e3b..c549f4744 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -78,14 +78,21 @@ void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) {
78 */ 78 */
79void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect) { 79void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect) {
80 80
81 const u32 active_fb_top = (GPU::g_regs.top_framebuffer.active_fb == 1)
82 ? GPU::g_regs.framebuffer_top_left_2
83 : GPU::g_regs.framebuffer_top_left_1;
84 const u32 active_fb_sub = (GPU::g_regs.sub_framebuffer.active_fb == 1)
85 ? GPU::g_regs.framebuffer_sub_left_2
86 : GPU::g_regs.framebuffer_sub_left_1;
87
81 DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x", 88 DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x",
82 GPU::g_regs.top_framebuffer.stride * GPU::g_regs.top_framebuffer.height, 89 GPU::g_regs.top_framebuffer.stride * GPU::g_regs.top_framebuffer.height,
83 GPU::GetFramebufferAddr(GPU::g_regs.framebuffer_top_left_1), (int)GPU::g_regs.top_framebuffer.width, 90 GPU::GetFramebufferAddr(GPU::g_regs.framebuffer_top_left_1), (int)GPU::g_regs.top_framebuffer.width,
84 (int)GPU::g_regs.top_framebuffer.height, (int)GPU::g_regs.top_framebuffer.format); 91 (int)GPU::g_regs.top_framebuffer.height, (int)GPU::g_regs.top_framebuffer.format);
85 92
86 // TODO: This should consider the GPU registers for framebuffer width, height and stride. 93 // TODO: This should consider the GPU registers for framebuffer width, height and stride.
87 FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_top_left_1), m_xfb_top_flipped); 94 FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_top), m_xfb_top_flipped);
88 FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped); 95 FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_sub), m_xfb_bottom_flipped);
89 96
90 // Blit the top framebuffer 97 // Blit the top framebuffer
91 // ------------------------ 98 // ------------------------