#1440
Feature Request: Expose CPU time in C API calibration function
Currently, ___tracy_emit_gpu_calibration immediately does a GetTime call to fill in the CPU time. When using VK_EXT_calibrated_timestamps from a language that is bound via the C API (Java in this case) I am unable to pass through the CPU time that is returned by Vulkan like TracyVulkan.hpp does.
@Pilzschaf is there a specific reason for doing CPU time retrieval directly in
___tracy_emit_gpu_calibration?1. The wire message
QueueGpuCalibration(public/common/TracyQueue.hpp:587-593) — 24 payload bytes, 3 of 4 fields are timestamps:The server turns each event into an affine GPU→CPU mapping (
server/TracyWorker.cpp:6215-6236, used at:6166):So
gpuTime+cpuTimemust be a simultaneous pair — that's the anchor;cpuDelta(with the GPU-side delta) is the slope.2. What the C++ side does (
TracyVulkan.hpp:316-333)Where
tcpucomes fromGetCalibratedTimestamps()(:371-387): onevkGetCalibratedTimestampsEXTcall requesting bothVK_TIME_DOMAIN_DEVICE_EXTand the host domain, host result converted to ns (:359-369: QPC→ns on Windows, pass-through on Linux). The C++ code has direct access to every field of the message — it queues the wire struct itself.3. What the C API does (
TracyProfiler.cpp:5094-5105)