1// Copyright 2016-2021 The Khronos Group, Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_KHR_maintenance2.txt[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2017-09-05 11*Interactions and External Dependencies*:: 12 - Promoted to Vulkan 1.1 Core 13*Contributors*:: 14 - Michael Worcester, Imagination Technologies 15 - Stuart Smith, Imagination Technologies 16 - Jeff Bolz, NVIDIA 17 - Daniel Koch, NVIDIA 18 - Jan-Harald Fredriksen, ARM 19 - Daniel Rakos, AMD 20 - Neil Henning, Codeplay 21 - Piers Daniell, NVIDIA 22 23=== Description 24 25`VK_KHR_maintenance2` adds a collection of minor features that were 26intentionally left out or overlooked from the original Vulkan 1.0 release. 27 28The new features are as follows: 29 30 * Allow the application to specify which aspect of an input attachment 31 might be read for a given subpass. 32 * Allow implementations to express the clipping behavior of points. 33 * Allow creating images with usage flags that may not be supported for the 34 base image's format, but are supported for image views of the image that 35 have a different but compatible format. 36 * Allow creating uncompressed image views of compressed images. 37 * Allow the application to select between an upper-left and lower-left 38 origin for the tessellation domain space. 39 * Adds two new image layouts for depth stencil images to allow either the 40 depth or stencil aspect to be read-only while the other aspect is 41 writable. 42 43=== Input Attachment Specification 44 45Input attachment specification allows an application to specify which aspect 46of a multi-aspect image (e.g. a combined depth stencil format) will be 47accessed via a code:subpassLoad operation. 48 49On some implementations there may: be a performance penalty if the 50implementation does not know (at flink:vkCreateRenderPass time) which 51aspect(s) of multi-aspect images can: be accessed as input attachments. 52 53=== Promotion to Vulkan 1.1 54 55All functionality in this extension is included in core Vulkan 1.1, with the 56KHR suffix omitted. 57The original type, enum and command names are still available as aliases of 58the core functionality. 59 60include::{generated}/interfaces/VK_KHR_maintenance2.txt[] 61 62=== Input Attachment Specification Example 63 64Consider the case where a render pass has two subpasses and two attachments. 65 66Attachment 0 has the format ename:VK_FORMAT_D24_UNORM_S8_UINT, attachment 1 67has some color format. 68 69Subpass 0 writes to attachment 0, subpass 1 reads only the depth information 70from attachment 0 (using inputAttachmentRead) and writes to attachment 1. 71 72[source,c++] 73---------------------------------------- 74 VkInputAttachmentAspectReferenceKHR references[] = { 75 { 76 .subpass = 1, 77 .inputAttachmentIndex = 0, 78 .aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT 79 } 80 }; 81 82 VkRenderPassInputAttachmentAspectCreateInfoKHR specifyAspects = { 83 .sType = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR, 84 .pNext = NULL, 85 .aspectReferenceCount = 1, 86 .pAspectReferences = references 87 }; 88 89 90 VkRenderPassCreateInfo createInfo = { 91 ... 92 .pNext = &specifyAspects, 93 ... 94 }; 95 96 vkCreateRenderPass(...); 97---------------------------------------- 98 99=== Issues 100 1011) What is the default tessellation domain origin? 102 103*RESOLVED*: Vulkan 1.0 originally inadvertently documented a lower-left 104origin, but the conformance tests and all implementations implemented an 105upper-left origin. 106This extension adds a control to select between lower-left (for 107compatibility with OpenGL) and upper-left, and we retroactively fix 108unextended Vulkan to have a default of an upper-left origin. 109 110=== Version History 111 112 * Revision 1, 2017-04-28 113