diff options
author | Keith Packard <[email protected]> | 2018-02-09 07:45:58 -0800 |
---|---|---|
committer | Keith Packard <[email protected]> | 2018-06-19 14:17:46 -0700 |
commit | 7ab1fffcd2a504024b16e408de329f7a94553ecc (patch) | |
tree | a16e762884aa1a7481e1bc0fbd31c73bbd57a131 /meson.build | |
parent | 5a2efefb0ad90359c6671c25fa1d8815fc7e050a (diff) |
vulkan: Add EXT_acquire_xlib_display [v5]
This extension adds the ability to borrow an X RandR output for
temporary use directly by a Vulkan application. For DRM, we use the
Linux resource leasing mechanism.
v2:
Clean up xlib_lease detection
* Use separate temporary '_xlib_lease' variable to hold the
option value to avoid changin the type of a variable.
* Use boolean expressions instead of additional if statements
to compute resulting with_xlib_lease value.
* Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to
vulkan_wsi_args
Suggested-by: Eric Engestrom <[email protected]>
Move mode list from wsi_display to wsi_display_connector
Fix scope for wsi_display_mode and wsi_display_connector allocs
Suggested-by: Jason Ekstrand <[email protected]>
v3:
Adopt Jason Ekstrand's coding conventions
Declare variables at first use, eliminate extra whitespace
between types and names. Wrap lines to 80 columns.
Explicitly forbid multiple DRM leases. Making the code support
this looks tricky and will require additional thought.
Use xcb_randr_output_t throughout the internals of the
implementation. Convert at the public API
(wsi_get_randr_output_display).
Clean up check for usable active_crtc (possible when only the
desired output is connected to the crtc).
Suggested-by: Jason Ekstrand <[email protected]>
v4:
Move output resource fetching closer to use in
wsi_display_get_output. This simplifies the error returns in
earlier parts of the code a bit.
Return VK_ERROR_INITIALIZATION_FAILED from
wsi_acquire_xlib_display. Jason says this is the right error
message.
Suggested-by: Jason Ekstrand <[email protected]>
v5:
randr doesn't pass vscan over the wire, so we set vscan to 0
for randr-acquired modes, and test wsi modes for vscan <= 1
when comparing against randr modes.
Suggested-by: Jason Ekstrand <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 65ae32172d2..ce54393fded 100644 --- a/meson.build +++ b/meson.build @@ -247,6 +247,13 @@ if _platforms.length() != 0 and _platforms != [''] egl_native_platform = _platforms[0] endif +_xlib_lease = get_option('xlib-lease') +if _xlib_lease == 'auto' + with_xlib_lease = with_platform_x11 and with_platform_drm +else + with_xlib_lease = _xlib_lease == 'true' +endif + with_glx = get_option('glx') if with_glx == 'auto' if with_dri @@ -1293,6 +1300,7 @@ dep_xcb_present = null_dep dep_xcb_sync = null_dep dep_xcb_xfixes = null_dep dep_xshmfence = null_dep +dep_xcb_xrandr = null_dep if with_platform_x11 if with_glx == 'xlib' or with_glx == 'gallium-xlib' dep_x11 = dependency('x11') @@ -1339,6 +1347,9 @@ if with_platform_x11 with_gallium_omx != 'disabled')) dep_xcb_xfixes = dependency('xcb-xfixes') endif + if with_xlib_lease + dep_xcb_xrandr = dependency('xcb-randr', version : '>= 1.12') + endif endif if get_option('gallium-extra-hud') |