summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-05-07 11:25:29 -0400
committerGravatar FernandoS272019-05-07 12:33:10 -0400
commit3a08c3207b726a71e15784571e7c4677d25e3b3f (patch)
tree5aabe9038ac94cc3e02032c39ccb33bfce9b49b2 /src
parentMerge pull request #2451 from lioncash/travis (diff)
downloadyuzu-3a08c3207b726a71e15784571e7c4677d25e3b3f.tar.gz
yuzu-3a08c3207b726a71e15784571e7c4677d25e3b3f.tar.xz
yuzu-3a08c3207b726a71e15784571e7c4677d25e3b3f.zip
Correct possible error on Rasterizer Caches
There was a weird bug that could happen if the object died directly and the cache address wasn't stored.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/rasterizer_cache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/rasterizer_cache.h b/src/video_core/rasterizer_cache.h
index 291772186..185b6f414 100644
--- a/src/video_core/rasterizer_cache.h
+++ b/src/video_core/rasterizer_cache.h
@@ -147,8 +147,9 @@ protected:
147 147
148 object->SetIsRegistered(false); 148 object->SetIsRegistered(false);
149 rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1); 149 rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1);
150 const CacheAddr addr = object->GetCacheAddr();
150 interval_cache.subtract({GetInterval(object), ObjectSet{object}}); 151 interval_cache.subtract({GetInterval(object), ObjectSet{object}});
151 map_cache.erase(object->GetCacheAddr()); 152 map_cache.erase(addr);
152 } 153 }
153 154
154 /// Returns a ticks counter used for tracking when cached objects were last modified 155 /// Returns a ticks counter used for tracking when cached objects were last modified