summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authortfarley <tfarleygithub@gmail.com>2015-05-30 03:54:53 +0200
committertfarley <tfarleygithub@gmail.com>2015-06-09 01:18:20 +0200
commit66b0d799ee0e22e07ca9a409d42bafe790695f3c (patch)
treec668e0500c940d30490baf156b045a3d350d6ab6 /src/video_core
parentLiberal texture unbind (clout menu) (diff)
downloadyuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar
yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.gz
yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.bz2
yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.lz
yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.xz
yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.tar.zst
yuzu-66b0d799ee0e22e07ca9a409d42bafe790695f3c.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp14
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() {
vertex_batch.clear();
- // TODO: Flush the resource cache at the current depth and color framebuffer addresses for render-to-texture
+ // Flush the resource cache at the current depth and color framebuffer addresses for render-to-texture
+ const auto& regs = Pica::g_state.regs;
+
+ PAddr cur_fb_color_addr = regs.framebuffer.GetColorBufferPhysicalAddress();
+ u32 cur_fb_color_size = Pica::Regs::BytesPerColorPixel(regs.framebuffer.color_format)
+ * regs.framebuffer.GetWidth() * regs.framebuffer.GetHeight();
+
+ PAddr cur_fb_depth_addr = regs.framebuffer.GetDepthBufferPhysicalAddress();
+ u32 cur_fb_depth_size = Pica::Regs::BytesPerDepthPixel(regs.framebuffer.depth_format)
+ * regs.framebuffer.GetWidth() * regs.framebuffer.GetHeight();
+
+ res_cache.NotifyFlush(cur_fb_color_addr, cur_fb_color_size);
+ res_cache.NotifyFlush(cur_fb_depth_addr, cur_fb_depth_size);
}
void RasterizerOpenGL::CommitFramebuffer() {