[Mesa-dev] [PATCH 6/7] vulkan: Add new VK_MESA_query_timestamp extension

Keith Packard keithp at keithp.com
Tue Feb 13 21:11:25 UTC 2018

Lionel Landwerlin <lionel.g.landwerlin at intel.com> writes:

> I'm assuming the correlation is done outside the vulkan driver? With a 
> clock_gettime() maybe?
> If that's the case, I'm afraid this will be highly inaccurate.
> The kernel might execute other tasks when the ioctl() happens and that 
> might introduce (in my experience) a few milliseconds of delay.

Yes, I agree. The trouble is that the window system layer works in one
time base while the rendering layer works in the other, so there's no
one driver which has access to both values, at least in Mesa.

> I think if you want to do something like that, this has to be 
> implemented in the kernel, making sure you disable interruptions while 
> doing the correlation.

That was my thinking originally, until I realized that there wasn't a
single place which knew of the two clocks.

Suggestions are welcome; I just don't know how the rendering driver is
supposed to know what timebase the window system is running in?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180213/ecae2871/attachment.sig>

More information about the mesa-dev mailing list