1e5c31af7Sopenharmony_ci// Copyright 2015-2021 The Khronos Group, Inc. 2e5c31af7Sopenharmony_ci// 3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ci[[devsandqueues]] 6e5c31af7Sopenharmony_ci= Devices and Queues 7e5c31af7Sopenharmony_ci 8e5c31af7Sopenharmony_ciOnce Vulkan is initialized, devices and queues are the primary objects used 9e5c31af7Sopenharmony_cito interact with a Vulkan implementation. 10e5c31af7Sopenharmony_ci 11e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDevice',desc='Opaque handle to a physical device object',type='handles'] 12e5c31af7Sopenharmony_ci-- 13e5c31af7Sopenharmony_ciVulkan separates the concept of _physical_ and _logical_ devices. 14e5c31af7Sopenharmony_ciA physical device usually represents a single complete implementation of 15e5c31af7Sopenharmony_ciVulkan (excluding instance-level functionality) available to the host, of 16e5c31af7Sopenharmony_ciwhich there are a finite number. 17e5c31af7Sopenharmony_ciA logical device represents an instance of that implementation with its own 18e5c31af7Sopenharmony_cistate and resources independent of other logical devices. 19e5c31af7Sopenharmony_ci 20e5c31af7Sopenharmony_ciPhysical devices are represented by sname:VkPhysicalDevice handles: 21e5c31af7Sopenharmony_ci 22e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkPhysicalDevice.txt[] 23e5c31af7Sopenharmony_ci-- 24e5c31af7Sopenharmony_ci 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci[[devsandqueues-physical-device-enumeration]] 27e5c31af7Sopenharmony_ci== Physical Devices 28e5c31af7Sopenharmony_ci 29e5c31af7Sopenharmony_ci[open,refpage='vkEnumeratePhysicalDevices',desc='Enumerates the physical devices accessible to a Vulkan instance',type='protos'] 30e5c31af7Sopenharmony_ci-- 31e5c31af7Sopenharmony_ciTo retrieve a list of physical device objects representing the physical 32e5c31af7Sopenharmony_cidevices installed in the system, call: 33e5c31af7Sopenharmony_ci 34e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkEnumeratePhysicalDevices.txt[] 35e5c31af7Sopenharmony_ci 36e5c31af7Sopenharmony_ci * pname:instance is a handle to a Vulkan instance previously created with 37e5c31af7Sopenharmony_ci flink:vkCreateInstance. 38e5c31af7Sopenharmony_ci * pname:pPhysicalDeviceCount is a pointer to an integer related to the 39e5c31af7Sopenharmony_ci number of physical devices available or queried, as described below. 40e5c31af7Sopenharmony_ci * pname:pPhysicalDevices is either `NULL` or a pointer to an array of 41e5c31af7Sopenharmony_ci sname:VkPhysicalDevice handles. 42e5c31af7Sopenharmony_ci 43e5c31af7Sopenharmony_ciIf pname:pPhysicalDevices is `NULL`, then the number of physical devices 44e5c31af7Sopenharmony_ciavailable is returned in pname:pPhysicalDeviceCount. 45e5c31af7Sopenharmony_ciOtherwise, pname:pPhysicalDeviceCount must: point to a variable set by the 46e5c31af7Sopenharmony_ciuser to the number of elements in the pname:pPhysicalDevices array, and on 47e5c31af7Sopenharmony_cireturn the variable is overwritten with the number of handles actually 48e5c31af7Sopenharmony_ciwritten to pname:pPhysicalDevices. 49e5c31af7Sopenharmony_ciIf pname:pPhysicalDeviceCount is less than the number of physical devices 50e5c31af7Sopenharmony_ciavailable, at most pname:pPhysicalDeviceCount structures will be written, 51e5c31af7Sopenharmony_ciand ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to 52e5c31af7Sopenharmony_ciindicate that not all the available physical devices were returned. 53e5c31af7Sopenharmony_ci 54e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkEnumeratePhysicalDevices.txt[] 55e5c31af7Sopenharmony_ci-- 56e5c31af7Sopenharmony_ci 57e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceProperties',desc='Returns properties of a physical device',type='protos'] 58e5c31af7Sopenharmony_ci-- 59e5c31af7Sopenharmony_ciTo query general properties of physical devices once enumerated, call: 60e5c31af7Sopenharmony_ci 61e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceProperties.txt[] 62e5c31af7Sopenharmony_ci 63e5c31af7Sopenharmony_ci * pname:physicalDevice is the handle to the physical device whose 64e5c31af7Sopenharmony_ci properties will be queried. 65e5c31af7Sopenharmony_ci * pname:pProperties is a pointer to a slink:VkPhysicalDeviceProperties 66e5c31af7Sopenharmony_ci structure in which properties are returned. 67e5c31af7Sopenharmony_ci 68e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceProperties.txt[] 69e5c31af7Sopenharmony_ci-- 70e5c31af7Sopenharmony_ci 71e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceProperties',desc='Structure specifying physical device properties',type='structs'] 72e5c31af7Sopenharmony_ci-- 73e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceProperties structure is defined as: 74e5c31af7Sopenharmony_ci 75e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceProperties.txt[] 76e5c31af7Sopenharmony_ci 77e5c31af7Sopenharmony_ci * pname:apiVersion is the version of Vulkan supported by the device, 78e5c31af7Sopenharmony_ci encoded as described in <<extendingvulkan-coreversions-versionnumbers>>. 79e5c31af7Sopenharmony_ci * pname:driverVersion is the vendor-specified version of the driver. 80e5c31af7Sopenharmony_ci * pname:vendorID is a unique identifier for the _vendor_ (see below) of 81e5c31af7Sopenharmony_ci the physical device. 82e5c31af7Sopenharmony_ci * pname:deviceID is a unique identifier for the physical device among 83e5c31af7Sopenharmony_ci devices available from the vendor. 84e5c31af7Sopenharmony_ci * pname:deviceType is a elink:VkPhysicalDeviceType specifying the type of 85e5c31af7Sopenharmony_ci device. 86e5c31af7Sopenharmony_ci * pname:deviceName is an array of ename:VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 87e5c31af7Sopenharmony_ci code:char containing a null-terminated UTF-8 string which is the name of 88e5c31af7Sopenharmony_ci the device. 89e5c31af7Sopenharmony_ci * pname:pipelineCacheUUID is an array of ename:VK_UUID_SIZE code:uint8_t 90e5c31af7Sopenharmony_ci values representing a universally unique identifier for the device. 91e5c31af7Sopenharmony_ci * pname:limits is the slink:VkPhysicalDeviceLimits structure specifying 92e5c31af7Sopenharmony_ci device-specific limits of the physical device. 93e5c31af7Sopenharmony_ci See <<limits,Limits>> for details. 94e5c31af7Sopenharmony_ci * pname:sparseProperties is the slink:VkPhysicalDeviceSparseProperties 95e5c31af7Sopenharmony_ci structure specifying various sparse related properties of the physical 96e5c31af7Sopenharmony_ci device. 97e5c31af7Sopenharmony_ci See <<sparsememory-physicalprops,Sparse Properties>> for details. 98e5c31af7Sopenharmony_ci 99e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 100e5c31af7Sopenharmony_ci[NOTE] 101e5c31af7Sopenharmony_ci.Note 102e5c31af7Sopenharmony_ci==== 103e5c31af7Sopenharmony_ciThe value of pname:apiVersion may: be different than the version returned by 104e5c31af7Sopenharmony_ciflink:vkEnumerateInstanceVersion; either higher or lower. 105e5c31af7Sopenharmony_ciIn such cases, the application must: not use functionality that exceeds the 106e5c31af7Sopenharmony_civersion of Vulkan associated with a given object. 107e5c31af7Sopenharmony_ciThe pname:pApiVersion parameter returned by flink:vkEnumerateInstanceVersion 108e5c31af7Sopenharmony_ciis the version associated with a slink:VkInstance and its children, except 109e5c31af7Sopenharmony_cifor a slink:VkPhysicalDevice and its children. 110e5c31af7Sopenharmony_cisname:VkPhysicalDeviceProperties::pname:apiVersion is the version associated 111e5c31af7Sopenharmony_ciwith a slink:VkPhysicalDevice and its children. 112e5c31af7Sopenharmony_ci==== 113e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 114e5c31af7Sopenharmony_ci 115e5c31af7Sopenharmony_ci[NOTE] 116e5c31af7Sopenharmony_ci.Note 117e5c31af7Sopenharmony_ci==== 118e5c31af7Sopenharmony_ciThe encoding of pname:driverVersion is implementation-defined. 119e5c31af7Sopenharmony_ciIt may: not use the same encoding as pname:apiVersion. 120e5c31af7Sopenharmony_ciApplications should follow information from the _vendor_ on how to extract 121e5c31af7Sopenharmony_cithe version information from pname:driverVersion. 122e5c31af7Sopenharmony_ci==== 123e5c31af7Sopenharmony_ci 124e5c31af7Sopenharmony_ciThe pname:vendorID and pname:deviceID fields are provided to allow 125e5c31af7Sopenharmony_ciapplications to adapt to device characteristics that are not adequately 126e5c31af7Sopenharmony_ciexposed by other Vulkan queries. 127e5c31af7Sopenharmony_ci 128e5c31af7Sopenharmony_ci[NOTE] 129e5c31af7Sopenharmony_ci.Note 130e5c31af7Sopenharmony_ci==== 131e5c31af7Sopenharmony_ciThese may: include performance profiles, hardware errata, or other 132e5c31af7Sopenharmony_cicharacteristics. 133e5c31af7Sopenharmony_ci==== 134e5c31af7Sopenharmony_ci 135e5c31af7Sopenharmony_ciThe _vendor_ identified by pname:vendorID is the entity responsible for the 136e5c31af7Sopenharmony_cimost salient characteristics of the underlying implementation of the 137e5c31af7Sopenharmony_cislink:VkPhysicalDevice being queried. 138e5c31af7Sopenharmony_ci 139e5c31af7Sopenharmony_ci[NOTE] 140e5c31af7Sopenharmony_ci.Note 141e5c31af7Sopenharmony_ci==== 142e5c31af7Sopenharmony_ciFor example, in the case of a discrete GPU implementation, this should: be 143e5c31af7Sopenharmony_cithe GPU chipset vendor. 144e5c31af7Sopenharmony_ciIn the case of a hardware accelerator integrated into a system-on-chip 145e5c31af7Sopenharmony_ci(SoC), this should: be the supplier of the silicon IP used to create the 146e5c31af7Sopenharmony_ciaccelerator. 147e5c31af7Sopenharmony_ci==== 148e5c31af7Sopenharmony_ci 149e5c31af7Sopenharmony_ciIf the vendor has a https://pcisig.com/membership/member-companies[PCI 150e5c31af7Sopenharmony_civendor ID], the low 16 bits of pname:vendorID must: contain that PCI vendor 151e5c31af7Sopenharmony_ciID, and the remaining bits must: be set to zero. 152e5c31af7Sopenharmony_ciOtherwise, the value returned must: be a valid Khronos vendor ID, obtained 153e5c31af7Sopenharmony_cias described in the <<vulkan-styleguide,Vulkan Documentation and Extensions: 154e5c31af7Sopenharmony_ciProcedures and Conventions>> document in the section "`Registering a Vendor 155e5c31af7Sopenharmony_ciID with Khronos`". 156e5c31af7Sopenharmony_ciKhronos vendor IDs are allocated starting at 0x10000, to distinguish them 157e5c31af7Sopenharmony_cifrom the PCI vendor ID namespace. 158e5c31af7Sopenharmony_ciKhronos vendor IDs are symbolically defined in the elink:VkVendorId type. 159e5c31af7Sopenharmony_ci 160e5c31af7Sopenharmony_ciThe vendor is also responsible for the value returned in pname:deviceID. 161e5c31af7Sopenharmony_ciIf the implementation is driven primarily by a https://pcisig.com/[PCI 162e5c31af7Sopenharmony_cidevice] with a https://pcisig.com/[PCI device ID], the low 16 bits of 163e5c31af7Sopenharmony_cipname:deviceID must: contain that PCI device ID, and the remaining bits 164e5c31af7Sopenharmony_cimust: be set to zero. 165e5c31af7Sopenharmony_ciOtherwise, the choice of what values to return may: be dictated by operating 166e5c31af7Sopenharmony_cisystem or platform policies - but should: uniquely identify both the device 167e5c31af7Sopenharmony_civersion and any major configuration options (for example, core count in the 168e5c31af7Sopenharmony_cicase of multicore devices). 169e5c31af7Sopenharmony_ci 170e5c31af7Sopenharmony_ci[NOTE] 171e5c31af7Sopenharmony_ci.Note 172e5c31af7Sopenharmony_ci==== 173e5c31af7Sopenharmony_ciThe same device ID should: be used for all physical implementations of that 174e5c31af7Sopenharmony_cidevice version and configuration. 175e5c31af7Sopenharmony_ciFor example, all uses of a specific silicon IP GPU version and configuration 176e5c31af7Sopenharmony_cishould: use the same device ID, even if those uses occur in different SoCs. 177e5c31af7Sopenharmony_ci==== 178e5c31af7Sopenharmony_ci 179e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceProperties.txt[] 180e5c31af7Sopenharmony_ci-- 181e5c31af7Sopenharmony_ci 182e5c31af7Sopenharmony_ci[open,refpage='VkVendorId',desc='Khronos vendor IDs',type='enums'] 183e5c31af7Sopenharmony_ci-- 184e5c31af7Sopenharmony_ciKhronos vendor IDs which may: be returned in 185e5c31af7Sopenharmony_cislink:VkPhysicalDeviceProperties::pname:vendorID are: 186e5c31af7Sopenharmony_ci 187e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkVendorId.txt[] 188e5c31af7Sopenharmony_ci 189e5c31af7Sopenharmony_ci[NOTE] 190e5c31af7Sopenharmony_ci.Note 191e5c31af7Sopenharmony_ci==== 192e5c31af7Sopenharmony_ciKhronos vendor IDs may be allocated by vendors at any time. 193e5c31af7Sopenharmony_ciOnly the latest canonical versions of this Specification, of the 194e5c31af7Sopenharmony_cicorresponding `vk.xml` API Registry, and of the corresponding 195e5c31af7Sopenharmony_ci`{core_header}` header file must: contain all reserved Khronos vendor IDs. 196e5c31af7Sopenharmony_ci 197e5c31af7Sopenharmony_ciOnly Khronos vendor IDs are given symbolic names at present. 198e5c31af7Sopenharmony_ciPCI vendor IDs returned by the implementation can be looked up in the 199e5c31af7Sopenharmony_ciPCI-SIG database. 200e5c31af7Sopenharmony_ci==== 201e5c31af7Sopenharmony_ci-- 202e5c31af7Sopenharmony_ci 203e5c31af7Sopenharmony_ci[open,refpage='VK_MAX_PHYSICAL_DEVICE_NAME_SIZE',desc='Length of a physical device name string',type='consts'] 204e5c31af7Sopenharmony_ci-- 205e5c31af7Sopenharmony_ciename:VK_MAX_PHYSICAL_DEVICE_NAME_SIZE is the length in code:char values of 206e5c31af7Sopenharmony_cian array containing a physical device name string, as returned in 207e5c31af7Sopenharmony_cislink:VkPhysicalDeviceProperties::deviceName. 208e5c31af7Sopenharmony_ci 209e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_PHYSICAL_DEVICE_NAME_SIZE.txt[] 210e5c31af7Sopenharmony_ci-- 211e5c31af7Sopenharmony_ci 212e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceType',desc='Supported physical device types',type='enums'] 213e5c31af7Sopenharmony_ci-- 214e5c31af7Sopenharmony_ciThe physical device types which may: be returned in 215e5c31af7Sopenharmony_cislink:VkPhysicalDeviceProperties::pname:deviceType are: 216e5c31af7Sopenharmony_ci 217e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkPhysicalDeviceType.txt[] 218e5c31af7Sopenharmony_ci 219e5c31af7Sopenharmony_ci * ename:VK_PHYSICAL_DEVICE_TYPE_OTHER - the device does not match any 220e5c31af7Sopenharmony_ci other available types. 221e5c31af7Sopenharmony_ci * ename:VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU - the device is typically 222e5c31af7Sopenharmony_ci one embedded in or tightly coupled with the host. 223e5c31af7Sopenharmony_ci * ename:VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU - the device is typically a 224e5c31af7Sopenharmony_ci separate processor connected to the host via an interlink. 225e5c31af7Sopenharmony_ci * ename:VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU - the device is typically a 226e5c31af7Sopenharmony_ci virtual node in a virtualization environment. 227e5c31af7Sopenharmony_ci * ename:VK_PHYSICAL_DEVICE_TYPE_CPU - the device is typically running on 228e5c31af7Sopenharmony_ci the same processors as the host. 229e5c31af7Sopenharmony_ci 230e5c31af7Sopenharmony_ciThe physical device type is advertised for informational purposes only, and 231e5c31af7Sopenharmony_cidoes not directly affect the operation of the system. 232e5c31af7Sopenharmony_ciHowever, the device type may: correlate with other advertised properties or 233e5c31af7Sopenharmony_cicapabilities of the system, such as how many memory heaps there are. 234e5c31af7Sopenharmony_ci-- 235e5c31af7Sopenharmony_ci 236e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] 237e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceProperties2',desc='Returns properties of a physical device',type='protos'] 238e5c31af7Sopenharmony_ci-- 239e5c31af7Sopenharmony_ciTo query general properties of physical devices once enumerated, call: 240e5c31af7Sopenharmony_ci 241e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 242e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceProperties2.txt[] 243e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 244e5c31af7Sopenharmony_ci 245e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_get_physical_device_properties2[or the equivalent command] 246e5c31af7Sopenharmony_ci 247e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[] 248e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceProperties2KHR.txt[] 249e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[] 250e5c31af7Sopenharmony_ci 251e5c31af7Sopenharmony_ci * pname:physicalDevice is the handle to the physical device whose 252e5c31af7Sopenharmony_ci properties will be queried. 253e5c31af7Sopenharmony_ci * pname:pProperties is a pointer to a slink:VkPhysicalDeviceProperties2 254e5c31af7Sopenharmony_ci structure in which properties are returned. 255e5c31af7Sopenharmony_ci 256e5c31af7Sopenharmony_ciEach structure in pname:pProperties and its pname:pNext chain contains 257e5c31af7Sopenharmony_cimembers corresponding to implementation-dependent properties, behaviors, or 258e5c31af7Sopenharmony_cilimits. 259e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceProperties2 fills in each member to specify the 260e5c31af7Sopenharmony_cicorresponding value for the implementation. 261e5c31af7Sopenharmony_ci 262e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceProperties2.txt[] 263e5c31af7Sopenharmony_ci-- 264e5c31af7Sopenharmony_ci 265e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceProperties2',desc='Structure specifying physical device properties',type='structs'] 266e5c31af7Sopenharmony_ci-- 267e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceProperties2 structure is defined as: 268e5c31af7Sopenharmony_ci 269e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceProperties2.txt[] 270e5c31af7Sopenharmony_ci 271e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[] 272e5c31af7Sopenharmony_cior the equivalent 273e5c31af7Sopenharmony_ci 274e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceProperties2KHR.txt[] 275e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[] 276e5c31af7Sopenharmony_ci 277e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 278e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 279e5c31af7Sopenharmony_ci structure. 280e5c31af7Sopenharmony_ci * pname:properties is a slink:VkPhysicalDeviceProperties structure 281e5c31af7Sopenharmony_ci describing properties of the physical device. 282e5c31af7Sopenharmony_ci This structure is written with the same values as if it were written by 283e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceProperties. 284e5c31af7Sopenharmony_ci 285e5c31af7Sopenharmony_ciThe pname:pNext chain of this structure is used to extend the structure with 286e5c31af7Sopenharmony_ciproperties defined by extensions. 287e5c31af7Sopenharmony_ci 288e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceProperties2.txt[] 289e5c31af7Sopenharmony_ci-- 290e5c31af7Sopenharmony_ci 291e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[] 292e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceVulkan11Properties',desc='Structure specifying physical device properties for functionality promoted to Vulkan 1.1',type='structs'] 293e5c31af7Sopenharmony_ci-- 294e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceVulkan11Properties structure is defined as: 295e5c31af7Sopenharmony_ci 296e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceVulkan11Properties.txt[] 297e5c31af7Sopenharmony_ci 298e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 299e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 300e5c31af7Sopenharmony_ci structure. 301e5c31af7Sopenharmony_ci 302e5c31af7Sopenharmony_ci:anchor-prefix: 303e5c31af7Sopenharmony_ciinclude::{chapters}/devsandqueues.txt[tag=VK_KHR_external_memory_capabilities-properties] 304e5c31af7Sopenharmony_ci * [[{anchor-prefix}limits-subgroup-size]] pname:subgroupSize is the 305e5c31af7Sopenharmony_ci default number of invocations in each subgroup. 306e5c31af7Sopenharmony_ci pname:subgroupSize is at least 1 if any of the physical device's queues 307e5c31af7Sopenharmony_ci support ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT. 308e5c31af7Sopenharmony_ci pname:subgroupSize is a power-of-two. 309e5c31af7Sopenharmony_ci * [[{anchor-prefix}limits-subgroupSupportedStages]] 310e5c31af7Sopenharmony_ci pname:subgroupSupportedStages is a bitfield of 311e5c31af7Sopenharmony_ci elink:VkShaderStageFlagBits describing the shader stages that 312e5c31af7Sopenharmony_ci <<shaders-group-operations, group operations>> with 313e5c31af7Sopenharmony_ci <<shaders-scope-subgroup, subgroup scope>> are supported in. 314e5c31af7Sopenharmony_ci pname:subgroupSupportedStages will have the 315e5c31af7Sopenharmony_ci ename:VK_SHADER_STAGE_COMPUTE_BIT bit set if any of the physical 316e5c31af7Sopenharmony_ci device's queues support ename:VK_QUEUE_COMPUTE_BIT. 317e5c31af7Sopenharmony_ci * pname:subgroupSupportedOperations is a bitmask of 318e5c31af7Sopenharmony_ci elink:VkSubgroupFeatureFlagBits specifying the sets of 319e5c31af7Sopenharmony_ci <<shaders-group-operations, group operations>> with 320e5c31af7Sopenharmony_ci <<shaders-scope-subgroup, subgroup scope>> supported on this device. 321e5c31af7Sopenharmony_ci pname:subgroupSupportedOperations will have the 322e5c31af7Sopenharmony_ci ename:VK_SUBGROUP_FEATURE_BASIC_BIT bit set if any of the physical 323e5c31af7Sopenharmony_ci device's queues support ename:VK_QUEUE_GRAPHICS_BIT or 324e5c31af7Sopenharmony_ci ename:VK_QUEUE_COMPUTE_BIT. 325e5c31af7Sopenharmony_ci * [[{anchor-prefix}limits-subgroupQuadOperationsInAllStages]] 326e5c31af7Sopenharmony_ci pname:subgroupQuadOperationsInAllStages is a boolean specifying whether 327e5c31af7Sopenharmony_ci <<shaders-quad-operations,quad group operations>> are available in all 328e5c31af7Sopenharmony_ci stages, or are restricted to fragment and compute stages. 329e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_maintenance2-properties] 330e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_multiview-properties] 331e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_protected_memory-properties] 332e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_maintenance3-properties] 333e5c31af7Sopenharmony_ci 334e5c31af7Sopenharmony_ci:refpage: VkPhysicalDeviceVulkan11Properties 335e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 336e5c31af7Sopenharmony_ci 337e5c31af7Sopenharmony_ciThese properties correspond to Vulkan 1.1 functionality. 338e5c31af7Sopenharmony_ci 339e5c31af7Sopenharmony_ciThe members of sname:VkPhysicalDeviceVulkan11Properties have the same values 340e5c31af7Sopenharmony_cias the corresponding members of slink:VkPhysicalDeviceIDProperties, 341e5c31af7Sopenharmony_cislink:VkPhysicalDeviceSubgroupProperties, 342e5c31af7Sopenharmony_cislink:VkPhysicalDevicePointClippingProperties, 343e5c31af7Sopenharmony_cislink:VkPhysicalDeviceMultiviewProperties, 344e5c31af7Sopenharmony_cislink:VkPhysicalDeviceProtectedMemoryProperties, and 345e5c31af7Sopenharmony_cislink:VkPhysicalDeviceMaintenance3Properties. 346e5c31af7Sopenharmony_ci 347e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceVulkan11Properties.txt[] 348e5c31af7Sopenharmony_ci-- 349e5c31af7Sopenharmony_ci 350e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceVulkan12Properties',desc='Structure specifying physical device properties for functionality promoted to Vulkan 1.2',type='structs'] 351e5c31af7Sopenharmony_ci-- 352e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceVulkan12Properties structure is defined as: 353e5c31af7Sopenharmony_ci 354e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceVulkan12Properties.txt[] 355e5c31af7Sopenharmony_ci 356e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 357e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 358e5c31af7Sopenharmony_ci structure. 359e5c31af7Sopenharmony_ci 360e5c31af7Sopenharmony_ci:anchor-prefix: 361e5c31af7Sopenharmony_ciinclude::{chapters}/devsandqueues.txt[tag=VK_KHR_driver_properties-properties] 362e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_shader_float_controls-properties] 363e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_EXT_descriptor_indexing-properties] 364e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_depth_stencil_resolve-properties] 365e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_EXT_sampler_filter_minmax-properties] 366e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=VK_KHR_timeline_semaphore-properties] 367e5c31af7Sopenharmony_ci * [[limits-framebufferIntegerColorSampleCounts]] 368e5c31af7Sopenharmony_ci pname:framebufferIntegerColorSampleCounts is a bitmask of 369e5c31af7Sopenharmony_ci elink:VkSampleCountFlagBits indicating the color sample counts that are 370e5c31af7Sopenharmony_ci supported for all framebuffer color attachments with integer formats. 371e5c31af7Sopenharmony_ci 372e5c31af7Sopenharmony_ci:refpage: VkPhysicalDeviceVulkan12Properties 373e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 374e5c31af7Sopenharmony_ci 375e5c31af7Sopenharmony_ciThese properties correspond to Vulkan 1.2 functionality. 376e5c31af7Sopenharmony_ci 377e5c31af7Sopenharmony_ciThe members of sname:VkPhysicalDeviceVulkan12Properties must: have the same 378e5c31af7Sopenharmony_civalues as the corresponding members of 379e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDriverProperties, 380e5c31af7Sopenharmony_cislink:VkPhysicalDeviceFloatControlsProperties, 381e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDescriptorIndexingProperties, 382e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDepthStencilResolveProperties, 383e5c31af7Sopenharmony_cislink:VkPhysicalDeviceSamplerFilterMinmaxProperties, and 384e5c31af7Sopenharmony_cislink:VkPhysicalDeviceTimelineSemaphoreProperties. 385e5c31af7Sopenharmony_ci 386e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceVulkan12Properties.txt[] 387e5c31af7Sopenharmony_ci-- 388e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[] 389e5c31af7Sopenharmony_ci 390e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities,VK_KHR_external_semaphore_capabilities,VK_KHR_external_fence_capabilities[] 391e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceIDProperties',desc='Structure specifying IDs related to the physical device',type='structs'] 392e5c31af7Sopenharmony_ci-- 393e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceIDProperties structure is defined as: 394e5c31af7Sopenharmony_ci 395e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceIDProperties.txt[] 396e5c31af7Sopenharmony_ci 397e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities[] 398e5c31af7Sopenharmony_cior the equivalent 399e5c31af7Sopenharmony_ci 400e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceIDPropertiesKHR.txt[] 401e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities[] 402e5c31af7Sopenharmony_ci 403e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 404e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 405e5c31af7Sopenharmony_ci structure. 406e5c31af7Sopenharmony_ci 407e5c31af7Sopenharmony_ci// Must have preceding whitespace 408e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[:anchor-prefix: extension-] 409e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2[:anchor-prefix:] 410e5c31af7Sopenharmony_ci// tag::VK_KHR_external_memory_capabilities-properties[] 411e5c31af7Sopenharmony_ci * pname:deviceUUID is an array of ename:VK_UUID_SIZE code:uint8_t values 412e5c31af7Sopenharmony_ci representing a universally unique identifier for the device. 413e5c31af7Sopenharmony_ci * pname:driverUUID is an array of ename:VK_UUID_SIZE code:uint8_t values 414e5c31af7Sopenharmony_ci representing a universally unique identifier for the driver build in use 415e5c31af7Sopenharmony_ci by the device. 416e5c31af7Sopenharmony_ci * pname:deviceLUID is an array of ename:VK_LUID_SIZE code:uint8_t values 417e5c31af7Sopenharmony_ci representing a locally unique identifier for the device. 418e5c31af7Sopenharmony_ci * pname:deviceNodeMask is a code:uint32_t bitfield identifying the node 419e5c31af7Sopenharmony_ci within a linked device adapter corresponding to the device. 420e5c31af7Sopenharmony_ci * pname:deviceLUIDValid is a boolean value that will be ename:VK_TRUE if 421e5c31af7Sopenharmony_ci pname:deviceLUID contains a valid LUID and pname:deviceNodeMask contains 422e5c31af7Sopenharmony_ci a valid node mask, and ename:VK_FALSE if they do not. 423e5c31af7Sopenharmony_ci// end::VK_KHR_external_memory_capabilities-properties[] 424e5c31af7Sopenharmony_ci 425e5c31af7Sopenharmony_ci:refpage: VkPhysicalDeviceIDProperties 426e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 427e5c31af7Sopenharmony_ci 428e5c31af7Sopenharmony_cipname:deviceUUID must: be immutable for a given device across instances, 429e5c31af7Sopenharmony_ciprocesses, driver APIs, driver versions, and system reboots. 430e5c31af7Sopenharmony_ci 431e5c31af7Sopenharmony_ciApplications can: compare the pname:driverUUID value across instance and 432e5c31af7Sopenharmony_ciprocess boundaries, and can: make similar queries in external APIs to 433e5c31af7Sopenharmony_cidetermine whether they are capable of sharing memory objects and resources 434e5c31af7Sopenharmony_ciusing them with the device. 435e5c31af7Sopenharmony_ci 436e5c31af7Sopenharmony_cipname:deviceUUID and/or pname:driverUUID must: be used to determine whether 437e5c31af7Sopenharmony_cia particular external object can be shared between driver components, where 438e5c31af7Sopenharmony_cisuch a restriction exists as defined in the compatibility table for the 439e5c31af7Sopenharmony_ciparticular object type: 440e5c31af7Sopenharmony_ci 441e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[] 442e5c31af7Sopenharmony_ci * <<external-memory-handle-types-compatibility,External memory handle 443e5c31af7Sopenharmony_ci types compatibility>> 444e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[] 445e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_semaphore_capabilities[] 446e5c31af7Sopenharmony_ci * <<external-semaphore-handle-types-compatibility,External semaphore 447e5c31af7Sopenharmony_ci handle types compatibility>> 448e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_semaphore_capabilities[] 449e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[] 450e5c31af7Sopenharmony_ci * <<external-fence-handle-types-compatibility,External fence handle types 451e5c31af7Sopenharmony_ci compatibility>> 452e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[] 453e5c31af7Sopenharmony_ci 454e5c31af7Sopenharmony_ciIf pname:deviceLUIDValid is ename:VK_FALSE, the values of pname:deviceLUID 455e5c31af7Sopenharmony_ciand pname:deviceNodeMask are undefined:. 456e5c31af7Sopenharmony_ciIf pname:deviceLUIDValid is ename:VK_TRUE and Vulkan is running on the 457e5c31af7Sopenharmony_ciWindows operating system, the contents of pname:deviceLUID can: be cast to 458e5c31af7Sopenharmony_cian code:LUID object and must: be equal to the locally unique identifier of a 459e5c31af7Sopenharmony_cicode:IDXGIAdapter1 object that corresponds to pname:physicalDevice. 460e5c31af7Sopenharmony_ciIf pname:deviceLUIDValid is ename:VK_TRUE, pname:deviceNodeMask must: 461e5c31af7Sopenharmony_cicontain exactly one bit. 462e5c31af7Sopenharmony_ciIf Vulkan is running on an operating system that supports the Direct3D 12 463e5c31af7Sopenharmony_ciAPI and pname:physicalDevice corresponds to an individual device in a linked 464e5c31af7Sopenharmony_cidevice adapter, pname:deviceNodeMask identifies the Direct3D 12 node 465e5c31af7Sopenharmony_cicorresponding to pname:physicalDevice. 466e5c31af7Sopenharmony_ciOtherwise, pname:deviceNodeMask must: be `1`. 467e5c31af7Sopenharmony_ci 468e5c31af7Sopenharmony_ci[NOTE] 469e5c31af7Sopenharmony_ci.Note 470e5c31af7Sopenharmony_ci==== 471e5c31af7Sopenharmony_ciAlthough they have identical descriptions, 472e5c31af7Sopenharmony_cislink:VkPhysicalDeviceIDProperties::pname:deviceUUID may differ from 473e5c31af7Sopenharmony_cislink:VkPhysicalDeviceProperties2::pname:pipelineCacheUUID. 474e5c31af7Sopenharmony_ciThe former is intended to identify and correlate devices across API and 475e5c31af7Sopenharmony_cidriver boundaries, while the latter is used to identify a compatible device 476e5c31af7Sopenharmony_ciand driver combination to use when serializing and de-serializing pipeline 477e5c31af7Sopenharmony_cistate. 478e5c31af7Sopenharmony_ci 479e5c31af7Sopenharmony_ciImplementations should: return pname:deviceUUID values which are likely to 480e5c31af7Sopenharmony_cibe unique even in the presence of multiple Vulkan implementations (such as a 481e5c31af7Sopenharmony_ciGPU driver and a software renderer; two drivers for different GPUs; or the 482e5c31af7Sopenharmony_cisame Vulkan driver running on two logically different devices). 483e5c31af7Sopenharmony_ci 484e5c31af7Sopenharmony_ciKhronos' conformance testing can not guarantee that pname:deviceUUID values 485e5c31af7Sopenharmony_ciare actually unique, so implementors should make their own best efforts to 486e5c31af7Sopenharmony_ciensure this. 487e5c31af7Sopenharmony_ciIn particular, hard-coded pname:deviceUUID values, especially all-`0` bits, 488e5c31af7Sopenharmony_cishould: never be used. 489e5c31af7Sopenharmony_ci 490e5c31af7Sopenharmony_ciA combination of values unique to the vendor, the driver, and the hardware 491e5c31af7Sopenharmony_cienvironment can be used to provide a pname:deviceUUID which is unique to a 492e5c31af7Sopenharmony_cihigh degree of certainty. 493e5c31af7Sopenharmony_ciSome possible inputs to such a computation are: 494e5c31af7Sopenharmony_ci 495e5c31af7Sopenharmony_ci * Information reported by flink:vkGetPhysicalDeviceProperties 496e5c31af7Sopenharmony_ci * PCI device ID (if defined) 497e5c31af7Sopenharmony_ci * PCI bus ID, or similar system configuration information. 498e5c31af7Sopenharmony_ci * Driver binary checksums. 499e5c31af7Sopenharmony_ci==== 500e5c31af7Sopenharmony_ci 501e5c31af7Sopenharmony_ci 502e5c31af7Sopenharmony_ci[NOTE] 503e5c31af7Sopenharmony_ci.Note 504e5c31af7Sopenharmony_ci==== 505e5c31af7Sopenharmony_ciWhile slink:VkPhysicalDeviceIDProperties::pname:deviceUUID is specified to 506e5c31af7Sopenharmony_ciremain consistent across driver versions and system reboots, it is not 507e5c31af7Sopenharmony_ciintended to be usable as a serializable persistent identifier for a device. 508e5c31af7Sopenharmony_ciIt may change when a device is physically added to, removed from, or moved 509e5c31af7Sopenharmony_cito a different connector in a system while that system is powered down. 510e5c31af7Sopenharmony_ciFurther, there is no reasonable way to verify with conformance testing that 511e5c31af7Sopenharmony_cia given device retains the same UUID in a given system across all driver 512e5c31af7Sopenharmony_civersions supported in that system. 513e5c31af7Sopenharmony_ciWhile implementations should make every effort to report consistent device 514e5c31af7Sopenharmony_ciUUIDs across driver versions, applications should avoid relying on the 515e5c31af7Sopenharmony_cipersistence of this value for uses other than identifying compatible devices 516e5c31af7Sopenharmony_cifor external object sharing purposes. 517e5c31af7Sopenharmony_ci==== 518e5c31af7Sopenharmony_ci 519e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceIDProperties.txt[] 520e5c31af7Sopenharmony_ci-- 521e5c31af7Sopenharmony_ci 522e5c31af7Sopenharmony_ci[open,refpage='VK_UUID_SIZE',desc='Length of a universally unique device or driver build identifier',type='consts'] 523e5c31af7Sopenharmony_ci-- 524e5c31af7Sopenharmony_ciename:VK_UUID_SIZE is the length in code:uint8_t values of an array 525e5c31af7Sopenharmony_cicontaining a universally unique device or driver build identifier, as 526e5c31af7Sopenharmony_cireturned in slink:VkPhysicalDeviceIDProperties::deviceUUID and 527e5c31af7Sopenharmony_cislink:VkPhysicalDeviceIDProperties::driverUUID. 528e5c31af7Sopenharmony_ci 529e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_UUID_SIZE.txt[] 530e5c31af7Sopenharmony_ci-- 531e5c31af7Sopenharmony_ci 532e5c31af7Sopenharmony_ci[open,refpage='VK_LUID_SIZE',desc='Length of a locally unique device identifier',type='consts',alias='VK_LUID_SIZE_KHR'] 533e5c31af7Sopenharmony_ci-- 534e5c31af7Sopenharmony_ciename:VK_LUID_SIZE is the length in code:uint8_t values of an array 535e5c31af7Sopenharmony_cicontaining a locally unique device identifier, as returned in 536e5c31af7Sopenharmony_cislink:VkPhysicalDeviceIDProperties::deviceLUID. 537e5c31af7Sopenharmony_ci 538e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_LUID_SIZE.txt[] 539e5c31af7Sopenharmony_ci 540e5c31af7Sopenharmony_ciifdef::VK_KHR_external_memory_capabilities,VK_KHR_external_semaphore_capabilities,VK_KHR_external_fence_capabilities[] 541e5c31af7Sopenharmony_cior the equivalent 542e5c31af7Sopenharmony_ci 543e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_LUID_SIZE_KHR.txt[] 544e5c31af7Sopenharmony_ciendif::VK_KHR_external_memory_capabilities,VK_KHR_external_semaphore_capabilities,VK_KHR_external_fence_capabilities[] 545e5c31af7Sopenharmony_ci-- 546e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities,VK_KHR_external_semaphore_capabilities,VK_KHR_external_fence_capabilities[] 547e5c31af7Sopenharmony_ci 548e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_driver_properties[] 549e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceDriverProperties',desc='Structure containing driver identification information',type='structs',alias='VkPhysicalDeviceDriverPropertiesKHR'] 550e5c31af7Sopenharmony_ci-- 551e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceDriverProperties structure is defined as: 552e5c31af7Sopenharmony_ci 553e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceDriverProperties.txt[] 554e5c31af7Sopenharmony_ci 555e5c31af7Sopenharmony_ciifdef::VK_KHR_driver_properties[] 556e5c31af7Sopenharmony_cior the equivalent 557e5c31af7Sopenharmony_ci 558e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceDriverPropertiesKHR.txt[] 559e5c31af7Sopenharmony_ciendif::VK_KHR_driver_properties[] 560e5c31af7Sopenharmony_ci 561e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 562e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 563e5c31af7Sopenharmony_ci structure. 564e5c31af7Sopenharmony_ci 565e5c31af7Sopenharmony_ci// Must have preceding whitespace 566e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[:anchor-prefix: extension-] 567e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_2[:anchor-prefix:] 568e5c31af7Sopenharmony_ci// tag::VK_KHR_driver_properties-properties[] 569e5c31af7Sopenharmony_ci * pname:driverID is a unique identifier for the driver of the physical 570e5c31af7Sopenharmony_ci device. 571e5c31af7Sopenharmony_ci * pname:driverName is an array of ename:VK_MAX_DRIVER_NAME_SIZE code:char 572e5c31af7Sopenharmony_ci containing a null-terminated UTF-8 string which is the name of the 573e5c31af7Sopenharmony_ci driver. 574e5c31af7Sopenharmony_ci * pname:driverInfo is an array of ename:VK_MAX_DRIVER_INFO_SIZE code:char 575e5c31af7Sopenharmony_ci containing a null-terminated UTF-8 string with additional information 576e5c31af7Sopenharmony_ci about the driver. 577e5c31af7Sopenharmony_ci * pname:conformanceVersion is the version of the Vulkan conformance test 578e5c31af7Sopenharmony_ci this driver is conformant against (see slink:VkConformanceVersion). 579e5c31af7Sopenharmony_ci// end::VK_KHR_driver_properties-properties[] 580e5c31af7Sopenharmony_ci 581e5c31af7Sopenharmony_ci:refpage: VkPhysicalDeviceDriverProperties 582e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 583e5c31af7Sopenharmony_ci 584e5c31af7Sopenharmony_ciThese are properties of the driver corresponding to a physical device. 585e5c31af7Sopenharmony_ci 586e5c31af7Sopenharmony_cipname:driverID must: be immutable for a given driver across instances, 587e5c31af7Sopenharmony_ciprocesses, driver versions, and system reboots. 588e5c31af7Sopenharmony_ci 589e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceDriverProperties.txt[] 590e5c31af7Sopenharmony_ci-- 591e5c31af7Sopenharmony_ci 592e5c31af7Sopenharmony_ci[open,refpage='VkDriverId',desc='Khronos driver IDs',type='enums',alias='VkDriverIdKHR'] 593e5c31af7Sopenharmony_ci-- 594e5c31af7Sopenharmony_ciKhronos driver IDs which may: be returned in 595e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDriverProperties::pname:driverID are: 596e5c31af7Sopenharmony_ci 597e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDriverId.txt[] 598e5c31af7Sopenharmony_ci 599e5c31af7Sopenharmony_ciifdef::VK_KHR_driver_properties[] 600e5c31af7Sopenharmony_cior the equivalent 601e5c31af7Sopenharmony_ci 602e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDriverIdKHR.txt[] 603e5c31af7Sopenharmony_ciendif::VK_KHR_driver_properties[] 604e5c31af7Sopenharmony_ci 605e5c31af7Sopenharmony_ci[NOTE] 606e5c31af7Sopenharmony_ci.Note 607e5c31af7Sopenharmony_ci==== 608e5c31af7Sopenharmony_ciKhronos driver IDs may be allocated by vendors at any time. 609e5c31af7Sopenharmony_ciThere may be multiple driver IDs for the same vendor, representing different 610e5c31af7Sopenharmony_cidrivers (for e.g. different platforms, proprietary or open source, etc.). 611e5c31af7Sopenharmony_ciOnly the latest canonical versions of this Specification, of the 612e5c31af7Sopenharmony_cicorresponding `vk.xml` API Registry, and of the corresponding 613e5c31af7Sopenharmony_ci`{core_header}` header file must: contain all reserved Khronos driver IDs. 614e5c31af7Sopenharmony_ci 615e5c31af7Sopenharmony_ciOnly driver IDs registered with Khronos are given symbolic names. 616e5c31af7Sopenharmony_ciThere may: be unregistered driver IDs returned. 617e5c31af7Sopenharmony_ci==== 618e5c31af7Sopenharmony_ci-- 619e5c31af7Sopenharmony_ci 620e5c31af7Sopenharmony_ci[open,refpage='VK_MAX_DRIVER_NAME_SIZE',desc='Maximum length of a physical device driver name string',type='consts',alias='VK_MAX_DRIVER_NAME_SIZE_KHR'] 621e5c31af7Sopenharmony_ci-- 622e5c31af7Sopenharmony_ciename:VK_MAX_DRIVER_NAME_SIZE is the length in code:char values of an array 623e5c31af7Sopenharmony_cicontaining a driver name string, as returned in 624e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDriverProperties::driverName. 625e5c31af7Sopenharmony_ci 626e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_DRIVER_NAME_SIZE.txt[] 627e5c31af7Sopenharmony_ci 628e5c31af7Sopenharmony_ciifdef::VK_KHR_driver_properties[] 629e5c31af7Sopenharmony_cior the equivalent 630e5c31af7Sopenharmony_ci 631e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_DRIVER_NAME_SIZE_KHR.txt[] 632e5c31af7Sopenharmony_ciendif::VK_KHR_driver_properties[] 633e5c31af7Sopenharmony_ci-- 634e5c31af7Sopenharmony_ci 635e5c31af7Sopenharmony_ci[open,refpage='VK_MAX_DRIVER_INFO_SIZE',desc='Length of a physical device driver information string',type='consts',alias='VK_MAX_DRIVER_INFO_SIZE_KHR'] 636e5c31af7Sopenharmony_ci-- 637e5c31af7Sopenharmony_ciename:VK_MAX_DRIVER_INFO_SIZE is the length in code:char values of an array 638e5c31af7Sopenharmony_cicontaining a driver information string, as returned in 639e5c31af7Sopenharmony_cislink:VkPhysicalDeviceDriverProperties::driverInfo. 640e5c31af7Sopenharmony_ci 641e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_DRIVER_INFO_SIZE.txt[] 642e5c31af7Sopenharmony_ci 643e5c31af7Sopenharmony_ciifdef::VK_KHR_driver_properties[] 644e5c31af7Sopenharmony_cior the equivalent 645e5c31af7Sopenharmony_ci 646e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_DRIVER_INFO_SIZE_KHR.txt[] 647e5c31af7Sopenharmony_ciendif::VK_KHR_driver_properties[] 648e5c31af7Sopenharmony_ci-- 649e5c31af7Sopenharmony_ci 650e5c31af7Sopenharmony_ci[open,refpage='VkConformanceVersion',desc='Structure containing the conformance test suite version the implementation is compliant with',type='structs',alias='VkConformanceVersionKHR'] 651e5c31af7Sopenharmony_ci-- 652e5c31af7Sopenharmony_ciThe conformance test suite version an implementation is compliant with is 653e5c31af7Sopenharmony_cidescribed with the sname:VkConformanceVersion structure: 654e5c31af7Sopenharmony_ci 655e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkConformanceVersion.txt[] 656e5c31af7Sopenharmony_ci 657e5c31af7Sopenharmony_ciifdef::VK_KHR_driver_properties[] 658e5c31af7Sopenharmony_cior the equivalent 659e5c31af7Sopenharmony_ci 660e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkConformanceVersionKHR.txt[] 661e5c31af7Sopenharmony_ciendif::VK_KHR_driver_properties[] 662e5c31af7Sopenharmony_ci 663e5c31af7Sopenharmony_ci * pname:major is the major version number of the conformance test suite. 664e5c31af7Sopenharmony_ci * pname:minor is the minor version number of the conformance test suite. 665e5c31af7Sopenharmony_ci * pname:subminor is the subminor version number of the conformance test 666e5c31af7Sopenharmony_ci suite. 667e5c31af7Sopenharmony_ci * pname:patch is the patch version number of the conformance test suite. 668e5c31af7Sopenharmony_ci 669e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkConformanceVersion.txt[] 670e5c31af7Sopenharmony_ci-- 671e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_driver_properties[] 672e5c31af7Sopenharmony_ci 673e5c31af7Sopenharmony_ciifdef::VK_EXT_pci_bus_info[] 674e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDevicePCIBusInfoPropertiesEXT',desc='Structure containing PCI bus information of a physical device',type='structs'] 675e5c31af7Sopenharmony_ci-- 676e5c31af7Sopenharmony_ciThe sname:VkPhysicalDevicePCIBusInfoPropertiesEXT structure is defined as: 677e5c31af7Sopenharmony_ci 678e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDevicePCIBusInfoPropertiesEXT.txt[] 679e5c31af7Sopenharmony_ci 680e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 681e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 682e5c31af7Sopenharmony_ci structure. 683e5c31af7Sopenharmony_ci * pname:pciDomain is the PCI bus domain. 684e5c31af7Sopenharmony_ci * pname:pciBus is the PCI bus identifier. 685e5c31af7Sopenharmony_ci * pname:pciDevice is the PCI device identifier. 686e5c31af7Sopenharmony_ci * pname:pciFunction is the PCI device function identifier. 687e5c31af7Sopenharmony_ci 688e5c31af7Sopenharmony_ci:refpage: VkPhysicalDevicePCIBusInfoPropertiesEXT 689e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 690e5c31af7Sopenharmony_ci 691e5c31af7Sopenharmony_ciThese are properties of the PCI bus information of a physical device. 692e5c31af7Sopenharmony_ci 693e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDevicePCIBusInfoPropertiesEXT.txt[] 694e5c31af7Sopenharmony_ci-- 695e5c31af7Sopenharmony_ciendif::VK_EXT_pci_bus_info[] 696e5c31af7Sopenharmony_ci 697e5c31af7Sopenharmony_ciifdef::VK_EXT_physical_device_drm[] 698e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceDrmPropertiesEXT',desc='Structure containing DRM information of a physical device',type='structs'] 699e5c31af7Sopenharmony_ci-- 700e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceDrmPropertiesEXT structure is defined as: 701e5c31af7Sopenharmony_ci 702e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceDrmPropertiesEXT.txt[] 703e5c31af7Sopenharmony_ci 704e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 705e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 706e5c31af7Sopenharmony_ci structure. 707e5c31af7Sopenharmony_ci * pname:hasPrimary is a boolean indicating whether the physical device has 708e5c31af7Sopenharmony_ci a DRM primary node. 709e5c31af7Sopenharmony_ci * pname:hasRender is a boolean indicating whether the physical device has 710e5c31af7Sopenharmony_ci a DRM render node. 711e5c31af7Sopenharmony_ci * pname:primaryMajor is the DRM primary node major number, if any. 712e5c31af7Sopenharmony_ci * pname:primaryMinor is the DRM primary node minor number, if any. 713e5c31af7Sopenharmony_ci * pname:renderMajor is the DRM render node major number, if any. 714e5c31af7Sopenharmony_ci * pname:renderMinor is the DRM render node minor number, if any. 715e5c31af7Sopenharmony_ci 716e5c31af7Sopenharmony_ci:refpage: VkPhysicalDeviceDrmPropertiesEXT 717e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 718e5c31af7Sopenharmony_ci 719e5c31af7Sopenharmony_ciThese are properties of the DRM information of a physical device. 720e5c31af7Sopenharmony_ci 721e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceDrmPropertiesEXT.txt[] 722e5c31af7Sopenharmony_ci-- 723e5c31af7Sopenharmony_ciendif::VK_EXT_physical_device_drm[] 724e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] 725e5c31af7Sopenharmony_ci 726e5c31af7Sopenharmony_ciifdef::VK_KHR_shader_integer_dot_product[] 727e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR',desc='Structure containing information about integer dot product support for a physical device',type='structs'] 728e5c31af7Sopenharmony_ci-- 729e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR structure is 730e5c31af7Sopenharmony_cidefined as: 731e5c31af7Sopenharmony_ci 732e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR.txt[] 733e5c31af7Sopenharmony_ci 734e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 735e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 736e5c31af7Sopenharmony_ci structure. 737e5c31af7Sopenharmony_ci * pname:integerDotProduct8BitUnsignedAccelerated is a boolean that will be 738e5c31af7Sopenharmony_ci ename:VK_TRUE if the support for 8-bit unsigned dot product operations 739e5c31af7Sopenharmony_ci using the code:OpUDotKHR SPIR-V instruction is accelerated 740e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 741e5c31af7Sopenharmony_ci * pname:integerDotProduct8BitSignedAccelerated is a boolean that will be 742e5c31af7Sopenharmony_ci ename:VK_TRUE if the support for 8-bit signed dot product operations 743e5c31af7Sopenharmony_ci using the code:OpSDotKHR SPIR-V instruction is accelerated 744e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 745e5c31af7Sopenharmony_ci * pname:integerDotProduct8BitMixedSignednessAccelerated is a boolean that 746e5c31af7Sopenharmony_ci will be ename:VK_TRUE if the support for 8-bit mixed signedness dot 747e5c31af7Sopenharmony_ci product operations using the code:OpSUDotKHR SPIR-V instruction is 748e5c31af7Sopenharmony_ci accelerated <<devsandqueues-integer-dot-product-accelerated,as defined 749e5c31af7Sopenharmony_ci below>>. 750e5c31af7Sopenharmony_ci * pname:integerDotProduct4x8BitPackedUnsignedAccelerated is a boolean that 751e5c31af7Sopenharmony_ci will be ename:VK_TRUE if the support for 8-bit unsigned dot product 752e5c31af7Sopenharmony_ci operations from operands packed into 32-bit integers using the 753e5c31af7Sopenharmony_ci code:OpUDotKHR SPIR-V instruction is accelerated 754e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 755e5c31af7Sopenharmony_ci * pname:integerDotProduct4x8BitPackedSignedAccelerated is a boolean that 756e5c31af7Sopenharmony_ci will be ename:VK_TRUE if the support for 8-bit signed dot product 757e5c31af7Sopenharmony_ci operations from operands packed into 32-bit integers using the 758e5c31af7Sopenharmony_ci code:OpSDotKHR SPIR-V instruction is accelerated 759e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 760e5c31af7Sopenharmony_ci * pname:integerDotProduct4x8BitPackedMixedSignednessAccelerated is a 761e5c31af7Sopenharmony_ci boolean that will be ename:VK_TRUE if the support for 8-bit mixed 762e5c31af7Sopenharmony_ci signedness dot product operations from operands packed into 32-bit 763e5c31af7Sopenharmony_ci integers using the code:OpSUDotKHR SPIR-V instruction is accelerated 764e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 765e5c31af7Sopenharmony_ci * pname:integerDotProduct16BitUnsignedAccelerated is a boolean that will 766e5c31af7Sopenharmony_ci be ename:VK_TRUE if the support for 16-bit unsigned dot product 767e5c31af7Sopenharmony_ci operations using the code:OpUDotKHR SPIR-V instruction is accelerated 768e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 769e5c31af7Sopenharmony_ci * pname:integerDotProduct16BitSignedAccelerated is a boolean that will be 770e5c31af7Sopenharmony_ci ename:VK_TRUE if the support for 16-bit signed dot product operations 771e5c31af7Sopenharmony_ci using the code:OpSDotKHR SPIR-V instruction is accelerated 772e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 773e5c31af7Sopenharmony_ci * pname:integerDotProduct16BitMixedSignednessAccelerated is a boolean that 774e5c31af7Sopenharmony_ci will be ename:VK_TRUE if the support for 16-bit mixed signedness dot 775e5c31af7Sopenharmony_ci product operations using the code:OpSUDotKHR SPIR-V instruction is 776e5c31af7Sopenharmony_ci accelerated <<devsandqueues-integer-dot-product-accelerated,as defined 777e5c31af7Sopenharmony_ci below>>. 778e5c31af7Sopenharmony_ci * pname:integerDotProduct32BitUnsignedAccelerated is a boolean that will 779e5c31af7Sopenharmony_ci be ename:VK_TRUE if the support for 32-bit unsigned dot product 780e5c31af7Sopenharmony_ci operations using the code:OpUDotKHR SPIR-V instruction is accelerated 781e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 782e5c31af7Sopenharmony_ci * pname:integerDotProduct32BitSignedAccelerated is a boolean that will be 783e5c31af7Sopenharmony_ci ename:VK_TRUE if the support for 32-bit signed dot product operations 784e5c31af7Sopenharmony_ci using the code:OpSDotKHR SPIR-V instruction is accelerated 785e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 786e5c31af7Sopenharmony_ci * pname:integerDotProduct32BitMixedSignednessAccelerated is a boolean that 787e5c31af7Sopenharmony_ci will be ename:VK_TRUE if the support for 32-bit mixed signedness dot 788e5c31af7Sopenharmony_ci product operations using the code:OpSUDotKHR SPIR-V instruction is 789e5c31af7Sopenharmony_ci accelerated <<devsandqueues-integer-dot-product-accelerated,as defined 790e5c31af7Sopenharmony_ci below>>. 791e5c31af7Sopenharmony_ci * pname:integerDotProduct64BitUnsignedAccelerated is a boolean that will 792e5c31af7Sopenharmony_ci be ename:VK_TRUE if the support for 64-bit unsigned dot product 793e5c31af7Sopenharmony_ci operations using the code:OpUDotKHR SPIR-V instruction is accelerated 794e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 795e5c31af7Sopenharmony_ci * pname:integerDotProduct64BitSignedAccelerated is a boolean that will be 796e5c31af7Sopenharmony_ci ename:VK_TRUE if the support for 64-bit signed dot product operations 797e5c31af7Sopenharmony_ci using the code:OpSDotKHR SPIR-V instruction is accelerated 798e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 799e5c31af7Sopenharmony_ci * pname:integerDotProduct64BitMixedSignednessAccelerated is a boolean that 800e5c31af7Sopenharmony_ci will be ename:VK_TRUE if the support for 64-bit mixed signedness dot 801e5c31af7Sopenharmony_ci product operations using the code:OpSUDotKHR SPIR-V instruction is 802e5c31af7Sopenharmony_ci accelerated <<devsandqueues-integer-dot-product-accelerated,as defined 803e5c31af7Sopenharmony_ci below>>. 804e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating8BitUnsignedAccelerated is 805e5c31af7Sopenharmony_ci a boolean that will be ename:VK_TRUE if the support for 8-bit unsigned 806e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 807e5c31af7Sopenharmony_ci code:OpUDotAccSatKHR SPIR-V instruction is accelerated 808e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 809e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating8BitSignedAccelerated is a 810e5c31af7Sopenharmony_ci boolean that will be ename:VK_TRUE if the support for 8-bit signed 811e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 812e5c31af7Sopenharmony_ci code:OpSDotAccSatKHR SPIR-V instruction is accelerated 813e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 814e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated 815e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 8-bit mixed 816e5c31af7Sopenharmony_ci signedness accumulating saturating dot product operations using the 817e5c31af7Sopenharmony_ci code:OpSUDotAccSatKHR SPIR-V instruction is accelerated 818e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 819e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated 820e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 8-bit 821e5c31af7Sopenharmony_ci unsigned accumulating saturating dot product operations from operands 822e5c31af7Sopenharmony_ci packed into 32-bit integers using the code:OpUDotAccSatKHR SPIR-V 823e5c31af7Sopenharmony_ci instruction is accelerated 824e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 825e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated 826e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 8-bit signed 827e5c31af7Sopenharmony_ci accumulating saturating dot product operations from operands packed into 828e5c31af7Sopenharmony_ci 32-bit integers using the code:OpSDotAccSatKHR SPIR-V instruction is 829e5c31af7Sopenharmony_ci accelerated <<devsandqueues-integer-dot-product-accelerated,as defined 830e5c31af7Sopenharmony_ci below>>. 831e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated 832e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 8-bit mixed 833e5c31af7Sopenharmony_ci signedness accumulating saturating dot product operations from operands 834e5c31af7Sopenharmony_ci packed into 32-bit integers using the code:OpSUDotAccSatKHR SPIR-V 835e5c31af7Sopenharmony_ci instruction is accelerated 836e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 837e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating16BitUnsignedAccelerated is 838e5c31af7Sopenharmony_ci a boolean that will be ename:VK_TRUE if the support for 16-bit unsigned 839e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 840e5c31af7Sopenharmony_ci code:OpUDotAccSatKHR SPIR-V instruction is accelerated 841e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 842e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating16BitSignedAccelerated is a 843e5c31af7Sopenharmony_ci boolean that will be ename:VK_TRUE if the support for 16-bit signed 844e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 845e5c31af7Sopenharmony_ci code:OpSDotAccSatKHR SPIR-V instruction is accelerated 846e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 847e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated 848e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 16-bit mixed 849e5c31af7Sopenharmony_ci signedness accumulating saturating dot product operations using the 850e5c31af7Sopenharmony_ci code:OpSUDotAccSatKHR SPIR-V instruction is accelerated 851e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 852e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating32BitUnsignedAccelerated is 853e5c31af7Sopenharmony_ci a boolean that will be ename:VK_TRUE if the support for 32-bit unsigned 854e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 855e5c31af7Sopenharmony_ci code:OpUDotAccSatKHR SPIR-V instruction is accelerated 856e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 857e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating32BitSignedAccelerated is a 858e5c31af7Sopenharmony_ci boolean that will be ename:VK_TRUE if the support for 32-bit signed 859e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 860e5c31af7Sopenharmony_ci code:OpSDotAccSatKHR SPIR-V instruction is accelerated 861e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 862e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated 863e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 32-bit mixed 864e5c31af7Sopenharmony_ci signedness accumulating saturating dot product operations using the 865e5c31af7Sopenharmony_ci code:OpSUDotAccSatKHR SPIR-V instruction is accelerated 866e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 867e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating64BitUnsignedAccelerated is 868e5c31af7Sopenharmony_ci a boolean that will be ename:VK_TRUE if the support for 64-bit unsigned 869e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 870e5c31af7Sopenharmony_ci code:OpUDotAccSatKHR SPIR-V instruction is accelerated 871e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 872e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating64BitSignedAccelerated is a 873e5c31af7Sopenharmony_ci boolean that will be ename:VK_TRUE if the support for 64-bit signed 874e5c31af7Sopenharmony_ci accumulating saturating dot product operations using the 875e5c31af7Sopenharmony_ci code:OpSDotAccSatKHR SPIR-V instruction is accelerated 876e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 877e5c31af7Sopenharmony_ci * pname:integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated 878e5c31af7Sopenharmony_ci is a boolean that will be ename:VK_TRUE if the support for 64-bit mixed 879e5c31af7Sopenharmony_ci signedness accumulating saturating dot product operations using the 880e5c31af7Sopenharmony_ci code:OpSUDotAccSatKHR SPIR-V instruction is accelerated 881e5c31af7Sopenharmony_ci <<devsandqueues-integer-dot-product-accelerated,as defined below>>. 882e5c31af7Sopenharmony_ci 883e5c31af7Sopenharmony_ci:refpage: VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR 884e5c31af7Sopenharmony_ciinclude::{chapters}/limits.txt[tag=limits_desc] 885e5c31af7Sopenharmony_ci 886e5c31af7Sopenharmony_ciThese are properties of the integer dot product acceleration information of 887e5c31af7Sopenharmony_cia physical device. 888e5c31af7Sopenharmony_ci 889e5c31af7Sopenharmony_ci[[devsandqueues-integer-dot-product-accelerated]] 890e5c31af7Sopenharmony_ci[NOTE] 891e5c31af7Sopenharmony_ci.Note 892e5c31af7Sopenharmony_ci==== 893e5c31af7Sopenharmony_ciA dot product operation is deemed accelerated if its implementation provides 894e5c31af7Sopenharmony_cia performance advantage over application-provided code composed from 895e5c31af7Sopenharmony_cielementary instructions and/or other dot product instructions, either 896e5c31af7Sopenharmony_cibecause the implementation uses optimized machine code sequences whose 897e5c31af7Sopenharmony_cigeneration from application-provided code cannot be guaranteed or because it 898e5c31af7Sopenharmony_ciuses hardware features that cannot otherwise be targeted from 899e5c31af7Sopenharmony_ciapplication-provided code. 900e5c31af7Sopenharmony_ci==== 901e5c31af7Sopenharmony_ci 902e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR.txt[] 903e5c31af7Sopenharmony_ci-- 904e5c31af7Sopenharmony_ciendif::VK_KHR_shader_integer_dot_product[] 905e5c31af7Sopenharmony_ci 906e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceQueueFamilyProperties',desc='Reports properties of the queues of the specified physical device',type='protos'] 907e5c31af7Sopenharmony_ci-- 908e5c31af7Sopenharmony_ciTo query properties of queues available on a physical device, call: 909e5c31af7Sopenharmony_ci 910e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt[] 911e5c31af7Sopenharmony_ci 912e5c31af7Sopenharmony_ci * pname:physicalDevice is the handle to the physical device whose 913e5c31af7Sopenharmony_ci properties will be queried. 914e5c31af7Sopenharmony_ci * pname:pQueueFamilyPropertyCount is a pointer to an integer related to 915e5c31af7Sopenharmony_ci the number of queue families available or queried, as described below. 916e5c31af7Sopenharmony_ci * pname:pQueueFamilyProperties is either `NULL` or a pointer to an array 917e5c31af7Sopenharmony_ci of slink:VkQueueFamilyProperties structures. 918e5c31af7Sopenharmony_ci 919e5c31af7Sopenharmony_ciIf pname:pQueueFamilyProperties is `NULL`, then the number of queue families 920e5c31af7Sopenharmony_ciavailable is returned in pname:pQueueFamilyPropertyCount. 921e5c31af7Sopenharmony_ciImplementations must: support at least one queue family. 922e5c31af7Sopenharmony_ciOtherwise, pname:pQueueFamilyPropertyCount must: point to a variable set by 923e5c31af7Sopenharmony_cithe user to the number of elements in the pname:pQueueFamilyProperties 924e5c31af7Sopenharmony_ciarray, and on return the variable is overwritten with the number of 925e5c31af7Sopenharmony_cistructures actually written to pname:pQueueFamilyProperties. 926e5c31af7Sopenharmony_ciIf pname:pQueueFamilyPropertyCount is less than the number of queue families 927e5c31af7Sopenharmony_ciavailable, at most pname:pQueueFamilyPropertyCount structures will be 928e5c31af7Sopenharmony_ciwritten. 929e5c31af7Sopenharmony_ci 930e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt[] 931e5c31af7Sopenharmony_ci-- 932e5c31af7Sopenharmony_ci 933e5c31af7Sopenharmony_ci[open,refpage='VkQueueFamilyProperties',desc='Structure providing information about a queue family',type='structs'] 934e5c31af7Sopenharmony_ci-- 935e5c31af7Sopenharmony_ciThe sname:VkQueueFamilyProperties structure is defined as: 936e5c31af7Sopenharmony_ci 937e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkQueueFamilyProperties.txt[] 938e5c31af7Sopenharmony_ci 939e5c31af7Sopenharmony_ci * pname:queueFlags is a bitmask of elink:VkQueueFlagBits indicating 940e5c31af7Sopenharmony_ci capabilities of the queues in this queue family. 941e5c31af7Sopenharmony_ci * pname:queueCount is the unsigned integer count of queues in this queue 942e5c31af7Sopenharmony_ci family. 943e5c31af7Sopenharmony_ci Each queue family must: support at least one queue. 944e5c31af7Sopenharmony_ci * pname:timestampValidBits is the unsigned integer count of meaningful 945e5c31af7Sopenharmony_ci bits in the timestamps written via 946e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[] 947e5c31af7Sopenharmony_ci flink:vkCmdWriteTimestamp2KHR or 948e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[] 949e5c31af7Sopenharmony_ci flink:vkCmdWriteTimestamp. 950e5c31af7Sopenharmony_ci The valid range for the count is 36..64 bits, or a value of 0, 951e5c31af7Sopenharmony_ci indicating no support for timestamps. 952e5c31af7Sopenharmony_ci Bits outside the valid range are guaranteed to be zeros. 953e5c31af7Sopenharmony_ci * pname:minImageTransferGranularity is the minimum granularity supported 954e5c31af7Sopenharmony_ci for image transfer operations on the queues in this queue family. 955e5c31af7Sopenharmony_ci 956e5c31af7Sopenharmony_ciThe value returned in pname:minImageTransferGranularity has a unit of 957e5c31af7Sopenharmony_cicompressed texel blocks for images having a block-compressed format, and a 958e5c31af7Sopenharmony_ciunit of texels otherwise. 959e5c31af7Sopenharmony_ci 960e5c31af7Sopenharmony_ciPossible values of pname:minImageTransferGranularity are: 961e5c31af7Sopenharmony_ci 962e5c31af7Sopenharmony_ci * [eq]#(0,0,0)# specifies that only whole mip levels must: be transferred 963e5c31af7Sopenharmony_ci using the image transfer operations on the corresponding queues. 964e5c31af7Sopenharmony_ci In this case, the following restrictions apply to all offset and extent 965e5c31af7Sopenharmony_ci parameters of image transfer operations: 966e5c31af7Sopenharmony_ci ** The pname:x, pname:y, and pname:z members of a slink:VkOffset3D 967e5c31af7Sopenharmony_ci parameter must: always be zero. 968e5c31af7Sopenharmony_ci ** The pname:width, pname:height, and pname:depth members of a 969e5c31af7Sopenharmony_ci slink:VkExtent3D parameter must: always match the width, height, and 970e5c31af7Sopenharmony_ci depth of the image subresource corresponding to the parameter, 971e5c31af7Sopenharmony_ci respectively. 972e5c31af7Sopenharmony_ci * [eq]#(A~x~, A~y~, A~z~)# where [eq]#A~x~#, [eq]#A~y~#, and [eq]#A~z~# 973e5c31af7Sopenharmony_ci are all integer powers of two. 974e5c31af7Sopenharmony_ci In this case the following restrictions apply to all image transfer 975e5c31af7Sopenharmony_ci operations: 976e5c31af7Sopenharmony_ci ** pname:x, pname:y, and pname:z of a slink:VkOffset3D parameter must: be 977e5c31af7Sopenharmony_ci integer multiples of [eq]#A~x~#, [eq]#A~y~#, and [eq]#A~z~#, 978e5c31af7Sopenharmony_ci respectively. 979e5c31af7Sopenharmony_ci ** pname:width of a slink:VkExtent3D parameter must: be an integer 980e5c31af7Sopenharmony_ci multiple of [eq]#A~x~#, or else [eq]#pname:x {plus} pname:width# must: 981e5c31af7Sopenharmony_ci equal the width of the image subresource corresponding to the 982e5c31af7Sopenharmony_ci parameter. 983e5c31af7Sopenharmony_ci ** pname:height of a slink:VkExtent3D parameter must: be an integer 984e5c31af7Sopenharmony_ci multiple of [eq]#A~y~#, or else [eq]#pname:y {plus} pname:height# must: 985e5c31af7Sopenharmony_ci equal the height of the image subresource corresponding to the 986e5c31af7Sopenharmony_ci parameter. 987e5c31af7Sopenharmony_ci ** pname:depth of a slink:VkExtent3D parameter must: be an integer 988e5c31af7Sopenharmony_ci multiple of [eq]#A~z~#, or else [eq]#pname:z {plus} pname:depth# must: 989e5c31af7Sopenharmony_ci equal the depth of the image subresource corresponding to the 990e5c31af7Sopenharmony_ci parameter. 991e5c31af7Sopenharmony_ci ** If the format of the image corresponding to the parameters is one of 992e5c31af7Sopenharmony_ci the block-compressed formats then for the purposes of the above 993e5c31af7Sopenharmony_ci calculations the granularity must: be scaled up by the compressed texel 994e5c31af7Sopenharmony_ci block dimensions. 995e5c31af7Sopenharmony_ci 996e5c31af7Sopenharmony_ciQueues supporting graphics and/or compute operations must: report 997e5c31af7Sopenharmony_ci[eq]#(1,1,1)# in pname:minImageTransferGranularity, meaning that there are 998e5c31af7Sopenharmony_cino additional restrictions on the granularity of image transfer operations 999e5c31af7Sopenharmony_cifor these queues. 1000e5c31af7Sopenharmony_ciOther queues supporting image transfer operations are only required: to 1001e5c31af7Sopenharmony_cisupport whole mip level transfers, thus pname:minImageTransferGranularity 1002e5c31af7Sopenharmony_cifor queues belonging to such queue families may: be [eq]#(0,0,0)#. 1003e5c31af7Sopenharmony_ci 1004e5c31af7Sopenharmony_ciThe <<memory-device,Device Memory>> section describes memory properties 1005e5c31af7Sopenharmony_ciqueried from the physical device. 1006e5c31af7Sopenharmony_ci 1007e5c31af7Sopenharmony_ciFor physical device feature queries see the <<features, Features>> chapter. 1008e5c31af7Sopenharmony_ci 1009e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkQueueFamilyProperties.txt[] 1010e5c31af7Sopenharmony_ci-- 1011e5c31af7Sopenharmony_ci 1012e5c31af7Sopenharmony_ci[open,refpage='VkQueueFlagBits',desc='Bitmask specifying capabilities of queues in a queue family',type='enums'] 1013e5c31af7Sopenharmony_ci-- 1014e5c31af7Sopenharmony_ciBits which may: be set in slink:VkQueueFamilyProperties::pname:queueFlags 1015e5c31af7Sopenharmony_ciindicating capabilities of queues in a queue family are: 1016e5c31af7Sopenharmony_ci 1017e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkQueueFlagBits.txt[] 1018e5c31af7Sopenharmony_ci 1019e5c31af7Sopenharmony_ci * ename:VK_QUEUE_GRAPHICS_BIT specifies that queues in this queue family 1020e5c31af7Sopenharmony_ci support graphics operations. 1021e5c31af7Sopenharmony_ci * ename:VK_QUEUE_COMPUTE_BIT specifies that queues in this queue family 1022e5c31af7Sopenharmony_ci support compute operations. 1023e5c31af7Sopenharmony_ci * ename:VK_QUEUE_TRANSFER_BIT specifies that queues in this queue family 1024e5c31af7Sopenharmony_ci support transfer operations. 1025e5c31af7Sopenharmony_ci * ename:VK_QUEUE_SPARSE_BINDING_BIT specifies that queues in this queue 1026e5c31af7Sopenharmony_ci family support sparse memory management operations (see 1027e5c31af7Sopenharmony_ci <<sparsememory,Sparse Resources>>). 1028e5c31af7Sopenharmony_ci If any of the sparse resource features are enabled, then at least one 1029e5c31af7Sopenharmony_ci queue family must: support this bit. 1030e5c31af7Sopenharmony_ciifdef::VK_KHR_video_decode_queue[] 1031e5c31af7Sopenharmony_ci * ename:VK_QUEUE_VIDEO_DECODE_BIT_KHR specifies that queues in this queue 1032e5c31af7Sopenharmony_ci family support Video Decode operations. 1033e5c31af7Sopenharmony_ciendif::VK_KHR_video_decode_queue[] 1034e5c31af7Sopenharmony_ciifdef::VK_KHR_video_encode_queue[] 1035e5c31af7Sopenharmony_ci * ename:VK_QUEUE_VIDEO_ENCODE_BIT_KHR specifies that queues in this queue 1036e5c31af7Sopenharmony_ci family support Video Encode operations. 1037e5c31af7Sopenharmony_ciendif::VK_KHR_video_encode_queue[] 1038e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 1039e5c31af7Sopenharmony_ci * ename:VK_QUEUE_PROTECTED_BIT specifies that queues in this queue family 1040e5c31af7Sopenharmony_ci support the ename:VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT bit. 1041e5c31af7Sopenharmony_ci (see <<memory-protected-memory,Protected Memory>>). 1042e5c31af7Sopenharmony_ci If the physical device supports the pname:protectedMemory feature, at 1043e5c31af7Sopenharmony_ci least one of its queue families must: support this bit. 1044e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1045e5c31af7Sopenharmony_ci 1046e5c31af7Sopenharmony_ciIf an implementation exposes any queue family that supports graphics 1047e5c31af7Sopenharmony_cioperations, at least one queue family of at least one physical device 1048e5c31af7Sopenharmony_ciexposed by the implementation must: support both graphics and compute 1049e5c31af7Sopenharmony_cioperations. 1050e5c31af7Sopenharmony_ci 1051e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 1052e5c31af7Sopenharmony_ciFurthermore, if the protected memory physical device feature is supported, 1053e5c31af7Sopenharmony_cithen at least one queue family of at least one physical device exposed by 1054e5c31af7Sopenharmony_cithe implementation must: support graphics operations, compute operations, 1055e5c31af7Sopenharmony_ciand protected memory operations. 1056e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1057e5c31af7Sopenharmony_ci 1058e5c31af7Sopenharmony_ci[NOTE] 1059e5c31af7Sopenharmony_ci.Note 1060e5c31af7Sopenharmony_ci==== 1061e5c31af7Sopenharmony_ciAll commands that are allowed on a queue that supports transfer operations 1062e5c31af7Sopenharmony_ciare also allowed on a queue that supports either graphics or compute 1063e5c31af7Sopenharmony_cioperations. 1064e5c31af7Sopenharmony_ciThus, if the capabilities of a queue family include 1065e5c31af7Sopenharmony_ciename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT, then reporting 1066e5c31af7Sopenharmony_cithe ename:VK_QUEUE_TRANSFER_BIT capability separately for that queue family 1067e5c31af7Sopenharmony_ciis optional:. 1068e5c31af7Sopenharmony_ci==== 1069e5c31af7Sopenharmony_ci 1070e5c31af7Sopenharmony_ciFor further details see <<devsandqueues-queues,Queues>>. 1071e5c31af7Sopenharmony_ci-- 1072e5c31af7Sopenharmony_ci 1073e5c31af7Sopenharmony_ci[open,refpage='VkQueueFlags',desc='Bitmask of VkQueueFlagBits',type='flags'] 1074e5c31af7Sopenharmony_ci-- 1075e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkQueueFlags.txt[] 1076e5c31af7Sopenharmony_ci 1077e5c31af7Sopenharmony_citname:VkQueueFlags is a bitmask type for setting a mask of zero or more 1078e5c31af7Sopenharmony_cielink:VkQueueFlagBits. 1079e5c31af7Sopenharmony_ci-- 1080e5c31af7Sopenharmony_ci 1081e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] 1082e5c31af7Sopenharmony_ci[open,refpage='vkGetPhysicalDeviceQueueFamilyProperties2',desc='Reports properties of the queues of the specified physical device',type='protos'] 1083e5c31af7Sopenharmony_ci-- 1084e5c31af7Sopenharmony_ciTo query properties of queues available on a physical device, call: 1085e5c31af7Sopenharmony_ci 1086e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 1087e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceQueueFamilyProperties2.txt[] 1088e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1089e5c31af7Sopenharmony_ci 1090e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_get_physical_device_properties2[or the equivalent command] 1091e5c31af7Sopenharmony_ci 1092e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[] 1093e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetPhysicalDeviceQueueFamilyProperties2KHR.txt[] 1094e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[] 1095e5c31af7Sopenharmony_ci 1096e5c31af7Sopenharmony_ci * pname:physicalDevice is the handle to the physical device whose 1097e5c31af7Sopenharmony_ci properties will be queried. 1098e5c31af7Sopenharmony_ci * pname:pQueueFamilyPropertyCount is a pointer to an integer related to 1099e5c31af7Sopenharmony_ci the number of queue families available or queried, as described in 1100e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceQueueFamilyProperties. 1101e5c31af7Sopenharmony_ci * pname:pQueueFamilyProperties is either `NULL` or a pointer to an array 1102e5c31af7Sopenharmony_ci of slink:VkQueueFamilyProperties2 structures. 1103e5c31af7Sopenharmony_ci 1104e5c31af7Sopenharmony_cifname:vkGetPhysicalDeviceQueueFamilyProperties2 behaves similarly to 1105e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceQueueFamilyProperties, with the ability to return 1106e5c31af7Sopenharmony_ciextended information in a pname:pNext chain of output structures. 1107e5c31af7Sopenharmony_ci 1108e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetPhysicalDeviceQueueFamilyProperties2.txt[] 1109e5c31af7Sopenharmony_ci-- 1110e5c31af7Sopenharmony_ci 1111e5c31af7Sopenharmony_ci[open,refpage='VkQueueFamilyProperties2',desc='Structure providing information about a queue family',type='structs'] 1112e5c31af7Sopenharmony_ci-- 1113e5c31af7Sopenharmony_ciThe sname:VkQueueFamilyProperties2 structure is defined as: 1114e5c31af7Sopenharmony_ci 1115e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkQueueFamilyProperties2.txt[] 1116e5c31af7Sopenharmony_ci 1117e5c31af7Sopenharmony_ciifdef::VK_KHR_get_physical_device_properties2[] 1118e5c31af7Sopenharmony_cior the equivalent 1119e5c31af7Sopenharmony_ci 1120e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkQueueFamilyProperties2KHR.txt[] 1121e5c31af7Sopenharmony_ciendif::VK_KHR_get_physical_device_properties2[] 1122e5c31af7Sopenharmony_ci 1123e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1124e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1125e5c31af7Sopenharmony_ci structure. 1126e5c31af7Sopenharmony_ci * pname:queueFamilyProperties is a slink:VkQueueFamilyProperties structure 1127e5c31af7Sopenharmony_ci which is populated with the same values as in 1128e5c31af7Sopenharmony_ci flink:vkGetPhysicalDeviceQueueFamilyProperties. 1129e5c31af7Sopenharmony_ci 1130e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkQueueFamilyProperties2.txt[] 1131e5c31af7Sopenharmony_ci-- 1132e5c31af7Sopenharmony_ci 1133e5c31af7Sopenharmony_ciifdef::VK_EXT_global_priority_query[] 1134e5c31af7Sopenharmony_ci 1135e5c31af7Sopenharmony_ci[open,refpage='VkQueueFamilyGlobalPriorityPropertiesEXT',desc='Return structure for queue family global priority information query',type='structs'] 1136e5c31af7Sopenharmony_ci-- 1137e5c31af7Sopenharmony_ci 1138e5c31af7Sopenharmony_ciThe definition of slink:VkQueueFamilyGlobalPriorityPropertiesEXT is: 1139e5c31af7Sopenharmony_ci 1140e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkQueueFamilyGlobalPriorityPropertiesEXT.txt[] 1141e5c31af7Sopenharmony_ci 1142e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1143e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1144e5c31af7Sopenharmony_ci structure. 1145e5c31af7Sopenharmony_ci * pname:priorityCount is the number of supported global queue priorities 1146e5c31af7Sopenharmony_ci in this queue family, and it must: be greater than 0. 1147e5c31af7Sopenharmony_ci * pname:priorities is an array of ename:VK_MAX_GLOBAL_PRIORITY_SIZE_EXT 1148e5c31af7Sopenharmony_ci elink:VkQueueGlobalPriorityEXT enums representing all supported global 1149e5c31af7Sopenharmony_ci queue priorities in this queue family. 1150e5c31af7Sopenharmony_ci The first pname:priorityCount elements of the array will be valid. 1151e5c31af7Sopenharmony_ci 1152e5c31af7Sopenharmony_ciThe valid elements of pname:priorities must: not contain any duplicate 1153e5c31af7Sopenharmony_civalues. 1154e5c31af7Sopenharmony_ci 1155e5c31af7Sopenharmony_ciThe valid elements of pname:priorities must: be a continuous sequence of 1156e5c31af7Sopenharmony_cielink:VkQueueGlobalPriorityEXT enums in the ascending order. 1157e5c31af7Sopenharmony_ci 1158e5c31af7Sopenharmony_ci[NOTE] 1159e5c31af7Sopenharmony_ci.Note 1160e5c31af7Sopenharmony_ci==== 1161e5c31af7Sopenharmony_ciFor example, returning pname:priorityCount as 3 with supported 1162e5c31af7Sopenharmony_cipname:priorities as ename:VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, 1163e5c31af7Sopenharmony_ciename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT and 1164e5c31af7Sopenharmony_ciename:VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT is not allowed. 1165e5c31af7Sopenharmony_ci==== 1166e5c31af7Sopenharmony_ci 1167e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkQueueFamilyGlobalPriorityPropertiesEXT.txt[] 1168e5c31af7Sopenharmony_ci 1169e5c31af7Sopenharmony_ci-- 1170e5c31af7Sopenharmony_ci 1171e5c31af7Sopenharmony_ciendif::VK_EXT_global_priority_query[] 1172e5c31af7Sopenharmony_ci 1173e5c31af7Sopenharmony_ciifdef::VK_NV_device_diagnostic_checkpoints[] 1174e5c31af7Sopenharmony_ciinclude::{chapters}/VK_NV_device_diagnostic_checkpoints/queue_checkpoint_properties.txt[] 1175e5c31af7Sopenharmony_ciendif::VK_NV_device_diagnostic_checkpoints[] 1176e5c31af7Sopenharmony_ci 1177e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] 1178e5c31af7Sopenharmony_ci 1179e5c31af7Sopenharmony_ciifdef::VK_KHR_performance_query[] 1180e5c31af7Sopenharmony_ciinclude::{chapters}/VK_KHR_performance_query/queuefamily.txt[] 1181e5c31af7Sopenharmony_ciendif::VK_KHR_performance_query[] 1182e5c31af7Sopenharmony_ci 1183e5c31af7Sopenharmony_ci 1184e5c31af7Sopenharmony_ci[[devsandqueues-devices]] 1185e5c31af7Sopenharmony_ci== Devices 1186e5c31af7Sopenharmony_ci 1187e5c31af7Sopenharmony_ciDevice objects represent logical connections to physical devices. 1188e5c31af7Sopenharmony_ciEach device exposes a number of _queue families_ each having one or more 1189e5c31af7Sopenharmony_ci_queues_. 1190e5c31af7Sopenharmony_ciAll queues in a queue family support the same operations. 1191e5c31af7Sopenharmony_ci 1192e5c31af7Sopenharmony_ciAs described in <<devsandqueues-physical-device-enumeration,Physical 1193e5c31af7Sopenharmony_ciDevices>>, a Vulkan application will first query for all physical devices in 1194e5c31af7Sopenharmony_cia system. 1195e5c31af7Sopenharmony_ciEach physical device can: then be queried for its capabilities, including 1196e5c31af7Sopenharmony_ciits queue and queue family properties. 1197e5c31af7Sopenharmony_ciOnce an acceptable physical device is identified, an application will create 1198e5c31af7Sopenharmony_cia corresponding logical device. 1199e5c31af7Sopenharmony_ciThe created logical device is then the primary interface to the physical 1200e5c31af7Sopenharmony_cidevice. 1201e5c31af7Sopenharmony_ci 1202e5c31af7Sopenharmony_ciHow to enumerate the physical devices in a system and query those physical 1203e5c31af7Sopenharmony_cidevices for their queue family properties is described in the 1204e5c31af7Sopenharmony_ci<<devsandqueues-physical-device-enumeration, Physical Device Enumeration>> 1205e5c31af7Sopenharmony_cisection above. 1206e5c31af7Sopenharmony_ci 1207e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group_creation[] 1208e5c31af7Sopenharmony_ci 1209e5c31af7Sopenharmony_ciA single logical device can: be created from multiple physical devices, if 1210e5c31af7Sopenharmony_cithose physical devices belong to the same device group. 1211e5c31af7Sopenharmony_ciA _device group_ is a set of physical devices that support accessing each 1212e5c31af7Sopenharmony_ciother's memory and recording a single command buffer that can: be executed 1213e5c31af7Sopenharmony_cion all the physical devices. 1214e5c31af7Sopenharmony_ciDevice groups are enumerated by calling 1215e5c31af7Sopenharmony_ciflink:vkEnumeratePhysicalDeviceGroups, and a logical device is created from 1216e5c31af7Sopenharmony_cia subset of the physical devices in a device group by passing the physical 1217e5c31af7Sopenharmony_cidevices through slink:VkDeviceGroupDeviceCreateInfo. 1218e5c31af7Sopenharmony_ciFor two physical devices to be in the same device group, they must: support 1219e5c31af7Sopenharmony_ciidentical extensions, features, and properties. 1220e5c31af7Sopenharmony_ci 1221e5c31af7Sopenharmony_ci[NOTE] 1222e5c31af7Sopenharmony_ci.Note 1223e5c31af7Sopenharmony_ci==== 1224e5c31af7Sopenharmony_ciPhysical devices in the same device group must: be so similar because there 1225e5c31af7Sopenharmony_ciare no rules for how different features/properties would interact. 1226e5c31af7Sopenharmony_ciThey must: return the same values for nearly every invariant 1227e5c31af7Sopenharmony_ciftext:vkGetPhysicalDevice* feature, property, capability, etc., but could 1228e5c31af7Sopenharmony_cipotentially differ for certain queries based on things like having a 1229e5c31af7Sopenharmony_cidifferent display connected, or a different compositor. 1230e5c31af7Sopenharmony_ciThe specification does not attempt to enumerate which state is in each 1231e5c31af7Sopenharmony_cicategory, because such a list would quickly become out of date. 1232e5c31af7Sopenharmony_ci==== 1233e5c31af7Sopenharmony_ci 1234e5c31af7Sopenharmony_ci[open,refpage='vkEnumeratePhysicalDeviceGroups',desc='Enumerates groups of physical devices that can be used to create a single logical device',type='protos'] 1235e5c31af7Sopenharmony_ci-- 1236e5c31af7Sopenharmony_ciTo retrieve a list of the device groups present in the system, call: 1237e5c31af7Sopenharmony_ci 1238e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 1239e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkEnumeratePhysicalDeviceGroups.txt[] 1240e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1241e5c31af7Sopenharmony_ci 1242e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1+VK_KHR_device_group_creation[or the equivalent command] 1243e5c31af7Sopenharmony_ci 1244e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group_creation[] 1245e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkEnumeratePhysicalDeviceGroupsKHR.txt[] 1246e5c31af7Sopenharmony_ciendif::VK_KHR_device_group_creation[] 1247e5c31af7Sopenharmony_ci 1248e5c31af7Sopenharmony_ci * pname:instance is a handle to a Vulkan instance previously created with 1249e5c31af7Sopenharmony_ci flink:vkCreateInstance. 1250e5c31af7Sopenharmony_ci * pname:pPhysicalDeviceGroupCount is a pointer to an integer related to 1251e5c31af7Sopenharmony_ci the number of device groups available or queried, as described below. 1252e5c31af7Sopenharmony_ci * pname:pPhysicalDeviceGroupProperties is either `NULL` or a pointer to an 1253e5c31af7Sopenharmony_ci array of slink:VkPhysicalDeviceGroupProperties structures. 1254e5c31af7Sopenharmony_ci 1255e5c31af7Sopenharmony_ciIf pname:pPhysicalDeviceGroupProperties is `NULL`, then the number of device 1256e5c31af7Sopenharmony_cigroups available is returned in pname:pPhysicalDeviceGroupCount. 1257e5c31af7Sopenharmony_ciOtherwise, pname:pPhysicalDeviceGroupCount must: point to a variable set by 1258e5c31af7Sopenharmony_cithe user to the number of elements in the 1259e5c31af7Sopenharmony_cipname:pPhysicalDeviceGroupProperties array, and on return the variable is 1260e5c31af7Sopenharmony_cioverwritten with the number of structures actually written to 1261e5c31af7Sopenharmony_cipname:pPhysicalDeviceGroupProperties. 1262e5c31af7Sopenharmony_ciIf pname:pPhysicalDeviceGroupCount is less than the number of device groups 1263e5c31af7Sopenharmony_ciavailable, at most pname:pPhysicalDeviceGroupCount structures will be 1264e5c31af7Sopenharmony_ciwritten, and ename:VK_INCOMPLETE will be returned instead of 1265e5c31af7Sopenharmony_ciename:VK_SUCCESS, to indicate that not all the available device groups were 1266e5c31af7Sopenharmony_cireturned. 1267e5c31af7Sopenharmony_ci 1268e5c31af7Sopenharmony_ciEvery physical device must: be in exactly one device group. 1269e5c31af7Sopenharmony_ci 1270e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkEnumeratePhysicalDeviceGroups.txt[] 1271e5c31af7Sopenharmony_ci-- 1272e5c31af7Sopenharmony_ci 1273e5c31af7Sopenharmony_ci[open,refpage='VkPhysicalDeviceGroupProperties',desc='Structure specifying physical device group properties',type='structs'] 1274e5c31af7Sopenharmony_ci-- 1275e5c31af7Sopenharmony_ciThe sname:VkPhysicalDeviceGroupProperties structure is defined as: 1276e5c31af7Sopenharmony_ci 1277e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceGroupProperties.txt[] 1278e5c31af7Sopenharmony_ci 1279e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group_creation[] 1280e5c31af7Sopenharmony_cior the equivalent 1281e5c31af7Sopenharmony_ci 1282e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkPhysicalDeviceGroupPropertiesKHR.txt[] 1283e5c31af7Sopenharmony_ciendif::VK_KHR_device_group_creation[] 1284e5c31af7Sopenharmony_ci 1285e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1286e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1287e5c31af7Sopenharmony_ci structure. 1288e5c31af7Sopenharmony_ci * pname:physicalDeviceCount is the number of physical devices in the 1289e5c31af7Sopenharmony_ci group. 1290e5c31af7Sopenharmony_ci * pname:physicalDevices is an array of ename:VK_MAX_DEVICE_GROUP_SIZE 1291e5c31af7Sopenharmony_ci slink:VkPhysicalDevice handles representing all physical devices in the 1292e5c31af7Sopenharmony_ci group. 1293e5c31af7Sopenharmony_ci The first pname:physicalDeviceCount elements of the array will be valid. 1294e5c31af7Sopenharmony_ci * pname:subsetAllocation specifies whether logical devices created from 1295e5c31af7Sopenharmony_ci the group support allocating device memory on a subset of devices, via 1296e5c31af7Sopenharmony_ci the pname:deviceMask member of the slink:VkMemoryAllocateFlagsInfo. 1297e5c31af7Sopenharmony_ci If this is ename:VK_FALSE, then all device memory allocations are made 1298e5c31af7Sopenharmony_ci across all physical devices in the group. 1299e5c31af7Sopenharmony_ci If pname:physicalDeviceCount is `1`, then pname:subsetAllocation must: 1300e5c31af7Sopenharmony_ci be ename:VK_FALSE. 1301e5c31af7Sopenharmony_ci 1302e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkPhysicalDeviceGroupProperties.txt[] 1303e5c31af7Sopenharmony_ci-- 1304e5c31af7Sopenharmony_ci 1305e5c31af7Sopenharmony_ci[open,refpage='VK_MAX_DEVICE_GROUP_SIZE',desc='Length of a physical device handle array',type='consts',alias='VK_MAX_DEVICE_GROUP_SIZE_KHR'] 1306e5c31af7Sopenharmony_ci-- 1307e5c31af7Sopenharmony_ciename:VK_MAX_DEVICE_GROUP_SIZE is the length of an array containing 1308e5c31af7Sopenharmony_cislink:VkPhysicalDevice handle values representing all physical devices in a 1309e5c31af7Sopenharmony_cigroup, as returned in 1310e5c31af7Sopenharmony_cislink:VkPhysicalDeviceGroupProperties::physicalDevices. 1311e5c31af7Sopenharmony_ci 1312e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_DEVICE_GROUP_SIZE.txt[] 1313e5c31af7Sopenharmony_ci 1314e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group_creation[] 1315e5c31af7Sopenharmony_cior the equivalent 1316e5c31af7Sopenharmony_ci 1317e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VK_MAX_DEVICE_GROUP_SIZE_KHR.txt[] 1318e5c31af7Sopenharmony_ciendif::VK_KHR_device_group_creation[] 1319e5c31af7Sopenharmony_ci-- 1320e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group_creation[] 1321e5c31af7Sopenharmony_ci 1322e5c31af7Sopenharmony_ci 1323e5c31af7Sopenharmony_ci[[devsandqueues-device-creation]] 1324e5c31af7Sopenharmony_ci=== Device Creation 1325e5c31af7Sopenharmony_ci 1326e5c31af7Sopenharmony_ci[open,refpage='VkDevice',desc='Opaque handle to a device object',type='handles'] 1327e5c31af7Sopenharmony_ci-- 1328e5c31af7Sopenharmony_ciLogical devices are represented by sname:VkDevice handles: 1329e5c31af7Sopenharmony_ci 1330e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkDevice.txt[] 1331e5c31af7Sopenharmony_ci-- 1332e5c31af7Sopenharmony_ci 1333e5c31af7Sopenharmony_ci[open,refpage='vkCreateDevice',desc='Create a new device instance',type='protos'] 1334e5c31af7Sopenharmony_ci-- 1335e5c31af7Sopenharmony_ciA logical device is created as a _connection_ to a physical device. 1336e5c31af7Sopenharmony_ciTo create a logical device, call: 1337e5c31af7Sopenharmony_ci 1338e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkCreateDevice.txt[] 1339e5c31af7Sopenharmony_ci 1340e5c31af7Sopenharmony_ci * pname:physicalDevice must: be one of the device handles returned from a 1341e5c31af7Sopenharmony_ci call to fname:vkEnumeratePhysicalDevices (see 1342e5c31af7Sopenharmony_ci <<devsandqueues-physical-device-enumeration, Physical Device 1343e5c31af7Sopenharmony_ci Enumeration>>). 1344e5c31af7Sopenharmony_ci * pname:pCreateInfo is a pointer to a slink:VkDeviceCreateInfo structure 1345e5c31af7Sopenharmony_ci containing information about how to create the device. 1346e5c31af7Sopenharmony_ci * pname:pAllocator controls host memory allocation as described in the 1347e5c31af7Sopenharmony_ci <<memory-allocation, Memory Allocation>> chapter. 1348e5c31af7Sopenharmony_ci * pname:pDevice is a pointer to a handle in which the created 1349e5c31af7Sopenharmony_ci slink:VkDevice is returned. 1350e5c31af7Sopenharmony_ci 1351e5c31af7Sopenharmony_cifname:vkCreateDevice verifies that extensions and features requested in the 1352e5c31af7Sopenharmony_cipname:ppEnabledExtensionNames and pname:pEnabledFeatures members of 1353e5c31af7Sopenharmony_cipname:pCreateInfo, respectively, are supported by the implementation. 1354e5c31af7Sopenharmony_ciIf any requested extension is not supported, fname:vkCreateDevice must: 1355e5c31af7Sopenharmony_cireturn ename:VK_ERROR_EXTENSION_NOT_PRESENT. 1356e5c31af7Sopenharmony_ciIf any requested feature is not supported, fname:vkCreateDevice must: return 1357e5c31af7Sopenharmony_ciename:VK_ERROR_FEATURE_NOT_PRESENT. 1358e5c31af7Sopenharmony_ciSupport for extensions can: be checked before creating a device by querying 1359e5c31af7Sopenharmony_ciflink:vkEnumerateDeviceExtensionProperties. 1360e5c31af7Sopenharmony_ciSupport for features can: similarly be checked by querying 1361e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceFeatures. 1362e5c31af7Sopenharmony_ci 1363e5c31af7Sopenharmony_ciAfter verifying and enabling the extensions the sname:VkDevice object is 1364e5c31af7Sopenharmony_cicreated and returned to the application. 1365e5c31af7Sopenharmony_ci 1366e5c31af7Sopenharmony_ciMultiple logical devices can: be created from the same physical device. 1367e5c31af7Sopenharmony_ciLogical device creation may: fail due to lack of device-specific resources 1368e5c31af7Sopenharmony_ci(in addition to other errors). 1369e5c31af7Sopenharmony_ciIf that occurs, fname:vkCreateDevice will return 1370e5c31af7Sopenharmony_ciename:VK_ERROR_TOO_MANY_OBJECTS. 1371e5c31af7Sopenharmony_ci 1372e5c31af7Sopenharmony_ci.Valid Usage 1373e5c31af7Sopenharmony_ci**** 1374e5c31af7Sopenharmony_ci * [[VUID-vkCreateDevice-ppEnabledExtensionNames-01387]] 1375e5c31af7Sopenharmony_ci All <<extendingvulkan-extensions-extensiondependencies, required device 1376e5c31af7Sopenharmony_ci extensions>> for each extension in the 1377e5c31af7Sopenharmony_ci slink:VkDeviceCreateInfo::pname:ppEnabledExtensionNames list must: also 1378e5c31af7Sopenharmony_ci be present in that list 1379e5c31af7Sopenharmony_ci**** 1380e5c31af7Sopenharmony_ci 1381e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkCreateDevice.txt[] 1382e5c31af7Sopenharmony_ci-- 1383e5c31af7Sopenharmony_ci 1384e5c31af7Sopenharmony_ci[open,refpage='VkDeviceCreateInfo',desc='Structure specifying parameters of a newly created device',type='structs'] 1385e5c31af7Sopenharmony_ci-- 1386e5c31af7Sopenharmony_ciThe sname:VkDeviceCreateInfo structure is defined as: 1387e5c31af7Sopenharmony_ci 1388e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceCreateInfo.txt[] 1389e5c31af7Sopenharmony_ci 1390e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1391e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1392e5c31af7Sopenharmony_ci structure. 1393e5c31af7Sopenharmony_ci * pname:flags is reserved for future use. 1394e5c31af7Sopenharmony_ci * pname:queueCreateInfoCount is the unsigned integer size of the 1395e5c31af7Sopenharmony_ci pname:pQueueCreateInfos array. 1396e5c31af7Sopenharmony_ci Refer to the <<devsandqueues-queue-creation,Queue Creation>> section 1397e5c31af7Sopenharmony_ci below for further details. 1398e5c31af7Sopenharmony_ci * pname:pQueueCreateInfos is a pointer to an array of 1399e5c31af7Sopenharmony_ci slink:VkDeviceQueueCreateInfo structures describing the queues that are 1400e5c31af7Sopenharmony_ci requested to be created along with the logical device. 1401e5c31af7Sopenharmony_ci Refer to the <<devsandqueues-queue-creation,Queue Creation>> section 1402e5c31af7Sopenharmony_ci below for further details. 1403e5c31af7Sopenharmony_ci * pname:enabledLayerCount is deprecated and ignored. 1404e5c31af7Sopenharmony_ci * pname:ppEnabledLayerNames is deprecated and ignored. 1405e5c31af7Sopenharmony_ci See <<extendingvulkan-layers-devicelayerdeprecation>>. 1406e5c31af7Sopenharmony_ci * pname:enabledExtensionCount is the number of device extensions to 1407e5c31af7Sopenharmony_ci enable. 1408e5c31af7Sopenharmony_ci * pname:ppEnabledExtensionNames is a pointer to an array of 1409e5c31af7Sopenharmony_ci pname:enabledExtensionCount null-terminated UTF-8 strings containing the 1410e5c31af7Sopenharmony_ci names of extensions to enable for the created device. 1411e5c31af7Sopenharmony_ci See the <<extendingvulkan-extensions>> section for further details. 1412e5c31af7Sopenharmony_ci * pname:pEnabledFeatures is `NULL` or a pointer to a 1413e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceFeatures structure containing boolean indicators 1414e5c31af7Sopenharmony_ci of all the features to be enabled. 1415e5c31af7Sopenharmony_ci Refer to the <<features,Features>> section for further details. 1416e5c31af7Sopenharmony_ci 1417e5c31af7Sopenharmony_ci.Valid Usage 1418e5c31af7Sopenharmony_ci**** 1419e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1[] 1420e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-queueFamilyIndex-00372]] 1421e5c31af7Sopenharmony_ci The pname:queueFamilyIndex member of each element of 1422e5c31af7Sopenharmony_ci pname:pQueueCreateInfos must: be unique within pname:pQueueCreateInfos 1423e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1424e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 1425e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-queueFamilyIndex-02802]] 1426e5c31af7Sopenharmony_ci The pname:queueFamilyIndex member of each element of 1427e5c31af7Sopenharmony_ci pname:pQueueCreateInfos must: be unique within pname:pQueueCreateInfos, 1428e5c31af7Sopenharmony_ci except that two members can share the same pname:queueFamilyIndex if one 1429e5c31af7Sopenharmony_ci is a protected-capable queue and one is not a protected-capable queue 1430e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1431e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] 1432e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-pNext-00373]] 1433e5c31af7Sopenharmony_ci If the pname:pNext chain includes a slink:VkPhysicalDeviceFeatures2 1434e5c31af7Sopenharmony_ci structure, then pname:pEnabledFeatures must: be `NULL` 1435e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] 1436e5c31af7Sopenharmony_ciifdef::VK_AMD_negative_viewport_height[] 1437e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 1438e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-01840]] 1439e5c31af7Sopenharmony_ci pname:ppEnabledExtensionNames must: not contain 1440e5c31af7Sopenharmony_ci `apiext:VK_AMD_negative_viewport_height` 1441e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1442e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1[] 1443e5c31af7Sopenharmony_ciifdef::VK_KHR_maintenance1[] 1444e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-00374]] 1445e5c31af7Sopenharmony_ci pname:ppEnabledExtensionNames must: not contain both 1446e5c31af7Sopenharmony_ci `apiext:VK_KHR_maintenance1` and 1447e5c31af7Sopenharmony_ci `apiext:VK_AMD_negative_viewport_height` 1448e5c31af7Sopenharmony_ciendif::VK_KHR_maintenance1[] 1449e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 1450e5c31af7Sopenharmony_ciendif::VK_AMD_negative_viewport_height[] 1451e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address+VK_KHR_buffer_device_address[] 1452e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-03328]] 1453e5c31af7Sopenharmony_ci pname:ppEnabledExtensionNames must: not contain both 1454e5c31af7Sopenharmony_ci `apiext:VK_KHR_buffer_device_address` and 1455e5c31af7Sopenharmony_ci `apiext:VK_EXT_buffer_device_address` 1456e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address+VK_KHR_buffer_device_address[] 1457e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2[] 1458e5c31af7Sopenharmony_ciifdef::VK_EXT_buffer_device_address[] 1459e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-pNext-04748]] 1460e5c31af7Sopenharmony_ci if the pname:pNext chain includes a 1461e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkan12Features structure and 1462e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkan12Features::pname:bufferDeviceAddress is 1463e5c31af7Sopenharmony_ci ename:VK_TRUE, pname:ppEnabledExtensionNames must: not contain 1464e5c31af7Sopenharmony_ci `apiext:VK_EXT_buffer_device_address` 1465e5c31af7Sopenharmony_ciendif::VK_EXT_buffer_device_address[] 1466e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-pNext-02829]] 1467e5c31af7Sopenharmony_ci If the pname:pNext chain includes a 1468e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkan11Features structure, then it must: not 1469e5c31af7Sopenharmony_ci include a slink:VkPhysicalDevice16BitStorageFeatures, 1470e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceMultiviewFeatures, 1471e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVariablePointersFeatures, 1472e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceProtectedMemoryFeatures, 1473e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceSamplerYcbcrConversionFeatures, or 1474e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceShaderDrawParametersFeatures structure 1475e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-pNext-02830]] 1476e5c31af7Sopenharmony_ci If the pname:pNext chain includes a 1477e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkan12Features structure, then it must: not 1478e5c31af7Sopenharmony_ci include a slink:VkPhysicalDevice8BitStorageFeatures, 1479e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceShaderAtomicInt64Features, 1480e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceShaderFloat16Int8Features, 1481e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceDescriptorIndexingFeatures, 1482e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceScalarBlockLayoutFeatures, 1483e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceImagelessFramebufferFeatures, 1484e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceUniformBufferStandardLayoutFeatures, 1485e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, 1486e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, 1487e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceHostQueryResetFeatures, 1488e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceTimelineSemaphoreFeatures, 1489e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceBufferDeviceAddressFeatures, or 1490e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkanMemoryModelFeatures structure 1491e5c31af7Sopenharmony_ciifdef::VK_KHR_shader_draw_parameters[] 1492e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensions-04476]] 1493e5c31af7Sopenharmony_ci If pname:ppEnabledExtensions contains `"VK_KHR_shader_draw_parameters"` 1494e5c31af7Sopenharmony_ci and the pname:pNext chain includes a 1495e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkan11Features structure, then 1496e5c31af7Sopenharmony_ci sname:VkPhysicalDeviceVulkan11Features::pname:shaderDrawParameters must: 1497e5c31af7Sopenharmony_ci be ename:VK_TRUE 1498e5c31af7Sopenharmony_ciendif::VK_KHR_shader_draw_parameters[] 1499e5c31af7Sopenharmony_ciifdef::VK_KHR_draw_indirect_count[] 1500e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensions-02831]] 1501e5c31af7Sopenharmony_ci If pname:ppEnabledExtensions contains `"VK_KHR_draw_indirect_count"` and 1502e5c31af7Sopenharmony_ci the pname:pNext chain includes a slink:VkPhysicalDeviceVulkan12Features 1503e5c31af7Sopenharmony_ci structure, then 1504e5c31af7Sopenharmony_ci sname:VkPhysicalDeviceVulkan12Features::pname:drawIndirectCount must: be 1505e5c31af7Sopenharmony_ci ename:VK_TRUE 1506e5c31af7Sopenharmony_ciendif::VK_KHR_draw_indirect_count[] 1507e5c31af7Sopenharmony_ciifdef::VK_KHR_sampler_mirror_clamp_to_edge[] 1508e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensions-02832]] 1509e5c31af7Sopenharmony_ci If pname:ppEnabledExtensions contains 1510e5c31af7Sopenharmony_ci `"VK_KHR_sampler_mirror_clamp_to_edge"` and the pname:pNext chain 1511e5c31af7Sopenharmony_ci includes a slink:VkPhysicalDeviceVulkan12Features structure, then 1512e5c31af7Sopenharmony_ci sname:VkPhysicalDeviceVulkan12Features::pname:samplerMirrorClampToEdge 1513e5c31af7Sopenharmony_ci must: be ename:VK_TRUE 1514e5c31af7Sopenharmony_ciendif::VK_KHR_sampler_mirror_clamp_to_edge[] 1515e5c31af7Sopenharmony_ciifdef::VK_EXT_descriptor_indexing[] 1516e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensions-02833]] 1517e5c31af7Sopenharmony_ci If pname:ppEnabledExtensions contains `"VK_EXT_descriptor_indexing"` and 1518e5c31af7Sopenharmony_ci the pname:pNext chain includes a slink:VkPhysicalDeviceVulkan12Features 1519e5c31af7Sopenharmony_ci structure, then 1520e5c31af7Sopenharmony_ci sname:VkPhysicalDeviceVulkan12Features::pname:descriptorIndexing must: 1521e5c31af7Sopenharmony_ci be ename:VK_TRUE 1522e5c31af7Sopenharmony_ciendif::VK_EXT_descriptor_indexing[] 1523e5c31af7Sopenharmony_ciifdef::VK_EXT_sampler_filter_minmax[] 1524e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensions-02834]] 1525e5c31af7Sopenharmony_ci If pname:ppEnabledExtensions contains `"VK_EXT_sampler_filter_minmax"` 1526e5c31af7Sopenharmony_ci and the pname:pNext chain includes a 1527e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceVulkan12Features structure, then 1528e5c31af7Sopenharmony_ci sname:VkPhysicalDeviceVulkan12Features::pname:samplerFilterMinmax must: 1529e5c31af7Sopenharmony_ci be ename:VK_TRUE 1530e5c31af7Sopenharmony_ciendif::VK_EXT_sampler_filter_minmax[] 1531e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_viewport_index_layer[] 1532e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-ppEnabledExtensions-02835]] 1533e5c31af7Sopenharmony_ci If pname:ppEnabledExtensions contains 1534e5c31af7Sopenharmony_ci `"VK_EXT_shader_viewport_index_layer"` and the pname:pNext chain 1535e5c31af7Sopenharmony_ci includes a slink:VkPhysicalDeviceVulkan12Features structure, then 1536e5c31af7Sopenharmony_ci sname:VkPhysicalDeviceVulkan12Features::pname:shaderOutputViewportIndex 1537e5c31af7Sopenharmony_ci and sname:VkPhysicalDeviceVulkan12Features::pname:shaderOutputLayer 1538e5c31af7Sopenharmony_ci must: both be ename:VK_TRUE 1539e5c31af7Sopenharmony_ciendif::VK_EXT_shader_viewport_index_layer[] 1540e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2[] 1541e5c31af7Sopenharmony_ciifdef::VK_KHR_portability_subset[] 1542e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-pProperties-04451]] 1543e5c31af7Sopenharmony_ci If the `apiext:VK_KHR_portability_subset` extension is included in 1544e5c31af7Sopenharmony_ci pname:pProperties of flink:vkEnumerateDeviceExtensionProperties, 1545e5c31af7Sopenharmony_ci pname:ppEnabledExtensions must: include "VK_KHR_portability_subset" 1546e5c31af7Sopenharmony_ciendif::VK_KHR_portability_subset[] 1547e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[] 1548e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-shadingRateImage-04478]] 1549e5c31af7Sopenharmony_ci If <<features-shadingRateImage,pname:shadingRateImage>> is enabled, 1550e5c31af7Sopenharmony_ci <<features-pipelineFragmentShadingRate, 1551e5c31af7Sopenharmony_ci pname:pipelineFragmentShadingRate>> must: not be enabled 1552e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-shadingRateImage-04479]] 1553e5c31af7Sopenharmony_ci If <<features-shadingRateImage,pname:shadingRateImage>> is enabled, 1554e5c31af7Sopenharmony_ci <<features-primitiveFragmentShadingRate, 1555e5c31af7Sopenharmony_ci pname:primitiveFragmentShadingRate>> must: not be enabled 1556e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-shadingRateImage-04480]] 1557e5c31af7Sopenharmony_ci If <<features-shadingRateImage,pname:shadingRateImage>> is enabled, 1558e5c31af7Sopenharmony_ci <<features-attachmentFragmentShadingRate, 1559e5c31af7Sopenharmony_ci pname:attachmentFragmentShadingRate>> must: not be enabled 1560e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[] 1561e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate,VK_EXT_fragment_density_map[] 1562e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-fragmentDensityMap-04481]] 1563e5c31af7Sopenharmony_ci If <<features-fragmentDensityMap,pname:fragmentDensityMap>> is enabled, 1564e5c31af7Sopenharmony_ci <<features-pipelineFragmentShadingRate, 1565e5c31af7Sopenharmony_ci pname:pipelineFragmentShadingRate>> must: not be enabled 1566e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-fragmentDensityMap-04482]] 1567e5c31af7Sopenharmony_ci If <<features-fragmentDensityMap,pname:fragmentDensityMap>> is enabled, 1568e5c31af7Sopenharmony_ci <<features-primitiveFragmentShadingRate, 1569e5c31af7Sopenharmony_ci pname:primitiveFragmentShadingRate>> must: not be enabled 1570e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-fragmentDensityMap-04483]] 1571e5c31af7Sopenharmony_ci If <<features-fragmentDensityMap,pname:fragmentDensityMap>> is enabled, 1572e5c31af7Sopenharmony_ci <<features-attachmentFragmentShadingRate, 1573e5c31af7Sopenharmony_ci pname:attachmentFragmentShadingRate>> must: not be enabled 1574e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate,VK_EXT_fragment_density_map[] 1575e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_image_atomic_int64[] 1576e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-None-04896]] 1577e5c31af7Sopenharmony_ci If <<features-sparseImageInt64Atomics, pname:sparseImageInt64Atomics>> 1578e5c31af7Sopenharmony_ci is enabled, <<features-shaderImageInt64Atomics, 1579e5c31af7Sopenharmony_ci pname:shaderImageInt64Atomics>> must: be enabled 1580e5c31af7Sopenharmony_ciendif::VK_EXT_shader_image_atomic_int64[] 1581e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_atomic_float[] 1582e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-None-04897]] 1583e5c31af7Sopenharmony_ci If <<features-sparseImageFloat32Atomics, 1584e5c31af7Sopenharmony_ci pname:sparseImageFloat32Atomics>> is enabled, 1585e5c31af7Sopenharmony_ci <<features-shaderImageFloat32Atomics, pname:shaderImageFloat32Atomics>> 1586e5c31af7Sopenharmony_ci must: be enabled 1587e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-None-04898]] 1588e5c31af7Sopenharmony_ci If <<features-sparseImageFloat32AtomicAdd, 1589e5c31af7Sopenharmony_ci pname:sparseImageFloat32AtomicAdd>> is enabled, 1590e5c31af7Sopenharmony_ci <<features-shaderImageFloat32AtomicAdd, 1591e5c31af7Sopenharmony_ci pname:shaderImageFloat32AtomicAdd>> must: be enabled 1592e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float[] 1593e5c31af7Sopenharmony_ciifdef::VK_EXT_shader_atomic_float2[] 1594e5c31af7Sopenharmony_ci * [[VUID-VkDeviceCreateInfo-sparseImageFloat32AtomicMinMax-04975]] 1595e5c31af7Sopenharmony_ci If <<features-sparseImageFloat32AtomicMinMax, 1596e5c31af7Sopenharmony_ci pname:sparseImageFloat32AtomicMinMax>> is enabled, 1597e5c31af7Sopenharmony_ci <<features-shaderImageFloat32AtomicMinMax, 1598e5c31af7Sopenharmony_ci pname:shaderImageFloat32AtomicMinMax>> must: be enabled 1599e5c31af7Sopenharmony_ciendif::VK_EXT_shader_atomic_float2[] 1600e5c31af7Sopenharmony_ci**** 1601e5c31af7Sopenharmony_ci 1602e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceCreateInfo.txt[] 1603e5c31af7Sopenharmony_ci-- 1604e5c31af7Sopenharmony_ci 1605e5c31af7Sopenharmony_ci[open,refpage='VkDeviceCreateFlags',desc='Reserved for future use',type='flags'] 1606e5c31af7Sopenharmony_ci-- 1607e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDeviceCreateFlags.txt[] 1608e5c31af7Sopenharmony_ci 1609e5c31af7Sopenharmony_citname:VkDeviceCreateFlags is a bitmask type for setting a mask, but is 1610e5c31af7Sopenharmony_cicurrently reserved for future use. 1611e5c31af7Sopenharmony_ci-- 1612e5c31af7Sopenharmony_ci 1613e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_device_group_creation[] 1614e5c31af7Sopenharmony_ci[open,refpage='VkDeviceGroupDeviceCreateInfo',desc='Create a logical device from multiple physical devices',type='structs'] 1615e5c31af7Sopenharmony_ci-- 1616e5c31af7Sopenharmony_ciA logical device can: be created that connects to one or more physical 1617e5c31af7Sopenharmony_cidevices by adding a sname:VkDeviceGroupDeviceCreateInfo structure to the 1618e5c31af7Sopenharmony_cipname:pNext chain of slink:VkDeviceCreateInfo. 1619e5c31af7Sopenharmony_ciThe sname:VkDeviceGroupDeviceCreateInfo structure is defined as: 1620e5c31af7Sopenharmony_ci 1621e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceGroupDeviceCreateInfo.txt[] 1622e5c31af7Sopenharmony_ci 1623e5c31af7Sopenharmony_ciifdef::VK_KHR_device_group_creation[] 1624e5c31af7Sopenharmony_cior the equivalent 1625e5c31af7Sopenharmony_ci 1626e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceGroupDeviceCreateInfoKHR.txt[] 1627e5c31af7Sopenharmony_ciendif::VK_KHR_device_group_creation[] 1628e5c31af7Sopenharmony_ci 1629e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1630e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1631e5c31af7Sopenharmony_ci structure. 1632e5c31af7Sopenharmony_ci * pname:physicalDeviceCount is the number of elements in the 1633e5c31af7Sopenharmony_ci pname:pPhysicalDevices array. 1634e5c31af7Sopenharmony_ci * pname:pPhysicalDevices is a pointer to an array of physical device 1635e5c31af7Sopenharmony_ci handles belonging to the same device group. 1636e5c31af7Sopenharmony_ci 1637e5c31af7Sopenharmony_ciThe elements of the pname:pPhysicalDevices array are an ordered list of the 1638e5c31af7Sopenharmony_ciphysical devices that the logical device represents. 1639e5c31af7Sopenharmony_ciThese must: be a subset of a single device group, and need not be in the 1640e5c31af7Sopenharmony_cisame order as they were enumerated. 1641e5c31af7Sopenharmony_ciThe order of the physical devices in the pname:pPhysicalDevices array 1642e5c31af7Sopenharmony_cidetermines the _device index_ of each physical device, with element [eq]#i# 1643e5c31af7Sopenharmony_cibeing assigned a device index of [eq]#i#. 1644e5c31af7Sopenharmony_ciCertain commands and structures refer to one or more physical devices by 1645e5c31af7Sopenharmony_ciusing device indices or _device masks_ formed using device indices. 1646e5c31af7Sopenharmony_ci 1647e5c31af7Sopenharmony_ciA logical device created without using sname:VkDeviceGroupDeviceCreateInfo, 1648e5c31af7Sopenharmony_cior with pname:physicalDeviceCount equal to zero, is equivalent to a 1649e5c31af7Sopenharmony_cipname:physicalDeviceCount of one and pname:pPhysicalDevices pointing to the 1650e5c31af7Sopenharmony_cipname:physicalDevice parameter to flink:vkCreateDevice. 1651e5c31af7Sopenharmony_ciIn particular, the device index of that physical device is zero. 1652e5c31af7Sopenharmony_ci 1653e5c31af7Sopenharmony_ci.Valid Usage 1654e5c31af7Sopenharmony_ci**** 1655e5c31af7Sopenharmony_ci * [[VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-00375]] 1656e5c31af7Sopenharmony_ci Each element of pname:pPhysicalDevices must: be unique 1657e5c31af7Sopenharmony_ci * [[VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-00376]] 1658e5c31af7Sopenharmony_ci All elements of pname:pPhysicalDevices must: be in the same device group 1659e5c31af7Sopenharmony_ci as enumerated by flink:vkEnumeratePhysicalDeviceGroups 1660e5c31af7Sopenharmony_ci * [[VUID-VkDeviceGroupDeviceCreateInfo-physicalDeviceCount-00377]] 1661e5c31af7Sopenharmony_ci If pname:physicalDeviceCount is not `0`, the pname:physicalDevice 1662e5c31af7Sopenharmony_ci parameter of flink:vkCreateDevice must: be an element of 1663e5c31af7Sopenharmony_ci pname:pPhysicalDevices 1664e5c31af7Sopenharmony_ci**** 1665e5c31af7Sopenharmony_ci 1666e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceGroupDeviceCreateInfo.txt[] 1667e5c31af7Sopenharmony_ci-- 1668e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_device_group_creation[] 1669e5c31af7Sopenharmony_ci 1670e5c31af7Sopenharmony_ciifdef::VK_AMD_memory_overallocation_behavior[] 1671e5c31af7Sopenharmony_ci[open,refpage='VkDeviceMemoryOverallocationCreateInfoAMD',desc='Specify memory overallocation behavior for a Vulkan device',type='structs'] 1672e5c31af7Sopenharmony_ci-- 1673e5c31af7Sopenharmony_ciTo specify whether device memory allocation is allowed beyond the size 1674e5c31af7Sopenharmony_cireported by slink:VkPhysicalDeviceMemoryProperties, add a 1675e5c31af7Sopenharmony_cislink:VkDeviceMemoryOverallocationCreateInfoAMD structure to the pname:pNext 1676e5c31af7Sopenharmony_cichain of the slink:VkDeviceCreateInfo structure. 1677e5c31af7Sopenharmony_ciIf this structure is not specified, it is as if the 1678e5c31af7Sopenharmony_ciename:VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD value is used. 1679e5c31af7Sopenharmony_ci 1680e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceMemoryOverallocationCreateInfoAMD.txt[] 1681e5c31af7Sopenharmony_ci 1682e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1683e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1684e5c31af7Sopenharmony_ci structure. 1685e5c31af7Sopenharmony_ci * pname:overallocationBehavior is the desired overallocation behavior. 1686e5c31af7Sopenharmony_ci 1687e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceMemoryOverallocationCreateInfoAMD.txt[] 1688e5c31af7Sopenharmony_ci-- 1689e5c31af7Sopenharmony_ci 1690e5c31af7Sopenharmony_ci[open,refpage='VkMemoryOverallocationBehaviorAMD',desc='Specify memory overallocation behavior',type='enums'] 1691e5c31af7Sopenharmony_ci-- 1692e5c31af7Sopenharmony_ciPossible values for 1693e5c31af7Sopenharmony_cislink:VkDeviceMemoryOverallocationCreateInfoAMD::pname:overallocationBehavior 1694e5c31af7Sopenharmony_ciinclude: 1695e5c31af7Sopenharmony_ci 1696e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkMemoryOverallocationBehaviorAMD.txt[] 1697e5c31af7Sopenharmony_ci 1698e5c31af7Sopenharmony_ci * ename:VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD lets the 1699e5c31af7Sopenharmony_ci implementation decide if overallocation is allowed. 1700e5c31af7Sopenharmony_ci * ename:VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD specifies 1701e5c31af7Sopenharmony_ci overallocation is allowed if platform permits. 1702e5c31af7Sopenharmony_ci * ename:VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD specifies the 1703e5c31af7Sopenharmony_ci application is not allowed to allocate device memory beyond the heap 1704e5c31af7Sopenharmony_ci sizes reported by slink:VkPhysicalDeviceMemoryProperties. 1705e5c31af7Sopenharmony_ci Allocations that are not explicitly made by the application within the 1706e5c31af7Sopenharmony_ci scope of the Vulkan instance are not accounted for. 1707e5c31af7Sopenharmony_ci-- 1708e5c31af7Sopenharmony_ciendif::VK_AMD_memory_overallocation_behavior[] 1709e5c31af7Sopenharmony_ci 1710e5c31af7Sopenharmony_ciifdef::VK_NV_device_diagnostics_config[] 1711e5c31af7Sopenharmony_ci[open,refpage='VkDeviceDiagnosticsConfigCreateInfoNV',desc='Specify diagnostics config for a Vulkan device',type='structs'] 1712e5c31af7Sopenharmony_ci-- 1713e5c31af7Sopenharmony_ciWhen using the Nsight^(TM)^ Aftermath SDK, to configure how device crash 1714e5c31af7Sopenharmony_cidumps are created, add a slink:VkDeviceDiagnosticsConfigCreateInfoNV 1715e5c31af7Sopenharmony_cistructure to the pname:pNext chain of the slink:VkDeviceCreateInfo 1716e5c31af7Sopenharmony_cistructure. 1717e5c31af7Sopenharmony_ci 1718e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceDiagnosticsConfigCreateInfoNV.txt[] 1719e5c31af7Sopenharmony_ci 1720e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1721e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1722e5c31af7Sopenharmony_ci structure. 1723e5c31af7Sopenharmony_ci * pname:flags is a bitmask of elink:VkDeviceDiagnosticsConfigFlagBitsNV 1724e5c31af7Sopenharmony_ci specifying addtional parameters for configuring diagnostic tools. 1725e5c31af7Sopenharmony_ci 1726e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceDiagnosticsConfigCreateInfoNV.txt[] 1727e5c31af7Sopenharmony_ci-- 1728e5c31af7Sopenharmony_ci 1729e5c31af7Sopenharmony_ci[open,refpage='VkDeviceDiagnosticsConfigFlagBitsNV',desc='Bitmask specifying diagnostics flags',type='enums'] 1730e5c31af7Sopenharmony_ci-- 1731e5c31af7Sopenharmony_ciBits which can: be set in 1732e5c31af7Sopenharmony_cislink:VkDeviceDiagnosticsConfigCreateInfoNV::pname:flags include: 1733e5c31af7Sopenharmony_ci 1734e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDeviceDiagnosticsConfigFlagBitsNV.txt[] 1735e5c31af7Sopenharmony_ci 1736e5c31af7Sopenharmony_ci * ename:VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV 1737e5c31af7Sopenharmony_ci enables the generation of debug information for shaders. 1738e5c31af7Sopenharmony_ci * ename:VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV 1739e5c31af7Sopenharmony_ci enables driver side tracking of resources (images, buffers, etc.) used 1740e5c31af7Sopenharmony_ci to augment the device fault information. 1741e5c31af7Sopenharmony_ci * ename:VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV 1742e5c31af7Sopenharmony_ci enables automatic insertion of <<device-diagnostic-checkpoints, 1743e5c31af7Sopenharmony_ci diagnostic checkpoints>> for draw calls, dispatches, 1744e5c31af7Sopenharmony_ciifdef::VK_NV_ray_tracing[] 1745e5c31af7Sopenharmony_ci trace rays, 1746e5c31af7Sopenharmony_ciendif::VK_NV_ray_tracing[] 1747e5c31af7Sopenharmony_ci and copies. 1748e5c31af7Sopenharmony_ci The CPU call stack at the time of the command will be associated as the 1749e5c31af7Sopenharmony_ci marker data for the automatically inserted checkpoints. 1750e5c31af7Sopenharmony_ci-- 1751e5c31af7Sopenharmony_ci 1752e5c31af7Sopenharmony_ci[open,refpage='VkDeviceDiagnosticsConfigFlagsNV',desc='Bitmask of VkDeviceDiagnosticsConfigFlagBitsNV',type='flags'] 1753e5c31af7Sopenharmony_ci-- 1754e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDeviceDiagnosticsConfigFlagsNV.txt[] 1755e5c31af7Sopenharmony_ci 1756e5c31af7Sopenharmony_citname:VkDeviceDiagnosticsConfigFlagsNV is a bitmask type for setting a mask 1757e5c31af7Sopenharmony_ciof zero or more elink:VkDeviceDiagnosticsConfigFlagBitsNV. 1758e5c31af7Sopenharmony_ci-- 1759e5c31af7Sopenharmony_ciendif::VK_NV_device_diagnostics_config[] 1760e5c31af7Sopenharmony_ci 1761e5c31af7Sopenharmony_ciifdef::VK_EXT_device_memory_report[] 1762e5c31af7Sopenharmony_ci[open,refpage='VkDeviceDeviceMemoryReportCreateInfoEXT',desc='Register device memory report callbacks for a Vulkan device',type='structs'] 1763e5c31af7Sopenharmony_ci-- 1764e5c31af7Sopenharmony_ciTo register callbacks for underlying device memory events of type 1765e5c31af7Sopenharmony_cielink:VkDeviceMemoryReportEventTypeEXT, add one or multiple 1766e5c31af7Sopenharmony_cislink:VkDeviceDeviceMemoryReportCreateInfoEXT structures to the pname:pNext 1767e5c31af7Sopenharmony_cichain of the slink:VkDeviceCreateInfo structure. 1768e5c31af7Sopenharmony_ci 1769e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceDeviceMemoryReportCreateInfoEXT.txt[] 1770e5c31af7Sopenharmony_ci 1771e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1772e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1773e5c31af7Sopenharmony_ci structure. 1774e5c31af7Sopenharmony_ci * pname:flags is 0 and reserved for future use. 1775e5c31af7Sopenharmony_ci * pname:pfnUserCallback is the application callback function to call. 1776e5c31af7Sopenharmony_ci * pname:pUserData is user data to be passed to the callback. 1777e5c31af7Sopenharmony_ci 1778e5c31af7Sopenharmony_ciThe callback may: be called from multiple threads simultaneously. 1779e5c31af7Sopenharmony_ci 1780e5c31af7Sopenharmony_ciThe callback must: be called only once by the implementation when a 1781e5c31af7Sopenharmony_cielink:VkDeviceMemoryReportEventTypeEXT event occurs. 1782e5c31af7Sopenharmony_ci 1783e5c31af7Sopenharmony_ci[NOTE] 1784e5c31af7Sopenharmony_ci.Note 1785e5c31af7Sopenharmony_ci==== 1786e5c31af7Sopenharmony_ciThe callback could be called from a background thread other than the thread 1787e5c31af7Sopenharmony_cicalling the Vulkan commands. 1788e5c31af7Sopenharmony_ci==== 1789e5c31af7Sopenharmony_ci 1790e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceDeviceMemoryReportCreateInfoEXT.txt[] 1791e5c31af7Sopenharmony_ci-- 1792e5c31af7Sopenharmony_ci 1793e5c31af7Sopenharmony_ci[open,refpage='PFN_vkDeviceMemoryReportCallbackEXT',desc='Application-defined device memory report callback function',type='funcpointers'] 1794e5c31af7Sopenharmony_ci-- 1795e5c31af7Sopenharmony_ciThe prototype for the 1796e5c31af7Sopenharmony_cislink:VkDeviceDeviceMemoryReportCreateInfoEXT::pname:pfnUserCallback 1797e5c31af7Sopenharmony_cifunction implemented by the application is: 1798e5c31af7Sopenharmony_ci 1799e5c31af7Sopenharmony_ciinclude::{generated}/api/funcpointers/PFN_vkDeviceMemoryReportCallbackEXT.txt[] 1800e5c31af7Sopenharmony_ci 1801e5c31af7Sopenharmony_ci * pname:pCallbackData contains all the callback related data in the 1802e5c31af7Sopenharmony_ci slink:VkDeviceMemoryReportCallbackDataEXT structure. 1803e5c31af7Sopenharmony_ci * pname:pUserData is the user data provided when the 1804e5c31af7Sopenharmony_ci slink:VkDeviceDeviceMemoryReportCreateInfoEXT was created. 1805e5c31af7Sopenharmony_ci 1806e5c31af7Sopenharmony_ciThe callback must: not make calls to any Vulkan commands. 1807e5c31af7Sopenharmony_ci-- 1808e5c31af7Sopenharmony_ci 1809e5c31af7Sopenharmony_ci[open,refpage='VkDeviceMemoryReportCallbackDataEXT',desc='Structure specifying parameters returned to the callback',type='structs'] 1810e5c31af7Sopenharmony_ci-- 1811e5c31af7Sopenharmony_ciThe definition of sname:VkDeviceMemoryReportCallbackDataEXT is: 1812e5c31af7Sopenharmony_ci 1813e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceMemoryReportCallbackDataEXT.txt[] 1814e5c31af7Sopenharmony_ci 1815e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1816e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1817e5c31af7Sopenharmony_ci structure. 1818e5c31af7Sopenharmony_ci * pname:flags is 0 and reserved for future use. 1819e5c31af7Sopenharmony_ci * pname:type is a elink:VkDeviceMemoryReportEventTypeEXT type specifying 1820e5c31af7Sopenharmony_ci the type of event reported in this 1821e5c31af7Sopenharmony_ci sname:VkDeviceMemoryReportCallbackDataEXT structure. 1822e5c31af7Sopenharmony_ci * pname:memoryObjectId is the unique id for the underlying memory object 1823e5c31af7Sopenharmony_ci as described below. 1824e5c31af7Sopenharmony_ci * pname:size is the size of the memory object in bytes. 1825e5c31af7Sopenharmony_ci If pname:type is ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, 1826e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT or 1827e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, 1828e5c31af7Sopenharmony_ci pname:size is a valid basetype:VkDeviceSize value. 1829e5c31af7Sopenharmony_ci Otherwise, pname:size is undefined:. 1830e5c31af7Sopenharmony_ci * pname:objectType is a elink:VkObjectType value specifying the type of 1831e5c31af7Sopenharmony_ci the object associated with this device memory report event. 1832e5c31af7Sopenharmony_ci If pname:type is ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, 1833e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, 1834e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT, 1835e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT or 1836e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, 1837e5c31af7Sopenharmony_ci pname:objectType is a valid elink:VkObjectType enum. 1838e5c31af7Sopenharmony_ci Otherwise, pname:objectType is undefined:. 1839e5c31af7Sopenharmony_ci * pname:objectHandle is the object this device memory report event is 1840e5c31af7Sopenharmony_ci attributed to. 1841e5c31af7Sopenharmony_ci If pname:type is ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, 1842e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, 1843e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT or 1844e5c31af7Sopenharmony_ci ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT, 1845e5c31af7Sopenharmony_ci pname:objectHandle is a valid Vulkan handle of the type associated with 1846e5c31af7Sopenharmony_ci pname:objectType as defined in the <<debugging-object-types, 1847e5c31af7Sopenharmony_ci `VkObjectType` and Vulkan Handle Relationship>> table. 1848e5c31af7Sopenharmony_ci Otherwise, pname:objectHandle is undefined:. 1849e5c31af7Sopenharmony_ci * pname:heapIndex describes which memory heap this device memory 1850e5c31af7Sopenharmony_ci allocation is made from. 1851e5c31af7Sopenharmony_ci If pname:type is ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT 1852e5c31af7Sopenharmony_ci or ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, 1853e5c31af7Sopenharmony_ci pname:heapIndex corresponds to one of the valid heaps from the 1854e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceMemoryProperties structure. 1855e5c31af7Sopenharmony_ci Otherwise, pname:heapIndex is undefined:. 1856e5c31af7Sopenharmony_ci 1857e5c31af7Sopenharmony_cipname:memoryObjectId is used to avoid double-counting on the same memory 1858e5c31af7Sopenharmony_ciobject. 1859e5c31af7Sopenharmony_ci 1860e5c31af7Sopenharmony_ciIf an internally-allocated device memory object or a slink:VkDeviceMemory 1861e5c31af7Sopenharmony_cicannot: be exported, pname:memoryObjectId must: be unique in the 1862e5c31af7Sopenharmony_cislink:VkDevice. 1863e5c31af7Sopenharmony_ci 1864e5c31af7Sopenharmony_ciIf an internally-allocated device memory object or a slink:VkDeviceMemory 1865e5c31af7Sopenharmony_cisupports being exported, pname:memoryObjectId must: be unique system wide. 1866e5c31af7Sopenharmony_ci 1867e5c31af7Sopenharmony_ciIf an internal device memory object or a slink:VkDeviceMemory is backed by 1868e5c31af7Sopenharmony_cian imported external memory object, pname:memoryObjectId must: be unique 1869e5c31af7Sopenharmony_cisystem wide. 1870e5c31af7Sopenharmony_ci 1871e5c31af7Sopenharmony_ciifdef::implementation-guide[] 1872e5c31af7Sopenharmony_ci.Implementor's Note 1873e5c31af7Sopenharmony_ci**** 1874e5c31af7Sopenharmony_ciIf the heap backing an internally-allocated device memory cannot: be used to 1875e5c31af7Sopenharmony_ciback slink:VkDeviceMemory, implementations can: advertise that heap with no 1876e5c31af7Sopenharmony_citypes. 1877e5c31af7Sopenharmony_ci**** 1878e5c31af7Sopenharmony_ciendif::implementation-guide[] 1879e5c31af7Sopenharmony_ci 1880e5c31af7Sopenharmony_ci[NOTE] 1881e5c31af7Sopenharmony_ci.Note 1882e5c31af7Sopenharmony_ci==== 1883e5c31af7Sopenharmony_ciThis structure should only be considered valid during the lifetime of the 1884e5c31af7Sopenharmony_citriggered callback. 1885e5c31af7Sopenharmony_ci 1886e5c31af7Sopenharmony_ciFor ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT and 1887e5c31af7Sopenharmony_ciename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT events, 1888e5c31af7Sopenharmony_cipname:objectHandle usually will not yet exist when the application or tool 1889e5c31af7Sopenharmony_cireceives the callback. 1890e5c31af7Sopenharmony_cipname:objectHandle will only exist when the create or allocate call that 1891e5c31af7Sopenharmony_citriggered the event returns, and if the allocation or import ends up failing 1892e5c31af7Sopenharmony_cipname:objectHandle will not ever exist. 1893e5c31af7Sopenharmony_ci==== 1894e5c31af7Sopenharmony_ci 1895e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceMemoryReportCallbackDataEXT.txt[] 1896e5c31af7Sopenharmony_ci-- 1897e5c31af7Sopenharmony_ci 1898e5c31af7Sopenharmony_ci[open,refpage='VkDeviceMemoryReportFlagsEXT',desc='Reserved for future use',type='flags'] 1899e5c31af7Sopenharmony_ci-- 1900e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDeviceMemoryReportFlagsEXT.txt[] 1901e5c31af7Sopenharmony_ci 1902e5c31af7Sopenharmony_citname:VkDeviceMemoryReportFlagsEXT is a bitmask type for setting a mask, but 1903e5c31af7Sopenharmony_ciis currently reserved for future use. 1904e5c31af7Sopenharmony_ci-- 1905e5c31af7Sopenharmony_ci 1906e5c31af7Sopenharmony_ci[open,refpage='VkDeviceMemoryReportEventTypeEXT',desc='Events that can occur on a device memory object',type='enums'] 1907e5c31af7Sopenharmony_ci-- 1908e5c31af7Sopenharmony_ciPossible values of slink:VkDeviceMemoryReportCallbackDataEXT::pname:type, 1909e5c31af7Sopenharmony_cispecifying event types which cause the device driver to call the callback, 1910e5c31af7Sopenharmony_ciare: 1911e5c31af7Sopenharmony_ci 1912e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDeviceMemoryReportEventTypeEXT.txt[] 1913e5c31af7Sopenharmony_ci 1914e5c31af7Sopenharmony_ci * ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT specifies this 1915e5c31af7Sopenharmony_ci event corresponds to the allocation of an internal device memory object 1916e5c31af7Sopenharmony_ci or a slink:VkDeviceMemory. 1917e5c31af7Sopenharmony_ci * ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT specifies this event 1918e5c31af7Sopenharmony_ci corresponds to the deallocation of an internally-allocated device memory 1919e5c31af7Sopenharmony_ci object or a slink:VkDeviceMemory. 1920e5c31af7Sopenharmony_ci * ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT specifies this event 1921e5c31af7Sopenharmony_ci corresponds to the import of an external memory object. 1922e5c31af7Sopenharmony_ci * ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT specifies this 1923e5c31af7Sopenharmony_ci event is the release of an imported external memory object. 1924e5c31af7Sopenharmony_ci * ename:VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT specifies 1925e5c31af7Sopenharmony_ci this event corresponds to the failed allocation of an internal device 1926e5c31af7Sopenharmony_ci memory object or a slink:VkDeviceMemory. 1927e5c31af7Sopenharmony_ci-- 1928e5c31af7Sopenharmony_ciendif::VK_EXT_device_memory_report[] 1929e5c31af7Sopenharmony_ci 1930e5c31af7Sopenharmony_ciifdef::VK_EXT_private_data[] 1931e5c31af7Sopenharmony_ci[open,refpage='VkDevicePrivateDataCreateInfoEXT',desc='Reserve private data slots',type='structs'] 1932e5c31af7Sopenharmony_ci-- 1933e5c31af7Sopenharmony_ciTo reserve private data storage slots, add a 1934e5c31af7Sopenharmony_cislink:VkDevicePrivateDataCreateInfoEXT structure to the pname:pNext chain of 1935e5c31af7Sopenharmony_cithe slink:VkDeviceCreateInfo structure. 1936e5c31af7Sopenharmony_ciReserving slots in this manner is not strictly necessary, but doing so may: 1937e5c31af7Sopenharmony_ciimprove performance. 1938e5c31af7Sopenharmony_ci 1939e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDevicePrivateDataCreateInfoEXT.txt[] 1940e5c31af7Sopenharmony_ci 1941e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 1942e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 1943e5c31af7Sopenharmony_ci structure. 1944e5c31af7Sopenharmony_ci * pname:privateDataSlotRequestCount is the amount of slots to reserve. 1945e5c31af7Sopenharmony_ci 1946e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDevicePrivateDataCreateInfoEXT.txt[] 1947e5c31af7Sopenharmony_ci-- 1948e5c31af7Sopenharmony_ciendif::VK_EXT_private_data[] 1949e5c31af7Sopenharmony_ci 1950e5c31af7Sopenharmony_ci 1951e5c31af7Sopenharmony_ci[[devsandqueues-use]] 1952e5c31af7Sopenharmony_ci=== Device Use 1953e5c31af7Sopenharmony_ci 1954e5c31af7Sopenharmony_ciThe following is a high-level list of sname:VkDevice uses along with 1955e5c31af7Sopenharmony_cireferences on where to find more information: 1956e5c31af7Sopenharmony_ci 1957e5c31af7Sopenharmony_ci * Creation of queues. 1958e5c31af7Sopenharmony_ci See the <<devsandqueues-queues,Queues>> section below for further 1959e5c31af7Sopenharmony_ci details. 1960e5c31af7Sopenharmony_ci * Creation and tracking of various synchronization constructs. 1961e5c31af7Sopenharmony_ci See <<synchronization,Synchronization and Cache Control>> for further 1962e5c31af7Sopenharmony_ci details. 1963e5c31af7Sopenharmony_ci * Allocating, freeing, and managing memory. 1964e5c31af7Sopenharmony_ci See <<memory,Memory Allocation>> and <<resources,Resource Creation>> for 1965e5c31af7Sopenharmony_ci further details. 1966e5c31af7Sopenharmony_ci * Creation and destruction of command buffers and command buffer pools. 1967e5c31af7Sopenharmony_ci See <<commandbuffers,Command Buffers>> for further details. 1968e5c31af7Sopenharmony_ci * Creation, destruction, and management of graphics state. 1969e5c31af7Sopenharmony_ci See <<pipelines,Pipelines>> and <<descriptorsets,Resource Descriptors>>, 1970e5c31af7Sopenharmony_ci among others, for further details. 1971e5c31af7Sopenharmony_ci 1972e5c31af7Sopenharmony_ci 1973e5c31af7Sopenharmony_ci[[devsandqueues-lost-device]] 1974e5c31af7Sopenharmony_ci=== Lost Device 1975e5c31af7Sopenharmony_ci 1976e5c31af7Sopenharmony_ciA logical device may: become _lost_ for a number of implementation-specific 1977e5c31af7Sopenharmony_cireasons, indicating that pending and future command execution may: fail and 1978e5c31af7Sopenharmony_cicause resources and backing memory to become undefined:. 1979e5c31af7Sopenharmony_ci 1980e5c31af7Sopenharmony_ci[NOTE] 1981e5c31af7Sopenharmony_ci.Note 1982e5c31af7Sopenharmony_ci==== 1983e5c31af7Sopenharmony_ciTypical reasons for device loss will include things like execution timing 1984e5c31af7Sopenharmony_ciout (to prevent denial of service), power management events, platform 1985e5c31af7Sopenharmony_ciresource management, implementation errors. 1986e5c31af7Sopenharmony_ci 1987e5c31af7Sopenharmony_ciApplications not adhering to <<fundamentals-validusage, valid usage>> may 1988e5c31af7Sopenharmony_cialso result in device loss being reported, however this is not guaranteed. 1989e5c31af7Sopenharmony_ciEven if device loss is reported, the system may be in an unrecoverable 1990e5c31af7Sopenharmony_cistate, and further usage of the API is still considered invalid. 1991e5c31af7Sopenharmony_ci==== 1992e5c31af7Sopenharmony_ci 1993e5c31af7Sopenharmony_ciWhen this happens, certain commands will return ename:VK_ERROR_DEVICE_LOST. 1994e5c31af7Sopenharmony_ciAfter any such event, the logical device is considered _lost_. 1995e5c31af7Sopenharmony_ciIt is not possible to reset the logical device to a non-lost state, however 1996e5c31af7Sopenharmony_cithe lost state is specific to a logical device (sname:VkDevice), and the 1997e5c31af7Sopenharmony_cicorresponding physical device (sname:VkPhysicalDevice) may: be otherwise 1998e5c31af7Sopenharmony_ciunaffected. 1999e5c31af7Sopenharmony_ci 2000e5c31af7Sopenharmony_ciIn some cases, the physical device may: also be lost, and attempting to 2001e5c31af7Sopenharmony_cicreate a new logical device will fail, returning ename:VK_ERROR_DEVICE_LOST. 2002e5c31af7Sopenharmony_ciThis is usually indicative of a problem with the underlying implementation, 2003e5c31af7Sopenharmony_cior its connection to the host. 2004e5c31af7Sopenharmony_ciIf the physical device has not been lost, and a new logical device is 2005e5c31af7Sopenharmony_cisuccessfully created from that physical device, it must: be in the non-lost 2006e5c31af7Sopenharmony_cistate. 2007e5c31af7Sopenharmony_ci 2008e5c31af7Sopenharmony_ci[NOTE] 2009e5c31af7Sopenharmony_ci.Note 2010e5c31af7Sopenharmony_ci==== 2011e5c31af7Sopenharmony_ciWhilst logical device loss may: be recoverable, in the case of physical 2012e5c31af7Sopenharmony_cidevice loss, it is unlikely that an application will be able to recover 2013e5c31af7Sopenharmony_ciunless additional, unaffected physical devices exist on the system. 2014e5c31af7Sopenharmony_ciThe error is largely informational and intended only to inform the user that 2015e5c31af7Sopenharmony_cia platform issue has occurred, and should: be investigated further. 2016e5c31af7Sopenharmony_ciFor example, underlying hardware may: have developed a fault or become 2017e5c31af7Sopenharmony_ciphysically disconnected from the rest of the system. 2018e5c31af7Sopenharmony_ciIn many cases, physical device loss may: cause other more serious issues 2019e5c31af7Sopenharmony_cisuch as the operating system crashing; in which case it may: not be reported 2020e5c31af7Sopenharmony_civia the Vulkan API. 2021e5c31af7Sopenharmony_ci==== 2022e5c31af7Sopenharmony_ci 2023e5c31af7Sopenharmony_ciWhen a device is lost, its child objects are not implicitly destroyed and 2024e5c31af7Sopenharmony_citheir handles are still valid. 2025e5c31af7Sopenharmony_ciThose objects must: still be destroyed before their parents or the device 2026e5c31af7Sopenharmony_cican: be destroyed (see the <<fundamentals-objectmodel-lifetime,Object 2027e5c31af7Sopenharmony_ciLifetime>> section). 2028e5c31af7Sopenharmony_ciThe host address space corresponding to device memory mapped using 2029e5c31af7Sopenharmony_ciflink:vkMapMemory is still valid, and host memory accesses to these mapped 2030e5c31af7Sopenharmony_ciregions are still valid, but the contents are undefined:. 2031e5c31af7Sopenharmony_ciIt is still legal to call any API command on the device and child objects. 2032e5c31af7Sopenharmony_ci 2033e5c31af7Sopenharmony_ciOnce a device is lost, command execution may: fail, and commands that return 2034e5c31af7Sopenharmony_cia elink:VkResult may: return ename:VK_ERROR_DEVICE_LOST. 2035e5c31af7Sopenharmony_ciCommands that do not allow runtime errors must: still operate correctly for 2036e5c31af7Sopenharmony_civalid usage and, if applicable, return valid data. 2037e5c31af7Sopenharmony_ci 2038e5c31af7Sopenharmony_ciCommands that wait indefinitely for device execution (namely 2039e5c31af7Sopenharmony_ciflink:vkDeviceWaitIdle, flink:vkQueueWaitIdle, flink:vkWaitForFences 2040e5c31af7Sopenharmony_ciifdef::VK_KHR_swapchain[] 2041e5c31af7Sopenharmony_cior flink:vkAcquireNextImageKHR 2042e5c31af7Sopenharmony_ciendif::VK_KHR_swapchain[] 2043e5c31af7Sopenharmony_ciwith a maximum pname:timeout, and flink:vkGetQueryPoolResults with the 2044e5c31af7Sopenharmony_ciename:VK_QUERY_RESULT_WAIT_BIT bit set in pname:flags) must: return in 2045e5c31af7Sopenharmony_cifinite time even in the case of a lost device, and return either 2046e5c31af7Sopenharmony_ciename:VK_SUCCESS or ename:VK_ERROR_DEVICE_LOST. 2047e5c31af7Sopenharmony_ciFor any command that may: return ename:VK_ERROR_DEVICE_LOST, for the purpose 2048e5c31af7Sopenharmony_ciof determining whether a command buffer is in the 2049e5c31af7Sopenharmony_ci<<commandbuffers-lifecycle, pending state>>, or whether resources are 2050e5c31af7Sopenharmony_ciconsidered in-use by the device, a return value of 2051e5c31af7Sopenharmony_ciename:VK_ERROR_DEVICE_LOST is equivalent to ename:VK_SUCCESS. 2052e5c31af7Sopenharmony_ci 2053e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_memory[] 2054e5c31af7Sopenharmony_ci 2055e5c31af7Sopenharmony_ciThe content of any external memory objects that have been exported from or 2056e5c31af7Sopenharmony_ciimported to a lost device become undefined:. 2057e5c31af7Sopenharmony_ciObjects on other logical devices or in other APIs which are associated with 2058e5c31af7Sopenharmony_cithe same underlying memory resource as the external memory objects on the 2059e5c31af7Sopenharmony_cilost device are unaffected other than their content becoming undefined:. 2060e5c31af7Sopenharmony_ciThe layout of subresources of images on other logical devices that are bound 2061e5c31af7Sopenharmony_cito sname:VkDeviceMemory objects associated with the same underlying memory 2062e5c31af7Sopenharmony_ciresources as external memory objects on the lost device becomes 2063e5c31af7Sopenharmony_ciename:VK_IMAGE_LAYOUT_UNDEFINED. 2064e5c31af7Sopenharmony_ci 2065e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_memory[] 2066e5c31af7Sopenharmony_ci 2067e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_external_semaphore[] 2068e5c31af7Sopenharmony_ci 2069e5c31af7Sopenharmony_ciThe state of sname:VkSemaphore objects on other logical devices created by 2070e5c31af7Sopenharmony_ci<<synchronization-semaphores-importing,importing a semaphore payload>> with 2071e5c31af7Sopenharmony_citemporary permanence which was exported from the lost device is undefined:. 2072e5c31af7Sopenharmony_ciThe state of sname:VkSemaphore objects on other logical devices that 2073e5c31af7Sopenharmony_cipermanently share a semaphore payload with a sname:VkSemaphore object on the 2074e5c31af7Sopenharmony_cilost device is undefined:, and remains undefined: following any subsequent 2075e5c31af7Sopenharmony_cisignal operations. 2076e5c31af7Sopenharmony_ciImplementations must: ensure pending and subsequently submitted wait 2077e5c31af7Sopenharmony_cioperations on such semaphores behave as defined in 2078e5c31af7Sopenharmony_ci<<synchronization-semaphores-waiting-state,Semaphore State Requirements For 2079e5c31af7Sopenharmony_ciWait Operations>> for external semaphores not in a valid state for a wait 2080e5c31af7Sopenharmony_cioperation. 2081e5c31af7Sopenharmony_ci 2082e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_external_semaphore[] 2083e5c31af7Sopenharmony_ci 2084e5c31af7Sopenharmony_ciifdef::editing-notes[] 2085e5c31af7Sopenharmony_ci[NOTE] 2086e5c31af7Sopenharmony_ci.editing-note 2087e5c31af7Sopenharmony_ci==== 2088e5c31af7Sopenharmony_ciTODO (piman) - I do not think we are very clear about what "`in-use by the 2089e5c31af7Sopenharmony_cidevice`" means. 2090e5c31af7Sopenharmony_ci==== 2091e5c31af7Sopenharmony_ciendif::editing-notes[] 2092e5c31af7Sopenharmony_ci 2093e5c31af7Sopenharmony_ci 2094e5c31af7Sopenharmony_ci[[devsandqueues-destruction]] 2095e5c31af7Sopenharmony_ci=== Device Destruction 2096e5c31af7Sopenharmony_ci 2097e5c31af7Sopenharmony_ci[open,refpage='vkDestroyDevice',desc='Destroy a logical device',type='protos'] 2098e5c31af7Sopenharmony_ci-- 2099e5c31af7Sopenharmony_ciTo destroy a device, call: 2100e5c31af7Sopenharmony_ci 2101e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkDestroyDevice.txt[] 2102e5c31af7Sopenharmony_ci 2103e5c31af7Sopenharmony_ci * pname:device is the logical device to destroy. 2104e5c31af7Sopenharmony_ci * pname:pAllocator controls host memory allocation as described in the 2105e5c31af7Sopenharmony_ci <<memory-allocation, Memory Allocation>> chapter. 2106e5c31af7Sopenharmony_ci 2107e5c31af7Sopenharmony_ciTo ensure that no work is active on the device, flink:vkDeviceWaitIdle can: 2108e5c31af7Sopenharmony_cibe used to gate the destruction of the device. 2109e5c31af7Sopenharmony_ciPrior to destroying a device, an application is responsible for 2110e5c31af7Sopenharmony_cidestroying/freeing any Vulkan objects that were created using that device as 2111e5c31af7Sopenharmony_cithe first parameter of the corresponding ftext:vkCreate* or 2112e5c31af7Sopenharmony_ciftext:vkAllocate* command. 2113e5c31af7Sopenharmony_ci 2114e5c31af7Sopenharmony_ci[NOTE] 2115e5c31af7Sopenharmony_ci.Note 2116e5c31af7Sopenharmony_ci==== 2117e5c31af7Sopenharmony_ciThe lifetime of each of these objects is bound by the lifetime of the 2118e5c31af7Sopenharmony_cisname:VkDevice object. 2119e5c31af7Sopenharmony_ciTherefore, to avoid resource leaks, it is critical that an application 2120e5c31af7Sopenharmony_ciexplicitly free all of these resources prior to calling 2121e5c31af7Sopenharmony_cifname:vkDestroyDevice. 2122e5c31af7Sopenharmony_ci==== 2123e5c31af7Sopenharmony_ci 2124e5c31af7Sopenharmony_ci.Valid Usage 2125e5c31af7Sopenharmony_ci**** 2126e5c31af7Sopenharmony_ci * [[VUID-vkDestroyDevice-device-00378]] 2127e5c31af7Sopenharmony_ci All child objects created on pname:device must: have been destroyed 2128e5c31af7Sopenharmony_ci prior to destroying pname:device 2129e5c31af7Sopenharmony_ci * [[VUID-vkDestroyDevice-device-00379]] 2130e5c31af7Sopenharmony_ci If sname:VkAllocationCallbacks were provided when pname:device was 2131e5c31af7Sopenharmony_ci created, a compatible set of callbacks must: be provided here 2132e5c31af7Sopenharmony_ci * [[VUID-vkDestroyDevice-device-00380]] 2133e5c31af7Sopenharmony_ci If no sname:VkAllocationCallbacks were provided when pname:device was 2134e5c31af7Sopenharmony_ci created, pname:pAllocator must: be `NULL` 2135e5c31af7Sopenharmony_ci**** 2136e5c31af7Sopenharmony_ci 2137e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkDestroyDevice.txt[] 2138e5c31af7Sopenharmony_ci-- 2139e5c31af7Sopenharmony_ci 2140e5c31af7Sopenharmony_ci 2141e5c31af7Sopenharmony_ci[[devsandqueues-queues]] 2142e5c31af7Sopenharmony_ci== Queues 2143e5c31af7Sopenharmony_ci 2144e5c31af7Sopenharmony_ci 2145e5c31af7Sopenharmony_ci[[devsandqueues-queueprops]] 2146e5c31af7Sopenharmony_ci=== Queue Family Properties 2147e5c31af7Sopenharmony_ci 2148e5c31af7Sopenharmony_ciAs discussed in the <<devsandqueues-physical-device-enumeration,Physical 2149e5c31af7Sopenharmony_ciDevice Enumeration>> section above, the 2150e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceQueueFamilyProperties command is used to retrieve 2151e5c31af7Sopenharmony_cidetails about the queue families and queues supported by a device. 2152e5c31af7Sopenharmony_ci 2153e5c31af7Sopenharmony_ciEach index in the pname:pQueueFamilyProperties array returned by 2154e5c31af7Sopenharmony_ciflink:vkGetPhysicalDeviceQueueFamilyProperties describes a unique queue 2155e5c31af7Sopenharmony_cifamily on that physical device. 2156e5c31af7Sopenharmony_ciThese indices are used when creating queues, and they correspond directly 2157e5c31af7Sopenharmony_ciwith the pname:queueFamilyIndex that is passed to the flink:vkCreateDevice 2158e5c31af7Sopenharmony_cicommand via the slink:VkDeviceQueueCreateInfo structure as described in the 2159e5c31af7Sopenharmony_ci<<devsandqueues-queue-creation,Queue Creation>> section below. 2160e5c31af7Sopenharmony_ci 2161e5c31af7Sopenharmony_ciGrouping of queue families within a physical device is 2162e5c31af7Sopenharmony_ciimplementation-dependent. 2163e5c31af7Sopenharmony_ci 2164e5c31af7Sopenharmony_ci[NOTE] 2165e5c31af7Sopenharmony_ci.Note 2166e5c31af7Sopenharmony_ci==== 2167e5c31af7Sopenharmony_ciThe general expectation is that a physical device groups all queues of 2168e5c31af7Sopenharmony_cimatching capabilities into a single family. 2169e5c31af7Sopenharmony_ciHowever, while implementations should: do this, it is possible that a 2170e5c31af7Sopenharmony_ciphysical device may: return two separate queue families with the same 2171e5c31af7Sopenharmony_cicapabilities. 2172e5c31af7Sopenharmony_ci==== 2173e5c31af7Sopenharmony_ci 2174e5c31af7Sopenharmony_ciOnce an application has identified a physical device with the queue(s) that 2175e5c31af7Sopenharmony_ciit desires to use, it will create those queues in conjunction with a logical 2176e5c31af7Sopenharmony_cidevice. 2177e5c31af7Sopenharmony_ciThis is described in the following section. 2178e5c31af7Sopenharmony_ci 2179e5c31af7Sopenharmony_ci 2180e5c31af7Sopenharmony_ci[[devsandqueues-queue-creation]] 2181e5c31af7Sopenharmony_ci=== Queue Creation 2182e5c31af7Sopenharmony_ci 2183e5c31af7Sopenharmony_ci[open,refpage='VkQueue',desc='Opaque handle to a queue object',type='handles'] 2184e5c31af7Sopenharmony_ci-- 2185e5c31af7Sopenharmony_ciCreating a logical device also creates the queues associated with that 2186e5c31af7Sopenharmony_cidevice. 2187e5c31af7Sopenharmony_ciThe queues to create are described by a set of slink:VkDeviceQueueCreateInfo 2188e5c31af7Sopenharmony_cistructures that are passed to flink:vkCreateDevice in 2189e5c31af7Sopenharmony_cipname:pQueueCreateInfos. 2190e5c31af7Sopenharmony_ci 2191e5c31af7Sopenharmony_ciQueues are represented by sname:VkQueue handles: 2192e5c31af7Sopenharmony_ci 2193e5c31af7Sopenharmony_ciinclude::{generated}/api/handles/VkQueue.txt[] 2194e5c31af7Sopenharmony_ci-- 2195e5c31af7Sopenharmony_ci 2196e5c31af7Sopenharmony_ci[open,refpage='VkDeviceQueueCreateInfo',desc='Structure specifying parameters of a newly created device queue',type='structs'] 2197e5c31af7Sopenharmony_ci-- 2198e5c31af7Sopenharmony_ciThe sname:VkDeviceQueueCreateInfo structure is defined as: 2199e5c31af7Sopenharmony_ci 2200e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceQueueCreateInfo.txt[] 2201e5c31af7Sopenharmony_ci 2202e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 2203e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 2204e5c31af7Sopenharmony_ci structure. 2205e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1[] 2206e5c31af7Sopenharmony_ci * pname:flags is reserved for future use. 2207e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2208e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 2209e5c31af7Sopenharmony_ci * pname:flags is a bitmask indicating behavior of the queue. 2210e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2211e5c31af7Sopenharmony_ci * pname:queueFamilyIndex is an unsigned integer indicating the index of 2212e5c31af7Sopenharmony_ci the queue family in which to create the queue on this device. 2213e5c31af7Sopenharmony_ci This index corresponds to the index of an element of the 2214e5c31af7Sopenharmony_ci pname:pQueueFamilyProperties array that was returned by 2215e5c31af7Sopenharmony_ci fname:vkGetPhysicalDeviceQueueFamilyProperties. 2216e5c31af7Sopenharmony_ci * pname:queueCount is an unsigned integer specifying the number of queues 2217e5c31af7Sopenharmony_ci to create in the queue family indicated by pname:queueFamilyIndex. 2218e5c31af7Sopenharmony_ci * pname:pQueuePriorities is a pointer to an array of pname:queueCount 2219e5c31af7Sopenharmony_ci normalized floating point values, specifying priorities of work that 2220e5c31af7Sopenharmony_ci will be submitted to each created queue. 2221e5c31af7Sopenharmony_ci See <<devsandqueues-priority,Queue Priority>> for more information. 2222e5c31af7Sopenharmony_ci 2223e5c31af7Sopenharmony_ci.Valid Usage 2224e5c31af7Sopenharmony_ci**** 2225e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueCreateInfo-queueFamilyIndex-00381]] 2226e5c31af7Sopenharmony_ci pname:queueFamilyIndex must: be less than 2227e5c31af7Sopenharmony_ci pname:pQueueFamilyPropertyCount returned by 2228e5c31af7Sopenharmony_ci fname:vkGetPhysicalDeviceQueueFamilyProperties 2229e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueCreateInfo-queueCount-00382]] 2230e5c31af7Sopenharmony_ci pname:queueCount must: be less than or equal to the pname:queueCount 2231e5c31af7Sopenharmony_ci member of the sname:VkQueueFamilyProperties structure, as returned by 2232e5c31af7Sopenharmony_ci fname:vkGetPhysicalDeviceQueueFamilyProperties in the 2233e5c31af7Sopenharmony_ci pname:pQueueFamilyProperties[queueFamilyIndex] 2234e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueCreateInfo-pQueuePriorities-00383]] 2235e5c31af7Sopenharmony_ci Each element of pname:pQueuePriorities must: be between `0.0` and `1.0` 2236e5c31af7Sopenharmony_ci inclusive 2237e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 2238e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueCreateInfo-flags-02861]] 2239e5c31af7Sopenharmony_ci If the <<features-protectedMemory, protected memory>> feature is not 2240e5c31af7Sopenharmony_ci enabled, the ename:VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT bit of 2241e5c31af7Sopenharmony_ci pname:flags must: not be set 2242e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueCreateInfo-flags-06449]] 2243e5c31af7Sopenharmony_ci If pname:flags includes ename:VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT, 2244e5c31af7Sopenharmony_ci pname:queueFamilyIndex must: be the index of a queue family that 2245e5c31af7Sopenharmony_ci includes the ename:VK_QUEUE_PROTECTED_BIT capability 2246e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2247e5c31af7Sopenharmony_ci**** 2248e5c31af7Sopenharmony_ci 2249e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceQueueCreateInfo.txt[] 2250e5c31af7Sopenharmony_ci-- 2251e5c31af7Sopenharmony_ci 2252e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 2253e5c31af7Sopenharmony_ci[open,refpage='VkDeviceQueueCreateFlagBits',desc='Bitmask specifying behavior of the queue',type='enums'] 2254e5c31af7Sopenharmony_ci-- 2255e5c31af7Sopenharmony_ciBits which can: be set in slink:VkDeviceQueueCreateInfo::pname:flags to 2256e5c31af7Sopenharmony_cispecify usage behavior of the queue are: 2257e5c31af7Sopenharmony_ci 2258e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkDeviceQueueCreateFlagBits.txt[] 2259e5c31af7Sopenharmony_ci 2260e5c31af7Sopenharmony_ci * ename:VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT specifies that the device 2261e5c31af7Sopenharmony_ci queue is a protected-capable queue. 2262e5c31af7Sopenharmony_ci-- 2263e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2264e5c31af7Sopenharmony_ci 2265e5c31af7Sopenharmony_ci[open,refpage='VkDeviceQueueCreateFlags',desc='Bitmask of VkDeviceQueueCreateFlagBits',type='flags'] 2266e5c31af7Sopenharmony_ci-- 2267e5c31af7Sopenharmony_ciinclude::{generated}/api/flags/VkDeviceQueueCreateFlags.txt[] 2268e5c31af7Sopenharmony_ci 2269e5c31af7Sopenharmony_ciifndef::VK_VERSION_1_1[] 2270e5c31af7Sopenharmony_citname:VkDeviceQueueCreateFlags is a bitmask type for setting a mask, but is 2271e5c31af7Sopenharmony_cicurrently reserved for future use. 2272e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2273e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 2274e5c31af7Sopenharmony_citname:VkDeviceQueueCreateFlags is a bitmask type for setting a mask of zero 2275e5c31af7Sopenharmony_cior more elink:VkDeviceQueueCreateFlagBits. 2276e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2277e5c31af7Sopenharmony_ci-- 2278e5c31af7Sopenharmony_ci 2279e5c31af7Sopenharmony_ciifdef::VK_EXT_global_priority[] 2280e5c31af7Sopenharmony_ci[open,refpage='VkDeviceQueueGlobalPriorityCreateInfoEXT',desc='Specify a system wide priority',type='structs'] 2281e5c31af7Sopenharmony_ci-- 2282e5c31af7Sopenharmony_ciA queue can: be created with a system-wide priority by adding a 2283e5c31af7Sopenharmony_cisname:VkDeviceQueueGlobalPriorityCreateInfoEXT structure to the pname:pNext 2284e5c31af7Sopenharmony_cichain of slink:VkDeviceQueueCreateInfo. 2285e5c31af7Sopenharmony_ci 2286e5c31af7Sopenharmony_ciThe sname:VkDeviceQueueGlobalPriorityCreateInfoEXT structure is defined as: 2287e5c31af7Sopenharmony_ci 2288e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceQueueGlobalPriorityCreateInfoEXT.txt[] 2289e5c31af7Sopenharmony_ci 2290e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 2291e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 2292e5c31af7Sopenharmony_ci structure. 2293e5c31af7Sopenharmony_ci * pname:globalPriority is the system-wide priority associated to this 2294e5c31af7Sopenharmony_ci queue as specified by elink:VkQueueGlobalPriorityEXT 2295e5c31af7Sopenharmony_ci 2296e5c31af7Sopenharmony_ciA queue created without specifying 2297e5c31af7Sopenharmony_cisname:VkDeviceQueueGlobalPriorityCreateInfoEXT will default to 2298e5c31af7Sopenharmony_ciename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT. 2299e5c31af7Sopenharmony_ci 2300e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceQueueGlobalPriorityCreateInfoEXT.txt[] 2301e5c31af7Sopenharmony_ci-- 2302e5c31af7Sopenharmony_ci 2303e5c31af7Sopenharmony_ci[open,refpage='VkQueueGlobalPriorityEXT',desc='Values specifying a system-wide queue priority',type='enums'] 2304e5c31af7Sopenharmony_ci-- 2305e5c31af7Sopenharmony_ciPossible values of 2306e5c31af7Sopenharmony_cislink:VkDeviceQueueGlobalPriorityCreateInfoEXT::pname:globalPriority, 2307e5c31af7Sopenharmony_cispecifying a system-wide priority level are: 2308e5c31af7Sopenharmony_ci 2309e5c31af7Sopenharmony_ciinclude::{generated}/api/enums/VkQueueGlobalPriorityEXT.txt[] 2310e5c31af7Sopenharmony_ci 2311e5c31af7Sopenharmony_ciPriority values are sorted in ascending order. 2312e5c31af7Sopenharmony_ciA comparison operation on the enum values can be used to determine the 2313e5c31af7Sopenharmony_cipriority order. 2314e5c31af7Sopenharmony_ci 2315e5c31af7Sopenharmony_ci * ename:VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT is below the system default. 2316e5c31af7Sopenharmony_ci Useful for non-interactive tasks. 2317e5c31af7Sopenharmony_ci * ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT is the system default 2318e5c31af7Sopenharmony_ci priority. 2319e5c31af7Sopenharmony_ci * ename:VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT is above the system default. 2320e5c31af7Sopenharmony_ci * ename:VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT is the highest priority. 2321e5c31af7Sopenharmony_ci Useful for critical tasks. 2322e5c31af7Sopenharmony_ci-- 2323e5c31af7Sopenharmony_ci 2324e5c31af7Sopenharmony_ciQueues with higher system priority may: be allotted more processing time 2325e5c31af7Sopenharmony_cithan queues with lower priority. 2326e5c31af7Sopenharmony_ciAn implementation may: allow a higher-priority queue to starve a 2327e5c31af7Sopenharmony_cilower-priority queue until the higher-priority queue has no further commands 2328e5c31af7Sopenharmony_cito execute. 2329e5c31af7Sopenharmony_ci 2330e5c31af7Sopenharmony_ciPriorities imply no ordering or scheduling constraints. 2331e5c31af7Sopenharmony_ci 2332e5c31af7Sopenharmony_ciNo specific guarantees are made about higher priority queues receiving more 2333e5c31af7Sopenharmony_ciprocessing time or better quality of service than lower priority queues. 2334e5c31af7Sopenharmony_ci 2335e5c31af7Sopenharmony_ciThe global priority level of a queue takes precedence over the per-process 2336e5c31af7Sopenharmony_ciqueue priority (slink:VkDeviceQueueCreateInfo::pname:pQueuePriorities). 2337e5c31af7Sopenharmony_ci 2338e5c31af7Sopenharmony_ciAbuse of this feature may: result in starving the rest of the system of 2339e5c31af7Sopenharmony_ciimplementation resources. 2340e5c31af7Sopenharmony_ciTherefore, the driver implementation may: deny requests to acquire a 2341e5c31af7Sopenharmony_cipriority above the default priority 2342e5c31af7Sopenharmony_ci(ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) if the caller does not have 2343e5c31af7Sopenharmony_cisufficient privileges. 2344e5c31af7Sopenharmony_ciIn this scenario ename:VK_ERROR_NOT_PERMITTED_EXT is returned. 2345e5c31af7Sopenharmony_ci 2346e5c31af7Sopenharmony_ciThe driver implementation may: fail the queue allocation request if 2347e5c31af7Sopenharmony_ciresources required to complete the operation have been exhausted (either by 2348e5c31af7Sopenharmony_cithe same process or a different process). 2349e5c31af7Sopenharmony_ciIn this scenario ename:VK_ERROR_INITIALIZATION_FAILED is returned. 2350e5c31af7Sopenharmony_ci 2351e5c31af7Sopenharmony_ciifdef::VK_EXT_global_priority_query[] 2352e5c31af7Sopenharmony_ciIf the <<features-globalPriorityQuery, pname:globalPriorityQuery>> feature 2353e5c31af7Sopenharmony_ciis enabled and the requested global priority is not reported via 2354e5c31af7Sopenharmony_cislink:VkQueueFamilyGlobalPriorityPropertiesEXT, the driver implementation 2355e5c31af7Sopenharmony_cimust: fail the queue creation. 2356e5c31af7Sopenharmony_ciIn this scenario, ename:VK_ERROR_INITIALIZATION_FAILED is returned. 2357e5c31af7Sopenharmony_ciendif::VK_EXT_global_priority_query[] 2358e5c31af7Sopenharmony_ciendif::VK_EXT_global_priority[] 2359e5c31af7Sopenharmony_ci 2360e5c31af7Sopenharmony_ci[open,refpage='vkGetDeviceQueue',desc='Get a queue handle from a device',type='protos'] 2361e5c31af7Sopenharmony_ci-- 2362e5c31af7Sopenharmony_ciTo retrieve a handle to a slink:VkQueue object, call: 2363e5c31af7Sopenharmony_ci 2364e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceQueue.txt[] 2365e5c31af7Sopenharmony_ci 2366e5c31af7Sopenharmony_ci * pname:device is the logical device that owns the queue. 2367e5c31af7Sopenharmony_ci * pname:queueFamilyIndex is the index of the queue family to which the 2368e5c31af7Sopenharmony_ci queue belongs. 2369e5c31af7Sopenharmony_ci * pname:queueIndex is the index within this queue family of the queue to 2370e5c31af7Sopenharmony_ci retrieve. 2371e5c31af7Sopenharmony_ci * pname:pQueue is a pointer to a slink:VkQueue object that will be filled 2372e5c31af7Sopenharmony_ci with the handle for the requested queue. 2373e5c31af7Sopenharmony_ci 2374e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 2375e5c31af7Sopenharmony_cifname:vkGetDeviceQueue must: only be used to get queues that were created 2376e5c31af7Sopenharmony_ciwith the pname:flags parameter of slink:VkDeviceQueueCreateInfo set to zero. 2377e5c31af7Sopenharmony_ciTo get queues that were created with a non-zero pname:flags parameter use 2378e5c31af7Sopenharmony_ciflink:vkGetDeviceQueue2. 2379e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2380e5c31af7Sopenharmony_ci 2381e5c31af7Sopenharmony_ci.Valid Usage 2382e5c31af7Sopenharmony_ci**** 2383e5c31af7Sopenharmony_ci * [[VUID-vkGetDeviceQueue-queueFamilyIndex-00384]] 2384e5c31af7Sopenharmony_ci pname:queueFamilyIndex must: be one of the queue family indices 2385e5c31af7Sopenharmony_ci specified when pname:device was created, via the 2386e5c31af7Sopenharmony_ci slink:VkDeviceQueueCreateInfo structure 2387e5c31af7Sopenharmony_ci * [[VUID-vkGetDeviceQueue-queueIndex-00385]] 2388e5c31af7Sopenharmony_ci pname:queueIndex must: be less than the value of 2389e5c31af7Sopenharmony_ci slink:VkDeviceQueueCreateInfo::pname:queueCount for the queue family 2390e5c31af7Sopenharmony_ci indicated by pname:queueFamilyIndex when pname:device was created 2391e5c31af7Sopenharmony_ci * [[VUID-vkGetDeviceQueue-flags-01841]] 2392e5c31af7Sopenharmony_ci slink:VkDeviceQueueCreateInfo::pname:flags must: have been set to zero 2393e5c31af7Sopenharmony_ci when pname:device was created 2394e5c31af7Sopenharmony_ci**** 2395e5c31af7Sopenharmony_ci 2396e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDeviceQueue.txt[] 2397e5c31af7Sopenharmony_ci-- 2398e5c31af7Sopenharmony_ci 2399e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1[] 2400e5c31af7Sopenharmony_ci[open,refpage='vkGetDeviceQueue2',desc='Get a queue handle from a device',type='protos'] 2401e5c31af7Sopenharmony_ci-- 2402e5c31af7Sopenharmony_ciTo retrieve a handle to a slink:VkQueue object with specific 2403e5c31af7Sopenharmony_citlink:VkDeviceQueueCreateFlags creation flags, call: 2404e5c31af7Sopenharmony_ci 2405e5c31af7Sopenharmony_ciinclude::{generated}/api/protos/vkGetDeviceQueue2.txt[] 2406e5c31af7Sopenharmony_ci 2407e5c31af7Sopenharmony_ci * pname:device is the logical device that owns the queue. 2408e5c31af7Sopenharmony_ci * pname:pQueueInfo is a pointer to a slink:VkDeviceQueueInfo2 structure, 2409e5c31af7Sopenharmony_ci describing parameters of the device queue to be retrieved. 2410e5c31af7Sopenharmony_ci * pname:pQueue is a pointer to a slink:VkQueue object that will be filled 2411e5c31af7Sopenharmony_ci with the handle for the requested queue. 2412e5c31af7Sopenharmony_ci 2413e5c31af7Sopenharmony_ciinclude::{generated}/validity/protos/vkGetDeviceQueue2.txt[] 2414e5c31af7Sopenharmony_ci-- 2415e5c31af7Sopenharmony_ci 2416e5c31af7Sopenharmony_ci[open,refpage='VkDeviceQueueInfo2',desc='Structure specifying the parameters used for device queue creation',type='structs'] 2417e5c31af7Sopenharmony_ci-- 2418e5c31af7Sopenharmony_ciThe sname:VkDeviceQueueInfo2 structure is defined as: 2419e5c31af7Sopenharmony_ci 2420e5c31af7Sopenharmony_ciinclude::{generated}/api/structs/VkDeviceQueueInfo2.txt[] 2421e5c31af7Sopenharmony_ci 2422e5c31af7Sopenharmony_ci * pname:sType is the type of this structure. 2423e5c31af7Sopenharmony_ci * pname:pNext is `NULL` or a pointer to a structure extending this 2424e5c31af7Sopenharmony_ci structure. 2425e5c31af7Sopenharmony_ci The pname:pNext chain of sname:VkDeviceQueueInfo2 can: be used to 2426e5c31af7Sopenharmony_ci provide additional device queue parameters to fname:vkGetDeviceQueue2. 2427e5c31af7Sopenharmony_ci * pname:flags is a tlink:VkDeviceQueueCreateFlags value indicating the 2428e5c31af7Sopenharmony_ci flags used to create the device queue. 2429e5c31af7Sopenharmony_ci * pname:queueFamilyIndex is the index of the queue family to which the 2430e5c31af7Sopenharmony_ci queue belongs. 2431e5c31af7Sopenharmony_ci * pname:queueIndex is the index within this queue family of the queue to 2432e5c31af7Sopenharmony_ci retrieve. 2433e5c31af7Sopenharmony_ci 2434e5c31af7Sopenharmony_ciThe queue returned by fname:vkGetDeviceQueue2 must: have the same 2435e5c31af7Sopenharmony_cipname:flags value from this structure as that used at device creation time 2436e5c31af7Sopenharmony_ciin a slink:VkDeviceQueueCreateInfo structure. 2437e5c31af7Sopenharmony_ciIf no matching pname:flags were specified at device creation time, then the 2438e5c31af7Sopenharmony_cihandle returned in pname:pQueue must: be `NULL`. 2439e5c31af7Sopenharmony_ci 2440e5c31af7Sopenharmony_ci.Valid Usage 2441e5c31af7Sopenharmony_ci**** 2442e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueInfo2-queueFamilyIndex-01842]] 2443e5c31af7Sopenharmony_ci pname:queueFamilyIndex must: be one of the queue family indices 2444e5c31af7Sopenharmony_ci specified when pname:device was created, via the 2445e5c31af7Sopenharmony_ci slink:VkDeviceQueueCreateInfo structure 2446e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueInfo2-flags-06225]] 2447e5c31af7Sopenharmony_ci pname:flags must: be equal to slink:VkDeviceQueueCreateInfo::pname:flags 2448e5c31af7Sopenharmony_ci for a slink:VkDeviceQueueCreateInfo structure for the queue family 2449e5c31af7Sopenharmony_ci indicated by pname:queueFamilyIndex when pname:device was created 2450e5c31af7Sopenharmony_ci * [[VUID-VkDeviceQueueInfo2-queueIndex-01843]] 2451e5c31af7Sopenharmony_ci pname:queueIndex must: be less than 2452e5c31af7Sopenharmony_ci slink:VkDeviceQueueCreateInfo::pname:queueCount for the corresponding 2453e5c31af7Sopenharmony_ci queue family and flags indicated by pname:queueFamilyIndex and 2454e5c31af7Sopenharmony_ci pname:flags when pname:device was created 2455e5c31af7Sopenharmony_ci**** 2456e5c31af7Sopenharmony_ci 2457e5c31af7Sopenharmony_ciinclude::{generated}/validity/structs/VkDeviceQueueInfo2.txt[] 2458e5c31af7Sopenharmony_ci-- 2459e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1[] 2460e5c31af7Sopenharmony_ci 2461e5c31af7Sopenharmony_ci 2462e5c31af7Sopenharmony_ci[[devsandqueues-index]] 2463e5c31af7Sopenharmony_ci=== Queue Family Index 2464e5c31af7Sopenharmony_ci 2465e5c31af7Sopenharmony_ciThe queue family index is used in multiple places in Vulkan in order to tie 2466e5c31af7Sopenharmony_cioperations to a specific family of queues. 2467e5c31af7Sopenharmony_ci 2468e5c31af7Sopenharmony_ciWhen retrieving a handle to the queue via fname:vkGetDeviceQueue, the queue 2469e5c31af7Sopenharmony_cifamily index is used to select which queue family to retrieve the 2470e5c31af7Sopenharmony_cisname:VkQueue handle from as described in the previous section. 2471e5c31af7Sopenharmony_ci 2472e5c31af7Sopenharmony_ciWhen creating a sname:VkCommandPool object (see 2473e5c31af7Sopenharmony_ci<<commandbuffers-pools,Command Pools>>), a queue family index is specified 2474e5c31af7Sopenharmony_ciin the slink:VkCommandPoolCreateInfo structure. 2475e5c31af7Sopenharmony_ciCommand buffers from this pool can: only be submitted on queues 2476e5c31af7Sopenharmony_cicorresponding to this queue family. 2477e5c31af7Sopenharmony_ci 2478e5c31af7Sopenharmony_ciWhen creating sname:VkImage (see <<resources-images,Images>>) and 2479e5c31af7Sopenharmony_cisname:VkBuffer (see <<resources-buffers,Buffers>>) resources, a set of queue 2480e5c31af7Sopenharmony_cifamilies is included in the slink:VkImageCreateInfo and 2481e5c31af7Sopenharmony_cislink:VkBufferCreateInfo structures to specify the queue families that can: 2482e5c31af7Sopenharmony_ciaccess the resource. 2483e5c31af7Sopenharmony_ci 2484e5c31af7Sopenharmony_ciWhen inserting a slink:VkBufferMemoryBarrier or slink:VkImageMemoryBarrier 2485e5c31af7Sopenharmony_ci(see <<synchronization-pipeline-barriers>>), a source and destination queue 2486e5c31af7Sopenharmony_cifamily index is specified to allow the ownership of a buffer or image to be 2487e5c31af7Sopenharmony_citransferred from one queue family to another. 2488e5c31af7Sopenharmony_ciSee the <<resources-sharing,Resource Sharing>> section for details. 2489e5c31af7Sopenharmony_ci 2490e5c31af7Sopenharmony_ci 2491e5c31af7Sopenharmony_ci[[devsandqueues-priority]] 2492e5c31af7Sopenharmony_ci=== Queue Priority 2493e5c31af7Sopenharmony_ci 2494e5c31af7Sopenharmony_ciEach queue is assigned a priority, as set in the 2495e5c31af7Sopenharmony_cislink:VkDeviceQueueCreateInfo structures when creating the device. 2496e5c31af7Sopenharmony_ciThe priority of each queue is a normalized floating point value between 0.0 2497e5c31af7Sopenharmony_ciand 1.0, which is then translated to a discrete priority level by the 2498e5c31af7Sopenharmony_ciimplementation. 2499e5c31af7Sopenharmony_ciHigher values indicate a higher priority, with 0.0 being the lowest priority 2500e5c31af7Sopenharmony_ciand 1.0 being the highest. 2501e5c31af7Sopenharmony_ci 2502e5c31af7Sopenharmony_ciWithin the same device, queues with higher priority may: be allotted more 2503e5c31af7Sopenharmony_ciprocessing time than queues with lower priority. 2504e5c31af7Sopenharmony_ciThe implementation makes no guarantees with regards to ordering or 2505e5c31af7Sopenharmony_cischeduling among queues with the same priority, other than the constraints 2506e5c31af7Sopenharmony_cidefined by any <<synchronization, explicit synchronization primitives>>. 2507e5c31af7Sopenharmony_ciThe implementation makes no guarantees with regards to queues across 2508e5c31af7Sopenharmony_cidifferent devices. 2509e5c31af7Sopenharmony_ci 2510e5c31af7Sopenharmony_ciAn implementation may: allow a higher-priority queue to starve a 2511e5c31af7Sopenharmony_cilower-priority queue on the same sname:VkDevice until the higher-priority 2512e5c31af7Sopenharmony_ciqueue has no further commands to execute. 2513e5c31af7Sopenharmony_ciThe relationship of queue priorities must: not cause queues on one 2514e5c31af7Sopenharmony_cisname:VkDevice to starve queues on another sname:VkDevice. 2515e5c31af7Sopenharmony_ci 2516e5c31af7Sopenharmony_ciNo specific guarantees are made about higher priority queues receiving more 2517e5c31af7Sopenharmony_ciprocessing time or better quality of service than lower priority queues. 2518e5c31af7Sopenharmony_ci 2519e5c31af7Sopenharmony_ci 2520e5c31af7Sopenharmony_ci[[devsandqueues-submission]] 2521e5c31af7Sopenharmony_ci=== Queue Submission 2522e5c31af7Sopenharmony_ci 2523e5c31af7Sopenharmony_ciWork is submitted to a queue via _queue submission_ commands such as 2524e5c31af7Sopenharmony_ciifdef::VK_KHR_synchronization2[] 2525e5c31af7Sopenharmony_ciflink:vkQueueSubmit2KHR or 2526e5c31af7Sopenharmony_ciendif::VK_KHR_synchronization2[] 2527e5c31af7Sopenharmony_ciflink:vkQueueSubmit. 2528e5c31af7Sopenharmony_ciQueue submission commands define a set of _queue operations_ to be executed 2529e5c31af7Sopenharmony_ciby the underlying physical device, including synchronization with semaphores 2530e5c31af7Sopenharmony_ciand fences. 2531e5c31af7Sopenharmony_ci 2532e5c31af7Sopenharmony_ciSubmission commands take as parameters a target queue, zero or more 2533e5c31af7Sopenharmony_ci_batches_ of work, and an optional: fence to signal upon completion. 2534e5c31af7Sopenharmony_ciEach batch consists of three distinct parts: 2535e5c31af7Sopenharmony_ci 2536e5c31af7Sopenharmony_ci . Zero or more semaphores to wait on before execution of the rest of the 2537e5c31af7Sopenharmony_ci batch. 2538e5c31af7Sopenharmony_ci ** If present, these describe a <<synchronization-semaphores-waiting, 2539e5c31af7Sopenharmony_ci semaphore wait operation>>. 2540e5c31af7Sopenharmony_ci . Zero or more work items to execute. 2541e5c31af7Sopenharmony_ci ** If present, these describe a _queue operation_ matching the work 2542e5c31af7Sopenharmony_ci described. 2543e5c31af7Sopenharmony_ci . Zero or more semaphores to signal upon completion of the work items. 2544e5c31af7Sopenharmony_ci ** If present, these describe a <<synchronization-semaphores-signaling, 2545e5c31af7Sopenharmony_ci semaphore signal operation>>. 2546e5c31af7Sopenharmony_ci 2547e5c31af7Sopenharmony_ciIf a fence is present in a queue submission, it describes a 2548e5c31af7Sopenharmony_ci<<synchronization-fences-signaling, fence signal operation>>. 2549e5c31af7Sopenharmony_ci 2550e5c31af7Sopenharmony_ciAll work described by a queue submission command must: be submitted to the 2551e5c31af7Sopenharmony_ciqueue before the command returns. 2552e5c31af7Sopenharmony_ci 2553e5c31af7Sopenharmony_ci 2554e5c31af7Sopenharmony_ci[[devsandqueues-sparsebinding]] 2555e5c31af7Sopenharmony_ci==== Sparse Memory Binding 2556e5c31af7Sopenharmony_ci 2557e5c31af7Sopenharmony_ciIn Vulkan it is possible to sparsely bind memory to buffers and images as 2558e5c31af7Sopenharmony_cidescribed in the <<sparsememory,Sparse Resource>> chapter. 2559e5c31af7Sopenharmony_ciSparse memory binding is a queue operation. 2560e5c31af7Sopenharmony_ciA queue whose flags include the ename:VK_QUEUE_SPARSE_BINDING_BIT must: be 2561e5c31af7Sopenharmony_ciable to support the mapping of a virtual address to a physical address on 2562e5c31af7Sopenharmony_cithe device. 2563e5c31af7Sopenharmony_ciThis causes an update to the page table mappings on the device. 2564e5c31af7Sopenharmony_ciThis update must: be synchronized on a queue to avoid corrupting page table 2565e5c31af7Sopenharmony_cimappings during execution of graphics commands. 2566e5c31af7Sopenharmony_ciBy binding the sparse memory resources on queues, all commands that are 2567e5c31af7Sopenharmony_cidependent on the updated bindings are synchronized to only execute after the 2568e5c31af7Sopenharmony_cibinding is updated. 2569e5c31af7Sopenharmony_ciSee the <<synchronization,Synchronization and Cache Control>> chapter for 2570e5c31af7Sopenharmony_cihow this synchronization is accomplished. 2571e5c31af7Sopenharmony_ci 2572e5c31af7Sopenharmony_ci 2573e5c31af7Sopenharmony_ci[[devsandqueues-queuedestruction]] 2574e5c31af7Sopenharmony_ci=== Queue Destruction 2575e5c31af7Sopenharmony_ci 2576e5c31af7Sopenharmony_ciQueues are created along with a logical device during fname:vkCreateDevice. 2577e5c31af7Sopenharmony_ciAll queues associated with a logical device are destroyed when 2578e5c31af7Sopenharmony_cifname:vkDestroyDevice is called on that device. 2579