Class VkBufferDeviceAddressCreateInfoEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBufferDeviceAddressCreateInfoEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkBufferDeviceAddressCreateInfoEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Request a specific address for a buffer.Description
If
deviceAddress
is zero, no specific address is requested.If
deviceAddress
is not zero,deviceAddress
must be an address retrieved from an identically created buffer on the same implementation. The buffer must also be bound to an identically createdVkDeviceMemory
object.If this structure is not present, it is as if
deviceAddress
is zero.Apps should avoid creating buffers with app-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of
ERROR_INVALID_DEVICE_ADDRESS_EXT
errors.Note
The expected usage for this is that a trace capture/replay tool will add the
BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
flag to all buffers that useBUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT
, and during capture will save the queried 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_EXT
, to avoid address space allocation conflicts.Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.deviceAddress
– the device address requested for the buffer.
Layout
struct VkBufferDeviceAddressCreateInfoEXT { VkStructureType sType; void const * pNext; VkDeviceAddress deviceAddress; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkBufferDeviceAddressCreateInfoEXT.Buffer
An array ofVkBufferDeviceAddressCreateInfoEXT
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DEVICEADDRESS
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkBufferDeviceAddressCreateInfoEXT(java.nio.ByteBuffer container)
Creates aVkBufferDeviceAddressCreateInfoEXT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkBufferDeviceAddressCreateInfoEXT
calloc()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated withmemCalloc
.static VkBufferDeviceAddressCreateInfoEXT.Buffer
calloc(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated withmemCalloc
.static VkBufferDeviceAddressCreateInfoEXT
callocStack()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferDeviceAddressCreateInfoEXT.Buffer
callocStack(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferDeviceAddressCreateInfoEXT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferDeviceAddressCreateInfoEXT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferDeviceAddressCreateInfoEXT
create()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated withBufferUtils
.static VkBufferDeviceAddressCreateInfoEXT.Buffer
create(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated withBufferUtils
.static VkBufferDeviceAddressCreateInfoEXT
create(long address)
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance for the specified memory address.static VkBufferDeviceAddressCreateInfoEXT.Buffer
create(long address, int capacity)
Create aVkBufferDeviceAddressCreateInfoEXT.Buffer
instance at the specified memory.static VkBufferDeviceAddressCreateInfoEXT
createSafe(long address)
static VkBufferDeviceAddressCreateInfoEXT.Buffer
createSafe(long address, int capacity)
long
deviceAddress()
Returns the value of thedeviceAddress
field.VkBufferDeviceAddressCreateInfoEXT
deviceAddress(long value)
Sets the specified value to thedeviceAddress
field.static VkBufferDeviceAddressCreateInfoEXT
malloc()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated withmemAlloc
.static VkBufferDeviceAddressCreateInfoEXT.Buffer
malloc(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated withmemAlloc
.static VkBufferDeviceAddressCreateInfoEXT
mallocStack()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the thread-localMemoryStack
.static VkBufferDeviceAddressCreateInfoEXT.Buffer
mallocStack(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
.static VkBufferDeviceAddressCreateInfoEXT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
.static VkBufferDeviceAddressCreateInfoEXT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the specifiedMemoryStack
.static long
ndeviceAddress(long struct)
Unsafe version ofdeviceAddress()
.static void
ndeviceAddress(long struct, long value)
Unsafe version ofdeviceAddress
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.long
pNext()
Returns the value of thepNext
field.VkBufferDeviceAddressCreateInfoEXT
pNext(long value)
Sets the specified value to thepNext
field.VkBufferDeviceAddressCreateInfoEXT
set(int sType, long pNext, long deviceAddress)
Initializes this struct with the specified values.VkBufferDeviceAddressCreateInfoEXT
set(VkBufferDeviceAddressCreateInfoEXT src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkBufferDeviceAddressCreateInfoEXT
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkBufferDeviceAddressCreateInfoEXT
public VkBufferDeviceAddressCreateInfoEXT(java.nio.ByteBuffer container)
Creates aVkBufferDeviceAddressCreateInfoEXT
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
deviceAddress
public long deviceAddress()
Returns the value of thedeviceAddress
field.
-
sType
public VkBufferDeviceAddressCreateInfoEXT sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkBufferDeviceAddressCreateInfoEXT pNext(long value)
Sets the specified value to thepNext
field.
-
deviceAddress
public VkBufferDeviceAddressCreateInfoEXT deviceAddress(long value)
Sets the specified value to thedeviceAddress
field.
-
set
public VkBufferDeviceAddressCreateInfoEXT set(int sType, long pNext, long deviceAddress)
Initializes this struct with the specified values.
-
set
public VkBufferDeviceAddressCreateInfoEXT set(VkBufferDeviceAddressCreateInfoEXT src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkBufferDeviceAddressCreateInfoEXT malloc()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkBufferDeviceAddressCreateInfoEXT calloc()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkBufferDeviceAddressCreateInfoEXT create()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated withBufferUtils
.
-
create
public static VkBufferDeviceAddressCreateInfoEXT create(long address)
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance for the specified memory address.
-
createSafe
@Nullable public static VkBufferDeviceAddressCreateInfoEXT createSafe(long address)
-
malloc
public static VkBufferDeviceAddressCreateInfoEXT.Buffer malloc(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkBufferDeviceAddressCreateInfoEXT.Buffer calloc(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferDeviceAddressCreateInfoEXT.Buffer create(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferDeviceAddressCreateInfoEXT.Buffer create(long address, int capacity)
Create aVkBufferDeviceAddressCreateInfoEXT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkBufferDeviceAddressCreateInfoEXT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkBufferDeviceAddressCreateInfoEXT mallocStack()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkBufferDeviceAddressCreateInfoEXT callocStack()
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkBufferDeviceAddressCreateInfoEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkBufferDeviceAddressCreateInfoEXT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkBufferDeviceAddressCreateInfoEXT.Buffer mallocStack(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkBufferDeviceAddressCreateInfoEXT.Buffer callocStack(int capacity)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkBufferDeviceAddressCreateInfoEXT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkBufferDeviceAddressCreateInfoEXT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkBufferDeviceAddressCreateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType()
.
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext()
.
-
ndeviceAddress
public static long ndeviceAddress(long struct)
Unsafe version ofdeviceAddress()
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
ndeviceAddress
public static void ndeviceAddress(long struct, long value)
Unsafe version ofdeviceAddress
.
-
-