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
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"
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.