Name Strings
SPV_KHR_shader_clock
Contact
See Issues list in the Khronos SPIRV-Registry repository: https://github.com/KhronosGroup/SPIRV-Registry
Contributors
-
Aaron Hagan, AMD
-
Neil Henning, AMD
-
Daniel Rakos, AMD
-
David Neto, Google
-
Daniel Koch, NVIDIA
Status
-
Complete
-
Approved by the SPIR Working Group: 2019-03-06
-
Ratified by Khronos on 2019-05-03
Version
Last Modified Date |
2019-10-30 |
Revision |
3 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.3 Revision 1.
This extension requires SPIR-V 1.0.
Overview
This extension adds new capabilities to support the GL_ARB_shader_clock and GL_EXT_shader_realtime_clock GLSL extensions in SPIR-V.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_KHR_shader_clock"
New Capabilities
This extension introduces a new capability:
ShaderClockKHR
New Instructions
Instructions added under the ShaderClockKHR capability:
OpReadClockKHR
Token Number Assignments
ShaderClockKHR |
5055 |
OpReadClockKHR |
5056 |
Modifications to the SPIR-V Specification, Version 1.3
Capabilities
Modify Section 3.31, Capability, adding rows to the Capability table:
Capability | Implicitly Declares | |
---|---|---|
5055 |
ShaderClockKHR |
Instructions
- (Add Section 3.32.25, Time Instructions)
-
- (Add to Used by: list in Section 3.27, Scope <id>)
OpReadClockKHR
Validation Rules
An OpExtension must be added to SPIR-V for validation layers to check legal use of this extension:
OpExtension "SPV_KHR_shader_clock"
The Scope operand of the OpReadClockKHR instruction must be a valid Scope <id>.
Issues
-
How does this extension interact with ARB_shader_clock ?
RESOLVED: This extension purposefully does not fully implement ARB_shader_clock, as there is no guarantee of code motion barriers.
-
If two invocations execute the same dynamic instance of the ReadClockKHR instruction, do both invocations get exactly the same value ?
RESOLVED: There is no guarantee that two invocations will produce exactly the same value.
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2019-02-22 |
Aaron Hagan |
Initial draft |
2 |
2019-10-29 |
Daniel Koch |
Add Op prefix to new instruction, add links to GLSL specs |
3 |
2019-10-30 |
Daniel Koch |
SPIR-V/issues/511 (gitlab) - stop calling the scope "Execution Scope" |