diff options
| author | 2015-05-29 21:54:53 -0400 | |
|---|---|---|
| committer | 2015-06-08 19:18:20 -0400 | |
| commit | 66b0d799ee0e22e07ca9a409d42bafe790695f3c (patch) | |
| tree | c668e0500c940d30490baf156b045a3d350d6ab6 /src/video_core/renderer_opengl | |
| parent | Liberal texture unbind (clout menu) (diff) | |
| download | yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.gz yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.xz yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.zip | |
Render-to-texture flush, interval math fix
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 3396d72cc..faab77ff5 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -217,7 +217,19 @@ void RasterizerOpenGL::DrawTriangles() { | |||
| 217 | 217 | ||
| 218 | vertex_batch.clear(); | 218 | vertex_batch.clear(); |
| 219 | 219 | ||
| 220 | // TODO: Flush the resource cache at the current depth and color framebuffer addresses for render-to-texture | 220 | // Flush the resource cache at the current depth and color framebuffer addresses for render-to-texture |
| 221 | const auto& regs = Pica::g_state.regs; | ||
| 222 | |||
| 223 | PAddr cur_fb_color_addr = regs.framebuffer.GetColorBufferPhysicalAddress(); | ||
| 224 | u32 cur_fb_color_size = Pica::Regs::BytesPerColorPixel(regs.framebuffer.color_format) | ||
| 225 | * regs.framebuffer.GetWidth() * regs.framebuffer.GetHeight(); | ||
| 226 | |||
| 227 | PAddr cur_fb_depth_addr = regs.framebuffer.GetDepthBufferPhysicalAddress(); | ||
| 228 | u32 cur_fb_depth_size = Pica::Regs::BytesPerDepthPixel(regs.framebuffer.depth_format) | ||
| 229 | * regs.framebuffer.GetWidth() * regs.framebuffer.GetHeight(); | ||
| 230 | |||
| 231 | res_cache.NotifyFlush(cur_fb_color_addr, cur_fb_color_size); | ||
| 232 | res_cache.NotifyFlush(cur_fb_depth_addr, cur_fb_depth_size); | ||
| 221 | } | 233 | } |
| 222 | 234 | ||
| 223 | void RasterizerOpenGL::CommitFramebuffer() { | 235 | void RasterizerOpenGL::CommitFramebuffer() { |