From: Jean-Philippe Bruyère Date: Fri, 29 May 2020 09:21:37 +0000 (+0200) Subject: windows warning cleaning X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=eb55751061bdccf65b47c1d4d54687af197ae8f5;p=jp%2Fvkhelpers.git windows warning cleaning --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a6bed5b..4c852dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") ADD_DEFINITIONS (-DDEBUG) OPTION(ENABLE_VALIDATION "enable vulkan validation layer" ON) IF (UNIX) - SET(CMAKE_CXX_FLAGS "-Wall -Wno-extra") + SET(CMAKE_CXX_FLAGS "-std=c99 -Wall -Wno-extra") ELSEIF(MSVC) - SET(CMAKE_CXX_FLAGS "/W4 /wd4201 /wd4204 /wd4221")#c11 complient + SET(CMAKE_CXX_FLAGS "/W4 /wd4204 /wd4221 /wd4100") ENDIF() ELSE() UNSET(ENABLE_VALIDATION CACHE) diff --git a/include/vkh.h b/include/vkh.h index 8066abf..bb53415 100644 --- a/include/vkh.h +++ b/include/vkh.h @@ -68,7 +68,7 @@ typedef struct _vkh_presenter_t* VkhPresenter; VkhApp vkh_app_create (const char* app_name, uint32_t enabledLayersCount, const char *enabledLayers[], 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); +//VkPhysicalDevice vkh_app_select_phy (VkhApp app, VkPhysicalDeviceType preferedPhyType); VkhPhyInfo* vkh_app_get_phyinfos (VkhApp app, uint32_t* count, VkSurfaceKHR surface); void vkh_app_free_phyinfos (uint32_t count, VkhPhyInfo* infos); void vkh_app_enable_debug_messenger (VkhApp app, VkDebugUtilsMessageTypeFlagsEXT typeFlags, diff --git a/src/vkh_app.c b/src/vkh_app.c index 013df2c..2ae576f 100644 --- a/src/vkh_app.c +++ b/src/vkh_app.c @@ -25,9 +25,6 @@ #define ENGINE_NAME "vkhelpers" #define ENGINE_VERSION 1 - -static PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessenger; - VkBool32 debugUtilsMessengerCallback ( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, @@ -150,8 +147,8 @@ void vkh_app_enable_debug_messenger (VkhApp app, CreateDebugUtilsMessenger(app->inst, &info, VK_NULL_HANDLE, &app->debugMessenger); } -VkPhysicalDevice vkh_app_select_phy (VkhApp app, VkPhysicalDeviceType preferedPhyType) { - /*if (app->phyCount == 1) +/*VkPhysicalDevice vkh_app_select_phy (VkhApp app, VkPhysicalDeviceType preferedPhyType) { + if (app->phyCount == 1) return app->phyDevices[0]; for (int i=0; iphyCount; i++){ @@ -167,5 +164,5 @@ VkPhysicalDevice vkh_app_select_phy (VkhApp app, VkPhysicalDeviceType preferedPh } } fprintf (stderr, "No suitable GPU found\n"); - exit (-1);*/ -} + exit (-1); +}*/ diff --git a/src/vkh_phyinfo.c b/src/vkh_phyinfo.c index 14b1714..9140e3b 100644 --- a/src/vkh_phyinfo.c +++ b/src/vkh_phyinfo.c @@ -42,7 +42,7 @@ VkhPhyInfo vkh_phyinfo_create (VkPhysicalDevice phy, VkSurfaceKHR surface) { pi->pQueue = -1; //try to find dedicated queues first - for (int j=0; jqueueCount; j++){ + for (uint32_t j=0; jqueueCount; j++){ VkBool32 present = VK_FALSE; switch (pi->queues[j].queueFlags) { case VK_QUEUE_GRAPHICS_BIT: