aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-05-29 11:21:37 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-05-29 11:21:37 +0200
commiteb55751061bdccf65b47c1d4d54687af197ae8f5 (patch)
tree4223ee8b5020dcbb79925747dc657d21b1a9460b
parent272b14613774e65f073534ea097eaffbd977244b (diff)
windows warning cleaning
-rw-r--r--CMakeLists.txt4
-rw-r--r--include/vkh.h2
-rw-r--r--src/vkh_app.c11
-rw-r--r--src/vkh_phyinfo.c2
4 files changed, 8 insertions, 11 deletions
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; i<app->phyCount; 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; j<pi->queueCount; j++){
+ for (uint32_t j=0; j<pi->queueCount; j++){
VkBool32 present = VK_FALSE;
switch (pi->queues[j].queueFlags) {
case VK_QUEUE_GRAPHICS_BIT: