From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Paalanen Subject: Re: [PATCH 1/3] vulkan: Define new VK_MESA_query_timestamp extension [v2] Date: Tue, 10 Jul 2018 10:16:15 +0300 Message-ID: <20180710101615.610c7966@eldfell> References: <20180623151521.8306-1-keithp@keithp.com> <20180623151521.8306-2-keithp@keithp.com> <1642da34868.27ad.c6988b7ea6112e3e892765a0d4287e0c@jlekstrand.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1540160893==" Return-path: In-Reply-To: <1642da34868.27ad.c6988b7ea6112e3e892765a0d4287e0c@jlekstrand.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Jason Ekstrand Cc: mesa-dev@lists.freedesktop.org, Keith Packard , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1540160893== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/wxHmqsVryw2qFGIf+J1TVaf"; protocol="application/pgp-signature" --Sig_/wxHmqsVryw2qFGIf+J1TVaf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 23 Jun 2018 12:13:53 -0500 Jason Ekstrand wrote: > I haven't thought through this comment all that hard but would it make=20 > sense to have three timestamps, CPU, GPU, CPU so that you have error bars= =20 > on the GPU timestamp? At the very least, two timestamps would be better= =20 > than one so that, when we pull it into the kernel, it can provide somethi= ng=20 > 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 wrote: >=20 > > 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 > > > > Signed-off-by: Keith Packard > > --- > > 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 --Sig_/wxHmqsVryw2qFGIf+J1TVaf Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAltEXT8ACgkQI1/ltBGq qqfIfg/8Ce74EvTWemGfP+tryN93AySs/Ya4VhZJNP7l00U3+aLilgpL+C/ztIn2 vUXELUAZpZhhDjv+b2oOBa+6ZjMY/aayNeyQiSfFGLFvwKT+2pvDgoKRLd6Yp8MB Ql2Rt6lVzX6ckF7xcwNIe5j8UBnYhKkOINTPoPsy4GioEbVZhTUKW34QjzZ4G7Z5 s42jUzYY6HYE9N6hPsfOZ3xtNMM1C0suC9DNVqzp09rEXWeaglH2vF2e4/CluILF 2PHOPdh/WO6ukpd41bSS4SzTyD3uQLRYNrFXCpH2xGkKROeVhbJmptt/57Ez1clA QQrD+2W5kISDm3u1ANAJAjfHCoKQ33LlkbCvgo7JqX9AI+/4AaYe+lIX0oY1ICj9 ajG80bE8dsnac+JnAM9rWR8ZWon6BkY2lein9Gcclm3ib1/QYqHnUgRtSAHdxpeD tZJJgBIbtDPtb2IJ+xo6gMhnk9FfIUVrKv0egK0r55RqkAhlKgDub7sNbggoPYkc KCXlCL2l0DdwwhTJgn0aUwH+VQ2hsQqy6JnDa09j7Oc3ySAGWcCRfCGo7FborUXq 0A+hphLWNPfrSPtipVUk0O6J5rtrEKhCurchlnYPws+9kf5Y3V3Td2ahxL79cWWp A5+orKunB4DEHgDSGDR8wX8H8uCzXp5ZmliH145vBMMY7POCFHw= =Wif9 -----END PGP SIGNATURE----- --Sig_/wxHmqsVryw2qFGIf+J1TVaf-- --===============1540160893== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1540160893==--