Skip to content

Commit

Permalink
Merge pull request #169 from cg-tuwien/development
Browse files Browse the repository at this point in the history
v0.99
  • Loading branch information
johannesugb committed Jun 3, 2023
2 parents 4d47fa1 + a56db77 commit 2446006
Show file tree
Hide file tree
Showing 211 changed files with 43,111 additions and 30,590 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/cross-platform-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
linux:
name: ${{ matrix.config.name }}
name: ${{ matrix.config.name }}, VulkanSDK ${{ matrix.vulkan-sdk }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand All @@ -35,11 +35,11 @@ jobs:
}
# note: if a specific vulkan version (e.g. 1.1.x, or < 1.2.135) needs testing, you can add it here:
# (not that ubuntu-latest (20.04) only supports >= v1.2.148 via apt)
vulkan-sdk: ["latest", "1.2.176"]
vulkan-sdk: ["latest", "1.3.216"]

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
run: cmake --build .

windows:
name: ${{ matrix.config.name }}
name: ${{ matrix.config.name }}, VulkanSDK ${{ matrix.vulkan-sdk }}
runs-on: windows-2019
env:
vulkan_sdk: "$GITHUB_WORKSPACE/vulkan_sdk/"
Expand All @@ -114,9 +114,9 @@ jobs:
vulkan-sdk: ["latest", "1.2.176.1"]

steps:
# IMPORTANT: apparently checkout@v2 pulls to ${{ github.event.repository.name }}/${{ github.event.repository.name }} instead of just ${{ github.event.repository.name }} on windows
# IMPORTANT: apparently checkout@v3 pulls to ${{ github.event.repository.name }}/${{ github.event.repository.name }} instead of just ${{ github.event.repository.name }} on windows
- name: Checkout repository and submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

Expand All @@ -133,6 +133,8 @@ jobs:
curl -LS -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/${{ matrix.vulkan-sdk }}/windows/VulkanSDK-${{ matrix.vulkan-sdk }}-Installer.exe
}
7z x vulkan-sdk.exe -o"${{ env.vulkan_sdk }}"
mkdir "${{ env.vulkan_sdk }}Include/vma/"
curl -LS -o "${{ env.vulkan_sdk }}Include/vma/vk_mem_alloc.h" https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/master/include/vk_mem_alloc.h?raw=true
cmake -E make_directory ${{ runner.workspace }}/${{ github.event.repository.name }}/build
- name: Configure CMake
Expand All @@ -153,7 +155,7 @@ jobs:
run: VULKAN_SDK=${{ env.vulkan_sdk }} cmake --build . --config $BUILD_TYPE

windows-latest:
name: ${{ matrix.config.name }}
name: ${{ matrix.config.name }}, VulkanSDK ${{ matrix.vulkan-sdk }}
runs-on: windows-latest
env:
vulkan_sdk: "$GITHUB_WORKSPACE/vulkan_sdk/"
Expand All @@ -170,9 +172,9 @@ jobs:
vulkan-sdk: ["latest", "1.2.176.1"]

steps:
# IMPORTANT: apparently checkout@v2 pulls to ${{ github.event.repository.name }}/${{ github.event.repository.name }} instead of just ${{ github.event.repository.name }} on windows
# IMPORTANT: apparently checkout@v3 pulls to ${{ github.event.repository.name }}/${{ github.event.repository.name }} instead of just ${{ github.event.repository.name }} on windows
- name: Checkout repository and submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

Expand All @@ -189,6 +191,8 @@ jobs:
curl -LS -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/${{ matrix.vulkan-sdk }}/windows/VulkanSDK-${{ matrix.vulkan-sdk }}-Installer.exe
}
7z x vulkan-sdk.exe -o"${{ env.vulkan_sdk }}"
mkdir "${{ env.vulkan_sdk }}Include/vma/"
curl -LS -o "${{ env.vulkan_sdk }}Include/vma/vk_mem_alloc.h" https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/master/include/vk_mem_alloc.h?raw=true
cmake -E make_directory ${{ runner.workspace }}/${{ github.event.repository.name }}/build
- name: Configure CMake
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Auto-Vk-Toolkit Versions

Notable _Auto-Vk-Toolkit_ versions in date-wise decending order:

### v0.99

**Date:** 03.06.2023

Major changes:
- Gone is the overly huge precompiled header (PCH) configuration.
- A much smaller PCH project configuration is now used, mostly containing the externals.
- This should get rid of some bad compile/build experiences.
- Ported `static_meshlets` and `skinned_meshlets` examples to using both `VK_EXT_mesh_shader` and `VK_NV_mesh_shader`.
- Added a new camera: `orbit_camera`
- It is used in several example applications: `model_loader`, `orca_loader`, `static_meshlets`, and `skinned_meshlets`.

### v0.98

**Date:** 27.07.2022
First version number.

Renamed repository from _Gears-Vk_ to _Auto-Vk-Toolkit_.

Major changes:
- Ported all examples to new synchronization and commands usage provided by _Auto-Vk_
- Added new example: `multiple_queues`
- Added new example: `present_from_compute`
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@ set(avk_toolkit_Sources
external/universal/src/FileWatcher/FileWatcherOSX.cpp
external/universal/src/FileWatcher/FileWatcherWin32.cpp

# ImGui
external/universal/src/imgui.cpp
external/universal/src/imgui_demo.cpp
external/universal/src/imgui_draw.cpp
external/universal/src/imgui_impl_glfw.cpp
external/universal/src/imgui_impl_vulkan.cpp
external/universal/src/imgui_tables.cpp
external/universal/src/imgui_widgets.cpp

# Auto-Vk-Toolkit framework files:
auto_vk_toolkit/src/animation.cpp
auto_vk_toolkit/src/bezier_curve.cpp
Expand All @@ -138,8 +129,10 @@ set(avk_toolkit_Sources
auto_vk_toolkit/src/orca_scene.cpp
auto_vk_toolkit/src/quadratic_uniform_b_spline.cpp
auto_vk_toolkit/src/quake_camera.cpp
auto_vk_toolkit/src/orbit_camera.cpp
auto_vk_toolkit/src/swapchain_resized_event.cpp
auto_vk_toolkit/src/transform.cpp
auto_vk_toolkit/src/timer_globals.cpp
auto_vk_toolkit/src/updater.cpp
auto_vk_toolkit/src/varying_update_timer.cpp
auto_vk_toolkit/src/vk_convenience_functions.cpp
Expand Down Expand Up @@ -183,6 +176,15 @@ find_package(Vulkan REQUIRED)
target_link_libraries(${PROJECT_NAME} ${avk_toolkit_IncludeScope}
Vulkan::Vulkan)

# Dear ImGui
include(cmake/imgui.cmake)
if (UNIX)
target_include_directories(${PROJECT_NAME} ${avk_toolkit_IncludeScope}
${avk_toolkit_imguiIncludeDirectories})
endif(UNIX)
target_sources(${PROJECT_NAME} ${avk_toolkit_SourceScope}
${avk_toolkit_imguiSources})

# stb
# NOTE: Windows builds use a modified version of stb (including a small custom DLL).
# Since this version doesn't work on Linux, the Linux build process generates its own STB shared library.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto-Vk-Toolkit v0.98
# Auto-Vk-Toolkit v0.99

*Auto-Vk-Toolkit* (formerly "Gears-Vk") is a framework for the Vulkan graphics API, implemented in modern C++.
It aims to hit the sweet spot between programmer-convenience and efficiency while still supporting full Vulkan functionality.
Expand Down Expand Up @@ -131,7 +131,7 @@ For more information about the _Post Build Helper_, please refer to the [Post Bu
* Game-loop/render-loop handling with convenient to use callback methods via the `avk::invokee` interface (such as `initialize()`, `update()`, `render()`, where the former is called only once and the latter two are invoked each frame)
* User input handling
* A ready to use base class for object hierarchies: `avk::transform`
* A ready to use user-controllable camera class `avk::quake_camera` (which is derived from both, `avk::transform` and `avk::invokee`)
* Ready to use user-controllable camera classes `avk::quake_camera` and `avk::orbit_camera` (derived from both, `avk::transform` and `avk::invokee`)
* Resource loading support for:
* Images
* 3D Models
Expand Down Expand Up @@ -183,7 +183,7 @@ _A:_ Check out [Post Build Helper](./visual_studio#post-build-helper), which off
**Q: The application takes a long time to load assets like 3D models and images. Can it be accelerated?**
_A:_ If you are referring to _Debug_ builds, you can configure _Post Build Helper_ so that it deploys _Release_ DLLs of some external dependencies even for _Debug_ builds. They should accelerate asset loading a lot. To enable deployment of _Release_ DLLs, please open _Post Build Helper_'s [settings](./visual_studio#post-build-helper-settings) and enable the option "Always deploy Release DLLs".

**Q: Getting `cereal::Exception` in `cereal::loadBinary`, or `Unhandled exception at 0x00007FFE82204FD9 in ...exe: Microsoft C++ exception: cereal::Exception at memory location ...`**
**Q: Getting `cereal::Exception` in `cereal::loadBinary`, or `Unhandled exception at 0x00007FFE82204FD9 in ...exe: Microsoft C++ exception: cereal::Exception at memory location ...`**
_A:_ Your serialized cache file (e.g., for `sponza_and_terrain.fscene` this could be `sponza_and_terrain.fscene.cache`) has become corrupt (maybe because it was not fully written due to a previously occured error in the application, or because execution was aborted). Delete the cache file (e.g., `sponza_and_terrain.fscene.cache`) and let a new one be generated!


Expand Down
2 changes: 1 addition & 1 deletion auto_vk
Submodule auto_vk updated 73 files
+24 −8 .github/workflows/build.yml
+26 −0 CHANGELOG.md
+2 −2 CMakeLists.txt
+31 −4 README.md
+1 −1 include/avk/acceleration_structure_size_requirements.hpp
+13 −13 include/avk/attachment.hpp
+149 −92 include/avk/avk.hpp
+0 −1 include/avk/avk_error.hpp
+1 −1 include/avk/binding_data.hpp
+1 −1 include/avk/bindings.hpp
+1 −1 include/avk/border_handling_mode.hpp
+6 −4 include/avk/bottom_level_acceleration_structure.hpp
+17 −3 include/avk/buffer.hpp
+1 −1 include/avk/buffer_meta.hpp
+1 −1 include/avk/buffer_view.hpp
+1 −1 include/avk/command_buffer.hpp
+1 −1 include/avk/command_pool.hpp
+27 −3 include/avk/commands.hpp
+1 −1 include/avk/compute_pipeline.hpp
+1 −1 include/avk/compute_pipeline_config.hpp
+68 −1 include/avk/cpp_utils.hpp
+1 −1 include/avk/descriptor_alloc_request.hpp
+1 −1 include/avk/descriptor_cache.hpp
+1 −1 include/avk/descriptor_pool.hpp
+1 −1 include/avk/descriptor_set.hpp
+1 −1 include/avk/descriptor_set_layout.hpp
+1 −1 include/avk/fence.hpp
+1 −1 include/avk/filter_mode.hpp
+1 −1 include/avk/format_for.hpp
+1 −1 include/avk/framebuffer.hpp
+1 −1 include/avk/geometry_instance.hpp
+1 −1 include/avk/graphics_pipeline.hpp
+1 −1 include/avk/graphics_pipeline_config.hpp
+1 −1 include/avk/image.hpp
+1 −1 include/avk/image_color_channel_format.hpp
+1 −1 include/avk/image_color_channel_order.hpp
+1 −1 include/avk/image_sampler.hpp
+1 −1 include/avk/image_usage.hpp
+1 −1 include/avk/image_view.hpp
+1 −1 include/avk/input_description.hpp
+1 −1 include/avk/layout.hpp
+1 −1 include/avk/mapping_access.hpp
+1 −1 include/avk/mem_handle.hpp
+1 −1 include/avk/memory_access.hpp
+1 −1 include/avk/memory_usage.hpp
+1 −1 include/avk/on_load.hpp
+1 −1 include/avk/on_store.hpp
+8 −1 include/avk/pipeline_stage.hpp
+1 −1 include/avk/push_constants.hpp
+45 −9 include/avk/query_pool.hpp
+1 −1 include/avk/queue.hpp
+2 −1 include/avk/ray_tracing_pipeline.hpp
+1 −1 include/avk/ray_tracing_pipeline_config.hpp
+1 −1 include/avk/renderpass.hpp
+1 −1 include/avk/sampler.hpp
+1 −1 include/avk/semaphore.hpp
+1 −1 include/avk/set_of_descriptor_set_layouts.hpp
+1 −1 include/avk/shader.hpp
+1 −1 include/avk/shader_binding_table.hpp
+1 −1 include/avk/shader_info.hpp
+1 −1 include/avk/shader_type.hpp
+1 −1 include/avk/stage_and_access.hpp
+1 −1 include/avk/subpass_dependency.hpp
+1 −1 include/avk/subpass_usage_type.hpp
+1 −1 include/avk/subpass_usages.hpp
+6 −4 include/avk/top_level_acceleration_structure.hpp
+1 −1 include/avk/vertex_index_buffer_pair.hpp
+1 −1 include/avk/vk_utils.hpp
+1 −1 include/avk/vma_handle.hpp
+1 −1 include/avk/vulkan_helper_functions.hpp
+0 −19,560 include/vk_mem_alloc.h
+266 −49 src/avk.cpp
+0 −2 src/vk_mem_alloc.cpp
3 changes: 2 additions & 1 deletion auto_vk_toolkit/include/animation.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <auto_vk_toolkit.hpp>

#include "model_types.hpp"

namespace avk
{
Expand Down
140 changes: 1 addition & 139 deletions auto_vk_toolkit/include/auto_vk_toolkit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,146 +110,8 @@
#define DISPATCH_LOADER_EXT_TYPE vk::DispatchLoaderDynamic
#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
#define AVK_USE_VMA
#include <avk/avk.hpp>
#include "avk/avk.hpp"

// -------------------- Auto-Vk-Toolkit Includes --------------------
#include "format_for.hpp"
#include "conversion_utils.hpp"

#include "context_state.hpp"

#include "cursor.hpp"

#include "context_generic_glfw_types.hpp"
#include "window_base.hpp"

#include "window.hpp"
#include "context_generic_glfw.hpp"

#include "math_utils.hpp"
#include "key_code.hpp"
#include "key_state.hpp"
#include "timer_frame_type.hpp"
#include "timer_interface.hpp"
#include "fixed_update_timer.hpp"
#include "varying_update_timer.hpp"
#include "input_buffer.hpp"
#include "composition_interface.hpp"

#include "vk_convenience_functions.hpp"

#include "settings.hpp"
#include "context_vulkan.hpp"

namespace avk
{
#pragma region global data representing the currently active composition
/** @brief Get the current timer, which represents the current game-/render-time
* This can be nullptr! Use time() for a version which will not return nullptr.
*/
inline timer_interface*& timer_reference()
{
static timer_interface* sTimer = nullptr;
return sTimer;
}


/** @brief Sets a new timer.
* ATTENTION: This timer must live until the end of the application!
*/
inline void set_timer(timer_interface* const aPointerToNewTimer)
{
timer_reference() = aPointerToNewTimer;
}

extern void set_default_timer();

/** @brief Get the current timer, which represents the current game-/render-time
*/
inline timer_interface& time()
{
// If there is no timer set AT THE FIRST INVOCATION, one will be set.
// But at subsequent invocations, no further checks are performed.
static bool sInitialCheckPerformed = []() {
if (nullptr == timer_reference()) {
set_default_timer();
}
return true;
}();

// In every subsequent invocation, just return whatever timer is set:
return *timer_reference();
}

/** @brief Get the current frame's input data
* \remark This is just a shortcut to @ref composition_interface::current()->input();
*/
inline input_buffer& input()
{
return composition_interface::current()->input();
}

/** @brief Get access to the currently active objects
* \remark This is just a shortcut to @ref *composition_interface::current();
*/
inline composition_interface* current_composition()
{
return composition_interface::current();
}

inline auto& context()
{
static context_vulkan sContext;
return sContext;
}
#pragma endregion
}

namespace avk {
class serializer;
}

#include "event_data.hpp"
#include "event.hpp"
#include "files_changed_event.hpp"
#include "swapchain_resized_event.hpp"
#include "swapchain_changed_event.hpp"
#include "swapchain_format_changed_event.hpp"
#include "concurrent_frames_count_changed_event.hpp"
#include "swapchain_additional_attachments_changed_event.hpp"
#include "destroying_events.hpp"
#include "updater.hpp"

#include "invokee.hpp"
#include "sequential_invoker.hpp"

#include "transform.hpp"
#include "camera.hpp"
#include "quake_camera.hpp"
#include "material_config.hpp"
#include "material_gpu_data.hpp"
#include "material_gpu_data_ext.hpp"
#include "material.hpp"
#include "lightsource.hpp"
#include "lightsource_gpu_data.hpp"
#include "model_types.hpp"
#include "animation.hpp"
#include "model.hpp"
#include "orca_scene.hpp"
#include "serializer.hpp"
#include "image_data.hpp"
#include "material_image_helpers.hpp"
#include "meshlet_helpers.hpp"

#include "composition.hpp"
#include "configure_and_compose.hpp"

#include "imgui_manager.hpp"

#include "cp_interpolation.hpp"
#include "bezier_curve.hpp"
#include "catmull_rom_spline.hpp"
#include "quadratic_uniform_b_spline.hpp"
#include "cubic_uniform_b_spline.hpp"

// ReSharper restore CppUnusedIncludeDirective
4 changes: 3 additions & 1 deletion auto_vk_toolkit/include/bezier_curve.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once
#include <auto_vk_toolkit.hpp>


#include "cp_interpolation.hpp"

namespace avk
{
Expand Down
7 changes: 4 additions & 3 deletions auto_vk_toolkit/include/camera.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <auto_vk_toolkit.hpp>

#include "transform.hpp"

namespace avk
{
Expand All @@ -18,7 +19,7 @@ namespace avk
camera(const camera&) noexcept = default;
camera& operator=(camera&&) noexcept = default;
camera& operator=(const camera&) noexcept = default;
virtual ~camera();
virtual ~camera() = default;

// Returns the type of projection matrix used
enum projection_type projection_type() const { return mProjectionType; }
Expand Down Expand Up @@ -77,7 +78,7 @@ namespace avk
// calculates the z-buffer depth of the specified position in world space
float get_z_buffer_depth(const glm::vec3& aWorldSpacePosition);
// Calculates the z-buffer depth of a given transform's position
float get_z_buffer_depth(transform& aTransform);
float get_z_buffer_depth(const transform& aTransform);

// Calculates and returns the view matrix of this camera.
glm::mat4 view_matrix() const;
Expand Down
3 changes: 2 additions & 1 deletion auto_vk_toolkit/include/catmull_rom_spline.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <auto_vk_toolkit.hpp>

#include "cp_interpolation.hpp"

namespace avk
{
Expand Down
Loading

0 comments on commit 2446006

Please sign in to comment.