MVKDeviceMemory: Allow dedicated allocations to forget their resources.

Otherwise, if the resource is destroyed first (which it almost always
will be), then when the `VkDeviceMemory` is freed, it will access a
freed resource, at which point it will then proceed to fandango on core.
This commit is contained in:
Chip Davis 2018-10-02 16:05:32 -05:00
parent 70dae8946a
commit 6da32e55b0

View File

@ -124,7 +124,6 @@ VkResult MVKDeviceMemory::addBuffer(MVKBuffer* mvkBuff) {
void MVKDeviceMemory::removeBuffer(MVKBuffer* mvkBuff) {
lock_guard<mutex> lock(_rezLock);
if (_isDedicated) return;
mvkRemoveAllOccurances(_buffers, mvkBuff);
}
@ -145,7 +144,6 @@ VkResult MVKDeviceMemory::addImage(MVKImage* mvkImg) {
void MVKDeviceMemory::removeImage(MVKImage* mvkImg) {
lock_guard<mutex> lock(_rezLock);
if (_isDedicated) return;
mvkRemoveAllOccurances(_images, mvkImg);
}