From: Jean-Philippe Bruyère Date: Thu, 28 Feb 2019 08:21:25 +0000 (+0100) Subject: unset validation cmake options for release build X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=041a39cf003ece2604c167cb115c3210bde5c9b0;p=jp%2Fvkhelpers.git unset validation cmake options for release build --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 78bf717..c940cce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") ADD_DEFINITIONS (-DDEBUG) OPTION(ENABLE_VALIDATION "enable vulkan validation layer" ON) ELSE() - OPTION(ENABLE_VALIDATION "enable vulkan validation layer" OFF) + UNSET(ENABLE_VALIDATION CACHE) ENDIF() IF (ENABLE_VALIDATION) diff --git a/include/vkh.h b/include/vkh.h index 37c1869..b408dfb 100644 --- a/include/vkh.h +++ b/include/vkh.h @@ -66,7 +66,7 @@ typedef struct _vkh_presenter_t* VkhPresenter; /************* * VkhApp * *************/ -VkhApp vkh_app_create (const char* app_name, int ext_count, const char* extentions[]); +VkhApp vkh_app_create (const char* app_name, uint32_t ext_count, const char* extentions[]); void vkh_app_destroy (VkhApp app); VkInstance vkh_app_get_inst (VkhApp app); VkPhysicalDevice vkh_app_select_phy (VkhApp app, VkPhysicalDeviceType preferedPhyType); diff --git a/src/vkh_app.c b/src/vkh_app.c index 0397d4c..da7c527 100644 --- a/src/vkh_app.c +++ b/src/vkh_app.c @@ -25,7 +25,7 @@ #define ENGINE_NAME "vkhelpers" #define ENGINE_VERSION 1 -VkhApp vkh_app_create (const char* app_name, int ext_count, const char* extentions[]) { +VkhApp vkh_app_create (const char* app_name, uint32_t ext_count, const char* extentions[]) { VkhApp app = (VkhApp)malloc(sizeof(vkh_app_t)); VkApplicationInfo infos = { .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, diff --git a/src/vkh_device.c b/src/vkh_device.c index 8c4a526..865a965 100644 --- a/src/vkh_device.c +++ b/src/vkh_device.c @@ -39,5 +39,6 @@ VkhDevice vkh_device_create (VkPhysicalDevice phy, VkDevice vkDev) { void vkh_device_destroy (VkhDevice dev) { vmaDestroyAllocator (dev->allocator); + vkDestroyDevice (dev->dev, NULL); free (dev); } diff --git a/src/vkh_device.h b/src/vkh_device.h index 2b3b801..3a15798 100644 --- a/src/vkh_device.h +++ b/src/vkh_device.h @@ -34,6 +34,7 @@ typedef struct _vkh_device_t{ VkPhysicalDeviceMemoryProperties phyMemProps; VkPhysicalDevice phy; VmaAllocator allocator; + VkInstance instance; }vkh_device_t; #ifdef __cplusplus