Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 757c699

Browse files
committed
Remove usage of VK_IMAGE_LAYOUT_PREINITIALIZED
1 parent 50de9c1 commit 757c699

7 files changed

Lines changed: 50 additions & 49 deletions

File tree

06_Texture_mapping/00_Images.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ buffer instead of a staging image, so this won't be necessary. We will be using
239239
`VK_IMAGE_TILING_OPTIMAL` for efficient access from the shader.
240240

241241
```c++
242-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
242+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
243243
```
244244

245245
There are only two possible values for the `initialLayout` of an image:
@@ -249,11 +249,14 @@ transition will discard the texels.
249249
* `VK_IMAGE_LAYOUT_PREINITIALIZED`: Not usable by the GPU, but the first
250250
transition will preserve the texels.
251251

252-
An initially undefined layout is suitable for images that will be used as
253-
attachments, like color and depth buffers. In that case we don't care about any
254-
initial data, because it'll probably be cleared by a render pass before use. If
255-
you want to fill it with data, like a texture, then you should use the
256-
preinitialized layout.
252+
There are few situations where it is necessary for the texels to be preserved
253+
during the first transition. One example, however, would be if you wanted to use
254+
an image as a staging image in combination with the `VK_IMAGE_TILING_LINEAR`
255+
layout. In that case, you'd want to upload the texel data to it and then
256+
transition the image to be a transfer source without losing the data. In our
257+
case, however, we're first going to transition the image to be a transfer
258+
destination and then copy texel data to it from a buffer object, so we don't
259+
need this property and can safely use `VK_IMAGE_LAYOUT_UNDEFINED`.
257260

258261
```c++
259262
imageInfo.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
@@ -337,7 +340,7 @@ void createImage(uint32_t width, uint32_t height, VkFormat format, VkImageTiling
337340
imageInfo.arrayLayers = 1;
338341
imageInfo.format = format;
339342
imageInfo.tiling = tiling;
340-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
343+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
341344
imageInfo.usage = usage;
342345
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
343346
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
@@ -619,13 +622,14 @@ buffer to the texture image. This involves two steps:
619622
This is easy to do with the functions we just created:
620623

621624
```c++
622-
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
625+
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
623626
copyBufferToImage(stagingBuffer, textureImage, static_cast<uint32_t>(texWidth), static_cast<uint32_t>(texHeight));
624627
```
625628
626-
Both `VK_IMAGE_LAYOUT_PREINITIALIZED` and `VK_IMAGE_LAYOUT_UNDEFINED` are valid
627-
values for old layout when transitioning `textureImage`, because we don't care
628-
about its contents before the copy operation.
629+
The image was created with the `VK_IMAGE_LAYOUT_UNDEFINED` layout, so that one
630+
should be specified as old layout when transitioning `textureImage`. Remember
631+
that we can do this because we don't care about its contents before performing
632+
the copy operation.
629633
630634
To be able to start sampling from the texture image in the shader, we need one
631635
last transition to prepare it for shader access:
@@ -640,19 +644,17 @@ If run your application with validation layers enabled now, then you'll see that
640644
it complains about the access masks in `transitionImageLayout` being invalid.
641645
We still need to set those based on the layouts in the transition.
642646

643-
There are three transitions we need to handle:
647+
There are two transitions we need to handle:
644648

645-
* Preinitialized → transfer source: transfer reads should wait on host writes
646-
* Preinitialized → transfer destination: transfer writes should wait on host
647-
writes
649+
* Undefined → transfer destination: transfer writes that don't need to wait
648650
* Transfer destination → shader reading: shader reads should wait on transfer
649651
writes
650652

651653
These rules are specified using the following access masks:
652654

653655
```c++
654-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
655-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
656+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
657+
barrier.srcAccessMask = 0;
656658
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
657659
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
658660
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
@@ -664,13 +666,15 @@ if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_
664666

665667
If we need to do more transitions in the future, then we'll extend the function.
666668
The application should now run successfully, although there are of course no
667-
visual changes yet. One thing to note is that command buffer submission results
668-
in implicit `VK_ACCESS_HOST_WRITE_BIT` synchronization at the beginning. Since
669-
the `transitionImageLayout` function executes a command buffer with only a
670-
single command, we can use this implicit synchronization and set `srcAccessMask`
671-
to `0` for the first two types of transitions. It's up to you if you want to be
672-
explicit about it or not, but I'm personally not a fan of relying on these
673-
OpenGL-like "hidden" operations.
669+
visual changes yet.
670+
671+
One thing to note is that command buffer submission results in implicit
672+
`VK_ACCESS_HOST_WRITE_BIT` synchronization at the beginning. Since the
673+
`transitionImageLayout` function executes a command buffer with only a single
674+
command, you could use this implicit synchronization and set `srcAccessMask` to
675+
`0` if you ever needed a `VK_ACCESS_HOST_WRITE_BIT` dependency in a layout
676+
transition. It's up to you if you want to be explicit about it or not, but I'm
677+
personally not a fan of relying on these OpenGL-like "hidden" operations.
674678

675679
There is actually a special type of image layout that supports all operations,
676680
`VK_IMAGE_LAYOUT_GENERAL`. The problem with it, of course, is that it doesn't

07_Depth_buffering.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,8 @@ layout transitions of the depth image.
330330
Finally, add the correct access masks:
331331

