Class VkPhysicalDeviceIDProperties
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkPhysicalDeviceIDPropertiesKHR
Description
If the VkPhysicalDeviceIDProperties structure is included in the pNext chain of the VkPhysicalDeviceProperties2 structure passed to GetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.
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/or driverUUID 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 is FALSE, the values of deviceLUID and deviceNodeMask are undefined. If deviceLUIDValid is TRUE and Vulkan is running on the Windows operating system, the contents of deviceLUID can be cast to an LUID object and must be equal to the locally unique identifier of a IDXGIAdapter1 object that corresponds to physicalDevice. If deviceLUIDValid is TRUE, deviceNodeMask must contain exactly one bit. If Vulkan is running on an operating system that supports the Direct3D 12 API and physicalDevice corresponds to an individual device in a linked device adapter, deviceNodeMask identifies the Direct3D 12 node corresponding to physicalDevice. Otherwise, deviceNodeMask must be 1.
Note
Although they have identical descriptions, VkPhysicalDeviceIDProperties::deviceUUID may differ from VkPhysicalDeviceProperties2::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.
Implementations should return deviceUUID values which are likely to be unique even in the presence of multiple Vulkan implementations (such as a GPU driver and a software renderer; two drivers for different GPUs; or the same Vulkan driver running on two logically different devices).
Khronos' conformance testing is unable to guarantee that deviceUUID values are actually unique, so implementors should make their own best efforts to ensure this. In particular, hard-coded deviceUUID values, especially all-0 bits, should never be used.
A combination of values unique to the vendor, the driver, and the hardware environment can be used to provide a deviceUUID which is unique to a high degree of certainty. Some possible inputs to such a computation are:
- Information reported by
GetPhysicalDeviceProperties - PCI device ID (if defined)
- PCI bus ID, or similar system configuration information.
- Driver binary checksums.
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)
sTypemust beSTRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkPhysicalDeviceIDProperties(ByteBuffer container) Creates aVkPhysicalDeviceIDPropertiesinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkPhysicalDeviceIDPropertiescalloc()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPhysicalDeviceIDPropertiescalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPhysicalDeviceIDPropertiesDeprecated.callocStack(int capacity) Deprecated.callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkPhysicalDeviceIDPropertiescallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkPhysicalDeviceIDPropertiescreate()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withBufferUtils.create(int capacity) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withBufferUtils.static VkPhysicalDeviceIDPropertiescreate(long address) Returns a newVkPhysicalDeviceIDPropertiesinstance for the specified memory address.create(long address, int capacity) Create aVkPhysicalDeviceIDProperties.Bufferinstance at the specified memory.static @Nullable VkPhysicalDeviceIDPropertiescreateSafe(long address) static @Nullable VkPhysicalDeviceIDProperties.BuffercreateSafe(long address, int capacity) an array ofLUID_SIZEuint8_tvalues representing a locally unique identifier for the device.bytedeviceLUID(int index) an array ofLUID_SIZEuint8_tvalues representing a locally unique identifier for the device.booleanintauint32_tbitfield identifying the node within a linked device adapter corresponding to the device.an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device.bytedeviceUUID(int index) an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device.an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the driver build in use by the device.bytedriverUUID(int index) an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the driver build in use by the device.static VkPhysicalDeviceIDPropertiesmalloc()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the specifiedMemoryStack.static VkPhysicalDeviceIDPropertiesmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStack.static VkPhysicalDeviceIDPropertiesDeprecated.mallocStack(int capacity) Deprecated.mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkPhysicalDeviceIDPropertiesmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static ByteBufferndeviceLUID(long struct) Unsafe version ofdeviceLUID().static bytendeviceLUID(long struct, int index) Unsafe version ofdeviceLUID.static intndeviceLUIDValid(long struct) Unsafe version ofdeviceLUIDValid().static intndeviceNodeMask(long struct) Unsafe version ofdeviceNodeMask().static ByteBufferndeviceUUID(long struct) Unsafe version ofdeviceUUID().static bytendeviceUUID(long struct, int index) Unsafe version ofdeviceUUID.static ByteBufferndriverUUID(long struct) Unsafe version ofdriverUUID().static bytendriverUUID(long struct, int index) Unsafe version ofdriverUUID.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.set(int sType, long pNext) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIESvalue to thesType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
DEVICEUUID
public static final int DEVICEUUIDThe struct member offsets. -
DRIVERUUID
public static final int DRIVERUUIDThe struct member offsets. -
DEVICELUID
public static final int DEVICELUIDThe struct member offsets. -
DEVICENODEMASK
public static final int DEVICENODEMASKThe struct member offsets. -
DEVICELUIDVALID
public static final int DEVICELUIDVALIDThe struct member offsets.
-
-
Constructor Details
-
VkPhysicalDeviceIDProperties
Creates aVkPhysicalDeviceIDPropertiesinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkPhysicalDeviceIDProperties>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
deviceUUID
an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device. -
deviceUUID
public byte deviceUUID(int index) an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device. -
driverUUID
an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the driver build in use by the device. -
driverUUID
public byte driverUUID(int index) an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the driver build in use by the device. -
deviceLUID
an array ofLUID_SIZEuint8_tvalues representing a locally unique identifier for the device. -
deviceLUID
public byte deviceLUID(int index) an array ofLUID_SIZEuint8_tvalues representing a locally unique identifier for the device. -
deviceNodeMask
public int deviceNodeMask()auint32_tbitfield identifying the node within a linked device adapter corresponding to the device. -
deviceLUIDValid
public boolean deviceLUIDValid() -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIESvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withBufferUtils. -
create
Returns a newVkPhysicalDeviceIDPropertiesinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkPhysicalDeviceIDProperties.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
@Deprecated public static VkPhysicalDeviceIDProperties mallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
@Deprecated public static VkPhysicalDeviceIDProperties callocStack(org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkPhysicalDeviceIDProperties.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkPhysicalDeviceIDProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkPhysicalDeviceIDProperties.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkPhysicalDeviceIDProperties.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
ndeviceUUID
Unsafe version ofdeviceUUID(). -
ndeviceUUID
public static byte ndeviceUUID(long struct, int index) Unsafe version ofdeviceUUID. -
ndriverUUID
Unsafe version ofdriverUUID(). -
ndriverUUID
public static byte ndriverUUID(long struct, int index) Unsafe version ofdriverUUID. -
ndeviceLUID
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.
-