/ appendices / VK_EXT_inline_uniform_block.txt
VK_EXT_inline_uniform_block.txt
  1  include::meta/VK_EXT_inline_uniform_block.txt[]
  2  
  3  *Last Modified Date*::
  4      2018-08-01
  5  *IP Status*::
  6      No known IP claims.
  7  *Contributors*::
  8    - Daniel Rakos, AMD
  9    - Jeff Bolz, NVIDIA
 10    - Slawomir Grajewski, Intel
 11    - Neil Henning, Codeplay
 12  
 13  This extension introduces the ability to back uniform blocks directly with
 14  descriptor sets by storing inline uniform data within descriptor pool
 15  storage.
 16  Compared to push constants this new construct allows uniform data to be
 17  reused across multiple disjoint sets of draw or dispatch commands and may:
 18  enable uniform data to be accessed with less indirections compared to
 19  uniforms backed by buffer memory.
 20  
 21  === New Object Types
 22  
 23  None
 24  
 25  === New Enum Constants
 26  
 27    * Extending elink:VkStructureType:
 28    ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT
 29    ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT
 30    ** ename:VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT
 31    ** ename:VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT
 32  
 33    * Extending elink:VkDescriptorType:
 34    ** ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
 35  
 36  === New Enums
 37  
 38  None
 39  
 40  === New Structures
 41  
 42    * slink:VkPhysicalDeviceInlineUniformBlockFeaturesEXT
 43    * slink:VkPhysicalDeviceInlineUniformBlockPropertiesEXT
 44    * slink:VkWriteDescriptorSetInlineUniformBlockEXT
 45    * slink:VkDescriptorPoolInlineUniformBlockCreateInfoEXT
 46  
 47  === New Functions
 48  
 49  None
 50  
 51  === New Built-In Variables
 52  
 53  None
 54  
 55  === Issues
 56  
 57  1) Do we need a new storage class for inline uniform blocks vs uniform
 58  blocks?
 59  
 60  *RESOLVED*: No.
 61  The code:Uniform storage class is used to allow the same syntax used for
 62  both uniform buffers and inline uniform blocks.
 63  
 64  2) Is the descriptor array index and array size expressed in terms of bytes
 65  or dwords for inline uniform block descriptors?
 66  
 67  *RESOLVED*: In bytes, but both must: be a multiple of 4, similar to how push
 68  constant ranges are specified.
 69  The pname:descriptorCount of sname:VkDescriptorSetLayoutBinding thus
 70  provides the total number of bytes a particular binding with an inline
 71  uniform block descriptor type can hold, while the pname:srcArrayElement,
 72  pname:dstArrayElement, and pname:descriptorCount members of
 73  sname:VkWriteDescriptorSet, sname:VkCopyDescriptorSet, and
 74  sname:VkDescriptorUpdateTemplateEntry (where applicable) specify the byte
 75  offset and number of bytes to write/copy to the binding's backing store.
 76  Additionally, the pname:stride member of
 77  sname:VkDescriptorUpdateTemplateEntry is ignored for inline uniform blocks
 78  and a default value of one is used, meaning that the data to update inline
 79  uniform block bindings with must be contiguous in memory.
 80  
 81  3) What layout rules apply for uniform blocks corresponding to inline
 82  constants?
 83  
 84  *RESOLVED*: They use the same layout rules as uniform buffers.
 85  
 86  4) Do we need to add non-uniform indexing features/properties as introduced
 87  by `VK_EXT_descriptor_indexing` for inline uniform blocks?
 88  
 89  *RESOLVED*: No, because inline uniform blocks are not allowed to be
 90  "`arrayed`".
 91  A single binding with an inline uniform block descriptor type corresponds to
 92  a single uniform block instance and the array indices inside that binding
 93  refer to individual offsets within the uniform block (see issue #2).
 94  However, this extension does introduce new features/properties about the
 95  level of support for update-after-bind inline uniform blocks.
 96  
 97  5) Is the pname:descriptorBindingVariableDescriptorCount feature introduced
 98  by `VK_EXT_descriptor_indexing` supported for inline uniform blocks?
 99  
100  *RESOLVED*: Yes, as long as other inline uniform block specific limits are
101  respected.
102  
103  6) Do the robustness guarantees of pname:robustBufferAccess apply to inline
104  uniform block accesses?
105  
106  *RESOLVED*: No, similarly to push constants, as they are not backed by
107  buffer memory like uniform buffers.
108  
109  === Version History
110  
111   * Revision 1, 2018-08-01 (Daniel Rakos)
112     - Internal revisions