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

easy and robust cmake build process. #295

Open
wants to merge 614 commits into
base: main
Choose a base branch
from

Conversation

liudeyuan2021
Copy link

I use MacBook m1 when I learn the Vulkan tutorial, I can't install stb or tinyobjloader through homebrew, so I have some problems when I build the files the first time.

I change the CMakeLists.txt and add stb and tinyobjloader submodules. I think it will be easier for someone who isn't familiar with CMake to build the files.

Alexis Ronez added 30 commits June 17, 2019 18:17
…st in English, because the French version is used everywhere later on.
Because nothing is more important than an introduction to help the reader dive into something as hard as Vulkan
Overv and others added 26 commits February 5, 2022 20:57
Use Vulkan 1.3 spec
* Update tutorial for command buffer re-recording

Means the code now calls recordCommandBuffer every frame instead of ahead of time

Many changes to the structure of chapters 14 & 15, with small changes to subsequent
chapters.

Primary focus was shifting everything away from 'swapchain image count' to
MAX_FRAMES_IN_FLIGHT. This has caused a lot of chapter 15 to need to be rewritten.
Such as: Introducing fences alongside semaphores and not later; Waiting on a fence
at the start of the frame before introducing acquireNextImage; consolidating the
Frames In Flight concepts to apply to command buffers, fences, and semaphores at
the same time.

Chapter 14 saw command buffer allocation reduced to 1 at a time. This allows the
concept of Frames in Flight to not need introduction before having a triangle
drawing on the screen.

* Update introduction to semaphores and fences

Greatly improve the descriptions of semaphores and fences before their
introduction into the code. Provide examples with psuedo code.

By using max_frames_in_flight command buffers & semaphores, we dont
need to keep track of previously sumitted frames' fences and wait
on them "just in case". This removes a lot of the confusion I had
when I first was trying to understand the vulkan update loop.

* Remove accidental code changes

Un-comment vkDeviceWaitIdle and remove resizing of imagesInFlight (which was removed)

* Use uint32_t instead of size_t for currentFrame

* Address typos and fixup changes for re-recording command buffers PR

* Add description of fences needing explicit resetting while semaphores are automatic
* Elaborate on why 2 frames in flight are chosen

* Fix deadlock in resizing from resetting the fence too early

Because acquiring the swapchain image index may cause drawFrame to return early,
it was possible to cause the next vkWaitForFences to deadlock. By delaying fence
resetting till after acquiring, it prevents the deadlock.
* vkDestroyDescriptorPool  added

* dots

* vkDestroyDescriptorPool added for French chapter
This commit removes leftover references to the number of swapchain
images in the "Uniform buffers" chapter.
This code was still refering to `createCommandBuffers`  instead of `recordCommandBuffer`.
)

* Prefer use of dynamic state for viewport and scissor

* Slight rewording, working in-page anchor

* Updated command buffers chapter and code to use dynamic viewport and scissor state

* Updated swap chain recreation chapter

No more need to recreate the graphics pipeline as viewport and scissor state are now dynamic

* Updated command buffer chapter code to use dynamic viewport and scissor

* Removed render pass destruction/creation for swap chain recreation

This is not needed anymore

* Use dynamic state for viewport and scissor for samples after the fixed function chapter

* Use dynamic state for viewport and scissor for samples after the swap chain recreation chapter

Removed render pass destruction/creation for swap chain recreation, no longer necessary

* Removed duplicate code

* Wording change

* Changed wording on chapter intro, moved dynamic state paragraph to the top

* Fixed wording

* Fixed wording

* C++ style cast

* Wording

* Wording

* Wording

* Added note on renderpass recreation

* Apply suggestions from code review

Incorporate suggestions

Co-authored-by: Alexander Overvoorde <overv161@gmail.com>

* Added dynamic state to conclusion chapter

* Remove unnecessary link

* Remove code referencing command buffers too early

Co-authored-by: Alexander Overvoorde <overv161@gmail.com>
@Overv
Copy link
Owner

Overv commented Jul 8, 2022

While I appreciate the effort, I don't think it's a good idea to add git submodules for the dependencies because it clutters the repo a bit too much. Perhaps someone else with Mac experience can chime in on how the installation process could be made easier.

@SaschaWillems
Copy link
Contributor

An alternative to having submodules would be using FetchContent to download the dependencies at runtime.

Having cmake setup that works out of the box would be very much appreciated btw. ;)

@Overv Overv force-pushed the main branch 2 times, most recently from f2764d9 to ddd8649 Compare March 8, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet