vulkan-3.15: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

Description

Name

VK_EXT_pipeline_creation_cache_control - device extension

VK_EXT_pipeline_creation_cache_control

Name String
VK_EXT_pipeline_creation_cache_control
Extension Type
Device extension
Registered Extension Number
298
Revision
3
Extension and Version Dependencies
  • Requires Vulkan 1.0
Contact

Other Extension Metadata

Last Modified Date
2020-03-23
IP Status
No known IP claims.
Contributors
  • Gregory Grebe, AMD
  • Tobias Hector, AMD
  • Matthaeus Chajdas, AMD
  • Mitch Singer, AMD
  • Spencer Fricke, Samsung Electronics
  • Stuart Smith, Imagination Technologies
  • Jeff Bolz, NVIDIA Corporation
  • Daniel Koch, NVIDIA Corporation
  • Dan Ginsburg, Valve Corporation
  • Jeff Leger, QUALCOMM
  • Michal Pietrasiuk, Intel
  • Jan-Harald Fredriksen, Arm Limited

Description

This extension adds flags to Vk*PipelineCreateInfo and PipelineCacheCreateInfo structures with the aim of improving the predictability of pipeline creation cost. The goal is to provide information about potentially expensive hazards within the client driver during pipeline creation to the application before carrying them out rather than after.

Background

Pipeline creation is a costly operation, and the explicit nature of the Vulkan design means that cost is not hidden from the developer. Applications are also expected to schedule, prioritize, and load balance all calls for pipeline creation. It is strongly advised that applications create pipelines sufficiently ahead of their usage. Failure to do so will result in an unresponsive application, intermittent stuttering, or other poor user experiences. Proper usage of pipeline caches and/or derivative pipelines help mitigate this but is not assured to eliminate disruption in all cases. In the event that an ahead-of-time creation is not possible, considerations should be taken to ensure that the current execution context is suitable for the workload of pipeline creation including possible shader compilation.

Applications making API calls to create a pipeline must be prepared for any of the following to occur:

  • OS/kernel calls to be made by the ICD
  • Internal memory allocation not tracked by the pAllocator passed to vkCreate*Pipelines
  • Internal thread synchronization or yielding of the current thread’s core
  • Extremely long (multi-millisecond+), blocking, compilation times
  • Arbitrary call stacks depths and stack memory usage

The job or task based game engines that are being developed to take advantage of explicit graphics APIs like Vulkan may behave exceptionally poorly if any of the above scenarios occur. However, most game engines are already built to “stream” in assets dynamically as the user plays the game. By adding control by way of PipelineCreateFlags, we can require an ICD to report back a failure in critical execution paths rather than forcing an unexpected wait.

Applications can prevent unexpected compilation by setting PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT on Vk*PipelineCreateInfo::flags. When set, an ICD must not attempt pipeline or shader compilation to create the pipeline object. The ICD will return the result PIPELINE_COMPILE_REQUIRED_EXT. An ICD may still return a valid Pipeline object by either re-using existing pre-compiled objects such as those from a pipeline cache, or derivative pipelines.

By default vkCreate*Pipelines calls must attempt to create all pipelines before returning. Setting PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT on Vk*PipelineCreateInfo::flags can be used as an escape hatch for batched pipeline creates.

Hidden locks also add to the unpredictability of the cost of pipeline creation. The most common case of locks inside the vkCreate*Pipelines is internal synchronization of the PipelineCache object. PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT can be set when calling createPipelineCache to state the cache is externally synchronized.

The hope is that armed with this information application and engine developers can leverage existing asset streaming systems to recover from "just-in-time" pipeline creation stalls.

New Structures

New Enums

New Enum Constants

Version History

  • Revision 1, 2019-11-01 (Gregory Grebe)

    • Initial revision

See Also

PhysicalDevicePipelineCreationCacheControlFeaturesEXT, PipelineCacheCreateFlagBits

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 PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source #

VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT - Structure describing whether pipeline cache control can be supported by an implementation

Members

This structure describes the following feature:

Description

If the PhysicalDevicePipelineCreationCacheControlFeaturesEXT 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. PhysicalDevicePipelineCreationCacheControlFeaturesEXT can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_EXT_pipeline_creation_cache_control, Bool32, StructureType

Constructors

PhysicalDevicePipelineCreationCacheControlFeaturesEXT 

Fields

Instances

Instances details
Eq PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

Show PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

Storable PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

FromCStruct PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

ToCStruct PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

Zero PhysicalDevicePipelineCreationCacheControlFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control

type EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME = "VK_EXT_pipeline_creation_cache_control" Source #