]> O.S.I.I.S - jp/vkhelpers.git/commitdiff
unset validation cmake options for release build
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 28 Feb 2019 08:21:25 +0000 (09:21 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 28 Feb 2019 08:21:25 +0000 (09:21 +0100)
CMakeLists.txt
include/vkh.h
src/vkh_app.c
src/vkh_device.c
src/vkh_device.h

index 78bf7173d2569d2d2b6f9a7ebd32628c2dd2043b..c940cce8ee94d193b20a4d0c6607c399354d706c 100644 (file)
@@ -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)
index 37c18697745b0d6b4763fe39a29d3543bf3a680d..b408dfb40f981c2da043033e26c541dd68628433 100644 (file)
@@ -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);
index 0397d4cceb513a34c669c3710c3209bb13efdba9..da7c52776f55a11f7dc7e84b98436461645d0d7c 100644 (file)
@@ -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,
index 8c4a5263b128235e4254eda3f5f79bd1dae0bf26..865a965f9272cfee8ff75d5c00bed3425d3f0f66 100644 (file)
@@ -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);
 }
index 2b3b8016181253d780c6e88a64bacf31a8db6fa7..3a157989b8d6ee79f7687fcb37ca8e9f2d8a1dfb 100644 (file)
@@ -34,6 +34,7 @@ typedef struct _vkh_device_t{
     VkPhysicalDeviceMemoryProperties phyMemProps;
     VkPhysicalDevice        phy;
     VmaAllocator            allocator;
+    VkInstance              instance;
 }vkh_device_t;
 
 #ifdef __cplusplus