Structures

VkAccelerationStructureTrianglesOpacityMicromapKHR

Structure specifying an opacity micromap in a bottom-level acceleration structure

The VkAccelerationStructureTrianglesOpacityMicromapKHR structure is defined as:

typedef struct VkAccelerationStructureTrianglesOpacityMicromapKHR {
    VkStructureType sType;
    void* pNext;
    VkIndexType indexType;
    VkDeviceAddress indexBuffer;
    VkDeviceSize indexStride;
    uint32_t baseTriangle;
    VkAccelerationStructureKHR micromap;
} VkAccelerationStructureTrianglesOpacityMicromapKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • indexType is the type of triangle indices used when indexing this micromap
  • indexBuffer is the address containing the triangle indices
  • indexStride is the byte stride between triangle indices
  • baseTriangle is the base value added to the non-negative triangle indices
  • micromap is the handle to the micromap object to include in this geometry

If VkAccelerationStructureTrianglesOpacityMicromapKHR is included in the pNext chain of a VkAccelerationStructureDenseGeometryFormatTrianglesDataAMDX or VkAccelerationStructureGeometryTrianglesDataKHR structure, that geometry will reference that micromap.

For each triangle in the geometry, the acceleration structure build fetches an index from indexBuffer using indexType and indexStride if present. If indexType is VK_INDEX_TYPE_NONE_KHR, then the index used is the index of the triangle in the geometry.

If that value is the unsigned cast of one of the values from VkOpacityMicromapSpecialIndexKHR then that triangle behaves as described for that special value in Ray Opacity Micromap.

Otherwise that triangle uses the opacity micromap information from micromap at that index plus baseTriangle.

Valid Usage

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexType-11570

indexType must be VK_INDEX_TYPE_UINT8, VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32, or VK_INDEX_TYPE_NONE_KHR

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexBuffer-11571

If indexType is VK_INDEX_TYPE_NONE_KHR, indexBuffermust be 0

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexBuffer-11572

If indexType is not VK_INDEX_TYPE_NONE_KHR, indexBuffer must be a valid VkDeviceAddress

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexStride-11573

If indexType is not VK_INDEX_TYPE_NONE_KHR, indexStride must be a multiple of the size in bytes of indexType

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-indexStride-11574

If indexType is not VK_INDEX_TYPE_NONE_KHR, indexStride must be less than or equal to 232-1

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-geometry-11576

If indexType is VK_INDEX_TYPE_NONE_KHR, for each triangle index in the geometry, index plus baseTriangle must be less than or equal to numTriangles, where numTriangles is given by the sum of all count parameters in the pUsageCounts or ppUsageCounts provided to the micromap’s build command

VUID-VkAccelerationStructureTrianglesOpacityMicromapKHR-micromap-11579

If indexType is VK_INDEX_TYPE_NONE_KHR, micromap must not be VK_NULL_HANDLE

Valid Usage (Implicit)