SPIR-V Built-In
InstanceCustomIndexKHR
Custom index associated with an intersected instance
InstanceCustomIndexKHR
A variable decorated with the InstanceCustomIndexKHR decoration will
contain the application-defined value of the instance that intersects the
current ray.
This variable contains the value that was specified in
VkAccelerationStructureInstanceKHR::instanceCustomIndex for the
current acceleration structure instance in the lower 24 bits and the upper 8
bits will be zero.
Valid Usage
VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04251
The InstanceCustomIndexKHR decoration must be used only within the
IntersectionKHR, AnyHitKHR, or ClosestHitKHR
Execution Model
VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04252
The variable decorated with InstanceCustomIndexKHR must be
declared using the Input Storage Class
VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04253
The variable decorated with InstanceCustomIndexKHR must be
declared as a scalar 32-bit integer value