If deviceAddress is zero, no specific address is requested.
If deviceAddress is not zero, deviceAddress must be an address retrieved from an identically created acceleration structure on the same implementation. The acceleration structure must also be placed on an identically created buffer and at the same offset.
Applications should avoid creating acceleration structures with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR errors.
The expected usage for this is that a trace capture/replay tool will add the BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers that use BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and will add BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as storage for an acceleration structure where deviceAddress is not zero. This also means that the tool will need to add MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow the flag to be set where the application may not have otherwise required it. During capture the tool will save the queried opaque device addresses in the trace. During replay, the buffers will be created specifying the original address so any address values stored in the trace data will remain valid.
Implementations are expected to separate such buffers in the GPU address space so normal allocations will avoid using these addresses. Apps/tools should avoid mixing app-provided and implementation-provided addresses for buffers created with BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address space allocation conflicts.
Applications should create an acceleration structure with a specific VkAccelerationStructureTypeKHR other than ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is intended to be used by API translation layers. This can be used at acceleration structure creation time in cases where the actual acceleration structure type (top or bottom) is not yet known. The actual acceleration structure type must be specified as ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR when the build is performed.
If the acceleration structure will be the target of a build operation, the required size for an acceleration structure can be queried with GetAccelerationStructureBuildSizesKHR. If the acceleration structure is going to be the target of a compacting copy, CmdWriteAccelerationStructuresPropertiesKHR or WriteAccelerationStructuresPropertiesKHR can be used to obtain the compacted size required.
If the acceleration structure will be the target of a build operation with BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV it must include ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV in createFlags and include VkAccelerationStructureMotionInfoNV as an extension structure in pNext with the number of instances as metadata for the object.
deviceAddress is not zero, createFlags must include ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHRcreateFlags includes ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, VkPhysicalDeviceAccelerationStructureFeaturesKHR::accelerationStructureCaptureReplay must be TRUEbuffer must have been created with a usage value containing BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHRbuffer must not have been created with BUFFER_CREATE_SPARSE_RESIDENCY_BIToffset and size must be less than the size of bufferoffset must be a multiple of 256 bytesACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV is set in createFlags and type is ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, one member of the pNext chain must be a pointer to a valid instance of VkAccelerationStructureMotionInfoNVVkAccelerationStructureGeometryMotionTrianglesDataNV then createFlags must contain ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NVcreateFlags includes ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the descriptorBufferCaptureReplay feature must be enabledpNext chain includes a VkOpaqueCaptureDescriptorDataCreateInfoEXT structure, createFlags must contain ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXTsType must be STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHRpNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkAccelerationStructureMotionInfoNV or VkOpaqueCaptureDescriptorDataCreateInfoEXTsType value of each struct in the pNext chain must be uniquecreateFlags must be a valid combination of VkAccelerationStructureCreateFlagBitsKHR valuesbuffer must be a valid VkBuffer handletype must be a valid VkAccelerationStructureTypeKHR valueCreateAccelerationStructureKHR
struct VkAccelerationStructureCreateInfoKHR {
VkStructureType sType;
void const * pNext;
VkAccelerationStructureCreateFlagsKHR createFlags;
VkBuffer buffer;
VkDeviceSize offset;
VkDeviceSize size;
VkAccelerationStructureTypeKHR type;
VkDeviceAddress deviceAddress;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkAccelerationStructureCreateInfoKHR.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BUFFER
The struct member offsets. |
| public static final int | CREATEFLAGS
The struct member offsets. |
| public static final int | DEVICEADDRESS
The struct member offsets. |
| public static final int | OFFSET
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | SIZE
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| public static final int | TYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkAccelerationStructureCreateInfoKHR(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureCreateInfoKHR | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureCreateInfoKHR. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkAccelerationStructureCreateInfoKHR | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR | create(long address)
Returns a new |
| public static VkAccelerationStructureCreateInfoKHR. | create(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureCreateInfoKHR. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public int | createFlags()
a bitmask of |
| public VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR. | |
| public long | deviceAddress()
the device address requested for the acceleration structure if the |
| public VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR | |
| public static VkAccelerationStructureCreateInfoKHR. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureCreateInfoKHR | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureCreateInfoKHR. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public long | offset()
an offset in bytes from the base address of the buffer at which the acceleration structure will be stored, and must be a multiple of 256. |
| public VkAccelerationStructureCreateInfoKHR | |
| public long | |
| public VkAccelerationStructureCreateInfoKHR | |
| public VkAccelerationStructureCreateInfoKHR | pNext(VkAccelerationStructureMotionInfoNV value)
Prepends the specified |
| public VkAccelerationStructureCreateInfoKHR | pNext(VkOpaqueCaptureDescriptorDataCreateInfoEXT value)
Prepends the specified |
| public VkAccelerationStructureCreateInfoKHR | set(int sType, long pNext, int createFlags, long buffer, long offset, long size, int type, long deviceAddress)
Initializes this struct with the specified values. |
| public VkAccelerationStructureCreateInfoKHR | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public long | |
| public VkAccelerationStructureCreateInfoKHR | |
| public int | |
| public int | |
| public VkAccelerationStructureCreateInfoKHR | |
| public VkAccelerationStructureCreateInfoKHR | sType$Default()
Sets the |
| public int | type()
a |
| public VkAccelerationStructureCreateInfoKHR |