summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2019-12-02 10:37:40 +0800
committerPhilip Langdale <github.philipl@overt.org>2021-06-11 09:54:16 -0700
commitdbbf4a415de7866c6fe2dce10142d8a185eb0660 (patch)
tree7d98e0dc93f36bf8c80363831bb0430a571d5671 /options
parentdbf0fd7d60fa7b4996a3dd96101abd627768e9df (diff)
downloadmpv-dbbf4a415de7866c6fe2dce10142d8a185eb0660.tar.bz2
mpv-dbbf4a415de7866c6fe2dce10142d8a185eb0660.tar.xz
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.
Diffstat (limited to 'options')
-rw-r--r--options/options.c2
-rw-r--r--options/options.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index f54c7bd16c..f43068f221 100644
--- a/options/options.c
+++ b/options/options.c
@@ -87,6 +87,7 @@ extern const struct m_sub_options ao_conf;
extern const struct m_sub_options opengl_conf;
extern const struct m_sub_options vulkan_conf;
+extern const struct m_sub_options vulkan_display_conf;
extern const struct m_sub_options spirv_conf;
extern const struct m_sub_options d3d11_conf;
extern const struct m_sub_options d3d11va_conf;
@@ -781,6 +782,7 @@ static const m_option_t mp_opts[] = {
#if HAVE_VULKAN
{"", OPT_SUBSTRUCT(vulkan_opts, vulkan_conf)},
+ {"", OPT_SUBSTRUCT(vulkan_display_opts, vulkan_display_conf)},
#endif
#if HAVE_D3D11
diff --git a/options/options.h b/options/options.h
index 2d8b5a68b4..6522057cd0 100644
--- a/options/options.h
+++ b/options/options.h
@@ -344,6 +344,7 @@ typedef struct MPOpts {
struct angle_opts *angle_opts;
struct opengl_opts *opengl_opts;
struct vulkan_opts *vulkan_opts;
+ struct vulkan_display_opts *vulkan_display_opts;
struct spirv_opts *spirv_opts;
struct d3d11_opts *d3d11_opts;
struct d3d11va_opts *d3d11va_opts;