From: Jean-Philippe Bruyère Date: Mon, 24 Jan 2022 11:58:22 +0000 (+0100) Subject: NDEBUG disable assert, so required function MUST be outside X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=bd273b9ad1307d84dfc0ed362a5177f67fca0f1b;p=jp%2Fvkvg.git NDEBUG disable assert, so required function MUST be outside --- 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);