The buffer view has a buffer view usage identifying which descriptor types can be created from it. This usage can be defined by including the VkBufferUsageFlags2CreateInfoKHR structure in the pNext chain, and specifying the usage value there. If this structure is not included, it is equal to the VkBufferCreateInfo::usage value used to create buffer.
offset must be less than the size of bufferrange is not equal to WHOLE_SIZE, range must be greater than 0range is not equal to WHOLE_SIZE, range must be an integer multiple of the texel block size of formatrange is not equal to WHOLE_SIZE, the number of texel buffer elements given by (⌊range / (texel block size)⌋ × (texels per block)) where texel block size and texels per block are as defined in the Compatible Formats table for format, must be less than or equal to VkPhysicalDeviceLimits::maxTexelBufferElementsrange is not equal to WHOLE_SIZE, the sum of offset and range must be less than or equal to the size of bufferrange is equal to WHOLE_SIZE, the number of texel buffer elements given by (⌊(size - offset) / (texel block size)⌋ × (texels per block)) where size is the size of buffer, and texel block size and texels per block are as defined in the Compatible Formats table for format, must be less than or equal to VkPhysicalDeviceLimits::maxTexelBufferElementsbuffer must have been created with a usage value containing at least one of BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, then format features of format must contain FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BITBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, then format features of format must contain FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BITbuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory objecttexelBufferAlignment feature is not enabled, offset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignmenttexelBufferAlignment feature is enabled and if buffer was created with usage containing BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, offset must be a multiple of the lesser of VkPhysicalDeviceTexelBufferAlignmentProperties::storageTexelBufferOffsetAlignmentBytes or, if VkPhysicalDeviceTexelBufferAlignmentProperties::storageTexelBufferOffsetSingleTexelAlignment is TRUE, the size of a texel of the requested format. If the size of a texel is a multiple of three bytes, then the size of a single component of format is used insteadtexelBufferAlignment feature is enabled and if buffer was created with usage containing BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, offset must be a multiple of the lesser of VkPhysicalDeviceTexelBufferAlignmentProperties::uniformTexelBufferOffsetAlignmentBytes or, if VkPhysicalDeviceTexelBufferAlignmentProperties::uniformTexelBufferOffsetSingleTexelAlignment is TRUE, the size of a texel of the requested format. If the size of a texel is a multiple of three bytes, then the size of a single component of format is used insteadpNext chain includes a VkExportMetalObjectCreateInfoEXT structure, its exportObjectType member must be EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXTpNext chain includes a VkBufferUsageFlags2CreateInfoKHR, its usage must not contain any other bit than BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR or BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHRpNext chain includes a VkBufferUsageFlags2CreateInfoKHR, its usage must be a subset of the VkBufferCreateInfo::usage specified or VkBufferUsageFlags2CreateInfoKHR::usage from VkBufferCreateInfo::pNext when creating buffersType must be STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFOpNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBufferUsageFlags2CreateInfoKHR or VkExportMetalObjectCreateInfoEXTsType value of each struct in the pNext chain must be unique, with the exception of structures of type VkExportMetalObjectCreateInfoEXTflags must be 0buffer must be a valid VkBuffer handleformat must be a valid VkFormat value
struct VkBufferViewCreateInfo {
VkStructureType sType;
void const * pNext;
VkBufferViewCreateFlags flags;
VkBuffer buffer;
VkFormat format;
VkDeviceSize offset;
VkDeviceSize range;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkBufferViewCreateInfo.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BUFFER
The struct member offsets. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | FORMAT
The struct member offsets. |
| public static final int | OFFSET
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | RANGE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkBufferViewCreateInfo(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkBufferViewCreateInfo | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkBufferViewCreateInfo. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo. | |
| public static VkBufferViewCreateInfo. | |
| protected VkBufferViewCreateInfo | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo. | create(int
the buffer capacity capacity)Returns a new |
| public static VkBufferViewCreateInfo. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo. | |
| public int | |
| public VkBufferViewCreateInfo | |
| public int | |
| public VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkBufferViewCreateInfo | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkBufferViewCreateInfo. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo | |
| public static VkBufferViewCreateInfo. | |
| public static VkBufferViewCreateInfo. | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public long | |
| public VkBufferViewCreateInfo | |
| public long | |
| public VkBufferViewCreateInfo | |
| public VkBufferViewCreateInfo | pNext(VkBufferUsageFlags2CreateInfoKHR value)
Prepends the specified |
| public VkBufferViewCreateInfo | pNext(VkExportMetalObjectCreateInfoEXT value)
Prepends the specified |
| public long | |
| public VkBufferViewCreateInfo | |
| public VkBufferViewCreateInfo | set(int sType, long pNext, int flags, long buffer, int format, long offset, long range)
Initializes this struct with the specified values. |
| public VkBufferViewCreateInfo | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkBufferViewCreateInfo | |
| public VkBufferViewCreateInfo |