diff options
| author | 2015-01-07 18:13:48 -0500 | |
|---|---|---|
| committer | 2015-01-07 18:13:48 -0500 | |
| commit | b659cac2dc67ee97297049fcfb02c1ce186ffcb0 (patch) | |
| tree | 8b0bae87f32c632e5d07d826133d56d49c6159f7 /src | |
| parent | Merge pull request #431 from yuriks/thread-queue-cleanup (diff) | |
| parent | GSP: Toggle active framebuffer each frame (diff) | |
| download | yuzu-b659cac2dc67ee97297049fcfb02c1ce186ffcb0.tar.gz yuzu-b659cac2dc67ee97297049fcfb02c1ce186ffcb0.tar.xz yuzu-b659cac2dc67ee97297049fcfb02c1ce186ffcb0.zip | |
Merge pull request #404 from bunnei/more-frame-synch-fixes
GPU: Toggle active framebuffer each frame
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 0127d4ee5..26a43217e 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp | |||
| @@ -291,8 +291,11 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { | |||
| 291 | // Update framebuffer information if requested | 291 | // Update framebuffer information if requested |
| 292 | for (int screen_id = 0; screen_id < 2; ++screen_id) { | 292 | for (int screen_id = 0; screen_id < 2; ++screen_id) { |
| 293 | FrameBufferUpdate* info = GetFrameBufferInfo(thread_id, screen_id); | 293 | FrameBufferUpdate* info = GetFrameBufferInfo(thread_id, screen_id); |
| 294 | if (info->is_dirty) | 294 | |
| 295 | if (info->is_dirty) { | ||
| 295 | SetBufferSwap(screen_id, info->framebuffer_info[info->index]); | 296 | SetBufferSwap(screen_id, info->framebuffer_info[info->index]); |
| 297 | info->framebuffer_info->active_fb = info->framebuffer_info->active_fb ^ 1; | ||
| 298 | } | ||
| 296 | 299 | ||
| 297 | info->is_dirty = false; | 300 | info->is_dirty = false; |
| 298 | } | 301 | } |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 4df3a5e25..29d220e8d 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -87,8 +87,11 @@ void RendererOpenGL::SwapBuffers() { | |||
| 87 | */ | 87 | */ |
| 88 | void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& framebuffer, | 88 | void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& framebuffer, |
| 89 | const TextureInfo& texture) { | 89 | const TextureInfo& texture) { |
| 90 | |||
| 91 | // TODO: Why are active_fb and the valid framebuffer flipped compared to 3dbrew documentation | ||
| 92 | // and GSP definitions? | ||
| 90 | const VAddr framebuffer_vaddr = Memory::PhysicalToVirtualAddress( | 93 | const VAddr framebuffer_vaddr = Memory::PhysicalToVirtualAddress( |
| 91 | framebuffer.active_fb == 1 ? framebuffer.address_left2 : framebuffer.address_left1); | 94 | framebuffer.active_fb == 0 ? framebuffer.address_left2 : framebuffer.address_left1); |
| 92 | 95 | ||
| 93 | LOG_TRACE(Render_OpenGL, "0x%08x bytes from 0x%08x(%dx%d), fmt %x", | 96 | LOG_TRACE(Render_OpenGL, "0x%08x bytes from 0x%08x(%dx%d), fmt %x", |
| 94 | framebuffer.stride * framebuffer.height, | 97 | framebuffer.stride * framebuffer.height, |