[PATCH 1/3] vulkan: Define new VK_MESA_query_timestamp extension [v2]
Pekka Paalanen
ppaalanen at gmail.com
Tue Jul 10 07:16:15 UTC 2018
On Sat, 23 Jun 2018 12:13:53 -0500
Jason Ekstrand <jason at jlekstrand.net> wrote:
> I haven't thought through this comment all that hard but would it make
> sense to have three timestamps, CPU, GPU, CPU so that you have error bars
> on the GPU timestamp? At the very least, two timestamps would be better
> than one so that, when we pull it into the kernel, it can provide something
> more accurate than userspace trying to grab a snapshot.
Hi,
three timestamps sounds like a good idea to me, but you might want to
reach out to media developers (e.g. gstreamer) who have experience in
synchronizing different clocks and what that will actually take.
When reading the CPU timestamp, I believe it would be necessary for
userspace to tell which clock it should be reading. I'm not sure all
userspace is always using CLOCK_MONOTONIC. But if you have a better
rationale, that would be interesting to record and document.
Thanks,
pq
> On June 23, 2018 10:15:34 Keith Packard <keithp at keithp.com> wrote:
>
> > This extension adds a single function to query the current GPU
> > timestamp, just like glGetInteger64v(GL_TIMESTAMP, ×tamp). This
> > function is needed to complete the implementation of
> > GOOGLE_display_timing, which needs to be able to correlate GPU and CPU
> > timestamps.
> >
> > v2: Adopt Jason Ekstrand's coding conventions
> >
> > Declare variables at first use, eliminate extra whitespace between
> > types and names. Wrap lines to 80 columns.
> >
> > Add extension to list in alphabetical order
> >
> > Suggested-by: Jason Ekstrand <jason.ekstrand at intel.com>
> >
> > Signed-off-by: Keith Packard <keithp at keithp.com>
> > ---
> > include/vulkan/vk_mesa_query_timestamp.h | 41 ++++++++++++++++++++++++
> > src/vulkan/registry/vk.xml | 15 +++++++++
> > 2 files changed, 56 insertions(+)
> > create mode 100644 include/vulkan/vk_mesa_query_timestamp.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180710/30ad189b/attachment.sig>
More information about the dri-devel
mailing list