vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5]

Graphics / Mesa 3D Graphics Library / Mesa - Keith Packard [keithp.com] - 18 October 2018 03:10 EDT

Offers three clocks, device, clock monotonic and clock monotonic raw. Could use some kernel support to reduce the deviation between clock values.

v2: Ensure deviation is at least as big as the GPU time interval.

v3: Set device->lost when returning DEVICE_LOST. Use MAX2 and DIV_ROUND_UP instead of open coding these. Delete spurious TIMESTAMP in radv version.

67a2c1493c vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5]
src/amd/vulkan/radv_device.c | 119 ++++++++++++++++++++++++++++++++++
src/amd/vulkan/radv_extensions.py | 1 +
src/intel/vulkan/anv_device.c | 127 +++++++++++++++++++++++++++++++++++++
src/intel/vulkan/anv_extensions.py | 1 +
src/intel/vulkan/anv_gem.c | 13 ++++
src/intel/vulkan/anv_gem_stubs.c | 7 ++
src/intel/vulkan/anv_private.h | 2 +
7 files changed, 270 insertions(+)

Upstream: cgit.freedesktop.org


  • Share