Structures

VkGeometryTrianglesNV

Structure specifying a triangle geometry in a bottom-level acceleration structure

The VkGeometryTrianglesNV structure specifies triangle geometry in a bottom-level acceleration structure and is defined as:

typedef struct VkGeometryTrianglesNV {
    VkStructureType sType;
    const void* pNext;
    VkBuffer vertexData;
    VkDeviceSize vertexOffset;
    uint32_t vertexCount;
    VkDeviceSize vertexStride;
    VkFormat vertexFormat;
    VkBuffer indexData;
    VkDeviceSize indexOffset;
    uint32_t indexCount;
    VkIndexType indexType;
    VkBuffer transformData;
    VkDeviceSize transformOffset;
} VkGeometryTrianglesNV;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • vertexData is the buffer containing vertex data for this geometry.
  • vertexOffset is the offset in bytes within vertexData containing vertex data for this geometry.
  • vertexCount is the number of valid vertices.
  • vertexStride is the stride in bytes between each vertex.
  • vertexFormat is a VkFormat describing the format of each vertex element.
  • indexData is the buffer containing index data for this geometry.
  • indexOffset is the offset in bytes within indexData containing index data for this geometry.
  • indexCount is the number of indices to include in this geometry.
  • indexType is a VkIndexType describing the format of each index.
  • transformData is an optional buffer containing an VkTransformMatrixNV structure defining a transformation to be applied to this geometry.
  • transformOffset is the offset in bytes in transformData of the transform information described above.

If indexType is VK_INDEX_TYPE_NONE_NV, then this structure describes a set of triangles determined by vertexCount. Otherwise, this structure describes a set of indexed triangles determined by indexCount.

Valid Usage

VUID-VkGeometryTrianglesNV-vertexOffset-02428

vertexOffset must be less than the size of vertexData

VUID-VkGeometryTrianglesNV-vertexOffset-02429

vertexOffset must be a multiple of the component size of vertexFormat

VUID-VkGeometryTrianglesNV-vertexFormat-02430

vertexFormat must be one of VK_FORMAT_R32G32B32_SFLOAT, VK_FORMAT_R32G32_SFLOAT, VK_FORMAT_R16G16B16_SFLOAT, VK_FORMAT_R16G16_SFLOAT, VK_FORMAT_R16G16_SNORM, or VK_FORMAT_R16G16B16_SNORM

VUID-VkGeometryTrianglesNV-vertexStride-03818

vertexStride must be less than or equal to 232-1

VUID-VkGeometryTrianglesNV-indexOffset-02431

indexOffset must be less than the size of indexData

VUID-VkGeometryTrianglesNV-indexOffset-02432

indexOffset must be a multiple of the element size of indexType

VUID-VkGeometryTrianglesNV-indexType-02433

indexType must be VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_NV

VUID-VkGeometryTrianglesNV-indexData-02434

indexData must be VK_NULL_HANDLE if indexType is VK_INDEX_TYPE_NONE_NV

VUID-VkGeometryTrianglesNV-indexData-02435

indexData must be a valid VkBuffer handle if indexType is not VK_INDEX_TYPE_NONE_NV

VUID-VkGeometryTrianglesNV-indexCount-02436

indexCount must be 0 if indexType is VK_INDEX_TYPE_NONE_NV

VUID-VkGeometryTrianglesNV-transformOffset-02437

transformOffset must be less than the size of transformData

VUID-VkGeometryTrianglesNV-transformOffset-02438

transformOffset must be a multiple of 16

Valid Usage (Implicit)

VUID-VkGeometryTrianglesNV-sType-sType

sType must be VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV

VUID-VkGeometryTrianglesNV-vertexData-parameter

If vertexData is not VK_NULL_HANDLE, vertexData must be a valid VkBuffer handle

VUID-VkGeometryTrianglesNV-indexData-parameter

If indexData is not VK_NULL_HANDLE, indexData must be a valid VkBuffer handle

VUID-VkGeometryTrianglesNV-transformData-parameter

If transformData is not VK_NULL_HANDLE, transformData must be a valid VkBuffer handle

VUID-VkGeometryTrianglesNV-commonparent

Each of indexData, transformData, and vertexData that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice