summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-23 04:18:04 +0100
committerbunnei <bunneidev@gmail.com>2018-03-23 04:18:04 +0100
commite12c2cf8c692bf7581dda96c601e30c2a969086c (patch)
tree9461d3adbc55833cdd523d5069ba1d8560c9b88d /src/core/hle/service/nvdrv
parentgl_rasterizer: Implement AccelerateDisplay method from Citra. (diff)
downloadyuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.tar
yuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.tar.gz
yuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.tar.bz2
yuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.tar.lz
yuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.tar.xz
yuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.tar.zst
yuzu-e12c2cf8c692bf7581dda96c601e30c2a969086c.zip
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index 7cd1d9306..db030a8e2 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -33,6 +33,13 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3
addr, offset, width, height, stride, static_cast<PixelFormat>(format), flip_vertical};
Core::System::GetInstance().perf_stats.EndGameFrame();
+
+ // TODO(bunnei): The framebuffer region should only be flushed and invalidated if it is written
+ // to, not every frame. When we find the right place for this, the below line can be removed.
+ Memory::RasterizerFlushVirtualRegion(framebuffer.address,
+ framebuffer.width * framebuffer.height * 4,
+ Memory::FlushMode::FlushAndInvalidate);
+
VideoCore::g_renderer->SwapBuffers(framebuffer);
}