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.NativeResource
Structure specifying physical device properties.Description
Note
The value of
apiVersion
may 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. ThepApiVersion
parameter returned byEnumerateInstanceVersion
is the version associated with aVkInstance
and its children, except for aVkPhysicalDevice
and its children.VkPhysicalDeviceProperties
::apiVersion
is the version associated with aVkPhysicalDevice
and its children.The
vendorID
anddeviceID
fields 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
vendorID
is the entity responsible for the most salient characteristics of the underlying implementation of theVkPhysicalDevice
being 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
vendorID
must 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 theVkVendorId
type.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 ofdeviceID
must 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
,GetPhysicalDeviceProperties
Member documentation
apiVersion
– the version of Vulkan supported by the device, encoded as described in Version Numbers.driverVersion
– the vendor-specified version of the driver.vendorID
– a unique identifier for the vendor (see below) of the physical device.deviceID
– a unique identifier for the physical device among devices available from the vendor.deviceType
– aVkPhysicalDeviceType
specifying the type of device.deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]
– a null-terminated UTF-8 string containing the name of the device.pipelineCacheUUID[VK_UUID_SIZE]
– an array of sizeUUID_SIZE
, containing 8-bit values that represent a universally unique identifier for the device.limits
– theVkPhysicalDeviceLimits
structure which specifies device-specific limits of the physical device. See Limits for details.sparseProperties
– theVkPhysicalDeviceSparseProperties
structure which specifies various sparse related properties of the physical device. See Sparse Properties for details.
Layout
struct VkPhysicalDeviceProperties { uint32_t apiVersion; uint32_t driverVersion; uint32_t vendorID; uint32_t deviceID; VkPhysicalDeviceType deviceType; char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; uint8_t pipelineCacheUUID[VK_UUID_SIZE];
VkPhysicalDeviceLimits
limits;VkPhysicalDeviceSparseProperties
sparseProperties; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkPhysicalDeviceProperties.Buffer
An array ofVkPhysicalDeviceProperties
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
APIVERSION
DEVICEID
DEVICENAME
DEVICETYPE
DRIVERVERSION
LIMITS
PIPELINECACHEUUIDThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SPARSEPROPERTIES
VENDORIDThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPhysicalDeviceProperties(java.nio.ByteBuffer container)
Creates aVkPhysicalDeviceProperties
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
apiVersion()
Returns the value of theapiVersion
field.static VkPhysicalDeviceProperties
calloc()
Returns a newVkPhysicalDeviceProperties
instance allocated withmemCalloc
.static VkPhysicalDeviceProperties.Buffer
calloc(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated withmemCalloc
.static VkPhysicalDeviceProperties
callocStack()
Returns a newVkPhysicalDeviceProperties
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceProperties.Buffer
callocStack(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceProperties.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceProperties
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPhysicalDeviceProperties
create()
Returns a newVkPhysicalDeviceProperties
instance allocated withBufferUtils
.static VkPhysicalDeviceProperties.Buffer
create(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated withBufferUtils
.static VkPhysicalDeviceProperties
create(long address)
Returns a newVkPhysicalDeviceProperties
instance for the specified memory address.static VkPhysicalDeviceProperties.Buffer
create(long address, int capacity)
Create aVkPhysicalDeviceProperties.Buffer
instance at the specified memory.static VkPhysicalDeviceProperties
createSafe(long address)
static VkPhysicalDeviceProperties.Buffer
createSafe(long address, int capacity)
int
deviceID()
Returns the value of thedeviceID
field.java.nio.ByteBuffer
deviceName()
Returns aByteBuffer
view of thedeviceName
field.java.lang.String
deviceNameString()
Decodes the null-terminated string stored in thedeviceName
field.int
deviceType()
Returns the value of thedeviceType
field.int
driverVersion()
Returns the value of thedriverVersion
field.VkPhysicalDeviceLimits
limits()
Returns aVkPhysicalDeviceLimits
view of thelimits
field.static VkPhysicalDeviceProperties
malloc()
Returns a newVkPhysicalDeviceProperties
instance allocated withmemAlloc
.static VkPhysicalDeviceProperties.Buffer
malloc(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated withmemAlloc
.static VkPhysicalDeviceProperties
mallocStack()
Returns a newVkPhysicalDeviceProperties
instance allocated on the thread-localMemoryStack
.static VkPhysicalDeviceProperties.Buffer
mallocStack(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the thread-localMemoryStack
.static VkPhysicalDeviceProperties.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the specifiedMemoryStack
.static VkPhysicalDeviceProperties
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties
instance allocated on the specifiedMemoryStack
.static int
napiVersion(long struct)
Unsafe version ofapiVersion()
.static int
ndeviceID(long struct)
Unsafe version ofdeviceID()
.static java.nio.ByteBuffer
ndeviceName(long struct)
Unsafe version ofdeviceName()
.static java.lang.String
ndeviceNameString(long struct)
Unsafe version ofdeviceNameString()
.static int
ndeviceType(long struct)
Unsafe version ofdeviceType()
.static int
ndriverVersion(long struct)
Unsafe version ofdriverVersion()
.static VkPhysicalDeviceLimits
nlimits(long struct)
Unsafe version oflimits()
.static java.nio.ByteBuffer
npipelineCacheUUID(long struct)
Unsafe version ofpipelineCacheUUID()
.static byte
npipelineCacheUUID(long struct, int index)
Unsafe version ofpipelineCacheUUID
.static VkPhysicalDeviceSparseProperties
nsparseProperties(long struct)
Unsafe version ofsparseProperties()
.static int
nvendorID(long struct)
Unsafe version ofvendorID()
.java.nio.ByteBuffer
pipelineCacheUUID()
Returns aByteBuffer
view of thepipelineCacheUUID
field.byte
pipelineCacheUUID(int index)
Returns the value at the specified index of thepipelineCacheUUID
field.int
sizeof()
VkPhysicalDeviceSparseProperties
sparseProperties()
Returns aVkPhysicalDeviceSparseProperties
view of thesparseProperties
field.int
vendorID()
Returns the value of thevendorID
field.
-
-
-
Constructor Detail
-
VkPhysicalDeviceProperties
public VkPhysicalDeviceProperties(java.nio.ByteBuffer container)
Creates aVkPhysicalDeviceProperties
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
-
apiVersion
public int apiVersion()
Returns the value of theapiVersion
field.
-
driverVersion
public int driverVersion()
Returns the value of thedriverVersion
field.
-
vendorID
public int vendorID()
Returns the value of thevendorID
field.
-
deviceID
public int deviceID()
Returns the value of thedeviceID
field.
-
deviceType
public int deviceType()
Returns the value of thedeviceType
field.
-
deviceName
public java.nio.ByteBuffer deviceName()
Returns aByteBuffer
view of thedeviceName
field.
-
deviceNameString
public java.lang.String deviceNameString()
Decodes the null-terminated string stored in thedeviceName
field.
-
pipelineCacheUUID
public java.nio.ByteBuffer pipelineCacheUUID()
Returns aByteBuffer
view of thepipelineCacheUUID
field.
-
pipelineCacheUUID
public byte pipelineCacheUUID(int index)
Returns the value at the specified index of thepipelineCacheUUID
field.
-
limits
public VkPhysicalDeviceLimits limits()
Returns aVkPhysicalDeviceLimits
view of thelimits
field.
-
sparseProperties
public VkPhysicalDeviceSparseProperties sparseProperties()
Returns aVkPhysicalDeviceSparseProperties
view of thesparseProperties
field.
-
malloc
public static VkPhysicalDeviceProperties malloc()
Returns a newVkPhysicalDeviceProperties
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkPhysicalDeviceProperties calloc()
Returns a newVkPhysicalDeviceProperties
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkPhysicalDeviceProperties create()
Returns a newVkPhysicalDeviceProperties
instance allocated withBufferUtils
.
-
create
public static VkPhysicalDeviceProperties create(long address)
Returns a newVkPhysicalDeviceProperties
instance for the specified memory address.
-
createSafe
@Nullable public static VkPhysicalDeviceProperties createSafe(long address)
-
malloc
public static VkPhysicalDeviceProperties.Buffer malloc(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkPhysicalDeviceProperties.Buffer calloc(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPhysicalDeviceProperties.Buffer create(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPhysicalDeviceProperties.Buffer create(long address, int capacity)
Create aVkPhysicalDeviceProperties.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkPhysicalDeviceProperties.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkPhysicalDeviceProperties mallocStack()
Returns a newVkPhysicalDeviceProperties
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkPhysicalDeviceProperties callocStack()
Returns a newVkPhysicalDeviceProperties
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkPhysicalDeviceProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPhysicalDeviceProperties callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkPhysicalDeviceProperties.Buffer mallocStack(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkPhysicalDeviceProperties.Buffer callocStack(int capacity)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkPhysicalDeviceProperties.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkPhysicalDeviceProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPhysicalDeviceProperties.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
-