Skip to content
Snippets Groups Projects
Commit 3d316bca authored by Keith Packard's avatar Keith Packard
Browse files

vulkan: Add VK_GOOGLE_display_timing extension (x11+display, anv+radv) [v8]


This adds support for the VK_GOOGLE_display timing extension, which
provides two things:

 1) Detailed information about when frames are displayed, including
    slack time between GPU execution and display frame.

 2) Absolute time control over swapchain queue processing. This allows
    the application to request frames be displayed at specific
    absolute times, using the same timebase as that provided in vblank
    events.

Support for this extension has been implemented for the x11 and
display backends; adding support to other backends should be
reasonable straightforward for one familiar with those systems and
should not require any additional device-specific code.

v2:
	Adjust GOOGLE_display_timing earliest value.  The
	earliestPresentTime for an image cannot be before the previous
	image was displayed, or even a frame later (in FIFO mode).

	Make GOOGLE_display_timing use render completed time.  Switch
	from VK_PIPELINE_TOP_OF_PIPE_BIT to
	VK_PIPELINE_STAGE_ALL_COMMANDS_BIT so that the time reported
	to applications as the end of rendering reflects the latest
	possible value to ensure that applications don't underestimate
	the amount of work done in the frame.

v3:
	Adopt Jason Ekstrand's coding conventions.  Declare variables
	at first use, eliminate extra whitespace between types and
	names. Wrap lines to 80 columns.

Suggested-by: default avatarJason Ekstrand <jason.ekstrand@intel.com>

v4:
	Adapt to changes in MESA_query_timestamp extension

v5:
	Squash core bits and anv/radv wrappers into a single patch

Suggested-by: default avatarJason Ekstrand <jason.ekstrand@intel.com>

v6:
	Switch from MESA_query_timestamp to EXT_calibrated_timestamps

v7:
	Ensure we target frame no earlier than desired. This means
	rounding the target frame up, rather than selecting the
	nearest one.

Suggested-by: default avatarMichel Dänzer <michel@daenzer.net>

v8:
	Re-order display_timing in anv_extensions.py. That code
	now requires extensions in alphabetical order.

	Rename wsi_mark_time to wsi_present_complete to make
	the functionality clearer.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent db19e96c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment