Skip to content
Snippets Groups Projects
Verified Commit c04513d2 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Merge branch 'develop' into 96-dokumentation-vervollstandigen

parents 6d6de61d 675553a9
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
Showing
with 179 additions and 184 deletions
variables:
RUN:
value: "all"
description: "The tests that should run. Possible values: ubuntu, win-msvc, win-mingw, mac, all."
GIT_DEPTH: 15
stages:
- build
- deploy
build_ubuntu_gcc:
only:
variables:
- $RUN =~ /\bubuntu.*/i || $RUN =~ /\ball.*/i
stage: build
tags:
- ubuntu-gcc-cached
variables:
GIT_SUBMODULE_STRATEGY: recursive
timeout: 15m
retry: 1
script:
- mkdir debug
- cd debug
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build . -j 4
artifacts:
name: "Documentation - $CI_PIPELINE_ID"
paths:
- doc/html
- doc/latex
expire_in: never
build_win10_msvc:
only:
variables:
- $RUN =~ /\bwin-msvc.*/i || $RUN =~ /\ball.*/i
stage: build
tags:
- win10-msvc-cached
variables:
GIT_SUBMODULE_STRATEGY: recursive
timeout: 15m
retry: 0
script:
- cd 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\'
- .\Launch-VsDevShell.ps1
- cd $CI_PROJECT_DIR
- mkdir debug
- cd debug
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build . -j 4
build_win10_mingw:
only:
variables:
- $RUN =~ /\bwin-mingw.*/i || $RUN =~ /\ball.*/i
stage: build
tags:
- win10-mingw-cached
variables:
GIT_SUBMODULE_STRATEGY: recursive
timeout: 15m
retry: 0
script:
- mkdir debug
- cd debug
- cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe .. -G "Unix Makefiles"
- cmake --build . -j 4
build_mac_clang:
only:
variables:
- $RUN =~ /\bmac.*/i || $RUN =~ /\ball.*/i
stage: build
tags:
- catalina-clang-cached
variables:
GIT_SUBMODULE_STRATEGY: recursive
timeout: 15m
retry: 1
script:
- mkdir debug
- cd debug
- export LDFLAGS="-L/usr/local/opt/llvm/lib"
- export CPPFLAGS="-I/usr/local/opt/llvm/include"
- cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build . -j 4
deploy_doc_develop:
only:
variables:
- $RUN =~ /\bubuntu.*/i || $RUN =~ /\ball.*/i
refs:
- develop
stage: deploy
needs: ["build_ubuntu_gcc"]
dependencies:
- build_ubuntu_gcc
tags:
- webserver
variables:
GIT_STRATEGY: none
script:
- rsync -avh doc/html/ /var/www/html/develop --delete
- echo "Check it out at https://vkcv.de/develop"
deploy_doc_branch:
only:
variables:
- $RUN =~ /\bubuntu.*/i || $RUN =~ /\ball.*/i
except:
refs:
- develop
stage: deploy
needs: ["build_ubuntu_gcc"]
dependencies:
- build_ubuntu_gcc
tags:
- webserver
variables:
GIT_STRATEGY: none
script:
- rsync -avh doc/html/ /var/www/html/branch/$CI_COMMIT_BRANCH --delete
- echo "Check it out at https://vkcv.de/branch/$CI_COMMIT_BRANCH"
\ No newline at end of file
# Changelog
## [0.1.0](https://gitlab.uni-koblenz.de/vulkan2021/vkcv-framework/tree/0.1.0) (2021-12-07)
** Platform support:**
- Linux support (GCC and CLang)
- MacOS support (Apple CLang)
- Windows support (MSVC and MinGW-GCC experimentally)
** New modules:**
- [Asset-Loader](modules/asset_loader/README.md): A VkCV module to load basic assets like models, materials and images
- [Camera](modules/asset_loader/README.md): A VkCV module to manage cameras and their handle view and projection matrices
- [GUI](modules/gui/README.md): A VkCV module to integrate GUI rendering to your application as additional pass
- [Material](modules/material/README.md): A VkCV module to abstract typical kinds of materials for rendering
- [Meshlet](modules/meshlet/README.md): A VkCV module to divide vertex data of a mesh into meshlets
- [Scene](modules/scene/README.md): A VkCV module to load and manage a scene, simplify its rendering and potentially optimize it
- [Shader-Compiler](modules/shader_compiler/README.md): A VkCV module to compile shaders at runtime
- [Upscaling](modules/upscaling/README.md): A VkCV module to upscale images in realtime
** New features:**
- Resizable windows
- Multiple windows and multiple swapchains (window management)
- Dynamically requesting Vulkan features and extensions
- Shader reflection and runtime shader compilation (various shader stages)
- Realtime ray tracing
- Mesh shaders
- Indirect dispatch
- Compute pipelines and compute shaders
- Multiple queues and graphic pipelines
- Bindless textures
- ImGUI support
- Mipmapping
- Logging
- Command buffer synchronization
- Doxygen source code documentation
- Buffer, sampler and image management
- Camera management with gamepad support
- Input event synchronization
- Resource management with handles
...@@ -33,8 +33,13 @@ if (CMAKE_BUILD_TYPE) ...@@ -33,8 +33,13 @@ if (CMAKE_BUILD_TYPE)
set(vkcv_build_${_vkcv_build_type} 1) set(vkcv_build_${_vkcv_build_type} 1)
endif() endif()
if (EXISTS "/usr/bin/mold")
set(CMAKE_LINKER "/usr/bin/mold")
endif()
message(STATUS "Language: [ C++ " ${CMAKE_CXX_STANDARD} " ]") message(STATUS "Language: [ C++ " ${CMAKE_CXX_STANDARD} " ]")
message(STATUS "Compiler: [ " ${CMAKE_CXX_COMPILER_ID} " " ${CMAKE_CXX_COMPILER_VERSION} " ]") message(STATUS "Compiler: [ " ${CMAKE_CXX_COMPILER_ID} " " ${CMAKE_CXX_COMPILER_VERSION} " ]")
message(STATUS "Linker: [ " ${CMAKE_LINKER} " ]")
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0")) if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0"))
message(FATAL_ERROR "Upgrade your compiler! GCC 9.0+ is required!") message(FATAL_ERROR "Upgrade your compiler! GCC 9.0+ is required!")
......
...@@ -16,6 +16,9 @@ if(NOT WIN32) ...@@ -16,6 +16,9 @@ if(NOT WIN32)
list(APPEND vkcv_flags -fopenmp) list(APPEND vkcv_flags -fopenmp)
endif() endif()
# add custom functions to check for git submodules
include(${vkcv_config_ext}/Git.cmake)
list(APPEND vkcv_definitions _USE_MATH_DEFINES) list(APPEND vkcv_definitions _USE_MATH_DEFINES)
# some formatted printing # some formatted printing
......
function(use_git_submodule submodule_path submodule_status)
file(GLOB path_glob "${submodule_path}/*")
list(LENGTH path_glob glob_len)
if(glob_len GREATER 0)
set(${submodule_status} TRUE PARENT_SCOPE)
return()
endif()
get_filename_component(submodule_name ${submodule_path} NAME)
message(WARNING "${submodule_name} is required..! Update the submodules!")
set(${submodule_status} FALSE PARENT_SCOPE)
endfunction()
# the first argument should be the project's target
macro(fix_project)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(${ARGV1} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(${ARGV1} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(${ARGV1} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
endmacro()
...@@ -6,14 +6,14 @@ if (glfw3_FOUND) ...@@ -6,14 +6,14 @@ if (glfw3_FOUND)
message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION}) message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION})
else() else()
if (EXISTS "${vkcv_lib_path}/glfw") use_git_submodule("${vkcv_lib_path}/glfw" glfw_status)
if (${glfw_status})
add_subdirectory(${vkcv_lib}/glfw) add_subdirectory(${vkcv_lib}/glfw)
list(APPEND vkcv_libraries glfw) list(APPEND vkcv_libraries glfw)
list(APPEND vkcv_includes ${vkcv_lib_path}/glfw/include) list(APPEND vkcv_includes ${vkcv_lib_path}/glfw/include)
message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION}) message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION})
else()
message(WARNING "GLFW is required..! Update the submodules!")
endif () endif ()
endif () endif ()
...@@ -5,7 +5,9 @@ if (spirv-cross_FOUND) ...@@ -5,7 +5,9 @@ if (spirv-cross_FOUND)
message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION}) message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION})
else() else()
if (EXISTS "${vkcv_lib_path}/SPIRV-Cross") use_git_submodule("${vkcv_lib_path}/SPIRV-Cross" spirv_cross_status)
if (${spirv_cross_status})
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS OFF CACHE INTERNAL "") set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS OFF CACHE INTERNAL "")
set(SPIRV_CROSS_SHARED OFF CACHE INTERNAL "") set(SPIRV_CROSS_SHARED OFF CACHE INTERNAL "")
set(SPIRV_CROSS_STATIC ON CACHE INTERNAL "") set(SPIRV_CROSS_STATIC ON CACHE INTERNAL "")
...@@ -28,7 +30,5 @@ else() ...@@ -28,7 +30,5 @@ else()
list(APPEND vkcv_includes ${vkcv_lib_path}/SPIV-Cross/include) list(APPEND vkcv_includes ${vkcv_lib_path}/SPIV-Cross/include)
message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION}) message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION})
else()
message(WARNING "SPIRV-Cross is required..! Update the submodules!")
endif () endif ()
endif () endif ()
\ No newline at end of file
if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp") use_git_submodule("${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" vma_hpp_status)
set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" CACHE INTERNAL "")
if (${vma_hpp_status})
if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp/include")
set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp/include" CACHE INTERNAL "")
else()
set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" CACHE INTERNAL "")
endif()
set(VMA_RECORDING_ENABLED OFF CACHE INTERNAL "") set(VMA_RECORDING_ENABLED OFF CACHE INTERNAL "")
set(VMA_USE_STL_CONTAINERS OFF CACHE INTERNAL "") set(VMA_USE_STL_CONTAINERS OFF CACHE INTERNAL "")
...@@ -14,9 +20,7 @@ if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp") ...@@ -14,9 +20,7 @@ if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp")
add_subdirectory(${vkcv_config_lib}/vma) add_subdirectory(${vkcv_config_lib}/vma)
list(APPEND vkcv_libraries VulkanMemoryAllocator) list(APPEND vkcv_libraries VulkanMemoryAllocator)
list(APPEND vkcv_includes ${vkcv_lib_path}/VulkanMemoryAllocator-Hpp) list(APPEND vkcv_includes ${VMA_HPP_PATH})
message(${vkcv_config_msg} " VMA - ") message(${vkcv_config_msg} " VMA - ")
else()
message(WARNING "VulkanMemoryAllocator is required..! Update the submodules!")
endif () endif ()
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
#include <vector> #include <vector>
#include "Handles.hpp"
#include "ShaderProgram.hpp" #include "ShaderProgram.hpp"
namespace vkcv { namespace vkcv {
struct ComputePipelineConfig { struct ComputePipelineConfig {
ShaderProgram& m_ShaderProgram; ShaderProgram& m_ShaderProgram;
std::vector<vk::DescriptorSetLayout> m_DescriptorSetLayouts; std::vector<DescriptorSetLayoutHandle> m_DescriptorSetLayouts;
}; };
} }
\ No newline at end of file
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
#include "DrawcallRecording.hpp" #include "DrawcallRecording.hpp"
#include "CommandRecordingFunctionTypes.hpp" #include "CommandRecordingFunctionTypes.hpp"
#define VKCV_FRAMEWORK_NAME "VkCV"
#define VKCV_FRAMEWORK_VERSION (VK_MAKE_VERSION(0, 1, 0))
namespace vkcv namespace vkcv
{ {
...@@ -208,7 +211,7 @@ namespace vkcv ...@@ -208,7 +211,7 @@ namespace vkcv
[[nodiscard]] [[nodiscard]]
SamplerHandle createSampler(SamplerFilterType magFilter, SamplerFilterType minFilter, SamplerHandle createSampler(SamplerFilterType magFilter, SamplerFilterType minFilter,
SamplerMipmapMode mipmapMode, SamplerAddressMode addressMode, SamplerMipmapMode mipmapMode, SamplerAddressMode addressMode,
float mipLodBias = 0.0f); float mipLodBias = 0.0f, SamplerBorderColor borderColor = SamplerBorderColor::INT_ZERO_OPAQUE);
/** /**
* Creates an #Image with a given format, width, height and depth. * Creates an #Image with a given format, width, height and depth.
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "Handles.hpp" #include "Handles.hpp"
#include "DescriptorConfig.hpp" #include "DescriptorConfig.hpp"
#include "PushConstants.hpp" #include "PushConstants.hpp"
#include "Buffer.hpp" #include "Buffer.hpp"
namespace vkcv { namespace vkcv {
...@@ -28,12 +29,12 @@ namespace vkcv { ...@@ -28,12 +29,12 @@ namespace vkcv {
}; };
struct DescriptorSetUsage { struct DescriptorSetUsage {
inline DescriptorSetUsage(uint32_t setLocation, vk::DescriptorSet vulkanHandle, inline DescriptorSetUsage(uint32_t setLocation, DescriptorSetHandle descriptorSet,
const std::vector<uint32_t>& dynamicOffsets = {}) noexcept const std::vector<uint32_t>& dynamicOffsets = {}) noexcept
: setLocation(setLocation), vulkanHandle(vulkanHandle), dynamicOffsets(dynamicOffsets) {} : setLocation(setLocation), descriptorSet(descriptorSet), dynamicOffsets(dynamicOffsets) {}
const uint32_t setLocation; const uint32_t setLocation;
const vk::DescriptorSet vulkanHandle; const DescriptorSetHandle descriptorSet;
const std::vector<uint32_t> dynamicOffsets; const std::vector<uint32_t> dynamicOffsets;
}; };
...@@ -59,8 +60,6 @@ namespace vkcv { ...@@ -59,8 +60,6 @@ namespace vkcv {
}; };
vk::IndexType getIndexType(IndexBitCount indexByteCount);
struct DrawcallInfo { struct DrawcallInfo {
inline DrawcallInfo(const Mesh& mesh, const std::vector<DescriptorSetUsage>& descriptorSets, const uint32_t instanceCount = 1) inline DrawcallInfo(const Mesh& mesh, const std::vector<DescriptorSetUsage>& descriptorSets, const uint32_t instanceCount = 1)
: mesh(mesh), descriptorSets(descriptorSets), instanceCount(instanceCount){} : mesh(mesh), descriptorSets(descriptorSets), instanceCount(instanceCount){}
...@@ -70,22 +69,6 @@ namespace vkcv { ...@@ -70,22 +69,6 @@ namespace vkcv {
uint32_t instanceCount; uint32_t instanceCount;
}; };
void recordDrawcall(
const DrawcallInfo &drawcall,
vk::CommandBuffer cmdBuffer,
vk::PipelineLayout pipelineLayout,
const PushConstants &pushConstants,
const size_t drawcallIndex);
void recordIndirectDrawcall(
const DrawcallInfo &drawcall,
vk::CommandBuffer cmdBuffer,
const vkcv::Buffer<vk::DrawIndexedIndirectCommand> &drawBuffer,
const uint32_t drawCount,
vk::PipelineLayout pipelineLayout,
const PushConstants &pushConstants,
const size_t drawcallIndex);
void InitMeshShaderDrawFunctions(vk::Device device); void InitMeshShaderDrawFunctions(vk::Device device);
struct MeshShaderDrawcall { struct MeshShaderDrawcall {
...@@ -97,9 +80,10 @@ namespace vkcv { ...@@ -97,9 +80,10 @@ namespace vkcv {
}; };
void recordMeshShaderDrawcall( void recordMeshShaderDrawcall(
const Core& core,
vk::CommandBuffer cmdBuffer, vk::CommandBuffer cmdBuffer,
vk::PipelineLayout pipelineLayout, vk::PipelineLayout pipelineLayout,
const PushConstants& pushConstantData, const PushConstants& pushConstantData,
const uint32_t pushConstantOffset, const uint32_t pushConstantOffset,
const MeshShaderDrawcall& drawcall, const MeshShaderDrawcall& drawcall,
const uint32_t firstTask); const uint32_t firstTask);
......
...@@ -224,6 +224,12 @@ namespace vkcv { ...@@ -224,6 +224,12 @@ namespace vkcv {
[[nodiscard]] [[nodiscard]]
bool checkSupport(const vk::PhysicalDeviceMeshShaderFeaturesNV& features, bool required) const; bool checkSupport(const vk::PhysicalDeviceMeshShaderFeaturesNV& features, bool required) const;
[[nodiscard]]
bool checkSupport(const vk::PhysicalDeviceShaderAtomicFloatFeaturesEXT& features, bool required) const;
[[nodiscard]]
bool checkSupport(const vk::PhysicalDeviceShaderAtomicFloat2FeaturesEXT& features, bool required) const;
/** /**
* @brief Checks support of the @p vk::PhysicalDeviceVulkan12Features. * @brief Checks support of the @p vk::PhysicalDeviceVulkan12Features.
* @param features The features * @param features The features
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
namespace vkcv { namespace vkcv {
enum class PrimitiveTopology{PointList, LineList, TriangleList }; enum class PrimitiveTopology{PointList, LineList, TriangleList, PatchList };
enum class CullMode{ None, Front, Back }; enum class CullMode{ None, Front, Back };
enum class DepthTest { None, Less, LessEqual, Greater, GreatherEqual, Equal }; enum class DepthTest { None, Less, LessEqual, Greater, GreatherEqual, Equal };
...@@ -29,7 +29,7 @@ namespace vkcv { ...@@ -29,7 +29,7 @@ namespace vkcv {
uint32_t m_Height; uint32_t m_Height;
PassHandle m_PassHandle; PassHandle m_PassHandle;
VertexLayout m_VertexLayout; VertexLayout m_VertexLayout;
std::vector<vk::DescriptorSetLayout> m_DescriptorLayouts; std::vector<DescriptorSetLayoutHandle> m_DescriptorLayouts;
bool m_UseDynamicViewport; bool m_UseDynamicViewport;
bool m_UseConservativeRasterization = false; bool m_UseConservativeRasterization = false;
PrimitiveTopology m_PrimitiveTopology = PrimitiveTopology::TriangleList; PrimitiveTopology m_PrimitiveTopology = PrimitiveTopology::TriangleList;
...@@ -40,6 +40,7 @@ namespace vkcv { ...@@ -40,6 +40,7 @@ namespace vkcv {
DepthTest m_depthTest = DepthTest::LessEqual; DepthTest m_depthTest = DepthTest::LessEqual;
bool m_depthWrite = true; bool m_depthWrite = true;
bool m_alphaToCoverage = false; bool m_alphaToCoverage = false;
uint32_t m_tessellationControlPoints = 0;
}; };
} }
\ No newline at end of file
...@@ -21,7 +21,19 @@ namespace vkcv { ...@@ -21,7 +21,19 @@ namespace vkcv {
REPEAT = 1, REPEAT = 1,
MIRRORED_REPEAT = 2, MIRRORED_REPEAT = 2,
CLAMP_TO_EDGE = 3, CLAMP_TO_EDGE = 3,
MIRROR_CLAMP_TO_EDGE = 4 MIRROR_CLAMP_TO_EDGE = 4,
CLAMP_TO_BORDER = 5
};
enum class SamplerBorderColor {
INT_ZERO_OPAQUE = 1,
INT_ZERO_TRANSPARENT = 2,
FLOAT_ZERO_OPAQUE = 3,
FLOAT_ZERO_TRANSPARENT = 4,
INT_ONE_OPAQUE = 5,
FLOAT_ONE_OPAQUE = 6
}; };
} }
...@@ -8,26 +8,56 @@ ...@@ -8,26 +8,56 @@
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>
namespace vkcv { namespace vkcv {
enum class ShaderStage : VkShaderStageFlags { enum class ShaderStage : VkShaderStageFlags {
VERTEX = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eVertex), VERTEX = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eVertex),
TESS_CONTROL = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eTessellationControl), TESS_CONTROL = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eTessellationControl),
TESS_EVAL = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eTessellationEvaluation), TESS_EVAL = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eTessellationEvaluation),
GEOMETRY = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eGeometry), GEOMETRY = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eGeometry),
FRAGMENT = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eFragment), FRAGMENT = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eFragment),
COMPUTE = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eCompute), COMPUTE = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eCompute),
TASK = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eTaskNV), TASK = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eTaskNV),
MESH = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eMeshNV), MESH = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eMeshNV),
RAY_GEN = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eRaygenKHR), // RTX RAY_GEN = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eRaygenKHR),
RAY_ANY_HIT = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eAnyHitKHR), // RTX RAY_ANY_HIT = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eAnyHitKHR),
RAY_CLOSEST_HIT = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eClosestHitKHR), // RTX RAY_CLOSEST_HIT = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eClosestHitKHR),
RAY_MISS = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eMissKHR), // RTX RAY_MISS = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eMissKHR),
RAY_INTERSECTION = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eIntersectionKHR), // RTX RAY_INTERSECTION = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eIntersectionKHR),
RAY_CALLABLE = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eCallableKHR) // RTX RAY_CALLABLE = static_cast<VkShaderStageFlags>(vk::ShaderStageFlagBits::eCallableKHR)
}; };
using ShaderStages = vk::Flags<ShaderStage>; using ShaderStages = vk::Flags<ShaderStage>;
}
namespace vk {
template<>
struct [[maybe_unused]] FlagTraits<vkcv::ShaderStage> {
enum : VkFlags {
allFlags [[maybe_unused]] = (
VkFlags( vkcv::ShaderStage::VERTEX ) |
VkFlags( vkcv::ShaderStage::TESS_CONTROL ) |
VkFlags( vkcv::ShaderStage::TESS_EVAL ) |
VkFlags( vkcv::ShaderStage::GEOMETRY ) |
VkFlags( vkcv::ShaderStage::FRAGMENT ) |
VkFlags( vkcv::ShaderStage::COMPUTE ) |
VkFlags( vkcv::ShaderStage::TASK ) |
VkFlags( vkcv::ShaderStage::MESH ) |
VkFlags( vkcv::ShaderStage::RAY_GEN ) |
VkFlags( vkcv::ShaderStage::RAY_ANY_HIT ) |
VkFlags( vkcv::ShaderStage::RAY_CLOSEST_HIT ) |
VkFlags( vkcv::ShaderStage::RAY_MISS ) |
VkFlags( vkcv::ShaderStage::RAY_INTERSECTION ) |
VkFlags( vkcv::ShaderStage::RAY_CALLABLE )
)
};
};
}
namespace vkcv {
constexpr vk::ShaderStageFlags getShaderStageFlags(ShaderStages shaderStages) noexcept { constexpr vk::ShaderStageFlags getShaderStageFlags(ShaderStages shaderStages) noexcept {
return vk::ShaderStageFlags(static_cast<VkShaderStageFlags>(shaderStages)); return vk::ShaderStageFlags(static_cast<VkShaderStageFlags>(shaderStages));
} }
......
Subproject commit ff61890722a91e97c44940494be5b6eed0d5ff5b Subproject commit 6a67891418a3f08be63f92726e049dc788e46f5b
Subproject commit 3a61240a5354ce56c222969a69825aabb6ba0a21 Subproject commit c6c3c665b6a29ae546bdec60606a3ef0757ea108
Subproject commit 0e9ec7788b4985a0df698080258e4091d18dcc3b Subproject commit 4cb36872a5fe448c205d0b46f0e8c8b57530cfe0
if (EXISTS "${vkcv_asset_loader_lib_path}/fx-gltf") use_git_submodule("${vkcv_asset_loader_lib_path}/fx-gltf" fx_gltf_status)
if (${fx_gltf_status})
set(FX_GLTF_INSTALL OFF CACHE INTERNAL "") set(FX_GLTF_INSTALL OFF CACHE INTERNAL "")
set(FX_GLTF_USE_INSTALLED_DEPS OFF CACHE INTERNAL "") set(FX_GLTF_USE_INSTALLED_DEPS OFF CACHE INTERNAL "")
set(BUILD_TESTING OFF CACHE INTERNAL "") set(BUILD_TESTING OFF CACHE INTERNAL "")
...@@ -7,6 +9,4 @@ if (EXISTS "${vkcv_asset_loader_lib_path}/fx-gltf") ...@@ -7,6 +9,4 @@ if (EXISTS "${vkcv_asset_loader_lib_path}/fx-gltf")
add_subdirectory(${vkcv_asset_loader_lib}/fx-gltf) add_subdirectory(${vkcv_asset_loader_lib}/fx-gltf)
list(APPEND vkcv_asset_loader_libraries fx-gltf) list(APPEND vkcv_asset_loader_libraries fx-gltf)
else()
message(WARNING "FX-GLTF is required..! Update the submodules!")
endif () endif ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment