mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-22 18:28:52 -05:00
Fix Vulkan triangle test segfault on resize
The command buffer handle was not reset after being freed on window resize, leading to a segfault when the stale handle was used.
This commit is contained in:
parent
6abad2efd2
commit
65748fb8f3
|
@ -199,6 +199,7 @@ skills.
|
||||||
- Mário Freitas
|
- Mário Freitas
|
||||||
- GeO4d
|
- GeO4d
|
||||||
- Marcus Geelnard
|
- Marcus Geelnard
|
||||||
|
- Charles Giessen
|
||||||
- Stephen Gowen
|
- Stephen Gowen
|
||||||
- Kovid Goyal
|
- Kovid Goyal
|
||||||
- Eloi Marín Gratacós
|
- Eloi Marín Gratacós
|
||||||
|
|
|
@ -2118,6 +2118,7 @@ static void demo_cleanup(struct demo *demo) {
|
||||||
|
|
||||||
if (demo->setup_cmd) {
|
if (demo->setup_cmd) {
|
||||||
vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);
|
vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);
|
||||||
|
demo->setup_cmd = VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);
|
vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);
|
||||||
vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);
|
vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user