Class EXTBufferDeviceAddress
- java.lang.Object
-
- org.lwjgl.vulkan.EXTBufferDeviceAddress
-
public class EXTBufferDeviceAddress extends java.lang.Object
This extension allows the application to query a 64-bit buffer device address value for a buffer, which can be used to access the buffer memory via thePhysicalStorageBufferEXT
storage class in theGL_EXT_buffer_reference
GLSL extension andSPV_EXT_physical_storage_buffer
SPIR-V extension.It also allows buffer device addresses to be provided by a trace replay tool, so that it matches the address used when the trace was captured.
- Name String
VK_EXT_buffer_device_address
- Extension Type
- Device extension
- Registered Extension Number
- 245
- Revision
- 2
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Contact
- Jeff Bolz jeffbolznv
- Last Modified Date
- 2019-01-06
- IP Status
- No known IP claims.
- Contributors
- Jeff Bolz, NVIDIA
- Neil Henning, AMD
- Tobias Hector, AMD
- Jason Ekstrand, Intel
- Baldur Karlsson, Valve
-
-
Field Summary
Fields Modifier and Type Field Description static int
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
ExtendsVkBufferCreateFlagBits
.static int
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT
ExtendsVkBufferUsageFlagBits
.static int
VK_ERROR_INVALID_DEVICE_ADDRESS_EXT
ExtendsVkResult
.static java.lang.String
VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
The extension name.static int
VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION
The extension specification version.static int
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXTExtendsVkStructureType
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
nvkGetBufferDeviceAddressEXT(VkDevice device, long pInfo)
Unsafe version of:GetBufferDeviceAddressEXT
static long
vkGetBufferDeviceAddressEXT(VkDevice device, VkBufferDeviceAddressInfoEXT pInfo)
Query an address of a buffer.
-
-
-
Field Detail
-
VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION
The extension specification version.
-
VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT
-
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT
ExtendsVkBufferUsageFlagBits
.
-
VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
ExtendsVkBufferCreateFlagBits
.
-
VK_ERROR_INVALID_DEVICE_ADDRESS_EXT
ExtendsVkResult
.
-
-
Method Detail
-
nvkGetBufferDeviceAddressEXT
public static long nvkGetBufferDeviceAddressEXT(VkDevice device, long pInfo)
Unsafe version of:GetBufferDeviceAddressEXT
-
vkGetBufferDeviceAddressEXT
public static long vkGetBufferDeviceAddressEXT(VkDevice device, VkBufferDeviceAddressInfoEXT pInfo)
Query an address of a buffer.C Specification
To query a 64-bit buffer device address value through which buffer memory can be accessed in a shader, call:
VkDeviceAddress vkGetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo);
Description
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 theSPV_EXT_physical_storage_buffer
extension and thePhysicalStorageBufferEXT
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 throughPhysicalStorageBufferEXT
pointers must access addresses in the address range of some buffer.If the buffer was created with a non-zero value of
VkBufferDeviceAddressCreateInfoEXT
::deviceAddress
, the return value will be the same address.Valid Usage
- The bufferDeviceAddress feature must be enabled
- If
device
was created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled
Valid Usage (Implicit)
device
must be a validVkDevice
handlepInfo
must be a valid pointer to a validVkBufferDeviceAddressInfoEXT
structure
See Also
- Parameters:
device
- the logical device that the buffer was created on.pInfo
- a pointer to an instance of theVkBufferDeviceAddressInfoEXT
structure specifying the buffer to retrieve an address for.
-
-