diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 7a08aec297..ee57681218 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4626,7 +4626,9 @@ The following video options are currently all specific to ``--vo=gpu`` and cocoa Cocoa/OS X win - Win32/WGL, VK_KHR_win32_surface + Win32/WGL + winvk + VK_KHR_win32_surface angle Direct3D11 through the OpenGL ES translation layer ANGLE. This supports almost everything the ``win`` backend does (if the ANGLE build is new @@ -4636,18 +4638,22 @@ The following video options are currently all specific to ``--vo=gpu`` and on Nvidia and AMD. Newer Intel chips with the latest drivers may also work. x11 - X11/GLX, VK_KHR_xlib_surface + X11/GLX + x11vk + VK_KHR_xlib_surface x11probe For internal autoprobing, equivalent to ``x11`` otherwise. Don't use directly, it could be removed without warning as autoprobing is changed. wayland - Wayland/EGL, VK_KHR_wayland_surface + Wayland/EGL + waylandvk + VK_KHR_wayland_surface drm DRM/EGL x11egl X11/EGL android - Android/EGL. Requires ``--wid`` be set to an ``android.view.Surface``. + Android/EGL. Requires ``--wid`` be set to an ``android.view.Surface``. mali-fbdev Direct fbdev/EGL support on some ARM/MALI devices. vdpauglx diff --git a/video/out/gpu/context.c b/video/out/gpu/context.c index 8be0b2fc90..8dc8a5c71f 100644 --- a/video/out/gpu/context.c +++ b/video/out/gpu/context.c @@ -111,24 +111,16 @@ static const struct ra_ctx_fns *contexts[] = { #endif }; -static bool get_help(struct mp_log *log, struct bstr param) -{ - if (bstr_equals0(param, "help")) { - mp_info(log, "GPU contexts / APIs:\n"); - mp_info(log, " auto (autodetect)\n"); - for (int n = 0; n < MP_ARRAY_SIZE(contexts); n++) - mp_info(log, " %s (%s)\n", contexts[n]->name, contexts[n]->type); - return true; - } - - return false; -} - int ra_ctx_validate_api(struct mp_log *log, const struct m_option *opt, struct bstr name, struct bstr param) { - if (get_help(log, param)) + if (bstr_equals0(param, "help")) { + mp_info(log, "GPU APIs (contexts):\n"); + mp_info(log, " auto (autodetect)\n"); + for (int n = 0; n < MP_ARRAY_SIZE(contexts); n++) + mp_info(log, " %s (%s)\n", contexts[n]->type, contexts[n]->name); return M_OPT_EXIT; + } if (bstr_equals0(param, "auto")) return 1; for (int i = 0; i < MP_ARRAY_SIZE(contexts); i++) { @@ -141,8 +133,13 @@ int ra_ctx_validate_api(struct mp_log *log, const struct m_option *opt, int ra_ctx_validate_context(struct mp_log *log, const struct m_option *opt, struct bstr name, struct bstr param) { - if (get_help(log, param)) + if (bstr_equals0(param, "help")) { + mp_info(log, "GPU contexts (APIs):\n"); + mp_info(log, " auto (autodetect)\n"); + for (int n = 0; n < MP_ARRAY_SIZE(contexts); n++) + mp_info(log, " %s (%s)\n", contexts[n]->name, contexts[n]->type); return M_OPT_EXIT; + } if (bstr_equals0(param, "auto")) return 1; for (int i = 0; i < MP_ARRAY_SIZE(contexts); i++) { diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c index 92ee7aa1a9..7276775242 100644 --- a/video/out/vulkan/context_wayland.c +++ b/video/out/vulkan/context_wayland.c @@ -123,7 +123,7 @@ static void wayland_vk_wait_events(struct ra_ctx *ctx, int64_t until_time_us) const struct ra_ctx_fns ra_ctx_vulkan_wayland = { .type = "vulkan", - .name = "wayland", + .name = "waylandvk", .reconfig = wayland_vk_reconfig, .control = wayland_vk_control, .wakeup = wayland_vk_wakeup, diff --git a/video/out/vulkan/context_win.c b/video/out/vulkan/context_win.c index 899ab83257..cf31586d00 100644 --- a/video/out/vulkan/context_win.c +++ b/video/out/vulkan/context_win.c @@ -97,7 +97,7 @@ static int win_control(struct ra_ctx *ctx, int *events, int request, void *arg) const struct ra_ctx_fns ra_ctx_vulkan_win = { .type = "vulkan", - .name = "win", + .name = "winvk", .reconfig = win_reconfig, .control = win_control, .init = win_init, diff --git a/video/out/vulkan/context_xlib.c b/video/out/vulkan/context_xlib.c index 26efd6f583..c3bd49f4fb 100644 --- a/video/out/vulkan/context_xlib.c +++ b/video/out/vulkan/context_xlib.c @@ -107,7 +107,7 @@ static void xlib_wait_events(struct ra_ctx *ctx, int64_t until_time_us) const struct ra_ctx_fns ra_ctx_vulkan_xlib = { .type = "vulkan", - .name = "x11", + .name = "x11vk", .reconfig = xlib_reconfig, .control = xlib_control, .wakeup = xlib_wakeup,