Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vulkan2021/vkcv-framework
1 result
Show changes
Commits on Source (27)
Showing
with 81 additions and 35 deletions
......@@ -8,7 +8,7 @@
branch = main
[submodule "modules/asset_loader/lib/fx-gltf"]
path = modules/asset_loader/lib/fx-gltf
url = https://github.com/jessey-git/fx-gltf.git
url = https://github.com/TheJackiMonster/fx-gltf.git
branch = master
[submodule "modules/asset_loader/lib/json"]
path = modules/asset_loader/lib/json
......@@ -48,8 +48,8 @@
branch = main
[submodule "lib/VulkanMemoryAllocator-Hpp"]
path = lib/VulkanMemoryAllocator-Hpp
url = https://github.com/TheJackiMonster/VulkanMemoryAllocator-Hpp.git
branch = fix
url = https://github.com/YaaZ/VulkanMemoryAllocator-Hpp.git
branch = master
[submodule "modules/algorithm/lib/FidelityFX-SPD"]
path = modules/algorithm/lib/FidelityFX-SPD
url = https://github.com/GPUOpen-Effects/FidelityFX-SPD.git
......@@ -70,3 +70,15 @@
path = modules/asset_loader/lib/wuffs-mirror-release-c
url = https://github.com/google/wuffs-mirror-release-c.git
branch = main
[submodule "modules/shader_compiler/lib/shady"]
path = modules/shader_compiler/lib/shady
url = https://github.com/TheJackiMonster/shady.git
[submodule "modules/shader_compiler/lib/SPIRV-Headers"]
path = modules/shader_compiler/lib/SPIRV-Headers
url = https://github.com/KhronosGroup/SPIRV-Headers.git
[submodule "modules/shader_compiler/lib/murmur3"]
path = modules/shader_compiler/lib/murmur3
url = https://github.com/PeterScott/murmur3.git
[submodule "modules/shader_compiler/lib/json-c"]
path = modules/shader_compiler/lib/json-c
url = https://github.com/json-c/json-c.git
......@@ -73,10 +73,6 @@ namespace vkcv {
Context m_Context;
std::unique_ptr<PassManager> m_PassManager;
std::unique_ptr<GraphicsPipelineManager> m_GraphicsPipelineManager;
std::unique_ptr<ComputePipelineManager> m_ComputePipelineManager;
std::unique_ptr<RayTracingPipelineManager> m_RayTracingPipelineManager;
std::unique_ptr<DescriptorSetLayoutManager> m_DescriptorSetLayoutManager;
std::unique_ptr<DescriptorSetManager> m_DescriptorSetManager;
std::unique_ptr<BufferManager> m_BufferManager;
......@@ -86,11 +82,16 @@ namespace vkcv {
std::unique_ptr<CommandStreamManager> m_CommandStreamManager;
std::unique_ptr<WindowManager> m_WindowManager;
std::unique_ptr<SwapchainManager> m_SwapchainManager;
std::unique_ptr<PassManager> m_PassManager;
std::unique_ptr<GraphicsPipelineManager> m_GraphicsPipelineManager;
std::unique_ptr<ComputePipelineManager> m_ComputePipelineManager;
std::unique_ptr<RayTracingPipelineManager> m_RayTracingPipelineManager;
Vector<vk::CommandPool> m_CommandPools;
vk::Semaphore m_RenderFinished;
vk::Semaphore m_SwapchainImageAcquired;
std::vector<vk::Semaphore> m_SwapchainImagesAcquired;
uint32_t m_currentSwapchainImageIndex;
uint32_t m_currentSwapchainSemaphoreIndex;
std::unique_ptr<Downsampler> m_downsampler;
......
......@@ -5,6 +5,7 @@
* @brief Template event struct to synchronize callbacks.
*/
#include <algorithm>
#include <functional>
#ifndef __MINGW32__
......
......@@ -28,6 +28,11 @@ namespace vkcv {
HandleDestroyFunction m_destroy;
/**
* @brief Private internal method to destroy handle.
*/
void destroy();
protected:
/**
* @brief Constructor of an invalid handle
......
Subproject commit 633dc301350952a9a895c8db42eed371ea969a64
Subproject commit 68d401117c85219ee6b2aba9a0cded314c55798f
Subproject commit 85c2334e92e215cce34e8e0ed8b2dce4700f4a50
Subproject commit b379292b2ab6df5771ba9870d53cf8b2c9295daf
Subproject commit d07d082af148c32c5951daa33eed9be088f8b70f
Subproject commit 77f6a638a725816291c1deaf5e82c56225951a99
Subproject commit 1add1df154b2a05a6c7152407dcdcae30d983456
Subproject commit 871913da6a4b132b567d7b65c509600363c0041e
Subproject commit 4aa5600e01c533edf42620b91a79e199dae6d0a1
Subproject commit 8335d9d6ff3574c89e6cf363ec1d279179f9b957
Subproject commit 3eaf1255b29fdf5c2895856c7be7d7185ef2b241
Subproject commit b35641f4a3c62aa86a0b3c983d163bc0fe36026d
Subproject commit 7766c237ea81c0bb3759e78e5c0f22854843eef8
Subproject commit e4e128577164f5904135c935fffbb0895550895e
Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d
Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03
Subproject commit 5736b15f7ea0ffb08dd38af21067c314d6a3aae9
Subproject commit f7f20f39fe4f206c6f19e26ebfef7b261ee59ee4
Subproject commit e3f919ccfe3ef542cfc983a82146070258fb57f8
Subproject commit 7aef53c89e9c6e9a0c55f6e356d6b714681dfc36
Subproject commit 47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e
Subproject commit 33b4a621a697a305bc3a7610d290677b96beb181
Subproject commit ba1fa904a96ebbc8923d5d2b00a1adcba918e21b
Subproject commit d7e605d4309d7b054f4277b8968232749de2c6c4
......@@ -90,7 +90,7 @@ namespace vkcv::gui {
init_info.MinImageCount = swapchainImageCount;
init_info.ImageCount = swapchainImageCount;
init_info.CheckVkResultFn = checkVulkanResult;
const vk::AttachmentDescription attachment (
vk::AttachmentDescriptionFlags(),
m_core.getSwapchainFormat(swapchainHandle),
......@@ -141,19 +141,13 @@ namespace vkcv::gui {
&dependency
);
m_render_pass = m_context.getDevice().createRenderPass(passCreateInfo);
ImGui_ImplVulkan_Init(&init_info, static_cast<VkRenderPass>(m_render_pass));
init_info.RenderPass = m_context.getDevice().createRenderPass(passCreateInfo);
auto stream = m_core.createCommandStream(QueueType::Graphics);
m_core.recordCommandsToStream(stream, [](const vk::CommandBuffer& commandBuffer) {
ImGui_ImplVulkan_CreateFontsTexture(static_cast<VkCommandBuffer>(commandBuffer));
}, []() {
ImGui_ImplVulkan_DestroyFontUploadObjects();
});
m_core.submitCommandStream(stream, false);
ImGui_ImplVulkan_Init(&init_info);
ImGui_ImplVulkan_CreateFontsTexture();
m_render_pass = init_info.RenderPass;
m_context.getDevice().waitIdle();
}
......@@ -161,6 +155,7 @@ namespace vkcv::gui {
m_context.getDevice().waitIdle();
Window& window = m_core.getWindow(m_windowHandle);
ImGui_ImplVulkan_DestroyFontsTexture();
ImGui_ImplVulkan_Shutdown();
m_context.getDevice().destroyRenderPass(m_render_pass);
......@@ -188,6 +183,7 @@ namespace vkcv::gui {
ImGui_ImplVulkan_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
}
......
......@@ -21,6 +21,15 @@ set(vkcv_shader_compiler_sources
${vkcv_shader_compiler_include}/vkcv/shader/HLSLCompiler.hpp
${vkcv_shader_compiler_source}/vkcv/shader/HLSLCompiler.cpp
${vkcv_shader_compiler_include}/vkcv/shader/ShadyCompiler.hpp
${vkcv_shader_compiler_source}/vkcv/shader/ShadyCompiler.cpp
${vkcv_shader_compiler_include}/vkcv/shader/SlimCompiler.hpp
${vkcv_shader_compiler_source}/vkcv/shader/SlimCompiler.cpp
${vkcv_shader_compiler_include}/vkcv/shader/LLVMCompiler.hpp
${vkcv_shader_compiler_source}/vkcv/shader/LLVMCompiler.cpp
)
filter_headers(vkcv_shader_compiler_sources ${vkcv_shader_compiler_include} vkcv_shader_compiler_headers)
......@@ -33,9 +42,17 @@ set_target_properties(vkcv_shader_compiler PROPERTIES PUBLIC_HEADER "${vkcv_shad
set(vkcv_shader_compiler_lib lib)
set(vkcv_shader_compiler_lib_path ${PROJECT_SOURCE_DIR}/${vkcv_shader_compiler_lib})
# Load JSON-C and SPIRV-Headers
include(config/JSON-C.cmake)
include(config/SPIRV-Headers.cmake)
# Check and load GLSLANG
include(config/GLSLANG.cmake)
# Check and load Shady (with murmur3)
include(config/Murmur3.cmake)
include(config/Shady.cmake)
# link the required libraries to the module
target_link_libraries(vkcv_shader_compiler ${vkcv_shader_compiler_libraries} vkcv)
......
......@@ -7,8 +7,11 @@ A VkCV module to compile shaders at runtime
### Dependencies (required):
| Name of dependency | Used as submodule |
|----------------------------------------------------|---|
| [Glslang](https://github.com/KhronosGroup/glslang/) | ✅ |
|-----------------------------------------------------------------|----|
| [Glslang](https://github.com/KhronosGroup/glslang/) | ✅ |
| [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers/) | ✅ |
| [Murmur3](https://github.com/PeterScott/murmur3/) | ✅ |
| [Shady](https://github.com/TheJackiMonster/shady/) | ✅ |
## Docs
......
use_git_submodule("${vkcv_shader_compiler_lib_path}/json-c" json_c_status)
if (${json_c_status})
add_subdirectory(${vkcv_shader_compiler_lib}/json-c)
set(JSON_C_INCLUDE_DIR ${vkcv_shader_compiler_lib_path})
list(APPEND vkcv_shader_compiler_libraries json-c)
list(APPEND vkcv_shader_compiler_includes ${vkcv_shader_compiler_lib})
endif ()