From 054393917e99d307eea0aabc78c0c6e5e709b2c7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 23 Mar 2018 15:49:04 -0400 Subject: renderer_opengl: Fixes for properly flushing & rendering the framebuffer. --- src/video_core/renderer_opengl/renderer_opengl.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index ef63cbcf0..4628f6db0 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -137,9 +137,15 @@ void RendererOpenGL::SwapBuffers(boost::optional(0.f, 0.f, 1.f, 1.f); - Rasterizer()->FlushRegion(framebuffer_addr, framebuffer.stride * framebuffer.height); + Rasterizer()->FlushRegion(framebuffer_addr, size_in_bytes); - VideoCore::MortonCopyPixels128(framebuffer.width, framebuffer.height, bpp, 4, - Memory::GetPointer(framebuffer.address), + VideoCore::MortonCopyPixels128(framebuffer.width, framebuffer.height, bytes_per_pixel, 4, + Memory::GetPointer(framebuffer_addr), gl_framebuffer_data.data(), true); state.texture_units[0].texture_2d = screen_info.texture.resource.handle; -- cgit v1.2.3