summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-07-16 09:22:08 +0200
committerTony Wasserka <NeoBrainX@gmail.com>2014-07-23 00:33:08 +0200
commitcb6f97b2eb129da599f297a605b669b34bccc8e2 (patch)
tree8af43f3bd81c9745841b3fa1229964b45fcbdd29 /src
parentRenderer: Add a few TODOs. (diff)
downloadyuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.gz
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.bz2
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.lz
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.xz
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.tar.zst
yuzu-cb6f97b2eb129da599f297a605b669b34bccc8e2.zip
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) {
*/
void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect) {
+ const u32 active_fb_top = (GPU::g_regs.top_framebuffer.active_fb == 1)
+ ? GPU::g_regs.framebuffer_top_left_2
+ : GPU::g_regs.framebuffer_top_left_1;
+ const u32 active_fb_sub = (GPU::g_regs.sub_framebuffer.active_fb == 1)
+ ? GPU::g_regs.framebuffer_sub_left_2
+ : GPU::g_regs.framebuffer_sub_left_1;
+
DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x",
GPU::g_regs.top_framebuffer.stride * GPU::g_regs.top_framebuffer.height,
GPU::GetFramebufferAddr(GPU::g_regs.framebuffer_top_left_1), (int)GPU::g_regs.top_framebuffer.width,
(int)GPU::g_regs.top_framebuffer.height, (int)GPU::g_regs.top_framebuffer.format);
// TODO: This should consider the GPU registers for framebuffer width, height and stride.
- FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_top_left_1), m_xfb_top_flipped);
- FlipFramebuffer(GPU::GetFramebufferPointer(GPU::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped);
+ FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_top), m_xfb_top_flipped);
+ FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_sub), m_xfb_bottom_flipped);
// Blit the top framebuffer
// ------------------------