Added image layout barrier source access mask for depth/stencil attachment reads
This commit is contained in:
parent
7f675466ff
commit
230a693401
1 changed files with 7 additions and 0 deletions
|
|
@ -134,6 +134,13 @@ namespace vkTools
|
||||||
imageMemoryBarrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
imageMemoryBarrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Old layout is depth/stencil attachment
|
||||||
|
// Make sure any writes to the depth/stencil buffer have been finished
|
||||||
|
if (oldImageLayout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
|
||||||
|
{
|
||||||
|
imageMemoryBarrier.srcAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
|
||||||
|
}
|
||||||
|
|
||||||
// Old layout is transfer source
|
// Old layout is transfer source
|
||||||
// Make sure any reads from the image have been finished
|
// Make sure any reads from the image have been finished
|
||||||
if (oldImageLayout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL)
|
if (oldImageLayout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue