VKGETPHYSICALDEVICEP(3)

NAME
vkGetPhysicalDeviceProperties - Returns properties of a physical device.

C SPECIFICATION

    void vkGetPhysicalDeviceProperties(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceProperties*                 pProperties);

PARAMETERS

physicalDevice
    A handle to the physical device.

pProperties
    A pointer to a structure that will be written with the device properties.

DESCRIPTION

vkGetPhysicalDeviceProperties returns the properties of the physical device specified in physicalDevice in the structure pointed to by pProperties. pProperties points to an instance of the VkPhysicalDeviceProperties structure, the definition of which is:

    typedef 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;
    } VkPhysicalDeviceProperties;

The data returned in the pProperties structure contains information about the physical device and the driver associated with it.

The apiVersion member of VkPhysicalDeviceProperties indicates the API version supported by the physical device. Minor revisions of the API are backward compatible whereas major versions of the API may break compatibility. The API version is represented as a 32-bit field where bits 31 - 22 represent the major version, bits 21 - 12 represent the minor version, and bits 11 - 0 represent the patch version.

The driverVersion member represents the vendor-specific version of the driver used to enable the device.

The vendorID and deviceID members contain the PCI vendor and device identifiers, respectively. Note that if the device is not physcially a PCI-compliant device, then the values of vendorID and deviceID are platform dependent and may not be values assigned by the PCI-SIG.

The deviceType member indicates the type of device represented by physicalDevice. deviceType is a member of the VkPhysicalDeviceType enumeration, the definition of which is:

    typedef enum VkPhysicalDeviceType {
        VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
        VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
        VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
        VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
        VK_PHYSICAL_DEVICE_TYPE_CPU = 4,
    } VkPhysicalDeviceType;

When deviceType is VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, then the device is typically one embedded in or tightly coupled with the host CPU that is running the application. When deviceType is VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, then the device is typically a separate physical device connected to the host CPU via a slower interlink such as PCI-Express. If deviceType is VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, then the device is potentially emulated (such a stub device or debugger endpoint), a virtual node in a virtualization environment or otherwise does not fit either category. If the device is running entirely on the CPU, then deviceType will be VK_PHYSICAL_DEVICE_TYPE_CPU. If the device type is unknown or does not fit any of these types, then deviceType may be VK_PHYSICAL_DEVICE_TYPE_OTHER.

The deviceName member of pProperties contains a vendor-supplied human-readable name for the device encoded as a UTF-8 string which is up to VK_MAX_PHYSICAL_DEVICE_NAME_SIZE characters long, including a null-terminator.

pipelineCacheUUID is an array, of size VK_UUID_SIZE, containing 8-bit values that represent a universally unique signature that identifies the hardware and driver combination.

