Open Firestar99 opened 11 months ago
Thank you for your detailed issue report and sorry that you have experienced so many troubles. May I ask you do try the latest version on the development branch, which should have at least some of the issues fixed. 🙏
_Regarding 1. Example modelloader fails to configure: Yes, that's a typo. But should be fixed on development.
Regarding 2. Framework fails to build with clang: Unfortunately we had to drop Clang support a while ago because it still doesn't offer support for Ranges. Currently, on Linux only GCC version 23 or higher is supported.
_Regarding 3. helloworld example fails assert: I see. That must be fixed in code. But could take a while until I get to it. Pull requests are highly appreciated.
_Regarding 4. vertexbuffers and all other raster examples fail to link: That's strange. At least our GitHub workflow for GCC 23 does not report any issues on the development branch. Please try that one!
Regarding 5. All raytracing examples have validation errors and segfault: I.e. adding VK_KHR_acceleration_structure
solves the issue? May I ask you for a small pull request into the development branch?
Regarding Docs on controls: Should be better on development. The examples use an orbit_camera
by default.
Regarding Shader hot reloading: It exists and works. But one has to use an updater
to enable it. The "spam" on the console is expected behavior.
Regarding 4. vertex_buffers and all other raster examples fail to link: Your CI only ever tests the hello_world
example, which does not utilize vertex attributes, as it's vertex data is declared as constants in the shader.
Regarding 5. All raytracing examples have validation errors and segfault: sure: https://github.com/cg-tuwien/Auto-Vk-Toolkit/pull/190
I've also added a small note about the controls to the example section in your readme, so that not so obvious keybinds like F1 are known: https://github.com/cg-tuwien/Auto-Vk-Toolkit/blob/b7daeeb63375b90f5dd5c049be32c1a1bac10e3d/README.md?plain=1#L103-L108
I'm running into 4 as well. Using Auto-Vk, not Auto-Vk-Toolkit - so it's definitely an issue with Auto-Vk specifically.
I've determined the root cause of the issue, which is that MSVC and GCC parse pointers to members in different ways. If we have, say, a class called Vertex
with a member glm::vec3 pos
, then &Vertex::pos
is of type glm::vec3
in MSVC, but in GCC it's glm::vec3 Vertex::*
.
I was able to get it compiling by replacing the following function signature for stream_per_vertex
:
template <class M>
partial_input_binding_to_location_mapping& stream_per_vertex(const M&)
becomes
template <class M, class V>
partial_input_binding_to_location_mapping& stream_per_vertex(const M V::*&)
It is worth noting two things from my attempted fix here:
My Professor recommended your framework as a potential baseline for my master's thesis. So I attempted to get it working on my Ubuntu 23.10 machine with Clion and according to your documentation shouldn't require anything out of the ordinary apart from the vulkan-sdk. But Unfortunately I ran into multiple issues, and instead of creating a separate issue for each one, I thought it'll be better to just summarize them here.
1. Example
model_loader
fails to configureI've used the
-D avk_toolkit_BuildExamples=ON
cmake flag to enable all of your examples to get an overview of what the framework can do. Sadly themodel_loader
example fails to configure, so I commented out the lines below likely breaking the example. May there be a typo in the last line, withgvk
instead ofavk
?examples/model_loader/CMakeLists.txt
2. Framework fails to build with clang
It fails to build with clang but works with GCC, so I guess I continue with that.
Full error
``` FAILED: CMakeFiles/Auto_Vk_Toolkit.dir/cmake_pch.hxx.pch /usr/bin/clang++ -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_DISABLE_OBSOLETE_KEYIO -I3.
hello_world
example fails assertDuplicate of: https://github.com/cg-tuwien/Auto-Vk-Toolkit/issues/157
You request 3 images and for some reason Mesa gives you 5, which causes this assert. Same workaround as the mentioned issue: In the main method change
set_number_of_concurrent_frames(3)
andset_number_of_presentable_images(3)
to 5. Then Hello world works!auto_vk_toolkit/src/window.cpp:783
4.
vertex_buffers
and all other raster examples fail to linkSee my highlight below, I'm not sure how this is supposed to work, and I'm suck here, as all other examples depend on vertex input working.
Full error
``` [5/5] Linking CXX executable examples/vertex_buffers/vertex_buffers FAILED: examples/vertex_buffers/vertex_buffers : && /usr/bin/c++ -g examples/vertex_buffers/CMakeFiles/vertex_buffers.dir/source/vertex_buffers.cpp.o examples/vertex_buffers/CMakeFiles/vertex_buffers.dir/__/__/auto_vk/src/avk.cpp.o -o examples/vertex_buffers/vertex_buffers -Wl,-rpath,5. All raytracing examples have validation errors and segfault
If raster doesn't work we can of course try raytracing :D
I've mostly played around with the
ray_tracing_with_shadows_and_ao
andray_query_in_ray_tracing_shaders
, asray_tracing_custom_intersection
doesn't even compile. First the validation error:And I assume this contributes to the segfault, caused by calling
device().getAccelerationStructureBuildSizesKHR(...)
withgetAccelerationStructureBuildSizesKHR
being a nullptr, as the extensionVK_KHR_acceleration_structure
was never requested. Adding that does make both of the compiling examples work.6. Small things of note
-D avk_toolkit_BuildExamples=ON
cmake flag may also be helpful here.Hard- and Software
Everything was tested on latest master (e62ac9a6deff9635f52b57ae5272b507a98119a5), switching to tag 0.99 or 0.98 didn't change anything.
RADV_PERFTEST=rt
env var to enable raytracingUbuntu clang version 16.0.6 (15)
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0