1// Copyright 2020-2021 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4// Common Valid Usage 5// Common to attachment reference structures 6 * [[VUID-{refpage}-layout-03077]] 7 If pname:attachment is not ename:VK_ATTACHMENT_UNUSED, pname:layout 8 must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED, 9 ename:VK_IMAGE_LAYOUT_PREINITIALIZED, or 10 ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR 11ifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 12 * [[VUID-{refpage}-separateDepthStencilLayouts-03313]] 13 If the <<features-separateDepthStencilLayouts, 14 pname:separateDepthStencilLayouts>> feature is not enabled, and 15 pname:attachment is not ename:VK_ATTACHMENT_UNUSED, pname:layout must: 16 not be ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, 17 ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, 18 ename:VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or 19 ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, 20endif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 21ifdef::VK_KHR_synchronization2[] 22 * [[VUID-{refpage}-synchronization2-06910]] 23 If the <<features-synchronization2, pname:synchronization2>> feature is 24 not enabled, pname:layout must: not be 25 ename:VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or 26 ename:VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR 27endif::VK_KHR_synchronization2[] 28ifdef::VK_EXT_attachment_feedback_loop_layout[] 29 * [[VUID-{refpage}-attachmentFeedbackLoopLayout-07311]] 30 If the <<features-attachmentFeedbackLoopLayout, 31 pname:attachmentFeedbackLoopLayout>> feature is not enabled, 32 pname:layout must: not be 33 ename:VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT 34endif::VK_EXT_attachment_feedback_loop_layout[] 35// Common Valid Usage 36