easy and robust cmake build process.#295
Open
liudeyuan2021 wants to merge 614 commits intoOverv:mainfrom
Open
Conversation
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
Add Arch Linux support
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>
Owner
|
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. |
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. ;) |
f2764d9 to
ddd8649
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.