Here's an updated version of the extension to get GPU timestamps. This version returns both CPU and GPU timestamps which could (in theory) be more tightly correlated than just getting the time of one and then the other sequentially. The idea is that we'd eventually add a suitable kernel ioctl to get both.
The implementation is complicated by needing to allow WSI layers to have different timebases; the drivers now get CLOCK_MONOTONIC and GPU timestamps and then let the current WSI layer convert the CLOCK_MONOTONIC value into a suitable WSI-relative value. In the current code, all of the WSI layers are using CLOCK_MONOTONIC and so they don't actually use this functionality, but it's available in case it's needed. Neither radv nor anv bother to try and align the clocks closely; that would involve some fancy code to fetch the clocks multiple times, and I'd rather spend time just fixing the kernel rather than adding kludges in user space. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev