fix destruction order
This commit is contained in:
@@ -132,10 +132,10 @@ void waitForDevice(const gnOutputDeviceHandle device) {
|
|||||||
|
|
||||||
void destroyVulkanOutputDevice(gnOutputDeviceHandle device) {
|
void destroyVulkanOutputDevice(gnOutputDeviceHandle device) {
|
||||||
vkDestroyFence(device->outputDevice->device, device->outputDevice->barrierFence, NULL);
|
vkDestroyFence(device->outputDevice->device, device->outputDevice->barrierFence, NULL);
|
||||||
vmaDestroyBuffer(device->outputDevice->allocator, device->outputDevice->stagingBuffer.buffer, device->outputDevice->stagingBuffer.allocation);
|
|
||||||
vkDestroyCommandPool(device->outputDevice->device, device->outputDevice->transferCommandPool, NULL);
|
vkDestroyCommandPool(device->outputDevice->device, device->outputDevice->transferCommandPool, NULL);
|
||||||
vkDestroyDevice(device->outputDevice->device, NULL);
|
vmaDestroyBuffer(device->outputDevice->allocator, device->outputDevice->stagingBuffer.buffer, device->outputDevice->stagingBuffer.allocation);
|
||||||
vmaDestroyAllocator(device->outputDevice->allocator);
|
vmaDestroyAllocator(device->outputDevice->allocator);
|
||||||
|
vkDestroyDevice(device->outputDevice->device, NULL);
|
||||||
free(device->outputDevice);
|
free(device->outputDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user