Shutdown fix.

This commit is contained in:
Henrik Rydgård committed 2017-12-03 11:02:49 +01:00
1 parent 6abdbde47e
commit 1bf44b7ca3
2 files changed
+5 -5

No files matched your search

+4 -5
View File
@@ -169,11 +169,10 @@ void VulkanDeviceAllocator::Destroy() {
for (Slab &slab : slabs_) {
// Did anyone forget to free?
for (auto pair : slab.allocSizes) {
if (slab.usage[pair.first] != 2) {
// If it's not 2 (queued), there's a problem.
// If it's zero, it means allocSizes is somehow out of sync.
Crash();
}
int slabUsage = slab.usage[pair.first];
// If it's not 2 (queued), there's a problem.
// If it's zero, it means allocSizes is somehow out of sync.
_assert_msg_(G3D, slabUsage == 2, "Destroy: slabUsage has unexpected value %d", slabUsage);
}
assert(slab.deviceMemory);