Skip to content
Snippets Groups Projects
Commit 3a08c320 authored by Fernando Sahmkow's avatar Fernando Sahmkow Committed by FernandoS27
Browse files

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.
parent c63e68c4
No related branches found
No related tags found
No related merge requests found
...@@ -147,8 +147,9 @@ protected: ...@@ -147,8 +147,9 @@ protected:
object->SetIsRegistered(false); object->SetIsRegistered(false);
rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1); rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1);
const CacheAddr addr = object->GetCacheAddr();
interval_cache.subtract({GetInterval(object), ObjectSet{object}}); interval_cache.subtract({GetInterval(object), ObjectSet{object}});
map_cache.erase(object->GetCacheAddr()); map_cache.erase(addr);
} }
/// Returns a ticks counter used for tracking when cached objects were last modified /// Returns a ticks counter used for tracking when cached objects were last modified
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment