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:
parent
70dae8946a
commit
6da32e55b0
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user