Structures

VkPartitionedAccelerationStructureWriteInstanceDataNV

Structure describing instance data to write in PTLAS

The VkPartitionedAccelerationStructureWriteInstanceDataNV structure is defined as:

typedef struct VkPartitionedAccelerationStructureWriteInstanceDataNV {
    VkTransformMatrixKHR transform;
    float explicitAABB[6];
    uint32_t instanceID;
    uint32_t instanceMask;
    uint32_t instanceContributionToHitGroupIndex;
    VkPartitionedAccelerationStructureInstanceFlagsNV instanceFlags;
    uint32_t instanceIndex;
    uint32_t partitionIndex;
    VkDeviceAddress accelerationStructure;
} VkPartitionedAccelerationStructureWriteInstanceDataNV;
  • transform is a VkTransformMatrixKHR structure describing the transformation to be applied to the instance in PTLAS.
  • explicitAABB specifies an axis aligned bounding box representing the maximum extent of any vertex within the used acceleration structure after applying the instance-to-world transformation. The partition translation is not applied to the bounding box.
  • instanceID is a user specified constant assigned to an instance in the PTLAS.
  • instanceMask is a 8-bit mask assigned to the instance that may be used to include or reject group of instances.
  • instanceContributionToHitGroupIndex is a 24-bit per application specified instance value added in the indexing into the shader binding table to fetch the hit group to use.
  • instanceFlags is a bitmask of VkPartitionedAccelerationStructureInstanceFlagsNV specifying flags an instance in the PTLAS.
  • instanceIndex is the index of the instance within the PTLAS.
  • partitionIndex is the index of the partition to which this instance belongs. Global partitions are referred to by VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV.
  • accelerationStructure is the device address of the bottom level acceleration structure or a clustered bottom level acceleration structure that is being instanced. This instance is disabled if the device address is 0.

Valid Usage

VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-instanceMask-10566

The most significant 24 bits of instanceMask must be 0

VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-instanceContributionToHitGroupIndex-10567

The most significant 8 bits of instanceContributionToHitGroupIndexmust be 0

VUID-VkPartitionedAccelerationStructureWriteInstanceDataNV-explicitAABB-10570

explicitAABB must be a valid bounding box if instance was created with flag VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV set