Skip to content
  • Keith Packard's avatar
    vulkan: Add VK_GOOGLE_display_timing extension (x11+display, anv+radv) [v10] · 4f2e8a6b
    Keith Packard authored and Jakob Bornecrantz's avatar Jakob Bornecrantz committed
    
    
    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.
    
    v9:
    	Adopt to upstream changes to anv and radv extensions.
    
    v10:
    	Remove GetPhysicalDevicePropertie usage.
    
    Suggested-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
    
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    Signed-off-by: default avatarJakob Bornecrantz <jakob@collabora.com>
    4f2e8a6b