Class VkPhysicalDeviceIDProperties
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPhysicalDeviceIDProperties
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkPhysicalDeviceIDPropertiesKHR
public class VkPhysicalDeviceIDProperties extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying IDs related to the physical device.Description
deviceUUID
must be immutable for a given device across instances, processes, driver APIs, driver versions, and system reboots.Applications can compare the
driverUUID
value across instance and process boundaries, and can make similar queries in external APIs to determine whether they are capable of sharing memory objects and resources using them with the device.deviceUUID
and/ordriverUUID
must be used to determine whether a particular external object can be shared between driver components, where such a restriction exists as defined in the compatibility table for the particular object type:- External memory handle types compatibility
- External semaphore handle types compatibility
- External fence handle types compatibility
If
deviceLUIDValid
isFALSE
, the values ofdeviceLUID
anddeviceNodeMask
are undefined. IfdeviceLUIDValid
isTRUE
and Vulkan is running on the Windows operating system, the contents ofdeviceLUID
can be cast to anLUID
object and must be equal to the locally unique identifier of aIDXGIAdapter1
object that corresponds tophysicalDevice
. IfdeviceLUIDValid
isTRUE
,deviceNodeMask
must contain exactly one bit. If Vulkan is running on an operating system that supports the Direct3D 12 API andphysicalDevice
corresponds to an individual device in a linked device adapter,deviceNodeMask
identifies the Direct3D 12 node corresponding tophysicalDevice
. Otherwise,deviceNodeMask
must be 1.Note
Although they have identical descriptions,
VkPhysicalDeviceIDProperties
::deviceUUID
may differ fromVkPhysicalDeviceProperties2
::pipelineCacheUUID
. The former is intended to identify and correlate devices across API and driver boundaries, while the latter is used to identify a compatible device and driver combination to use when serializing and de-serializing pipeline state.Note
While
VkPhysicalDeviceIDProperties
::deviceUUID
is specified to remain consistent across driver versions and system reboots, it is not intended to be usable as a serializable persistent identifier for a device. It may change when a device is physically added to, removed from, or moved to a different connector in a system while that system is powered down. Further, there is no reasonable way to verify with conformance testing that a given device retains the same UUID in a given system across all driver versions supported in that system. While implementations should make every effort to report consistent device UUIDs across driver versions, applications should avoid relying on the persistence of this value for uses other than identifying compatible devices for external object sharing purposes.Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.deviceUUID[VK_UUID_SIZE]
– an array of sizeUUID_SIZE
, containing 8-bit values that represent a universally unique identifier for the device.driverUUID[VK_UUID_SIZE]
– an array of sizeUUID_SIZE
, containing 8-bit values that represent a universally unique identifier for the driver build in use by the device.deviceLUID[VK_LUID_SIZE]
– an array of sizeLUID_SIZE
, containing 8-bit values that represent a locally unique identifier for the device.deviceNodeMask
– a bitfield identifying the node within a linked device adapter corresponding to the device.deviceLUIDValid
– a boolean value that will beTRUE
ifdeviceLUID
contains a valid LUID anddeviceNodeMask
contains a valid node mask, andFALSE
if they do not.
Layout
struct VkPhysicalDeviceIDProperties { VkStructureType sType; void * pNext; uint8_t deviceUUID[VK_UUID_SIZE]; uint8_t driverUUID[VK_UUID_SIZE]; uint8_t deviceLUID[VK_LUID_SIZE]; uint32_t deviceNodeMask; VkBool32 deviceLUIDValid; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkPhysicalDeviceIDProperties.Buffer
An array ofVkPhysicalDeviceIDProperties
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DEVICELUID
DEVICELUIDVALID
DEVICENODEMASK
DEVICEUUID
DRIVERUUID
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPhysicalDeviceIDProperties(java.nio.ByteBuffer container)
Creates aVkPhysicalDeviceIDProperties
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 VkPhysicalDeviceIDProperties
calloc()
Returns a newVkPhysicalDeviceIDProperties
instance allocated withmemCalloc
.static VkPhysicalDeviceIDProperties.Buffer
calloc(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated withmemCalloc
.static VkPhysicalDeviceIDProperties
callocStack()
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceIDProperties.Buffer
callocStack(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceIDProperties.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceIDProperties
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceIDProperties
create()
Returns a newVkPhysicalDeviceIDProperties
instance allocated withBufferUtils
.static VkPhysicalDeviceIDProperties.Buffer
create(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated withBufferUtils
.static VkPhysicalDeviceIDProperties
create(long address)
Returns a newVkPhysicalDeviceIDProperties
instance for the specified memory address.static VkPhysicalDeviceIDProperties.Buffer
create(long address, int capacity)
Create aVkPhysicalDeviceIDProperties.Buffer
instance at the specified memory.static VkPhysicalDeviceIDProperties
createSafe(long address)
static VkPhysicalDeviceIDProperties.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
deviceLUID()
Returns aByteBuffer
view of thedeviceLUID
field.byte
deviceLUID(int index)
Returns the value at the specified index of thedeviceLUID
field.boolean
deviceLUIDValid()
Returns the value of thedeviceLUIDValid
field.int
deviceNodeMask()
Returns the value of thedeviceNodeMask
field.java.nio.ByteBuffer
deviceUUID()
Returns aByteBuffer
view of thedeviceUUID
field.byte
deviceUUID(int index)
Returns the value at the specified index of thedeviceUUID
field.java.nio.ByteBuffer
driverUUID()
Returns aByteBuffer
view of thedriverUUID
field.byte
driverUUID(int index)
Returns the value at the specified index of thedriverUUID
field.static VkPhysicalDeviceIDProperties
malloc()
Returns a newVkPhysicalDeviceIDProperties
instance allocated withmemAlloc
.static VkPhysicalDeviceIDProperties.Buffer
malloc(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated withmemAlloc
.static VkPhysicalDeviceIDProperties
mallocStack()
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the thread-localMemoryStack
.static VkPhysicalDeviceIDProperties.Buffer
mallocStack(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the thread-localMemoryStack
.static VkPhysicalDeviceIDProperties.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the specifiedMemoryStack
.static VkPhysicalDeviceIDProperties
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the specifiedMemoryStack
.static java.nio.ByteBuffer
ndeviceLUID(long struct)
Unsafe version ofdeviceLUID()
.static byte
ndeviceLUID(long struct, int index)
Unsafe version ofdeviceLUID
.static int
ndeviceLUIDValid(long struct)
Unsafe version ofdeviceLUIDValid()
.static int
ndeviceNodeMask(long struct)
Unsafe version ofdeviceNodeMask()
.static java.nio.ByteBuffer
ndeviceUUID(long struct)
Unsafe version ofdeviceUUID()
.static byte
ndeviceUUID(long struct, int index)
Unsafe version ofdeviceUUID
.static java.nio.ByteBuffer
ndriverUUID(long struct)
Unsafe version ofdriverUUID()
.static byte
ndriverUUID(long struct, int index)
Unsafe version ofdriverUUID
.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.VkPhysicalDeviceIDProperties
pNext(long value)
Sets the specified value to thepNext
field.VkPhysicalDeviceIDProperties
set(int sType, long pNext)
Initializes this struct with the specified values.VkPhysicalDeviceIDProperties
set(VkPhysicalDeviceIDProperties src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkPhysicalDeviceIDProperties
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkPhysicalDeviceIDProperties
public VkPhysicalDeviceIDProperties(java.nio.ByteBuffer container)
Creates aVkPhysicalDeviceIDProperties
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.
-
deviceUUID
public java.nio.ByteBuffer deviceUUID()
Returns aByteBuffer
view of thedeviceUUID
field.
-
deviceUUID
public byte deviceUUID(int index)
Returns the value at the specified index of thedeviceUUID
field.
-
driverUUID
public java.nio.ByteBuffer driverUUID()
Returns aByteBuffer
view of thedriverUUID
field.
-
driverUUID
public byte driverUUID(int index)
Returns the value at the specified index of thedriverUUID
field.
-
deviceLUID
public java.nio.ByteBuffer deviceLUID()
Returns aByteBuffer
view of thedeviceLUID
field.
-
deviceLUID
public byte deviceLUID(int index)
Returns the value at the specified index of thedeviceLUID
field.
-
deviceNodeMask
public int deviceNodeMask()
Returns the value of thedeviceNodeMask
field.
-
deviceLUIDValid
public boolean deviceLUIDValid()
Returns the value of thedeviceLUIDValid
field.
-
sType
public VkPhysicalDeviceIDProperties sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkPhysicalDeviceIDProperties pNext(long value)
Sets the specified value to thepNext
field.
-
set
public VkPhysicalDeviceIDProperties set(int sType, long pNext)
Initializes this struct with the specified values.
-
set
public VkPhysicalDeviceIDProperties set(VkPhysicalDeviceIDProperties src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkPhysicalDeviceIDProperties malloc()
Returns a newVkPhysicalDeviceIDProperties
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkPhysicalDeviceIDProperties calloc()
Returns a newVkPhysicalDeviceIDProperties
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkPhysicalDeviceIDProperties create()
Returns a newVkPhysicalDeviceIDProperties
instance allocated withBufferUtils
.
-
create
public static VkPhysicalDeviceIDProperties create(long address)
Returns a newVkPhysicalDeviceIDProperties
instance for the specified memory address.
-
createSafe
@Nullable public static VkPhysicalDeviceIDProperties createSafe(long address)
-
malloc
public static VkPhysicalDeviceIDProperties.Buffer malloc(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkPhysicalDeviceIDProperties.Buffer calloc(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPhysicalDeviceIDProperties.Buffer create(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPhysicalDeviceIDProperties.Buffer create(long address, int capacity)
Create aVkPhysicalDeviceIDProperties.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkPhysicalDeviceIDProperties.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkPhysicalDeviceIDProperties mallocStack()
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkPhysicalDeviceIDProperties callocStack()
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkPhysicalDeviceIDProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPhysicalDeviceIDProperties callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkPhysicalDeviceIDProperties.Buffer mallocStack(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkPhysicalDeviceIDProperties.Buffer callocStack(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkPhysicalDeviceIDProperties.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkPhysicalDeviceIDProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDProperties.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()
.
-
ndeviceUUID
public static java.nio.ByteBuffer ndeviceUUID(long struct)
Unsafe version ofdeviceUUID()
.
-
ndeviceUUID
public static byte ndeviceUUID(long struct, int index)
Unsafe version ofdeviceUUID
.
-
ndriverUUID
public static java.nio.ByteBuffer ndriverUUID(long struct)
Unsafe version ofdriverUUID()
.
-
ndriverUUID
public static byte ndriverUUID(long struct, int index)
Unsafe version ofdriverUUID
.
-
ndeviceLUID
public static java.nio.ByteBuffer ndeviceLUID(long struct)
Unsafe version ofdeviceLUID()
.
-
ndeviceLUID
public static byte ndeviceLUID(long struct, int index)
Unsafe version ofdeviceLUID
.
-
ndeviceNodeMask
public static int ndeviceNodeMask(long struct)
Unsafe version ofdeviceNodeMask()
.
-
ndeviceLUIDValid
public static int ndeviceLUIDValid(long struct)
Unsafe version ofdeviceLUIDValid()
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
-