]> O.S.I.I.S - jp/vkvg.git/commitdiff
NDEBUG disable assert, so required function MUST be outside
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 24 Jan 2022 11:58:22 +0000 (12:58 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 24 Jan 2022 11:58:22 +0000 (12:58 +0100)
tests/common/vkengine.c

index ec4746c99a284757637e18330043a00b5d211666..5dcb232945ce99b46f5fddddca4ffe6e3f489fa3 100644 (file)
@@ -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);