1// Copyright 2019-2021 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_EXT_robustness2.txt[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2020-01-29 11*IP Status*:: 12 No known IP claims. 13*Contributors*:: 14 - Liam Middlebrook, NVIDIA 15 - Jeff Bolz, NVIDIA 16 17=== Description 18 19This extension adds stricter requirements for how out of bounds reads and 20writes are handled. 21Most accesses must: be tightly bounds-checked, out of bounds writes must: be 22discarded, out of bound reads must: return zero. 23Rather than allowing multiple possible [eq]#(0,0,0,x)# vectors, the out of 24bounds values are treated as zero, and then missing components are inserted 25based on the format as described in <<textures-conversion-to-rgba, 26Conversion to RGBA>> and <<fxvertex-input-extraction,vertex input attribute 27extraction>>. 28 29These additional requirements may: be expensive on some implementations, and 30should only be enabled when truly necessary. 31 32This extension also adds support for "`null descriptors`", where 33dlink:VK_NULL_HANDLE can: be used instead of a valid handle. 34Accesses to null descriptors have well-defined behavior, and do not rely on 35robustness. 36 37include::{generated}/interfaces/VK_EXT_robustness2.txt[] 38 39=== Issues 40 411. Why do 42 slink:VkPhysicalDeviceRobustness2PropertiesEXT::pname:robustUniformBufferAccessSizeAlignment 43 and 44 slink:VkPhysicalDeviceRobustness2PropertiesEXT::pname:robustStorageBufferAccessSizeAlignment 45 exist? 46 47*RESOLVED*: Some implementations cannot efficiently tightly bounds-check all 48buffer accesses. 49Rather, the size of the bound range is padded to some power of two multiple, 50up to 256 bytes for uniform buffers and up to 4 bytes for storage buffers, 51and that padded size is bounds-checked. 52This is sufficient to implement D3D-like behavior, because D3D only allows 53binding whole uniform buffers or ranges that are a multiple of 256 bytes, 54and D3D raw and structured buffers only support 32-bit accesses. 55 56=== Examples 57 58None. 59 60=== Version History 61 62 * Revision 1, 2019-11-01 (Jeff Bolz, Liam Middlebrook) 63 - Initial draft 64