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