Package org.lwjgl.vulkan
Class VkStridedDeviceAddressRegionKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkStridedDeviceAddressRegionKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkStridedDeviceAddressRegionKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a region of device addresses with a stride.Valid Usage
- If
sizeis not zero, all addresses betweendeviceAddressanddeviceAddress + size - 1must be in the buffer device address range of the same buffer - If
sizeis not zero,stridemust be less than or equal to the size of the buffer from whichdeviceAddresswas queried
See Also
CmdTraceRaysIndirectKHR,CmdTraceRaysKHRLayout
struct VkStridedDeviceAddressRegionKHR { VkDeviceAddressdeviceAddress(); VkDeviceSizestride(); VkDeviceSizesize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkStridedDeviceAddressRegionKHR.BufferAn array ofVkStridedDeviceAddressRegionKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDEVICEADDRESS
SIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTRIDEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkStridedDeviceAddressRegionKHR(java.nio.ByteBuffer container)Creates aVkStridedDeviceAddressRegionKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkStridedDeviceAddressRegionKHRcalloc()Returns a newVkStridedDeviceAddressRegionKHRinstance allocated withmemCalloc.static VkStridedDeviceAddressRegionKHR.Buffercalloc(int capacity)Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated withmemCalloc.static VkStridedDeviceAddressRegionKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkStridedDeviceAddressRegionKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkStridedDeviceAddressRegionKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkStridedDeviceAddressRegionKHRcreate()Returns a newVkStridedDeviceAddressRegionKHRinstance allocated withBufferUtils.static VkStridedDeviceAddressRegionKHR.Buffercreate(int capacity)Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated withBufferUtils.static VkStridedDeviceAddressRegionKHRcreate(long address)Returns a newVkStridedDeviceAddressRegionKHRinstance for the specified memory address.static VkStridedDeviceAddressRegionKHR.Buffercreate(long address, int capacity)Create aVkStridedDeviceAddressRegionKHR.Bufferinstance at the specified memory.static VkStridedDeviceAddressRegionKHRcreateSafe(long address)static VkStridedDeviceAddressRegionKHR.BuffercreateSafe(long address, int capacity)longdeviceAddress()the device address (as returned by theGetBufferDeviceAddresscommand) at which the region starts, or zero if the region is unused.VkStridedDeviceAddressRegionKHRdeviceAddress(long value)Sets the specified value to thedeviceAddress()field.static VkStridedDeviceAddressRegionKHRmalloc()Returns a newVkStridedDeviceAddressRegionKHRinstance allocated withmemAlloc.static VkStridedDeviceAddressRegionKHR.Buffermalloc(int capacity)Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated withmemAlloc.static VkStridedDeviceAddressRegionKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkStridedDeviceAddressRegionKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkStridedDeviceAddressRegionKHRinstance allocated on the specifiedMemoryStack.static longndeviceAddress(long struct)Unsafe version ofdeviceAddress().static voidndeviceAddress(long struct, long value)Unsafe version ofdeviceAddress.static longnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, long value)Unsafe version ofsize.static longnstride(long struct)Unsafe version ofstride().static voidnstride(long struct, long value)Unsafe version ofstride.VkStridedDeviceAddressRegionKHRset(long deviceAddress, long stride, long size)Initializes this struct with the specified values.VkStridedDeviceAddressRegionKHRset(VkStridedDeviceAddressRegionKHR src)Copies the specified struct data to this struct.longsize()the size in bytes of the region starting atdeviceAddress.VkStridedDeviceAddressRegionKHRsize(long value)Sets the specified value to thesize()field.intsizeof()longstride()the byte stride between consecutive elements.VkStridedDeviceAddressRegionKHRstride(long value)Sets the specified value to thestride()field.
-
-
-
Constructor Detail
-
VkStridedDeviceAddressRegionKHR
public VkStridedDeviceAddressRegionKHR(java.nio.ByteBuffer container)
Creates aVkStridedDeviceAddressRegionKHRinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
deviceAddress
public long deviceAddress()
the device address (as returned by theGetBufferDeviceAddresscommand) at which the region starts, or zero if the region is unused.
-
stride
public long stride()
the byte stride between consecutive elements.
-
size
public long size()
the size in bytes of the region starting atdeviceAddress.
-
deviceAddress
public VkStridedDeviceAddressRegionKHR deviceAddress(long value)
Sets the specified value to thedeviceAddress()field.
-
stride
public VkStridedDeviceAddressRegionKHR stride(long value)
Sets the specified value to thestride()field.
-
size
public VkStridedDeviceAddressRegionKHR size(long value)
Sets the specified value to thesize()field.
-
set
public VkStridedDeviceAddressRegionKHR set(long deviceAddress, long stride, long size)
Initializes this struct with the specified values.
-
set
public VkStridedDeviceAddressRegionKHR set(VkStridedDeviceAddressRegionKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkStridedDeviceAddressRegionKHR malloc()
Returns a newVkStridedDeviceAddressRegionKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkStridedDeviceAddressRegionKHR calloc()
Returns a newVkStridedDeviceAddressRegionKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkStridedDeviceAddressRegionKHR create()
Returns a newVkStridedDeviceAddressRegionKHRinstance allocated withBufferUtils.
-
create
public static VkStridedDeviceAddressRegionKHR create(long address)
Returns a newVkStridedDeviceAddressRegionKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkStridedDeviceAddressRegionKHR createSafe(long address)
-
malloc
public static VkStridedDeviceAddressRegionKHR.Buffer malloc(int capacity)
Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkStridedDeviceAddressRegionKHR.Buffer calloc(int capacity)
Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkStridedDeviceAddressRegionKHR.Buffer create(int capacity)
Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkStridedDeviceAddressRegionKHR.Buffer create(long address, int capacity)
Create aVkStridedDeviceAddressRegionKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkStridedDeviceAddressRegionKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static VkStridedDeviceAddressRegionKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkStridedDeviceAddressRegionKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkStridedDeviceAddressRegionKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkStridedDeviceAddressRegionKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkStridedDeviceAddressRegionKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkStridedDeviceAddressRegionKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkStridedDeviceAddressRegionKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ndeviceAddress
public static long ndeviceAddress(long struct)
Unsafe version ofdeviceAddress().
-
nstride
public static long nstride(long struct)
Unsafe version ofstride().
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
ndeviceAddress
public static void ndeviceAddress(long struct, long value)Unsafe version ofdeviceAddress.
-
nstride
public static void nstride(long struct, long value)Unsafe version ofstride.
-
nsize
public static void nsize(long struct, long value)Unsafe version ofsize.
-
-