KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

core validation: extend CLEAR LOAD_OP check to new DS image layouts #2609

Closed ghost closed 6 years ago

ghost commented 6 years ago

Extend check for load operation vs first time use image layout to new read-only depth stencil image layouts.

The new layouts were added in VK_KHR_maintenance2 / Vulkan 1.1 and follow similar restrictions to VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL.

Spec:

" For any member of pAttachments with a loadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL.

For any member of pAttachments with a stencilLoadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL. "

chrisforbes commented 6 years ago

Code change looks good. CI failure is because the matching lines in layers/vk_validation_error_database aren't updated to match.

ghost commented 6 years ago

@chrisforbes Thanks! It should be fixed now.