// Copyright (c) 2020-2022 Khronos Group.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_pipeline_properties.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
    2022-04-19
*IP Status*::
    No known IP claims.
*Contributors*::
  - Mukund Keshava, NVIDIA
  - Daniel Koch, NVIDIA
  - Mark Bellamy, Arm


=== Description

Vulkan SC requires offline compilation of pipelines.
In order to support this, the pipeline state is represented in a
https://github.com/KhronosGroup/VulkanSC-Docs/wiki/JSON-schema[JSON schema]
that is read by an offline tool for compilation.

One method of developing a Vulkan SC application is to author a Vulkan
application and use a layer to record and serialize the pipeline state and
shaders for offline compilation.
Each pipeline is represented by a separate JSON file, and can be identified
with a pname:pipelineIdentifier.

Once the pipelines have been compiled by the offline pipeline cache
compiler, the Vulkan SC application can then use this
pname:pipelineIdentifier for identifying the pipeline via Vulkan SC's
pname:VkPipelineIdentifierInfo structure.

This extension allows the Vulkan application to query the
pname:pipelineIdentifier associated with each pipeline so that the
application can store this with its pipeline metadata and the Vulkan SC
application will then use to map the same state to an entry in the Vulkan SC
pipeline cache.

It is expected that this extension will initially be implemented in the json
generation layer, although we can envision that there might be future uses
for it in native Vulkan drivers as well.

include::{generated}/interfaces/VK_EXT_pipeline_properties.adoc[]

=== Issues
(1) This extension does not make sense on a strict Vulkan SC implementation.
It may however be of potential use in a non-strict Vulkan SC implementation.
Should this extension be enabled as part of Vulkan SC as well?
--
*RESOLVED*: No.
This extension will not be enabled for Vulkan SC.
--

(2) This is intended to be a general pipeline properties query, but is
currently only retrieving the pipeline identifier.
Should the pipeline identifier query be mandatory for this extension and for
all queries using this entry point?
--
*RESOLVED*: Use slink:VkBaseOutStructure for the return parameter.
Currently this is required to actually be a
slink:VkPipelinePropertiesIdentifierEXT structure, but that could be relaxed
in the future to allow other structure types or to allow other structures to
be chained in along with this one.
--

(3) Should there be a feature structure? Should it be required?
--
*RESOLVED*: Add a feature structure, and a feature for querying pipeline
identifier, but allow it to be optional so that this extension can be used
as the basis for other pipeline property queries without requiring the
pipeline identifier to be supported.
--

=== Version History

  * Revision 1, 2022-04-19 (Mukund Keshava, Daniel Koch)
  ** Initial draft
