1// Copyright 2017-2021 The Khronos Group, Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_KHR_shader_clock.txt[] 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 requires 15 {spirv}/KHR/SPV_KHR_shader_clock.html[`SPV_KHR_shader_clock`]. 16 - This extension provides API support for 17 https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_clock.txt[`ARB_shader_clock`] 18 and 19 https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_shader_realtime_clock.txt[`EXT_shader_realtime_clock`] 20*Contributors*:: 21 - Aaron Hagan, AMD 22 - Daniel Koch, NVIDIA 23 24=== Description 25 26This extension advertises the SPIR-V code:ShaderClockKHR capability for 27Vulkan, which allows a shader to query a real-time or monotonically 28incrementing counter at the subgroup level or across the device level. 29The two valid SPIR-V scopes for code:OpReadClockKHR are code:Subgroup and 30code:Device. 31 32When using GLSL source-based shading languages, the code:clockRealtime*EXT() 33timing functions map to the code:OpReadClockKHR instruction with a scope of 34code:Device, and the code:clock*ARB() timing functions map to the 35code:OpReadClockKHR instruction with a scope of code:Subgroup. 36 37include::{generated}/interfaces/VK_KHR_shader_clock.txt[] 38 39=== New SPIR-V Capabilities 40 41 * <<spirvenv-capabilities-table-ShaderClockKHR,ShaderClockKHR>> 42 43=== Version History 44 45 * Revision 1, 2019-4-25 (Aaron Hagan) 46 - Initial revision 47