Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assimp update to 5.4.2 #199

Merged
merged 22 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e9fbe52
Towards fixing everything.
johannesugb Mar 21, 2024
d87e4d4
Update cross-platform-check.yml
johannesugb Apr 12, 2024
6370599
Merge branch 'development' into queue-sync-fixes
johannesugb Apr 12, 2024
13f111f
Merge branch 'development' into queue-sync-fixes
johannesugb Apr 12, 2024
4d055ce
Attempted to fix sync issues in compute_image_processing.cpp with aut…
johannesugb Apr 12, 2024
f32d0e1
Fake news: auto barriers work
johannesugb Apr 22, 2024
4c7e22e
Fixed synchronization in dynamic_rendering example application
johannesugb Apr 22, 2024
46c8020
Enabling synchronization validation in multi_invokee_rendering example
johannesugb Apr 22, 2024
0269b32
Still problems in the multiple_queues example
johannesugb Apr 22, 2024
16f3320
Added custom tangent space calculation (based on new (and shitty) ASS…
johannesugb Apr 11, 2024
7acd96c
Reverted bitangent calculation to ASSIMP's good old code in model.cpp
johannesugb Apr 11, 2024
aaf8774
Linked to latest Auto-Vk after hot fix to development branch.
johannesugb Apr 23, 2024
a2bd40d
Added avk::projection parameter to camera::set_projection_matrix in o…
johannesugb May 31, 2024
7ea1c4f
Linked to Auto-Vk after documentation for read has been added.
johannesugb May 31, 2024
b175a44
Updated to The Assimp 5.4.2 Bugfix Release
johannesugb Jul 24, 2024
a72a6f9
Added the CMake-generated config.h file
johannesugb Jul 24, 2024
44f963b
ASSIMP .lib and .dll updates => Debug == Release actually
johannesugb Jul 24, 2024
70a3bce
Trying to fix workflows/cross-platform-check.yml
johannesugb Jul 31, 2024
4364ea6
assimp-vc143-mt.lib in assimp.cmake
johannesugb Jul 31, 2024
8a99dd4
No idea what I'm doing...
johannesugb Jul 31, 2024
6d41291
Updated auto_vk submodule
johannesugb Jul 31, 2024
3a4f765
vk::detail::createResultValueType for breaking change in latest Vulka…
johannesugb Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/cross-platform-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'framework/**'
- 'CMakeLists.txt'
pull_request:
workflow_dispatch:
# workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand All @@ -18,7 +18,7 @@ env:
jobs:
linux:
name: ${{ matrix.config.name }}, VulkanSDK ${{ matrix.vulkan-sdk }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand All @@ -35,7 +35,7 @@ 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.3.216"]
vulkan-sdk: ["latest", "1.3.243"]

steps:
- name: Checkout repository and submodules
Expand All @@ -49,15 +49,17 @@ jobs:
# We'll use this as our working directory for all subsequent commands
run: |
# Add lunarg apt sources
sudo sed -i -e 's|disco|jammy|g' /etc/apt/sources.list
sudo apt update
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
if [ "${{ matrix.vulkan-sdk }}" = "latest" ]; then
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list https://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
else
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-${{ matrix.vulkan-sdk }}-focal.list https://packages.lunarg.com/vulkan/${{ matrix.vulkan-sdk }}/lunarg-vulkan-${{ matrix.vulkan-sdk }}-focal.list
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-${{ matrix.vulkan-sdk }}-jammy.list https://packages.lunarg.com/vulkan/${{ matrix.vulkan-sdk }}/lunarg-vulkan-${{ matrix.vulkan-sdk }}-jammy.list
fi

# For GCC-13
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y

# Update package lists
sudo apt-get update -qq
Expand Down Expand Up @@ -116,7 +118,7 @@ jobs:
cxx: "cl"
}
# note: if a specific vulkan version needs testing, you can add it here:
vulkan-sdk: ["latest", "1.3.216.0"]
vulkan-sdk: ["latest", "1.3.243.0"]

steps:
# IMPORTANT: apparently checkout@v3 pulls to ${{ github.event.repository.name }}/${{ github.event.repository.name }} instead of just ${{ github.event.repository.name }} on windows
Expand Down Expand Up @@ -177,7 +179,7 @@ jobs:
cxx: "cl"
}
# note: if a specific vulkan version needs testing, you can add it here:
vulkan-sdk: ["latest", "1.3.216.0"]
vulkan-sdk: ["latest", "1.3.243.0"]

