diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-09 21:24:17 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-09 21:30:20 +0200 |
commit | 59ea37daa7b822f26737bface58a050ed2899fec (patch) | |
tree | 4054818d5fa4096173b656aa8a2994c3a2ec0c22 /src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |
parent | Merge pull request #992 from bunnei/declr-pred (diff) | |
download | yuzu-59ea37daa7b822f26737bface58a050ed2899fec.tar yuzu-59ea37daa7b822f26737bface58a050ed2899fec.tar.gz yuzu-59ea37daa7b822f26737bface58a050ed2899fec.tar.bz2 yuzu-59ea37daa7b822f26737bface58a050ed2899fec.tar.lz yuzu-59ea37daa7b822f26737bface58a050ed2899fec.tar.xz yuzu-59ea37daa7b822f26737bface58a050ed2899fec.tar.zst yuzu-59ea37daa7b822f26737bface58a050ed2899fec.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 8b6d1b89d..c447e999c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -761,10 +761,12 @@ void RasterizerCacheOpenGL::FlushRegion(Tegra::GPUVAddr /*addr*/, size_t /*size* } void RasterizerCacheOpenGL::InvalidateRegion(Tegra::GPUVAddr addr, size_t size) { - for (const auto& pair : surface_cache) { - const auto& surface{pair.second}; + for (auto iter = surface_cache.cbegin(); iter != surface_cache.cend();) { + const auto& surface{iter->second}; const auto& params{surface->GetSurfaceParams()}; + ++iter; + if (params.IsOverlappingRegion(addr, size)) { UnregisterSurface(surface); } |