332332
```c++
333-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) {
334-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
335-
barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
336-
} else if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
337-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
333+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
334+
barrier.srcAccessMask = 0;
338335
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
339336
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
340337
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

code/depth_buffering.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ class HelloTriangleApplication {
798798

799799
createImage(texWidth, texHeight, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, textureImage, textureImageMemory);
800800

801-
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
801+
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
802802
copyBufferToImage(stagingBuffer, textureImage, static_cast<uint32_t>(texWidth), static_cast<uint32_t>(texHeight));
803803
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
804804

@@ -862,7 +862,7 @@ class HelloTriangleApplication {
862862
imageInfo.arrayLayers = 1;
863863
imageInfo.format = format;
864864
imageInfo.tiling = tiling;
865-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
865+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
866866
imageInfo.usage = usage;
867867
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
868868
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
@@ -912,8 +912,8 @@ class HelloTriangleApplication {
912912
barrier.subresourceRange.baseArrayLayer = 0;
913913
barrier.subresourceRange.layerCount = 1;
914914

915-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
916-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
915+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
916+
barrier.srcAccessMask = 0;
917917
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
918918
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
919919
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

code/model_loading.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ class HelloTriangleApplication {
804804

805805
createImage(texWidth, texHeight, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, textureImage, textureImageMemory);
806806

807-
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
807+
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
808808
copyBufferToImage(stagingBuffer, textureImage, static_cast<uint32_t>(texWidth), static_cast<uint32_t>(texHeight));
809809
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
810810

@@ -868,7 +868,7 @@ class HelloTriangleApplication {
868868
imageInfo.arrayLayers = 1;
869869
imageInfo.format = format;
870870
imageInfo.tiling = tiling;
871-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
871+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
872872
imageInfo.usage = usage;
873873
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
874874
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
@@ -918,8 +918,8 @@ class HelloTriangleApplication {
918918
barrier.subresourceRange.baseArrayLayer = 0;
919919
barrier.subresourceRange.layerCount = 1;
920920

921-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
922-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
921+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
922+
barrier.srcAccessMask = 0;
923923
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
924924
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
925925
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

code/sampler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ class HelloTriangleApplication {
705705

706706
createImage(texWidth, texHeight, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, textureImage, textureImageMemory);
707707

708-
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
708+
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
709709
copyBufferToImage(stagingBuffer, textureImage, static_cast<uint32_t>(texWidth), static_cast<uint32_t>(texHeight));
710710
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
711711

@@ -769,7 +769,7 @@ class HelloTriangleApplication {
769769
imageInfo.arrayLayers = 1;
770770
imageInfo.format = format;
771771
imageInfo.tiling = tiling;
772-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
772+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
773773
imageInfo.usage = usage;
774774
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
775775
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
@@ -809,8 +809,8 @@ class HelloTriangleApplication {
809809
barrier.subresourceRange.baseArrayLayer = 0;
810810
barrier.subresourceRange.layerCount = 1;
811811

812-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
813-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
812+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
813+
barrier.srcAccessMask = 0;
814814
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
815815
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
816816
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

code/texture_image.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ class HelloTriangleApplication {
714714

715715
createImage(texWidth, texHeight, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, textureImage, textureImageMemory);
716716

717-
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
717+
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
718718
copyBufferToImage(stagingBuffer, textureImage, static_cast<uint32_t>(texWidth), static_cast<uint32_t>(texHeight));
719719
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
720720

@@ -733,7 +733,7 @@ class HelloTriangleApplication {
733733
imageInfo.arrayLayers = 1;
734734
imageInfo.format = format;
735735
imageInfo.tiling = tiling;
736-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
736+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
737737
imageInfo.usage = usage;
738738
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
739739
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
@@ -773,8 +773,8 @@ class HelloTriangleApplication {
773773
barrier.subresourceRange.baseArrayLayer = 0;
774774
barrier.subresourceRange.layerCount = 1;
775775

776-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
777-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
776+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
777+
barrier.srcAccessMask = 0;
778778
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
779779
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
780780
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

code/texture_mapping.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ class HelloTriangleApplication {
719719

720720
createImage(texWidth, texHeight, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, textureImage, textureImageMemory);
721721

722-
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
722+
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
723723
copyBufferToImage(stagingBuffer, textureImage, static_cast<uint32_t>(texWidth), static_cast<uint32_t>(texHeight));
724724
transitionImageLayout(textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
725725

@@ -783,7 +783,7 @@ class HelloTriangleApplication {
783783
imageInfo.arrayLayers = 1;
784784
imageInfo.format = format;
785785
imageInfo.tiling = tiling;
786-
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
786+
imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
787787
imageInfo.usage = usage;
788788
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
789789
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
@@ -823,8 +823,8 @@ class HelloTriangleApplication {
823823
barrier.subresourceRange.baseArrayLayer = 0;
824824
barrier.subresourceRange.layerCount = 1;
825825

826-
if (oldLayout == VK_IMAGE_LAYOUT_PREINITIALIZED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
827-
barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
826+
if (oldLayout == VK_IMAGE_LAYOUT_UNDEFINED && newLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
827+
barrier.srcAccessMask = 0;
828828
barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
829829
} else if (oldLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL && newLayout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
830830
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;

0 commit comments

Comments
 (0)