steps:
# IMPORTANT: apparently checkout@v3 pulls to ${{ github.event.repository.name }}/${{ github.event.repository.name }} instead of just ${{ github.event.repository.name }} on windows
Expand Down
2 changes: 1 addition & 1 deletion auto_vk
2 changes: 1 addition & 1 deletion auto_vk_toolkit/include/camera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace avk
float bottom_border() const { return mBottom; }

// sets the projection matrix
camera& set_projection_matrix(const glm::mat4& aMatrix);
camera& set_projection_matrix(const glm::mat4& aMatrix, avk::projection_type aProjectionType = avk::projection_type::unknown);
// Constructs and sets a perspective projection matrix with the given parameters
camera& set_perspective_projection(float aFov, float aAspect, float aNear, float aFar);
// Constructs and sets an orthographic projection matrix with the given parameters
Expand Down
20 changes: 20 additions & 0 deletions auto_vk_toolkit/include/imgui_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace avk
, mQueue { &aQueueToSubmitTo }
, mUserInteractionEnabled{ true }
, mAlterSettingsBeforeInitialization{ std::move(aAlterSettingsBeforeInitialization) }
, mIncomingLayout{ layout::color_attachment_optimal }
{
if (aRenderpassToUse.has_value()) {
mRenderpass = std::move(aRenderpassToUse.value());
Expand Down Expand Up @@ -126,6 +127,24 @@ namespace avk
bool end_wanting_to_occupy_mouse() const {
return !mOccupyMouse && mOccupyMouseLastFrame;
}

/** Gets the image layout that imgui_manager assumes the color attachment to be in when it starts
* to render into it.
* The default value is: avk::layout::color_attachment_optimal
*/
layout::image_layout previous_image_layout() const {
return mIncomingLayout;
}

/** Sets the image layout that imgui_manager shall expect the color attachment to be in
* before starting to render into it.
* Note: This change might only have effect BEFORE imgui_manager has been initialized,
* i.e., before its ::initialize() method has been invoked by the framework for the
* first time. => Ensure to configure this value before starting the composition!
*/
void set_previous_image_layout(layout::image_layout aIncomingLayout) {
mIncomingLayout = aIncomingLayout;
}
private:
void upload_fonts();
void construct_render_pass();
Expand Down Expand Up @@ -156,6 +175,7 @@ namespace avk
// customization
std::function<void(float)> mAlterSettingsBeforeInitialization = {};
std::string mCustomTtfFont = {};
layout::image_layout mIncomingLayout;
};

}
14 changes: 14 additions & 0 deletions auto_vk_toolkit/include/model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,19 @@ namespace avk
* @param aMeshIndices Vector of mesh indices to meshes which shall be included in the animation.
*/
animation prepare_animation(uint32_t aAnimationIndex, const std::vector<mesh_index_t>& aMeshIndices);

/** Calculates the tangent space with Auto-Vk-Toolkit's implementation,
* possibly overwriting ASSIMPs tangents/bitangents.
* @param aMeshIndex Mesh which the tangent space shall be computed for
* @param aConfigSourceUV The set of UV coordinates to be used for tangent space calculation
*/
void calculate_tangent_space_for_mesh(mesh_index_t aMeshIndex, uint32_t aConfigSourceUV = 0);

/** Calculates the tangent space with Auto-Vk-Toolkit's implementation for all meshes,
* possibly overwriting ASSIMPs tangents/bitangents.
* @param aConfigSourceUV The set of UV coordinates to be used for tangent space calculation
*/
void calculate_tangent_space_for_all_meshes(uint32_t aConfigSourceUV = 0);

