diff --git a/.gitmodules b/.gitmodules index 6ba86c6..0991bae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,13 +30,13 @@ branch = master [submodule "3rdparty/VulkanMemoryAllocator"] path = 3rdparty/VulkanMemoryAllocator - url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator - branch = master + url = https://github.com/saccharineboi/VulkanMemoryAllocator + branch = unix-fix [submodule "3rdparty/CRCpp"] path = 3rdparty/CRCpp url = https://github.com/d-bahr/CRCpp branch = master [submodule "3rdparty/METIS"] path = 3rdparty/METIS - url = https://github.com/milkru/METIS - branch = master + url = https://github.com/saccharineboi/METIS + branch = unix-fix diff --git a/3rdparty/METIS b/3rdparty/METIS index 1fb2d74..2b8c025 160000 --- a/3rdparty/METIS +++ b/3rdparty/METIS @@ -1 +1 @@ -Subproject commit 1fb2d74caba3b84588ffe63bad7c77892662c996 +Subproject commit 2b8c025274bb8c8176ae64e995e16ec2cc3d484c diff --git a/3rdparty/VulkanMemoryAllocator b/3rdparty/VulkanMemoryAllocator index c351692..ba79fb7 160000 --- a/3rdparty/VulkanMemoryAllocator +++ b/3rdparty/VulkanMemoryAllocator @@ -1 +1 @@ -Subproject commit c351692490513cdb0e5a2c925aaf7ea4a9b672f4 +Subproject commit ba79fb75380a3e2562bbfe1bf51ce162ecec7c33 diff --git a/CMakeLists.txt b/CMakeLists.txt index e4b82c6..a321635 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,20 @@ cmake_minimum_required(VERSION 3.16) - project(vulkanizer) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) + message("Compiling Shaders:") -set(GLSL_COMPILER "$ENV{VULKAN_SDK}/Bin/glslc.exe") +if (WIN32) + set(GLSL_COMPILER "$ENV{VULKAN_SDK}/Bin/glslc.exe") +elseif (UNIX AND NOT APPLE) + find_program(GLSL_COMPILER_PATH "glslc") + if (NOT GLSL_COMPILER_PATH) + message(FATAL_ERROR "glslc has not been found") + endif () + set(GLSL_COMPILER ${GLSL_COMPILER_PATH}) +endif () file(GLOB_RECURSE GLSL_SRC_FILES "src/shaders/*.comp" "src/shaders/*.task" "src/shaders/*.mesh" "src/shaders/*.vert" "src/shaders/*.frag") file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/shaders/") @@ -26,8 +36,7 @@ source_group("Shader Files" FILES ${GLSL_SRC_FILES}) include_directories(src) add_executable(${PROJECT_NAME} ${SRC_FILES} ${GLSL_SRC_FILES}) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD ${CMAKE_CXX_STANDARD}) set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) target_compile_definitions(${PROJECT_NAME} PRIVATE $<$:DEBUG_>) diff --git a/src/core/buffer.cpp b/src/core/buffer.cpp index bf31de9..1ab273b 100644 --- a/src/core/buffer.cpp +++ b/src/core/buffer.cpp @@ -1,6 +1,10 @@ #include "device.h" #include "buffer.h" +#ifndef _MSC_VER +#include +#endif + Buffer createBuffer( Device& _rDevice, BufferDesc _desc)