Registered Extension Number

463

Revision

1

Extension and Version Dependencies

Contact

Extension Proposal

Other Extension Metadata

Last Modified Date

2022-05-16

IP Status

No known IP claims.

Contributors
  • Hans-Kristian Arntzen, Valve

  • Ricardo Garcia, Igalia

  • Piers Daniell, NVIDIA

  • Jan-Harald Fredriksen, Arm

  • Tom Olson, Arm

  • Jason Ekstrand, Collabora

Description

Some applications generate SPIR-V code at runtime. When pipeline caches are primed, either explicitly through e.g. VkPipelineCache mechanisms, or implicitly through driver managed caches, having to re-generate SPIR-V modules is redundant. SPIR-V modules could be cached on disk by an application, but the extra disk size requirement might be prohibitive in some use cases.

This extension adds the ability for an application to query a small identifier associated with a VkShaderModule. On subsequent runs of the application, the same identifier can be provided in lieu of a VkShaderModule object. A pipeline creation call with such a module may succeed if a pipeline could be created without invoking compilation, and information inside the SPIR-V module is not required by the implementation.

VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT must be used if only the identifier is provided, and this use case is intended to work like a non-blocking, speculative compile. Applications can fallback as necessary.

The main motivation for identifying the module itself and not the entire pipeline is that pipeline identifiers change when a driver is updated, but module identifiers are expected to be stable for any particular driver implementation. This approach is helpful for shader pre-compilation systems which can prime pipeline caches ahead of time. When on-disk pipeline caches are updated, the same shader identifiers could lead to a pipeline cache hit.

New Commands

New Structures

New Enum Constants

  • VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME

  • VK_EXT_SHADER_MODULE_IDENTIFIER_SPEC_VERSION

  • VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT

  • Extending VkStructureType:

    • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT

    • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT

    • VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT

    • VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT

Version History

  • Revision 1, 2022-03-16 (Hans-Kristian Arntzen)

    • Initial draft

See Also

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.

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0