This allows for using different texture sizes without having to
know the mipmap count in advance.
All conformant Vulkan implementations should be able to handle this
constant, which is equal to `1000.0f`.
The function "createImageView" has a somewhat incorrect error message,
saying that it failed to create a texture image view. However, the
function is also used by more than simply the texture image view
creation process(e.g., the swapchain image view creation process, "createImageViews").
* Started working on compute shader bonus chapter
* Continued work on compute shader bonus chapter
* Continued work on compute shader bonus chapter
* Added code for compute sample
work-in-progress
* Added code for compute sample
Per-frame ssbos
Compute shader is now integrated and updating particles
work-in-progress
* Added code for compute sample
Nicer visuals, circular initial particle positions
work-in-progress
* Added code for compute sample
work-in-progress
* Tutorial compute queue families, submission and synchronization chapter
* Added paragraphs on sync, submit and queue familes
Rewording some paragraphs
* Rewording
Added image for workgroup and invocations compute space
* Sample for work group and dispatch counts
* Note and spec reference on queue families
* Minor additions
* Sample code uses SSBO per frame
Code cleanup
Tutotorial changed
* Added image for SSBOs per-frame reads and writes
* Conclusion
* Added note on signaled fences
* Update 11_Compute_Shader.md
* Use persistent mapped buffers
* Added links to advanced topics (tutorials, samples)
* Fixed typo
* Add note for the storage image chapter
* Added note on how to handle uneven no. of invocations using gl_GlobalInvocationID
* Added compute fence resize to tutorial
Was already present in code
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Update en/11_Compute_Shader.md
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Name the actual compute related physical device limits
* Clarfiy how work group and invocation counts are specified
* Show how initial particle data is generated for the shader storage buffer s
* Restructure SSBO setup
* Indentation
* Minor touches
* fixed transposition
* Added note on std140 memory layout qualifier
---------
Co-authored-by: Marty Johnson <68354714+marty-johnson59@users.noreply.github.com>
Co-authored-by: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com>
* Updated UBO chapter and removed in-place map and unmap of the ubo
Replaced it with map-once aka "persistent mapping"
* Fixed index for uniform buffer selection
* Update code samples to persistent ubo mapping
* Resize vector for mapped uniform buffer pointers
* Use calculated buffer size for mapping
* Update code samples to persistent ubo mapping
* Spelling
* 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>
* 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.
Calling `cmake --build .` will build the sample code executables for each
chapter in it's own folders, compile corresponding shaders and copy all
required resources to appropriate sub-folders. After that any example is
ready to be run from it's build sub-folder.
CMake project requires following dependencies:
* glfw3 dev package
* glm dev package
* stb_image header
* tinyobjloader dev package
* Vulkan sdk
The existing model had a permissive license at the time this tutorial
was written, but the artist has since started selling the model so I've
decided to switch to a different one to respect their wishes.