cleanup on image layout transition functions #767
Merged
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.
Description
Resolves validation layer warnings on using
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
, which was the default for theset_image_layout
helper function. Which actually was never used with different stages! And there was a helper functioninsert_image_memory_barrier
, which did the exact same stuff.Thus, introduced a set of helper functions
image_layout_transition
to cover this:With this PR, all calls to
set_image_layout
andinsert_image_memory_barrier
are replaced by a call to one of theimage_layout_transition
routines, and those functions are removed. In addition, explicit calls tovkCmdPipelineBarrier
with an image memory barrier are replaced by a call toimage_layout_transition
.Compiled and tested on Win10, using NVIDIA GPU.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
Sample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: