1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-27 17:10:57 +01:00

Examples: Vulkan: Switch validation layer. Fix CMakeLists to find Vulkan the standard way. (#3459)

This commit is contained in:
Michel Lesoinne 2020-05-08 17:58:05 -06:00 committed by omar
parent 751d153ca9
commit b25756be4a
4 changed files with 11 additions and 9 deletions

View File

@ -63,6 +63,8 @@ Other Changes:
- Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible.
- Demo: Add simple InputText() callbacks demo (aside from the more elaborate ones in 'Examples->Console').
- Examples: Vulkan: Reworked buffer resize handling, fix for Linux/X11. (#3390, #2626) [@RoryO]
- Examples: Vulkan: Switch validation layer to use "VK_LAYER_KHRONOS_validation" instead of
"VK_LAYER_LUNARG_standard_validation" which is deprecated (#3459) [@FunMiles]
-----------------------------------------------------------------------

View File

@ -28,9 +28,11 @@ set(IMGUI_DIR ../../)
include_directories(${IMGUI_DIR} ..)
# Libraries
find_library(VULKAN_LIBRARY
NAMES vulkan vulkan-1)
set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
find_package(Vulkan REQUIRED)
#find_library(VULKAN_LIBRARY
#NAMES vulkan vulkan-1)
#set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
set(LIBRARIES "glfw;Vulkan::Vulkan")
# Use vulkan headers from glfw:
include_directories(${GLFW_DIR}/deps)

View File

@ -72,10 +72,9 @@ static void SetupVulkan(const char** extensions, uint32_t extensions_count)
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
create_info.enabledExtensionCount = extensions_count;
create_info.ppEnabledExtensionNames = extensions;
#ifdef IMGUI_VULKAN_DEBUG_REPORT
// Enabling multiple validation layers grouped as LunarG standard validation
const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
// Enabling validation layers
const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
create_info.enabledLayerCount = 1;
create_info.ppEnabledLayerNames = layers;

View File

@ -64,10 +64,9 @@ static void SetupVulkan(const char** extensions, uint32_t extensions_count)
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
create_info.enabledExtensionCount = extensions_count;
create_info.ppEnabledExtensionNames = extensions;
#ifdef IMGUI_VULKAN_DEBUG_REPORT
// Enabling multiple validation layers grouped as LunarG standard validation
const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
// Enabling validation layers
const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
create_info.enabledLayerCount = 1;
create_info.ppEnabledLayerNames = layers;