From bae9cf76f39b096ad0d60a34f9ca4943cdf7eaef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 23 Jul 2018 13:18:59 +0200 Subject: [PATCH] dont expose VMA include in vkh.h --- include/vkh.h | 5 ++++- src/vkh_app.c | 8 +++++--- src/vkh_buffer.h | 1 + src/vkh_device.h | 1 + src/vkh_image.h | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/vkh.h b/include/vkh.h index 24b327a..0e20fdb 100644 --- a/include/vkh.h +++ b/include/vkh.h @@ -27,7 +27,10 @@ extern "C" { #endif #include -#include "vk_mem_alloc.h" + +typedef enum VmaMemoryUsage VmaMemoryUsage; + +//#include "vk_mem_alloc.h" #include #include diff --git a/src/vkh_app.c b/src/vkh_app.c index 95a1083..d8b4f51 100644 --- a/src/vkh_app.c +++ b/src/vkh_app.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ #include "vkh_app.h" +#include "vk_mem_alloc.h" #define ENGINE_NAME "vkhelpers" #define ENGINE_VERSION 1 @@ -33,13 +34,13 @@ VkhApp vkh_app_create (const char* app_name, int ext_count, const char* extentio .pEngineName = ENGINE_NAME, .engineVersion = ENGINE_VERSION, .apiVersion = VK_API_VERSION_1_0}; -#if DEBUG +/*#if DEBUG const uint32_t enabledLayersCount = 1; const char* enabledLayers[] = {"VK_LAYER_LUNARG_standard_validation"}; -#else +#else*/ const uint32_t enabledLayersCount = 0; const char* enabledLayers[] = {NULL}; -#endif +//#endif VkInstanceCreateInfo inst_info = { .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, .pApplicationInfo = &infos, @@ -49,6 +50,7 @@ VkhApp vkh_app_create (const char* app_name, int ext_count, const char* extentio .ppEnabledLayerNames = enabledLayers }; VK_CHECK_RESULT(vkCreateInstance (&inst_info, NULL, &app->inst)); + app->infos = infos; return app; } diff --git a/src/vkh_buffer.h b/src/vkh_buffer.h index d42eaa2..aeb16a7 100644 --- a/src/vkh_buffer.h +++ b/src/vkh_buffer.h @@ -27,6 +27,7 @@ extern "C" { #endif #include "vkh.h" +#include "vk_mem_alloc.h" typedef struct _vkh_buffer_t { VkhDevice pDev; diff --git a/src/vkh_device.h b/src/vkh_device.h index 1b5b1bf..2b3b801 100644 --- a/src/vkh_device.h +++ b/src/vkh_device.h @@ -27,6 +27,7 @@ extern "C" { #endif #include "vkh.h" +#include "vk_mem_alloc.h" typedef struct _vkh_device_t{ VkDevice dev; diff --git a/src/vkh_image.h b/src/vkh_image.h index 397e5cd..88075f4 100644 --- a/src/vkh_image.h +++ b/src/vkh_image.h @@ -27,6 +27,7 @@ extern "C" { #endif #include "vkh.h" +#include "vk_mem_alloc.h" typedef struct _vkh_image_t { VkhDevice pDev; -- 2.47.3