Skip to content
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions en/07_Depth_buffering.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ We'll use this function now to create a `findDepthFormat` helper function to sel

[,c++]
----
VkFormat findDepthFormat() {
vk::Format findDepthFormat() {
return findSupportedFormat(
{vk::Format::eD32Sfloat, vk::Format::eD32SfloatS8Uint, vk::Format::eD24UnormS8Uint},
vk::ImageTiling::eOptimal,
Expand Down Expand Up @@ -385,7 +385,7 @@ transition_image_layout(
vk::ImageAspectFlagBits::eDepth);
----

Unlike as with the color image we don't need multiple barriers here. As we don't care for the contents of the depth attachment once the frame is finished, we can always translate from `k::ImageLayout::eUndefined`. What's special about this layout, is the fact that you can always use it as a source without having to care what happens before.
Unlike as with the color image we don't need multiple barriers here. As we don't care for the contents of the depth attachment once the frame is finished, we can always translate from `vk::ImageLayout::eUndefined`. What's special about this layout, is the fact that you can always use it as a source without having to care what happens before.

Also make sure you adjust all other calls to the `transition_image_layout` function call to pass the correct image aspect:

Expand Down
Loading