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.NativeResourceStructure specifying IDs related to the physical device.Description
deviceUUIDmust be immutable for a given device across instances, processes, driver APIs, driver versions, and system reboots.Applications can compare the
driverUUIDvalue 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.deviceUUIDand/ordriverUUIDmust 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
deviceLUIDValidisFALSE, the values ofdeviceLUIDanddeviceNodeMaskare undefined. IfdeviceLUIDValidisTRUEand Vulkan is running on the Windows operating system, the contents ofdeviceLUIDcan be cast to anLUIDobject and must be equal to the locally unique identifier of aIDXGIAdapter1object that corresponds tophysicalDevice. IfdeviceLUIDValidisTRUE,deviceNodeMaskmust contain exactly one bit. If Vulkan is running on an operating system that supports the Direct3D 12 API andphysicalDevicecorresponds to an individual device in a linked device adapter,deviceNodeMaskidentifies the Direct3D 12 node corresponding tophysicalDevice. Otherwise,deviceNodeMaskmust be 1.Note
Although they have identical descriptions,
VkPhysicalDeviceIDProperties::deviceUUIDmay 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::deviceUUIDis 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
Member documentation
sType– the type of this structure.pNext–NULLor 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 beTRUEifdeviceLUIDcontains a valid LUID anddeviceNodeMaskcontains a valid node mask, andFALSEif 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 classVkPhysicalDeviceIDProperties.BufferAn array ofVkPhysicalDeviceIDPropertiesstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDEVICELUID
DEVICELUIDVALID
DEVICENODEMASK
DEVICEUUID
DRIVERUUID
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPhysicalDeviceIDProperties(java.nio.ByteBuffer container)Creates aVkPhysicalDeviceIDPropertiesinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkPhysicalDeviceIDPropertiescalloc()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemCalloc.static VkPhysicalDeviceIDProperties.Buffercalloc(int capacity)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemCalloc.static VkPhysicalDeviceIDPropertiescallocStack()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPhysicalDeviceIDProperties.BuffercallocStack(int capacity)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPhysicalDeviceIDProperties.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPhysicalDeviceIDPropertiescallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPhysicalDeviceIDPropertiescreate()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withBufferUtils.static VkPhysicalDeviceIDProperties.Buffercreate(int capacity)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withBufferUtils.static VkPhysicalDeviceIDPropertiescreate(long address)Returns a newVkPhysicalDeviceIDPropertiesinstance for the specified memory address.static VkPhysicalDeviceIDProperties.Buffercreate(long address, int capacity)Create aVkPhysicalDeviceIDProperties.Bufferinstance at the specified memory.static VkPhysicalDeviceIDPropertiescreateSafe(long address)static VkPhysicalDeviceIDProperties.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdeviceLUID()Returns aByteBufferview of thedeviceLUIDfield.bytedeviceLUID(int index)Returns the value at the specified index of thedeviceLUIDfield.booleandeviceLUIDValid()Returns the value of thedeviceLUIDValidfield.intdeviceNodeMask()Returns the value of thedeviceNodeMaskfield.java.nio.ByteBufferdeviceUUID()Returns aByteBufferview of thedeviceUUIDfield.bytedeviceUUID(int index)Returns the value at the specified index of thedeviceUUIDfield.java.nio.ByteBufferdriverUUID()Returns aByteBufferview of thedriverUUIDfield.bytedriverUUID(int index)Returns the value at the specified index of thedriverUUIDfield.static VkPhysicalDeviceIDPropertiesmalloc()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemAlloc.static VkPhysicalDeviceIDProperties.Buffermalloc(int capacity)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemAlloc.static VkPhysicalDeviceIDPropertiesmallocStack()Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the thread-localMemoryStack.static VkPhysicalDeviceIDProperties.BuffermallocStack(int capacity)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the thread-localMemoryStack.static VkPhysicalDeviceIDProperties.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the specifiedMemoryStack.static VkPhysicalDeviceIDPropertiesmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStack.static java.nio.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 java.nio.ByteBufferndeviceUUID(long struct)Unsafe version ofdeviceUUID().static bytendeviceUUID(long struct, int index)Unsafe version ofdeviceUUID.static java.nio.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()Returns the value of thepNextfield.VkPhysicalDeviceIDPropertiespNext(long value)Sets the specified value to thepNextfield.VkPhysicalDeviceIDPropertiesset(int sType, long pNext)Initializes this struct with the specified values.VkPhysicalDeviceIDPropertiesset(VkPhysicalDeviceIDProperties src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkPhysicalDeviceIDPropertiessType(int value)Sets the specified value to thesTypefield.
-
-
-
Constructor Detail
-
VkPhysicalDeviceIDProperties
public VkPhysicalDeviceIDProperties(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
deviceUUID
public java.nio.ByteBuffer deviceUUID()
Returns aByteBufferview of thedeviceUUIDfield.
-
deviceUUID
public byte deviceUUID(int index)
Returns the value at the specified index of thedeviceUUIDfield.
-
driverUUID
public java.nio.ByteBuffer driverUUID()
Returns aByteBufferview of thedriverUUIDfield.
-
driverUUID
public byte driverUUID(int index)
Returns the value at the specified index of thedriverUUIDfield.
-
deviceLUID
public java.nio.ByteBuffer deviceLUID()
Returns aByteBufferview of thedeviceLUIDfield.
-
deviceLUID
public byte deviceLUID(int index)
Returns the value at the specified index of thedeviceLUIDfield.
-
deviceNodeMask
public int deviceNodeMask()
Returns the value of thedeviceNodeMaskfield.
-
deviceLUIDValid
public boolean deviceLUIDValid()
Returns the value of thedeviceLUIDValidfield.
-
sType
public VkPhysicalDeviceIDProperties sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkPhysicalDeviceIDProperties pNext(long value)
Sets the specified value to thepNextfield.
-
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 newVkPhysicalDeviceIDPropertiesinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPhysicalDeviceIDProperties calloc()
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPhysicalDeviceIDProperties create()
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated withBufferUtils.
-
create
public static VkPhysicalDeviceIDProperties create(long address)
Returns a newVkPhysicalDeviceIDPropertiesinstance for the specified memory address.
-
createSafe
@Nullable public static VkPhysicalDeviceIDProperties createSafe(long address)
-
malloc
public static VkPhysicalDeviceIDProperties.Buffer malloc(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPhysicalDeviceIDProperties.Buffer calloc(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPhysicalDeviceIDProperties.Buffer create(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPhysicalDeviceIDProperties.Buffer create(long address, int capacity)
Create aVkPhysicalDeviceIDProperties.Bufferinstance 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 newVkPhysicalDeviceIDPropertiesinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkPhysicalDeviceIDProperties callocStack()
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkPhysicalDeviceIDProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkPhysicalDeviceIDProperties callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceIDPropertiesinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkPhysicalDeviceIDProperties.Buffer callocStack(int capacity)
Returns a newVkPhysicalDeviceIDProperties.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-