mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vulkan] Destroy the right framebuffers
Why nvidia's drivers accepted double-destroyed framebuffers is beyond me, but this fixes the Intel drivers complaining about such (and the subsequent segfault).
This commit is contained in:
parent
5b1052087a
commit
08721f7a21
1 changed files with 6 additions and 1 deletions
|
@ -572,7 +572,7 @@ Vulkan_DestroyFrames (vulkan_ctx_t *ctx)
|
|||
df->vkDestroyFence (dev, frame->fence, 0);
|
||||
df->vkDestroySemaphore (dev, frame->imageAvailableSemaphore, 0);
|
||||
df->vkDestroySemaphore (dev, frame->renderDoneSemaphore, 0);
|
||||
df->vkDestroyFramebuffer (dev, frame->framebuffer, 0);
|
||||
frame->framebuffer = 0;
|
||||
for (int j = 0; j < frame->cmdSetCount; j++) {
|
||||
DARRAY_CLEAR (&frame->cmdSets[j]);
|
||||
}
|
||||
|
@ -580,6 +580,11 @@ Vulkan_DestroyFrames (vulkan_ctx_t *ctx)
|
|||
}
|
||||
|
||||
DARRAY_CLEAR (&ctx->frames);
|
||||
|
||||
for (size_t i = 0; i < ctx->framebuffers->size; i++) {
|
||||
df->vkDestroyFramebuffer (dev, ctx->framebuffers->a[i], 0);
|
||||
}
|
||||
free (ctx->framebuffers);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue