|
@@ -254,10 +254,15 @@ namespace bs { namespace ct
|
|
|
if (readMask.isSet(RT_STENCIL))
|
|
if (readMask.isSet(RT_STENCIL))
|
|
|
attachmentRef.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
|
|
attachmentRef.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
|
|
|
else // Depth readable but stencil isn't
|
|
else // Depth readable but stencil isn't
|
|
|
- attachmentRef.layout = VK_IMAGE_LAYOUT_GENERAL;
|
|
|
|
|
|
|
+ attachmentRef.layout = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
- attachmentRef.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ if (readMask.isSet(RT_STENCIL)) // Stencil readable but depth isn't
|
|
|
|
|
+ attachmentRef.layout = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR;
|
|
|
|
|
+ else
|
|
|
|
|
+ attachmentRef.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
VkDevice device = mOwner->getDevice().getLogical();
|
|
VkDevice device = mOwner->getDevice().getLogical();
|