From bd273b9ad1307d84dfc0ed362a5177f67fca0f1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 24 Jan 2022 12:58:22 +0100 Subject: [PATCH] NDEBUG disable assert, so required function MUST be outside --- tests/common/vkengine.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/common/vkengine.c b/tests/common/vkengine.c index ec4746c..5dcb232 100644 --- a/tests/common/vkengine.c +++ b/tests/common/vkengine.c @@ -112,8 +112,12 @@ bool instance_extension_supported (VkExtensionProperties* instanceExtProps, uint vk_engine_t* vkengine_create (VkPhysicalDeviceType preferedGPU, VkPresentModeKHR presentMode, uint32_t width, uint32_t height) { glfwSetErrorCallback(glfw_error_callback); - assert (glfwInit()==GLFW_TRUE); - assert (glfwVulkanSupported()==GLFW_TRUE); + + int res = 0; + res = glfwInit(); + assert (res==GLFW_TRUE && "glfwInit failed."); + res = glfwVulkanSupported(); + assert (res==GLFW_TRUE && "glfwVulkanSupported return false."); uint32_t enabledExtsCount = 0, phyCount = 0; const char** gflwExts = glfwGetRequiredInstanceExtensions (&enabledExtsCount); -- 2.47.3