Class VkSparseImageMemoryRequirements

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkSparseImageMemoryRequirements
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying sparse image memory requirements.

    Member documentation

    • formatPropertiesformatProperties.aspectMask is the set of aspects of the image that this sparse memory requirement applies to. This will usually have a single aspect specified. However, depth/stencil images may have depth and stencil data interleaved in the same sparse block, in which case both IMAGE_ASPECT_DEPTH_BIT and IMAGE_ASPECT_STENCIL_BIT would be present.

      formatProperties.imageGranularity describes the dimensions of a single bindable sparse image block in texel units. For aspect IMAGE_ASPECT_METADATA_BIT, all dimensions will be zero. All metadata is located in the mip tail region.

      formatProperties.flags is a bitmask of VkSparseImageFormatFlagBits:

    • imageMipTailFirstLod – the first mip level at which image subresources are included in the mip tail region.
    • imageMipTailSize – the memory size (in bytes) of the mip tail region. If formatProperties.flags contains SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, this is the size of the whole mip tail, otherwise this is the size of the mip tail of a single array layer. This value is guaranteed to be a multiple of the sparse block size in bytes.
    • imageMipTailOffset – the opaque memory offset used with VkSparseImageOpaqueMemoryBindInfo to bind the mip tail region(s).
    • imageMipTailStride – the offset stride between each array-layer’s mip tail, if formatProperties.flags does not contain SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT (otherwise the value is undefined).

    Layout

    
     struct VkSparseImageMemoryRequirements {
         VkSparseImageFormatProperties formatProperties;
         uint32_t imageMipTailFirstLod;
         VkDeviceSize imageMipTailSize;
         VkDeviceSize imageMipTailOffset;
         VkDeviceSize imageMipTailStride;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FORMATPROPERTIES, IMAGEMIPTAILFIRSTLOD, IMAGEMIPTAILSIZE, IMAGEMIPTAILOFFSET, IMAGEMIPTAILSTRIDE

        The struct member offsets.
    • Constructor Detail

      • VkSparseImageMemoryRequirements

        public VkSparseImageMemoryRequirements​(java.nio.ByteBuffer container)
        Creates a VkSparseImageMemoryRequirements instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.