VK_KHR_shader_clock(3)

# VK_KHR_shader_clock(3) Manual Page

## Name

VK_KHR_shader_clock - device extension

Loading… please wait.

## Registered Extension Number

182

## Revision

1

## Ratification Status

Ratified

## Extension and Version Dependencies

VK_KHR_get_physical_device_properties2
or
Version 1.1

## SPIR-V Dependencies

- SPV_KHR_shader_clock

## Contact

- Aaron Hagan ahagan

## Other Extension Metadata

Last Modified Date

  2019-4-25

IP Status

  No known IP claims.

Interactions and External Dependencies

  - This extension provides API support for `GL_ARB_shader_clock` and `GL_EXT_shader_realtime_clock`

Contributors

  - Aaron Hagan, AMD

  - Daniel Koch, NVIDIA

## Description

This extension advertises the SPIR-V `ShaderClockKHR` capability for Vulkan, which allows a shader to query a real-time or monotonically incrementing counter at the subgroup level or across the device level. The two valid SPIR-V scopes for `OpReadClockKHR` are `Subgroup` and `Device`.

When using GLSL source-based shading languages, the `clockRealtime*EXT`() timing functions map to the `OpReadClockKHR` instruction with a scope of `Device`, and the `clock*ARB`() timing functions map to the `OpReadClockKHR` instruction with a scope of `Subgroup`.

## New Structures

- Extending VkPhysicalDeviceFeatures2, VkDeviceCreateInfo:

  - VkPhysicalDeviceShaderClockFeaturesKHR

## New Enum Constants

- `VK_KHR_SHADER_CLOCK_EXTENSION_NAME`

- `VK_KHR_SHADER_CLOCK_SPEC_VERSION`

- Extending VkStructureType:

  - `VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR`

## New SPIR-V Capabilities

- `ShaderClockKHR`

## Version History

- Revision 1, 2019-4-25 (Aaron Hagan)

  - Initial revision

## See Also

VkPhysicalDeviceShaderClockFeaturesKHR

## Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

## Copyright

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0