C Specification
The range of 3D slices for the created image view can be restricted to a
subset of the parent image’s Z range by adding a
VkImageViewSlicedCreateInfoEXT structure to the pNext chain of
VkImageViewCreateInfo.
The VkImageViewSlicedCreateInfoEXT structure is defined as:
// Provided by VK_EXT_image_sliced_view_of_3d
typedef struct VkImageViewSlicedCreateInfoEXT {
VkStructureType sType;
const void* pNext;
uint32_t sliceOffset;
uint32_t sliceCount;
} VkImageViewSlicedCreateInfoEXT;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
sliceOffsetis the Z-offset for the first 3D slice accessible to the image view. -
sliceCountis the number of 3D slices accessible to the image view.
Description
When this structure is chained to VkImageViewCreateInfo the
sliceOffset field is treated as a Z-offset for the sliced view and
sliceCount specifies the range.
Shader accesses using a Z coordinate of 0 will access the depth slice
corresponding to sliceOffset in the image, and in a shader, the
maximum in-bounds Z coordinate for the view is sliceCount - 1.
A sliced 3D view must only be used with a single mip level.
The slice coordinates are integer coordinates within the
subresourceRange.baseMipLevel used to create the image view.
The effective view depth is equal to extent.depth used to create the
image for this view adjusted by subresourceRange.baseMipLevel as
specified in Image Mip Level Sizing.
Shader access to this image view is only affected by
VkImageViewSlicedCreateInfoEXT if it uses a descriptor of type
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.
For access using any other descriptor type, the contents of
VkImageViewSlicedCreateInfoEXT are ignored; instead, sliceOffset
is treated as being equal to 0, and sliceCount is treated as being
equal to VK_REMAINING_3D_SLICES_EXT.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.