Class VkSparseImageMemoryBind

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


    public class VkSparseImageMemoryBind
    extends Struct
    Khronos Reference Page
    Vulkan Specification

    Describes a memory binding to a sparse image block of a VkImage object.

    Valid Usage
    • subresource must be a valid VkImageSubresource structure
    • If memory is not NULL_HANDLE, memory must be a valid VkDeviceMemory handle
    • flags must be a valid combination of VkSparseMemoryBindFlagBits values
    • If the sparse aliased residency feature is not enabled, and if any other resources are bound to ranges of memory, the range of memory being bound must not overlap with those bound ranges
    • memory and memoryOffset must match the memory requirements of the calling command's image
    • subresource must be a valid image subresource for image
    • offset.x must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of the image
    • extent.width must either be a multiple of the sparse image block width of the image, or else extent.width + offset.x must equal the width of the image subresource
    • offset.y must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of the image
    • extent.height must either be a multiple of the sparse image block height of the image, or else extent.height + offset.y must equal the height of the image subresource
    • offset.z must be a multiple of the sparse image block depth (VkSparseImageFormatProperties::imageGranularity.depth) of the image
    • extent.depth must either be a multiple of the sparse image block depth of the image, or else extent.depth + offset.z must equal the depth of the image subresource

    Member documentation

    • subresource – the aspectMask and region of interest in the image
    • offset – the coordinates of the first texel within the image subresource to bind
    • extent – the size in texels of the region within the image subresource to bind. The extent must be a multiple of the sparse image block dimensions, except when binding sparse image blocks along the edge of an image subresource it can instead be such that any coordinate of offset + extent equals the corresponding dimensions of the image subresource.
    • memory – the VkDeviceMemory object that the sparse image blocks of the image are bound to. If memory is NULL_HANDLE, the sparse image blocks are unbound.
    • memoryOffset – an offset into VkDeviceMemory object. If memory is NULL_HANDLE, this value is ignored.
    • flags – sparse memory binding flags. One or more of:
      SPARSE_MEMORY_BIND_METADATA_BIT

    Layout

    struct VkSparseImageMemoryBind {
        VkImageSubresource subresource;
        VkOffset3D offset;
        VkExtent3D extent;
        VkDeviceMemory memory;
        VkDeviceSize memoryOffset;
        VkSparseMemoryBindFlags flags;
    }