• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2017-2024 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_KHR_shader_clock.adoc[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2019-4-25
11*IP Status*::
12    No known IP claims.
13*Interactions and External Dependencies*::
14  - This extension provides API support for
15    {GLregistry}/ARB/ARB_shader_clock.txt[`GL_ARB_shader_clock`] and
16    {GLSLregistry}/ext/GL_EXT_shader_realtime_clock.txt[`GL_EXT_shader_realtime_clock`]
17*Contributors*::
18  - Aaron Hagan, AMD
19  - Daniel Koch, NVIDIA
20
21=== Description
22
23This extension advertises the SPIR-V code:ShaderClockKHR capability for
24Vulkan, which allows a shader to query a real-time or monotonically
25incrementing counter at the subgroup level or across the device level.
26The two valid SPIR-V scopes for code:OpReadClockKHR are code:Subgroup and
27code:Device.
28
29When using GLSL source-based shading languages, the code:clockRealtime*EXT()
30timing functions map to the code:OpReadClockKHR instruction with a scope of
31code:Device, and the code:clock*ARB() timing functions map to the
32code:OpReadClockKHR instruction with a scope of code:Subgroup.
33
34include::{generated}/interfaces/VK_KHR_shader_clock.adoc[]
35
36=== New SPIR-V Capabilities
37
38  * <<spirvenv-capabilities-table-ShaderClockKHR, code:ShaderClockKHR>>
39
40=== Version History
41
42  * Revision 1, 2019-4-25 (Aaron Hagan)
43  ** Initial revision
44