Function Prototype
vkGetAccelerationStructureHandleNV
Get opaque acceleration structure handle
To allow constructing geometry instances with device code if desired, we need to be able to query an opaque handle for an acceleration structure. This handle is a value of 8 bytes. To get this handle, call:
VkResult vkGetAccelerationStructureHandleNV(
VkDevice device,
VkAccelerationStructureNV accelerationStructure,
size_t dataSize,
void* pData);
device
is the logical device that owns the acceleration structures.accelerationStructure
is the acceleration structure.dataSize
is the size in bytes of the buffer pointed to bypData
.pData
is a pointer to an application-allocated buffer where the results will be written.
Valid Usage
VUID-vkGetAccelerationStructureHandleNV-dataSize-02240
dataSize
must be large enough to contain the result of the query,
as described above
VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-02787
accelerationStructure
must be bound completely and contiguously
to a single VkDeviceMemory
object via
vkBindAccelerationStructureMemoryNV
Valid Usage (Implicit)
VUID-vkGetAccelerationStructureHandleNV-device-parameter
device
must be a valid VkDevice handle
VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-parameter
accelerationStructure
must be a valid VkAccelerationStructureNV handle
VUID-vkGetAccelerationStructureHandleNV-pData-parameter
pData
must be a valid pointer to an array of dataSize
bytes
VUID-vkGetAccelerationStructureHandleNV-dataSize-arraylength
dataSize
must be greater than 0
VUID-vkGetAccelerationStructureHandleNV-accelerationStructure-parent
accelerationStructure
must have been created, allocated, or retrieved from device