From dbbf4a415de7866c6fe2dce10142d8a185eb0660 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Mon, 2 Dec 2019 10:37:40 +0800 Subject: vo_gpu: vulkan: implement a VkDisplayKHR backed context This is the Vulkan equivalent of the drm context for OpenGL, with the big difference that it's implemented purely in terms of Vulkan calls and doesn't actually require drm or kms. The basic idea is to identify a display, mode, and plane on a device, and then create a display backed surface for the swapchain. In theory, past that point, everything is the same, and this is in fact the case on Intel hardware. I can get a video playing on a vt. On nvidia, naturally, things don't work that way. Instead, nvidia only implemented the extension for scenarios where a VR application is stealing a display from a running window system, and not for standalone scenarios. With additional code, I've got this scenario to work but that's a separate incremental change. Other people have tested on AMD, and report roughly the same behaviour as on Intel. Note, that in this change, the VT will not be correctly restored after qutting. The only way to restore the VT is to introduce some drm specific code which I will illustrate in a separate change. --- wscript_build.py | 1 + 1 file changed, 1 insertion(+) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index a12cbf19e1..fbec5006f8 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -506,6 +506,7 @@ def build(ctx): ( "video/out/vo_x11.c" , "x11" ), ( "video/out/vo_xv.c", "xv" ), ( "video/out/vulkan/context.c", "vulkan" ), + ( "video/out/vulkan/context_display.c", "vulkan" ), ( "video/out/vulkan/context_android.c", "vulkan && android" ), ( "video/out/vulkan/context_wayland.c", "vulkan && wayland" ), ( "video/out/vulkan/context_win.c", "vulkan && win32-desktop" ), -- cgit v1.2.3