glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 15 Mar 2014 01:53:42 +0000 (18:53 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 29 Oct 2014 22:13:58 +0000 (15:13 -0700)
commit26122e09a304061e46690e1b9da2e36a527b3e2e
tree2c22a14cb1dbcf5ebf733b41e6d462418a14fee3
parent62b07b934ecce1f370f3566ad3613341ff86aba1
glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event
    rather than gettimeofday(), which gives us the presentation time
    instead of the time when SwapBuffers was called.  Suggested by
    Keith Packard.  This relies on the fact that the X DRI3/Present
    implementations use microseconds for UST.

v3: Properly ignore PresentCompleteKindMSCNotify; multiply in 64 bits
    (caught by Keith Packard).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Keith Packard <keithp@keithp.com> [v3]
Reviewed-by: Marek Olšák <marek.olsak@amd.com> [v1]
src/glx/dri3_glx.c
src/glx/dri3_priv.h