From 80a6d55c68c12444b54eae84ec3c4922d6ba7bdf Mon Sep 17 00:00:00 2001 From: TheJackiMonster <thejackimonster@gmail.com> Date: Tue, 19 Jul 2022 14:35:30 +0200 Subject: [PATCH] Some windows fixes Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> --- CMakeLists.txt | 6 ++++++ .../algorithm/src/vkcv/algorithm/SinglePassDownsampler.cpp | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b74cee6..9e017775 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,12 @@ option(BUILD_DOXYGEN_DOCS "Enables building the VkCV doxygen documentation" OFF) option(BUILD_SHARED "Enables building VkCV as shared libraries" OFF) option(BUILD_VMA_VULKAN_VERSION "Enforce a specific Vulkan version for VMA" OFF) +if ((WIN32) AND (NOT BUILD_VMA_VULKAN_VERSION)) + set(BUILD_VMA_VULKAN_VERSION "1.3.0") + + message(STATUS "HALLO!") +endif() + if (BUILD_PROJECTS) set(BUILD_MODULES ${BUILD_PROJECTS}) endif() diff --git a/modules/algorithm/src/vkcv/algorithm/SinglePassDownsampler.cpp b/modules/algorithm/src/vkcv/algorithm/SinglePassDownsampler.cpp index d022fbed..0d344861 100644 --- a/modules/algorithm/src/vkcv/algorithm/SinglePassDownsampler.cpp +++ b/modules/algorithm/src/vkcv/algorithm/SinglePassDownsampler.cpp @@ -3,6 +3,7 @@ #include <cstdint> #include <cmath> +#include <vector> #define A_CPU 1 #include <ffx_a.h> @@ -235,8 +236,9 @@ namespace vkcv::algorithm { { m_descriptorSetLayout } }); - uint32_t zeroes [m_globalCounter.getCount()]; - memset(zeroes, 0, m_globalCounter.getSize()); + std::vector<uint32_t> zeroes; + zeroes.resize(m_globalCounter.getCount()); + memset(zeroes.data(), 0, m_globalCounter.getSize()); m_globalCounter.fill(zeroes); } -- GitLab