core validation: extend CLEAR LOAD_OP check to new DS image layouts
authorSlawomir Cygan <slawomir.cygan@intel.com>
Tue, 24 Apr 2018 15:18:26 +0000 (17:18 +0200)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 30 Apr 2018 17:57:17 +0000 (10:57 -0700)
commitccaed44dc376d964fb98d51d2136132fa9a2f158
treee16bc643ab5223e8b7692b9936da042d48c5b7de
parent45b3c613f8676edcf2a6dd6e07fc685c3e50966c
core validation: extend CLEAR LOAD_OP check to new DS image layouts

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.
"
layers/buffer_validation.cpp
layers/vk_validation_error_database.txt