private:
void initialize_materials();
Expand Down Expand Up @@ -418,6 +431,7 @@ namespace avk
std::string mModelPath;
const aiScene* mScene;
std::vector<std::optional<material_config>> mMaterialConfigPerMesh;
std::unordered_map<mesh_index_t, std::tuple<std::vector<glm::vec3>, std::vector<glm::vec3>>> mTangentsAndBitangents;
};

using model = avk::owning_resource<model_t>;
Expand Down
4 changes: 2 additions & 2 deletions auto_vk_toolkit/src/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ namespace avk
, mBottom{ 0 }
{}

camera& camera::set_projection_matrix(const glm::mat4& aMatrix)
camera& camera::set_projection_matrix(const glm::mat4& aMatrix, avk::projection_type aProjectionType)
{
mProjectionType = projection_type::unknown;
mProjectionType = aProjectionType;
mProjectionMatrix = aMatrix;
return *this;
}
Expand Down
4 changes: 3 additions & 1 deletion auto_vk_toolkit/src/context_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ namespace avk
void context_vulkan::check_vk_result(VkResult err)
{
const auto& inst = context().vulkan_instance();
#if VK_HEADER_VERSION >= 216
#if VK_HEADER_VERSION >= 290
vk::detail::createResultValueType(static_cast<vk::Result>(err), "check_vk_result");
#elif VK_HEADER_VERSION >= 216
vk::createResultValueType(static_cast<vk::Result>(err), "check_vk_result");
#else
createResultValue(static_cast<vk::Result>(err), inst, "check_vk_result");
Expand Down
18 changes: 9 additions & 9 deletions auto_vk_toolkit/src/imgui_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ namespace avk

auto* wnd = context().main_window();
std::vector<attachment> attachments;
attachments.push_back(attachment::declare(format_from_window_color_buffer(wnd), on_load::load, usage::color(0), on_store::store.in_layout(layout::present_src)));
attachments.push_back(attachment::declare(format_from_window_color_buffer(wnd), on_load::load.from_previous_layout(mIncomingLayout), usage::color(0), on_store::store.in_layout(layout::present_src)));
for (auto a : wnd->get_additional_back_buffer_attachments()) {
// Well... who would have guessed the following (and, who understands??):
//
Expand All @@ -544,13 +544,13 @@ namespace avk
subpass_dependency(
subpass::external >> subpass::index(0),
// ... we have to synchronize all these stages with color+dept_stencil write access:
stage::color_attachment_output | stage::early_fragment_tests | stage::late_fragment_tests >> stage::color_attachment_output | stage::early_fragment_tests | stage::late_fragment_tests,
access::color_attachment_write | access::depth_stencil_attachment_write >> access::color_attachment_read | access::depth_stencil_attachment_write
stage::color_attachment_output >> stage::color_attachment_output,
access::none >> access::color_attachment_read | access::color_attachment_write // read && write due to layout transition
),
subpass_dependency(
subpass::index(0) >> subpass::external,
stage::color_attachment_output >> stage::none, // assume semaphore afterwards
access::color_attachment_write >> access::none
stage::color_attachment_output >> stage::color_attachment_output, // assume semaphore afterwards
access::color_attachment_write >> access::none // ^ ...but still, gotta synchronize image layout transition with subsequent presentKHR :ohgodwhy:
)
}
);
Expand All @@ -562,13 +562,13 @@ namespace avk
, {
subpass_dependency(
subpass::external >> subpass::index(0),
stage::none >> stage::color_attachment_output,
access::none >> access::color_attachment_read | access::color_attachment_write
stage::color_attachment_output >> stage::color_attachment_output,
access::none >> access::color_attachment_read | access::color_attachment_write // read && write due to layout transition
),
subpass_dependency(
subpass::index(0) >> subpass::external,
stage::color_attachment_output >> stage::none, // assume semaphore afterwards
access::color_attachment_write >> access::none
stage::color_attachment_output >> stage::color_attachment_output, // assume semaphore afterwards
access::color_attachment_write >> access::none // ^ ...but still, gotta synchronize image layout transition with subsequent presentKHR :ohgodwhy:
)
}
);
Expand Down
Loading
Loading