summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-28 03:21:31 +0100
committerbunnei <bunneidev@gmail.com>2019-03-17 03:03:19 +0100
commit032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9 (patch)
tree52ea44653c76901e25b9f84534939dcde07b99af
parentMerge pull request #2244 from bunnei/gpu-mem-refactor (diff)
downloadyuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.tar
yuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.tar.gz
yuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.tar.bz2
yuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.tar.lz
yuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.tar.xz
yuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.tar.zst
yuzu-032e4c4ca345410d1ff7cdebf27d30ef4f7e96e9.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);