From 1e8dc836a04c360079dd8500b977411c5d25c825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 25 Jul 2019 19:09:42 +0200 Subject: [PATCH] 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. (cherry picked from commit 65748fb8f316384cda39583a489c39ae80124305) --- README.md | 1 + tests/triangle-vulkan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 604a1be4..e71cbf52 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ skills. - Mário Freitas - GeO4d - Marcus Geelnard + - Charles Giessen - Stephen Gowen - Kovid Goyal - Eloi Marín Gratacós diff --git a/tests/triangle-vulkan.c b/tests/triangle-vulkan.c index 7cdb8f78..8600ced7 100644 --- a/tests/triangle-vulkan.c +++ b/tests/triangle-vulkan.c @@ -2118,6 +2118,7 @@ static void demo_cleanup(struct demo *demo) { if (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); vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);