public class KHRBufferDeviceAddress
extends java.lang.Object
PhysicalStorageBuffer storage class in the GL_EXT_buffer_reference GLSL extension and SPV_KHR_physical_storage_buffer SPIR-V extension.
This extension also allows opaque addresses for buffers and memory objects to be queried and later supplied by a trace capture and replay tool, so that addresses used at replay time match the addresses used when the trace was captured. To enable tools to insert these queries, new memory allocation flags must be specified for memory objects that will be bound to buffers accessed via the PhysicalStorageBuffer storage class.
VK_KHR_buffer_device_addressVK_KHR_get_physical_device_properties2| Modifier and Type | Method and Description |
|---|---|
static long |
nvkGetBufferDeviceAddressKHR(org.lwjgl.vulkan.VkDevice device,
long pInfo)
Unsafe version of:
GetBufferDeviceAddressKHR |
static long |
nvkGetBufferOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
long pInfo)
Unsafe version of:
GetBufferOpaqueCaptureAddressKHR |
static long |
nvkGetDeviceMemoryOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
long pInfo)
Unsafe version of:
GetDeviceMemoryOpaqueCaptureAddressKHR |
static long |
vkGetBufferDeviceAddressKHR(org.lwjgl.vulkan.VkDevice device,
VkBufferDeviceAddressInfoKHR pInfo)
Query an address of a buffer.
|
static long |
vkGetBufferOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
VkBufferDeviceAddressInfoKHR pInfo)
Query an opaque capture address of a buffer.
|
static long |
vkGetDeviceMemoryOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
VkDeviceMemoryOpaqueCaptureAddressInfoKHR pInfo)
Query an opaque capture address of a memory object.
|
public static final int VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION
public static final java.lang.String VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR
VkStructureType.
public static final int VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR
VkBufferUsageFlagBits.public static final int VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
VkBufferCreateFlagBits.public static final int VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR
VkMemoryAllocateFlagBits.
public static final int VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
VkMemoryAllocateFlagBits.
public static final int VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR
VkResult.public static long nvkGetBufferDeviceAddressKHR(org.lwjgl.vulkan.VkDevice device,
long pInfo)
GetBufferDeviceAddressKHRpublic static long vkGetBufferDeviceAddressKHR(org.lwjgl.vulkan.VkDevice device,
VkBufferDeviceAddressInfoKHR pInfo)
To query a 64-bit buffer device address value through which buffer memory can be accessed in a shader, call:
VkDeviceAddress vkGetBufferDeviceAddressKHR(
VkDevice device,
const VkBufferDeviceAddressInfoKHR* pInfo);
or the equivalent command
VkDeviceAddress vkGetBufferDeviceAddressEXT(
VkDevice device,
const VkBufferDeviceAddressInfoKHR* pInfo);
The 64-bit return value is an address of the start of pInfo->buffer. The address range starting at this value and whose size is the size of the buffer can be used in a shader to access the memory bound to that buffer, using the SPV_KHR_physical_storage_buffer extension or the equivalent SPV_EXT_physical_storage_buffer extension and the PhysicalStorageBuffer storage class. For example, this value can be stored in a uniform buffer, and the shader can read the value from the uniform buffer and use it to do a dependent read/write to this buffer. A value of zero is reserved as a "null" pointer and must not be returned as a valid buffer device address. All loads, stores, and atomics in a shader through PhysicalStorageBuffer pointers must access addresses in the address range of some buffer.
If the buffer was created with a non-zero value of VkBufferOpaqueCaptureAddressCreateInfoKHR::opaqueCaptureAddress or VkBufferDeviceAddressCreateInfoEXT::deviceAddress the return value will be the same address that was returned at capture time.
VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::bufferDeviceAddress feature must be enableddevice was created with multiple physical devices, then the bufferDeviceAddressMultiDevice or VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::bufferDeviceAddressMultiDevice feature must be enableddevice must be a valid VkDevice handlepInfo must be a valid pointer to a valid VkBufferDeviceAddressInfoKHR structuredevice - the logical device that the buffer was created on.pInfo - a pointer to a VkBufferDeviceAddressInfoKHR structure specifying the buffer to retrieve an address for.public static long nvkGetBufferOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
long pInfo)
GetBufferOpaqueCaptureAddressKHRpublic static long vkGetBufferOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
VkBufferDeviceAddressInfoKHR pInfo)
To query a 64-bit buffer opaque capture address, call:
uint64_t vkGetBufferOpaqueCaptureAddressKHR(
VkDevice device,
const VkBufferDeviceAddressInfoKHR* pInfo);
The 64-bit return value is an opaque capture address of the start of pInfo->buffer.
If the buffer was created with a non-zero value of VkBufferOpaqueCaptureAddressCreateInfoKHR::opaqueCaptureAddress the return value must be the same address.
device was created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enableddevice must be a valid VkDevice handlepInfo must be a valid pointer to a valid VkBufferDeviceAddressInfoKHR structuredevice - the logical device that the buffer was created on.pInfo - a pointer to a VkBufferDeviceAddressInfoKHR structure specifying the buffer to retrieve an address for.public static long nvkGetDeviceMemoryOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
long pInfo)
GetDeviceMemoryOpaqueCaptureAddressKHRpublic static long vkGetDeviceMemoryOpaqueCaptureAddressKHR(org.lwjgl.vulkan.VkDevice device,
VkDeviceMemoryOpaqueCaptureAddressInfoKHR pInfo)
To query a 64-bit opaque capture address value from a memory object, call:
uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR(
VkDevice device,
const VkDeviceMemoryOpaqueCaptureAddressInfoKHR* pInfo);
The 64-bit return value is an opaque address representing the start of pInfo->memory.
If the memory object was allocated with a non-zero value of VkMemoryOpaqueCaptureAddressAllocateInfoKHR::opaqueCaptureAddress, the return value must be the same address.
The expected usage for these opaque addresses is only for trace capture/replay tools to store these addresses in a trace and subsequently specify them during replay.
device was created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enableddevice must be a valid VkDevice handlepInfo must be a valid pointer to a valid VkDeviceMemoryOpaqueCaptureAddressInfoKHR structuredevice - the logical device that the memory object was allocated on.pInfo - a pointer to a VkDeviceMemoryOpaqueCaptureAddressInfoKHR structure specifying the memory object to retrieve an address for.Copyright LWJGL. All Rights Reserved. License terms.