limits is an instance of the VkPhysicalDeviceLimits structure which contains limits on the functionality provided by the device. The definition of VkPhysicalDeviceLimits is:

    typedef struct VkPhysicalDeviceLimits {
        uint32_t              maxImageDimension1D;
        uint32_t              maxImageDimension2D;
        uint32_t              maxImageDimension3D;
        uint32_t              maxImageDimensionCube;
        uint32_t              maxImageArrayLayers;
        uint32_t              maxTexelBufferElements;
        uint32_t              maxUniformBufferRange;
        uint32_t              maxStorageBufferRange;
        uint32_t              maxPushConstantsSize;
        uint32_t              maxMemoryAllocationCount;
        uint32_t              maxSamplerAllocationCount;
        VkDeviceSize          bufferImageGranularity;
        VkDeviceSize          sparseAddressSpaceSize;
        uint32_t              maxBoundDescriptorSets;
        uint32_t              maxPerStageDescriptorSamplers;
        uint32_t              maxPerStageDescriptorUniformBuffers;
        uint32_t              maxPerStageDescriptorStorageBuffers;
        uint32_t              maxPerStageDescriptorSampledImages;
        uint32_t              maxPerStageDescriptorStorageImages;
        uint32_t              maxPerStageDescriptorInputAttachments;
        uint32_t              maxPerStageResources;
        uint32_t              maxDescriptorSetSamplers;
        uint32_t              maxDescriptorSetUniformBuffers;
        uint32_t              maxDescriptorSetUniformBuffersDynamic;
        uint32_t              maxDescriptorSetStorageBuffers;
        uint32_t              maxDescriptorSetStorageBuffersDynamic;
        uint32_t              maxDescriptorSetSampledImages;
        uint32_t              maxDescriptorSetStorageImages;
        uint32_t              maxDescriptorSetInputAttachments;
        uint32_t              maxVertexInputAttributes;
        uint32_t              maxVertexInputBindings;
        uint32_t              maxVertexInputAttributeOffset;
        uint32_t              maxVertexInputBindingStride;
        uint32_t              maxVertexOutputComponents;
        uint32_t              maxTessellationGenerationLevel;
        uint32_t              maxTessellationPatchSize;
        uint32_t              maxTessellationControlPerVertexInputComponents;
        uint32_t              maxTessellationControlPerVertexOutputComponents;
        uint32_t              maxTessellationControlPerPatchOutputComponents;
        uint32_t              maxTessellationControlTotalOutputComponents;
        uint32_t              maxTessellationEvaluationInputComponents;
        uint32_t              maxTessellationEvaluationOutputComponents;
        uint32_t              maxGeometryShaderInvocations;
        uint32_t              maxGeometryInputComponents;
        uint32_t              maxGeometryOutputComponents;
        uint32_t              maxGeometryOutputVertices;
        uint32_t              maxGeometryTotalOutputComponents;
        uint32_t              maxFragmentInputComponents;
        uint32_t              maxFragmentOutputAttachments;
        uint32_t              maxFragmentDualSrcAttachments;
        uint32_t              maxFragmentCombinedOutputResources;
        uint32_t              maxComputeSharedMemorySize;
        uint32_t              maxComputeWorkGroupCount[3];
        uint32_t              maxComputeWorkGroupInvocations;
        uint32_t              maxComputeWorkGroupSize[3];
        uint32_t              subPixelPrecisionBits;
        uint32_t              subTexelPrecisionBits;
        uint32_t              mipmapPrecisionBits;
        uint32_t              maxDrawIndexedIndexValue;
        uint32_t              maxDrawIndirectCount;
        float                 maxSamplerLodBias;
        float                 maxSamplerAnisotropy;
        uint32_t              maxViewports;
        uint32_t              maxViewportDimensions[2];
        float                 viewportBoundsRange[2];
        uint32_t              viewportSubPixelBits;
        size_t                minMemoryMapAlignment;
        VkDeviceSize          minTexelBufferOffsetAlignment;
        VkDeviceSize          minUniformBufferOffsetAlignment;
        VkDeviceSize          minStorageBufferOffsetAlignment;
        int32_t               minTexelOffset;
        uint32_t              maxTexelOffset;
        int32_t               minTexelGatherOffset;
        uint32_t              maxTexelGatherOffset;
        float                 minInterpolationOffset;
        float                 maxInterpolationOffset;
        uint32_t              subPixelInterpolationOffsetBits;
        uint32_t              maxFramebufferWidth;
        uint32_t              maxFramebufferHeight;
        uint32_t              maxFramebufferLayers;
        VkSampleCountFlags    framebufferColorSampleCounts;
        VkSampleCountFlags    framebufferDepthSampleCounts;
        VkSampleCountFlags    framebufferStencilSampleCounts;
        VkSampleCountFlags    framebufferNoAttachmentsSampleCounts;
        uint32_t              maxColorAttachments;
        VkSampleCountFlags    sampledImageColorSampleCounts;
        VkSampleCountFlags    sampledImageIntegerSampleCounts;
        VkSampleCountFlags    sampledImageDepthSampleCounts;
        VkSampleCountFlags    sampledImageStencilSampleCounts;
        VkSampleCountFlags    storageImageSampleCounts;
        uint32_t              maxSampleMaskWords;
        VkBool32              timestampComputeAndGraphics;
        float                 timestampPeriod;
        uint32_t              maxClipDistances;
        uint32_t              maxCullDistances;
        uint32_t              maxCombinedClipAndCullDistances;
        uint32_t              discreteQueuePriorities;
        float                 pointSizeRange[2];
        float                 lineWidthRange[2];
        float                 pointSizeGranularity;
        float                 lineWidthGranularity;
        VkBool32              strictLines;
        VkBool32              standardSampleLocations;
        VkDeviceSize          optimalBufferCopyOffsetAlignment;
        VkDeviceSize          optimalBufferCopyRowPitchAlignment;
        VkDeviceSize          nonCoherentAtomSize;
    } VkPhysicalDeviceLimits;

VALID USAGE

    • physicalDevice must be a valid VkPhysicalDevice handle

    • pProperties must be a pointer to a VkPhysicalDeviceProperties structure

SEE ALSO

vkGetPhysicalDeviceFeatures, vkGetPhysicalDeviceProperties

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.