diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 019b0e6..e4bb7bc 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -27,10 +27,10 @@ FetchContent_MakeAvailable(volk) set(TINYEXR_BUILD_SAMPLE OFF CACHE BOOL "") FetchContent_Declare( - tinyexr - GIT_REPOSITORY https://github.com/syoyo/tinyexr.git - GIT_TAG 74d0820a3ec7f67d734fabdb4311ba8dffdde5a7 - GIT_SHALLOW ON + tinyexr + GIT_REPOSITORY https://github.com/syoyo/tinyexr.git + GIT_TAG v1.0.1 + GIT_SHALLOW ON ) FetchContent_MakeAvailable(tinyexr) @@ -39,7 +39,7 @@ set(VMA_DYNAMIC_VULKAN_FUNCTIONS ON CACHE BOOL "") FetchContent_Declare( vma GIT_REPOSITORY https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator - GIT_TAG v2.3.0 + GIT_TAG v3.0.0 GIT_SHALLOW ON ) if(NOT vma_POPULATED) @@ -77,7 +77,7 @@ target_include_directories( lflop PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include - ${vma_SOURCE_DIR}/src + ${vma_SOURCE_DIR}/include PRIVATE ${stb_SOURCE_DIR} ${tinyexr_SOURCE_DIR} diff --git a/lib/Flop.cpp b/lib/Flop.cpp index 5dad0c2..7c1b72d 100644 --- a/lib/Flop.cpp +++ b/lib/Flop.cpp @@ -288,7 +288,6 @@ static int create_device(char const* preferred_device, bool swapchain) .descriptorIndexing = VK_TRUE, .shaderSampledImageArrayNonUniformIndexing = VK_TRUE, .shaderStorageImageArrayNonUniformIndexing = VK_TRUE, - .descriptorBindingUniformBufferUpdateAfterBind = VK_TRUE, .descriptorBindingSampledImageUpdateAfterBind = VK_TRUE, .descriptorBindingStorageImageUpdateAfterBind = VK_TRUE, .descriptorBindingStorageBufferUpdateAfterBind = VK_TRUE, @@ -325,13 +324,18 @@ static int create_device(char const* preferred_device, bool swapchain) vkGetDeviceQueue(g_device, g_compute_queue_index, 0, &g_compute_queue); } + VmaVulkanFunctions vulkan_functions{ + .vkGetInstanceProcAddr = vkGetInstanceProcAddr, + .vkGetDeviceProcAddr = vkGetDeviceProcAddr, + }; + VmaAllocatorCreateInfo allocator_info{ .physicalDevice = g_physical_device, .device = g_device, .preferredLargeHeapBlockSize = 0, // 256 MiB default .pAllocationCallbacks = nullptr, .pDeviceMemoryCallbacks = nullptr, - .frameInUseCount = 0, + .pVulkanFunctions = &vulkan_functions, .instance = g_instance}; if (vmaCreateAllocator(&allocator_info, &g_allocator) != VK_SUCCESS) diff --git a/lib/VMA.cpp b/lib/VMA.cpp index ab61a83..a0000d8 100644 --- a/lib/VMA.cpp +++ b/lib/VMA.cpp @@ -1,4 +1,5 @@ #define VMA_IMPLEMENTATION -#define VMA_STATIC_VULKAN_FUNCTIONS 1 +#define VMA_STATIC_VULKAN_FUNCTIONS 0 +#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7d02a24..1478bac 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -83,6 +83,12 @@ target_compile_features( cxx_std_20 ) +target_compile_definitions( + flop + PUBLIC + NOMINMAX=1 +) + target_link_libraries( flop PUBLIC