diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-16 14:51:37 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-22 17:36:06 +0200 |
commit | da8f17715dbdc7eec92f5f0c11c968a51b86cab4 (patch) | |
tree | a1604f3cf9abe9128d26834f9c68161ecab6e204 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Texture Cache: Implement OnCPUWrite and SyncGuestHost (diff) | |
download | yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.gz yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.bz2 yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.lz yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.xz yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.zst yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index ac4485a18..537912745 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -660,6 +660,22 @@ void RasterizerOpenGL::InvalidateRegion(VAddr addr, u64 size) { query_cache.InvalidateRegion(addr, size); } +void RasterizerOpenGL::OnCPUWrite(VAddr addr, u64 size) { + MICROPROFILE_SCOPE(OpenGL_CacheManagement); + if (!addr || !size) { + return; + } + texture_cache.OnCPUWrite(addr, size); + shader_cache.InvalidateRegion(addr, size); + buffer_cache.InvalidateRegion(addr, size); +} + +void RasterizerOpenGL::SyncGuestHost() { + MICROPROFILE_SCOPE(OpenGL_CacheManagement); + texture_cache.SyncGuestHost(); + // buffer_cache.SyncGuestHost(); +} + void RasterizerOpenGL::FlushAndInvalidateRegion(VAddr addr, u64 size) { if (Settings::IsGPULevelExtreme()) { FlushRegion(addr, size); |