Wrong fields specified in image layout transition in Chapter06 Texture Mapping.

Open
#316 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
documentation

Research direction

Read the linked passage at line 352 of 06_Texture_mapping/00_Images.adoc and compare the two transition functions in attachments/24_texture_image.cpp, especially lines 521 and 742-772. Correct the queue-family field explanation and assess whether the functions should be canonicalized, then check the Chapter03 image-layout-transition reference for consistency.

Written by the indexing model from the issue text.

Description

In line 352 of 06_Texture_mapping/00_Images.adoc, it says:

If you are using the barrier to transfer queue family ownership, then oldLayout and newLayout fields should be the indices of the queue families. They must be set to VK_QUEUE_FAMILY_IGNORED if you don't want to do this (not the default value!).

But actually, vk::ImageMemoryBarrier should use fields .srcQueueFamilyIndex and .dstQueueFamilyIndex in this case. And it should be explained why provided code in transitionImageLayout doesn't do so:

https://github.com/KhronosGroup/Vulkan-Tutorial/blob/fef98131e744addae167848cb0f524bc107e9116/attachments/24_texture_image.cpp#L521

while transition_image_layout (yes, it's a different function, with inconsistent naming convention) does so:
https://github.com/KhronosGroup/Vulkan-Tutorial/blob/fef98131e744addae167848cb0f524bc107e9116/attachments/24_texture_image.cpp#L742-L772

This function is used in 03_Drawing_a_triangle. I think a better way is to canonicalize these two functions instead.

Dominant language
C++
Stars
424
Forks
127
Avg merge
2d 21h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KhronosGroup/Vulkan-Tutorial

All issues in KhronosGroup/Vulkan-Tutorial

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.