Class VkPhysicalDeviceProperties
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPhysicalDeviceProperties
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkPhysicalDeviceProperties extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying physical device properties.Description
Note
The value of
apiVersionmay be different than the version returned byEnumerateInstanceVersion; either higher or lower. In such cases, the application must not use functionality that exceeds the version of Vulkan associated with a given object. ThepApiVersionparameter returned byEnumerateInstanceVersionis the version associated with aVkInstanceand its children, except for aVkPhysicalDeviceand its children.VkPhysicalDeviceProperties::apiVersionis the version associated with aVkPhysicalDeviceand its children.Note
The encoding of
driverVersionis implementation-defined. It may not use the same encoding asapiVersion. Applications should follow information from the vendor on how to extract the version information fromdriverVersion.On implementations that claim support for the Roadmap 2022 profile, the major and minor version expressed by
apiVersionmust be at least Vulkan 1.3.The
vendorIDanddeviceIDfields are provided to allow applications to adapt to device characteristics that are not adequately exposed by other Vulkan queries.Note
These may include performance profiles, hardware errata, or other characteristics.
The vendor identified by
vendorIDis the entity responsible for the most salient characteristics of the underlying implementation of theVkPhysicalDevicebeing queried.Note
For example, in the case of a discrete GPU implementation, this should be the GPU chipset vendor. In the case of a hardware accelerator integrated into a system-on-chip (SoC), this should be the supplier of the silicon IP used to create the accelerator.
If the vendor has a PCI vendor ID, the low 16 bits of
vendorIDmust contain that PCI vendor ID, and the remaining bits must be set to zero. Otherwise, the value returned must be a valid Khronos vendor ID, obtained as described in the Vulkan Documentation and Extensions: Procedures and Conventions document in the section “Registering a Vendor ID with Khronos”. Khronos vendor IDs are allocated starting at 0x10000, to distinguish them from the PCI vendor ID namespace. Khronos vendor IDs are symbolically defined in theVkVendorIdtype.The vendor is also responsible for the value returned in
deviceID. If the implementation is driven primarily by a PCI device with a PCI device ID, the low 16 bits ofdeviceIDmust contain that PCI device ID, and the remaining bits must be set to zero. Otherwise, the choice of what values to return may be dictated by operating system or platform policies - but should uniquely identify both the device version and any major configuration options (for example, core count in the case of multicore devices).Note
The same device ID should be used for all physical implementations of that device version and configuration. For example, all uses of a specific silicon IP GPU version and configuration should use the same device ID, even if those uses occur in different SoCs.
See Also
VkPhysicalDeviceLimits,VkPhysicalDeviceProperties2,VkPhysicalDeviceSparseProperties,GetPhysicalDevicePropertiesLayout
struct VkPhysicalDeviceProperties { uint32_tapiVersion(); uint32_tdriverVersion(); uint32_tvendorID(); uint32_tdeviceID(); VkPhysicalDeviceTypedeviceType(); chardeviceName()[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; uint8_tpipelineCacheUUID()[VK_UUID_SIZE];VkPhysicalDeviceLimitslimits();VkPhysicalDeviceSparsePropertiessparseProperties(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkPhysicalDeviceProperties.BufferAn array ofVkPhysicalDevicePropertiesstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intAPIVERSION
DEVICEID
DEVICENAME
DEVICETYPE
DRIVERVERSION
LIMITS
PIPELINECACHEUUIDThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSPARSEPROPERTIES
VENDORIDThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPhysicalDeviceProperties(java.nio.ByteBuffer container)Creates aVkPhysicalDevicePropertiesinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intapiVersion()the version of Vulkan supported by the device, encoded as described in Version Numbers.static VkPhysicalDevicePropertiescalloc()Returns a newVkPhysicalDevicePropertiesinstance allocated withmemCalloc.static VkPhysicalDeviceProperties.Buffercalloc(int capacity)Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated withmemCalloc.static VkPhysicalDeviceProperties.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPhysicalDevicePropertiescalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDevicePropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPhysicalDevicePropertiescallocStack()Deprecated.static VkPhysicalDeviceProperties.BuffercallocStack(int capacity)Deprecated.static VkPhysicalDeviceProperties.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkPhysicalDevicePropertiescallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkPhysicalDevicePropertiescreate()Returns a newVkPhysicalDevicePropertiesinstance allocated withBufferUtils.static VkPhysicalDeviceProperties.Buffercreate(int capacity)Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated withBufferUtils.static VkPhysicalDevicePropertiescreate(long address)Returns a newVkPhysicalDevicePropertiesinstance for the specified memory address.static VkPhysicalDeviceProperties.Buffercreate(long address, int capacity)Create aVkPhysicalDeviceProperties.Bufferinstance at the specified memory.static VkPhysicalDevicePropertiescreateSafe(long address)static VkPhysicalDeviceProperties.BuffercreateSafe(long address, int capacity)intdeviceID()a unique identifier for the physical device among devices available from the vendor.java.nio.ByteBufferdeviceName()an array ofMAX_PHYSICAL_DEVICE_NAME_SIZEcharcontaining a null-terminated UTF-8 string which is the name of the device.java.lang.StringdeviceNameString()an array ofMAX_PHYSICAL_DEVICE_NAME_SIZEcharcontaining a null-terminated UTF-8 string which is the name of the device.intdeviceType()aVkPhysicalDeviceTypespecifying the type of device.intdriverVersion()the vendor-specified version of the driver.VkPhysicalDeviceLimitslimits()theVkPhysicalDeviceLimitsstructure specifying device-specific limits of the physical device.static VkPhysicalDevicePropertiesmalloc()Returns a newVkPhysicalDevicePropertiesinstance allocated withmemAlloc.static VkPhysicalDeviceProperties.Buffermalloc(int capacity)Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated withmemAlloc.static VkPhysicalDeviceProperties.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated on the specifiedMemoryStack.static VkPhysicalDevicePropertiesmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkPhysicalDevicePropertiesinstance allocated on the specifiedMemoryStack.static VkPhysicalDevicePropertiesmallocStack()Deprecated.static VkPhysicalDeviceProperties.BuffermallocStack(int capacity)Deprecated.static VkPhysicalDeviceProperties.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkPhysicalDevicePropertiesmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnapiVersion(long struct)Unsafe version ofapiVersion().static intndeviceID(long struct)Unsafe version ofdeviceID().static java.nio.ByteBufferndeviceName(long struct)Unsafe version ofdeviceName().static java.lang.StringndeviceNameString(long struct)Unsafe version ofdeviceNameString().static intndeviceType(long struct)Unsafe version ofdeviceType().static intndriverVersion(long struct)Unsafe version ofdriverVersion().static VkPhysicalDeviceLimitsnlimits(long struct)Unsafe version oflimits().static java.nio.ByteBuffernpipelineCacheUUID(long struct)Unsafe version ofpipelineCacheUUID().static bytenpipelineCacheUUID(long struct, int index)Unsafe version ofpipelineCacheUUID.static VkPhysicalDeviceSparsePropertiesnsparseProperties(long struct)Unsafe version ofsparseProperties().static intnvendorID(long struct)Unsafe version ofvendorID().java.nio.ByteBufferpipelineCacheUUID()an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device.bytepipelineCacheUUID(int index)an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device.intsizeof()VkPhysicalDeviceSparsePropertiessparseProperties()theVkPhysicalDeviceSparsePropertiesstructure specifying various sparse related properties of the physical device.intvendorID()a unique identifier for the vendor (see below) of the physical device.
-
-
-
Constructor Detail
-
VkPhysicalDeviceProperties
public VkPhysicalDeviceProperties(java.nio.ByteBuffer container)
Creates aVkPhysicalDevicePropertiesinstance 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
-
apiVersion
public int apiVersion()
the version of Vulkan supported by the device, encoded as described in Version Numbers.
-
driverVersion
public int driverVersion()
the vendor-specified version of the driver.
-
vendorID
public int vendorID()
a unique identifier for the vendor (see below) of the physical device.
-
deviceID
public int deviceID()
a unique identifier for the physical device among devices available from the vendor.
-
deviceType
public int deviceType()
aVkPhysicalDeviceTypespecifying the type of device.
-
deviceName, deviceNameString
public java.nio.ByteBuffer deviceName() public java.lang.String deviceNameString()
an array ofMAX_PHYSICAL_DEVICE_NAME_SIZEcharcontaining a null-terminated UTF-8 string which is the name of the device.
-
pipelineCacheUUID
public java.nio.ByteBuffer pipelineCacheUUID() public byte pipelineCacheUUID(int index)
an array ofUUID_SIZEuint8_tvalues representing a universally unique identifier for the device.
-
limits
public VkPhysicalDeviceLimits limits()
theVkPhysicalDeviceLimitsstructure specifying device-specific limits of the physical device. See Limits for details.
-
sparseProperties
public VkPhysicalDeviceSparseProperties sparseProperties()
theVkPhysicalDeviceSparsePropertiesstructure specifying various sparse related properties of the physical device. See Sparse Properties for details.
-
malloc
public static VkPhysicalDeviceProperties malloc()
Returns a newVkPhysicalDevicePropertiesinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPhysicalDeviceProperties calloc()
Returns a newVkPhysicalDevicePropertiesinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPhysicalDeviceProperties create()
Returns a newVkPhysicalDevicePropertiesinstance allocated withBufferUtils.
-
create
public static VkPhysicalDeviceProperties create(long address)
Returns a newVkPhysicalDevicePropertiesinstance for the specified memory address.
-
createSafe
@Nullable public static VkPhysicalDeviceProperties createSafe(long address)
-
malloc
public static VkPhysicalDeviceProperties.Buffer malloc(int capacity)
Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPhysicalDeviceProperties.Buffer calloc(int capacity)
Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPhysicalDeviceProperties.Buffer create(int capacity)
Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPhysicalDeviceProperties.Buffer create(long address, int capacity)
Create aVkPhysicalDeviceProperties.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkPhysicalDeviceProperties.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkPhysicalDeviceProperties mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkPhysicalDeviceProperties callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPhysicalDeviceProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkPhysicalDeviceProperties callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPhysicalDeviceProperties.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkPhysicalDeviceProperties.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPhysicalDeviceProperties.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 VkPhysicalDeviceProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkPhysicalDeviceProperties malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDevicePropertiesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkPhysicalDeviceProperties calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDevicePropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkPhysicalDeviceProperties.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkPhysicalDeviceProperties.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
napiVersion
public static int napiVersion(long struct)
Unsafe version ofapiVersion().
-
ndriverVersion
public static int ndriverVersion(long struct)
Unsafe version ofdriverVersion().
-
nvendorID
public static int nvendorID(long struct)
Unsafe version ofvendorID().
-
ndeviceID
public static int ndeviceID(long struct)
Unsafe version ofdeviceID().
-
ndeviceType
public static int ndeviceType(long struct)
Unsafe version ofdeviceType().
-
ndeviceName
public static java.nio.ByteBuffer ndeviceName(long struct)
Unsafe version ofdeviceName().
-
ndeviceNameString
public static java.lang.String ndeviceNameString(long struct)
Unsafe version ofdeviceNameString().
-
npipelineCacheUUID
public static java.nio.ByteBuffer npipelineCacheUUID(long struct)
Unsafe version ofpipelineCacheUUID().
-
npipelineCacheUUID
public static byte npipelineCacheUUID(long struct, int index)Unsafe version ofpipelineCacheUUID.
-
nlimits
public static VkPhysicalDeviceLimits nlimits(long struct)
Unsafe version oflimits().
-
nsparseProperties
public static VkPhysicalDeviceSparseProperties nsparseProperties(long struct)
Unsafe version ofsparseProperties().
-
-