vulkan-3.24.3: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_global_priority

Description

Name

VK_KHR_global_priority - device extension

VK_KHR_global_priority

Name String
VK_KHR_global_priority
Extension Type
Device extension
Registered Extension Number
189
Revision
1
Extension and Version Dependencies
  • Requires support for Vulkan 1.0
Contact

Other Extension Metadata

Last Modified Date
2021-10-22
Contributors
  • Tobias Hector, AMD
  • Contributors to VK_EXT_global_priority
  • Contributors to VK_EXT_global_priority_query

Description

In Vulkan, users can specify device-scope queue priorities. In some cases it may be useful to extend this concept to a system-wide scope. This device extension allows applications to query the global queue priorities supported by a queue family, and then set a priority when creating queues. The default queue priority is QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT.

Implementations can report which global priority levels are treated differently by the implementation. It is intended primarily for use in system integration along with certain platform-specific priority enforcement rules.

The driver implementation will attempt to skew hardware resource allocation in favour of the higher-priority task. Therefore, higher-priority work may retain similar latency and throughput characteristics even if the system is congested with lower priority work.

The global priority level of a queue shall take precedence over the per-process queue priority (DeviceQueueCreateInfo::pQueuePriorities).

Abuse of this feature may result in starving the rest of the system from hardware resources. Therefore, the driver implementation may deny requests to acquire a priority above the default priority (QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) if the caller does not have sufficient privileges. In this scenario ERROR_NOT_PERMITTED_EXT is returned.

The driver implementation may fail the queue allocation request if resources required to complete the operation have been exhausted (either by the same process or a different process). In this scenario ERROR_INITIALIZATION_FAILED is returned.

New Structures

New Enums

New Enum Constants

Issues

1) Can we additionally query whether a caller is permitted to acquire a specific global queue priority in this extension?

RESOLVED: No. Whether a caller has enough privilege goes with the OS, and the Vulkan driver cannot really guarantee that the privilege will not change in between this query and the actual queue creation call.

2) If more than 1 queue using global priority is requested, is there a good way to know which queue is failing the device creation?

RESOLVED: No. There is not a good way at this moment, and it is also not quite actionable for the applications to know that because the information may not be accurate. Queue creation can fail because of runtime constraints like insufficient privilege or lack of resource, and the failure is not necessarily tied to that particular queue configuration requested.

Version History

  • Revision 1, 2021-10-22 (Tobias Hector)

    • Initial draft

See Also

MAX_GLOBAL_PRIORITY_SIZE_KHR, DeviceQueueGlobalPriorityCreateInfoKHR, PhysicalDeviceGlobalPriorityQueryFeaturesKHR, QueueFamilyGlobalPriorityPropertiesKHR, QueueGlobalPriorityKHR

Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

data DeviceQueueGlobalPriorityCreateInfoKHR Source #

VkDeviceQueueGlobalPriorityCreateInfoKHR - Specify a system wide priority

Description

Queues created without specifying DeviceQueueGlobalPriorityCreateInfoKHR will default to QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR.

Valid Usage (Implicit)

See Also

VK_EXT_global_priority, VK_KHR_global_priority, QueueGlobalPriorityKHR, StructureType

Constructors

DeviceQueueGlobalPriorityCreateInfoKHR 

Fields

Instances

Instances details
Storable DeviceQueueGlobalPriorityCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Show DeviceQueueGlobalPriorityCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Eq DeviceQueueGlobalPriorityCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

FromCStruct DeviceQueueGlobalPriorityCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

ToCStruct DeviceQueueGlobalPriorityCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Zero DeviceQueueGlobalPriorityCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

data PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source #

VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR - Structure describing whether global priority query can be supported by an implementation

Members

This structure describes the following feature:

Description

If the PhysicalDeviceGlobalPriorityQueryFeaturesKHR structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. PhysicalDeviceGlobalPriorityQueryFeaturesKHR can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_KHR_global_priority, Bool32, StructureType

Constructors

PhysicalDeviceGlobalPriorityQueryFeaturesKHR 

Fields

  • globalPriorityQuery :: Bool

    globalPriorityQuery indicates whether the implementation supports the ability to query global queue priorities.

Instances

Instances details
Storable PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Show PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Eq PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

FromCStruct PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

ToCStruct PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Zero PhysicalDeviceGlobalPriorityQueryFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

data QueueFamilyGlobalPriorityPropertiesKHR Source #

VkQueueFamilyGlobalPriorityPropertiesKHR - Return structure for queue family global priority information query

Description

If the QueueFamilyGlobalPriorityPropertiesKHR structure is included in the pNext chain of the QueueFamilyProperties2 structure passed to getPhysicalDeviceQueueFamilyProperties2, it is filled in with the list of supported global queue priorities for the indicated family.

The valid elements of priorities must not contain any duplicate values.

The valid elements of priorities must be a continuous sequence of QueueGlobalPriorityKHR enums in the ascending order.

Note

For example, returning priorityCount as 3 with supported priorities as QUEUE_GLOBAL_PRIORITY_LOW_KHR, QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR and QUEUE_GLOBAL_PRIORITY_REALTIME_KHR is not allowed.

Valid Usage (Implicit)

See Also

VK_KHR_global_priority, QueueGlobalPriorityKHR, StructureType

Constructors

QueueFamilyGlobalPriorityPropertiesKHR 

Fields

Instances

Instances details
Storable QueueFamilyGlobalPriorityPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Show QueueFamilyGlobalPriorityPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

FromCStruct QueueFamilyGlobalPriorityPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

ToCStruct QueueFamilyGlobalPriorityPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Zero QueueFamilyGlobalPriorityPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

newtype QueueGlobalPriorityKHR Source #

VkQueueGlobalPriorityKHR - Values specifying a system-wide queue priority

Description

Priority values are sorted in ascending order. A comparison operation on the enum values can be used to determine the priority order.

See Also

VK_EXT_global_priority, VK_KHR_global_priority, DeviceQueueGlobalPriorityCreateInfoKHR, QueueFamilyGlobalPriorityPropertiesKHR

Bundled Patterns

pattern QUEUE_GLOBAL_PRIORITY_LOW_KHR :: QueueGlobalPriorityKHR

QUEUE_GLOBAL_PRIORITY_LOW_KHR is below the system default. Useful for non-interactive tasks.

pattern QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR :: QueueGlobalPriorityKHR

QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR is the system default priority.

pattern QUEUE_GLOBAL_PRIORITY_HIGH_KHR :: QueueGlobalPriorityKHR

QUEUE_GLOBAL_PRIORITY_HIGH_KHR is above the system default.

pattern QUEUE_GLOBAL_PRIORITY_REALTIME_KHR :: QueueGlobalPriorityKHR

QUEUE_GLOBAL_PRIORITY_REALTIME_KHR is the highest priority. Useful for critical tasks.

Instances

Instances details
Storable QueueGlobalPriorityKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Read QueueGlobalPriorityKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Show QueueGlobalPriorityKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Eq QueueGlobalPriorityKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Ord QueueGlobalPriorityKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

Zero QueueGlobalPriorityKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_global_priority

type KHR_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_KHR_global_priority" Source #

pattern KHR_GLOBAL_PRIORITY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #

pattern MAX_GLOBAL_PRIORITY_SIZE_KHR :: forall a. Integral a => a Source #

VK_MAX_GLOBAL_PRIORITY_SIZE_KHR - Length of an array of global queue priorities

See Also

VK_KHR_global_priority