Skip to content

Commit e962c8c

Browse files
committed
Fixed test not compiling shaders
1 parent 2683cfe commit e962c8c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/Shaders/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,22 @@ foreach(SHADER ${SHADERS})
1717
get_filename_component(FILE_NAME ${SHADER} NAME)
1818

1919
# Put the .spv files into the bin folder
20+
set(SPIRV_BIN ${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.spv)
2021
set(SPIRV ${PROJECT_SOURCE_DIR}/bin/${FILE_NAME}.spv)
2122

23+
2224
add_custom_command(
2325
OUTPUT ${SPIRV}
2426
# Use the same file name and append .spv to the compiled shader
2527
COMMAND ${GLSL_VALIDATOR} -V ${CMAKE_CURRENT_SOURCE_DIR}/${SHADER} -o ${SPIRV}
2628
DEPENDS ${SHADER}
2729
)
30+
add_custom_command(
31+
OUTPUT ${SPIRV_BIN}
32+
# Use the same file name and append .spv to the compiled shader
33+
COMMAND ${GLSL_VALIDATOR} -V ${CMAKE_CURRENT_SOURCE_DIR}/${SHADER} -o ${SPIRV_BIN}
34+
DEPENDS ${SHADER}
35+
)
2836

2937
list(APPEND SPIRV_FILES ${SPIRV})
3038
endforeach()

src/Tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8313,6 +8313,8 @@ static void TestWin32Handles()
83138313
vmaDestroyBuffer(g_hAllocator, buf, alloc);
83148314
TEST(CloseHandle(handle));
83158315
TEST(CloseHandle(handle2));
8316+
8317+
vmaDestroyPool(g_hAllocator, pool);
83168318
#endif
83178319
}
83188320

src/VulkanSample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#pragma comment(lib, "shlwapi.lib")
3434

35-
static const char* const SHADER_PATH1 = "./";
35+
static const char* const SHADER_PATH1 = "./Shaders/";
3636
static const char* const SHADER_PATH2 = "../bin/";
3737
static const wchar_t* const WINDOW_CLASS_NAME = L"VULKAN_MEMORY_ALLOCATOR_SAMPLE";
3838
static const char* const VALIDATION_LAYER_NAME = "VK_LAYER_KHRONOS_validation";
@@ -1884,7 +1884,7 @@ static void InitializeApplication()
18841884
else if(strcmp(physicalDeviceExtensionProperties[i].extensionName, VK_KHR_MAINTENANCE_5_EXTENSION_NAME) == 0)
18851885
VK_KHR_maintenance5_enabled = true;
18861886
else if (strcmp(physicalDeviceExtensionProperties[i].extensionName, VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME) == 0)
1887-
VK_KHR_external_memory_win32_enabled = true;
1887+
VK_KHR_external_memory_win32_enabled = VMA_DYNAMIC_VULKAN_FUNCTIONS;
18881888
}
18891889

18901890
if(GetVulkanApiVersion() >= VK_API_VERSION_1_2)

0 commit comments

Comments
 (0)