summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-17 06:40:32 +0100
committerGitHub <noreply@github.com>2019-03-17 06:40:32 +0100
commit41566c615b86183c4dbec5a6bc7596ed4d8a116b (patch)
treeb2f977e2298f9b98e7ae70b9381b938456801ead
parentMerge pull request #2249 from lioncash/ipc (diff)
parentgl_rasterizer: Skip zero addr/sized regions on flush/invalidate. (diff)
downloadyuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.tar
yuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.tar.gz
yuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.tar.bz2
yuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.tar.lz
yuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.tar.xz
yuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.tar.zst
yuzu-41566c615b86183c4dbec5a6bc7596ed4d8a116b.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index bb6de5477..198c54872 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -749,11 +749,17 @@ void RasterizerOpenGL::FlushAll() {}
void RasterizerOpenGL::FlushRegion(CacheAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
+ if (!addr || !size) {
+ return;
+ }
res_cache.FlushRegion(addr, size);
}
void RasterizerOpenGL::InvalidateRegion(CacheAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
+ if (!addr || !size) {
+ return;
+ }
res_cache.InvalidateRegion(addr, size);
shader_cache.InvalidateRegion(addr, size);
global_cache.InvalidateRegion(addr, size);