summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-04-15 23:18:44 -0400
committerKacper Michajłow <kasper93@gmail.com>2024-04-18 16:28:21 +0200
commit2533ea764f3fd506b619925611b4b8446d999c13 (patch)
tree91e4cea7220e9c8f097224d3a5ad225f296c2c7a /video
parenta6ff33425dd29fa214ee21c6b32cd283f8a18f64 (diff)
downloadmpv-2533ea764f3fd506b619925611b4b8446d999c13.tar.bz2
mpv-2533ea764f3fd506b619925611b4b8446d999c13.tar.xz
various: add GPU context description
Now that obj_settings_list is used for GPU contexts, detailed descriptions can be added so that --gpu-context=help can print the descriptions of the GPU contexts using standard obj_settings_list help printing.
Diffstat (limited to 'video')
-rw-r--r--video/out/d3d11/context.c1
-rw-r--r--video/out/gpu/context.c1
-rw-r--r--video/out/gpu/context.h1
-rw-r--r--video/out/opengl/context_android.c1
-rw-r--r--video/out/opengl/context_angle.c1
-rw-r--r--video/out/opengl/context_drm_egl.c1
-rw-r--r--video/out/opengl/context_dxinterop.c1
-rw-r--r--video/out/opengl/context_glx.c1
-rw-r--r--video/out/opengl/context_wayland.c1
-rw-r--r--video/out/opengl/context_win.c1
-rw-r--r--video/out/opengl/context_x11egl.c1
-rw-r--r--video/out/vulkan/context_android.c1
-rw-r--r--video/out/vulkan/context_display.c1
-rw-r--r--video/out/vulkan/context_mac.m1
-rw-r--r--video/out/vulkan/context_wayland.c1
-rw-r--r--video/out/vulkan/context_win.c1
-rw-r--r--video/out/vulkan/context_xlib.c1
-rw-r--r--video/out/wldmabuf/context_wldmabuf.c1
18 files changed, 18 insertions, 0 deletions
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c
index c563b5fa15..f183ae8be5 100644
--- a/video/out/d3d11/context.c
+++ b/video/out/d3d11/context.c
@@ -547,6 +547,7 @@ bool ra_d3d11_ctx_prefer_8bit_output_format(struct ra_ctx *ra)
const struct ra_ctx_fns ra_ctx_d3d11 = {
.type = "d3d11",
.name = "d3d11",
+ .description = "Direct3D 11",
.reconfig = d3d11_reconfig,
.control = d3d11_control,
.update_render_opts = d3d11_update_render_opts,
diff --git a/video/out/gpu/context.c b/video/out/gpu/context.c
index d6c1eaa242..3202729741 100644
--- a/video/out/gpu/context.c
+++ b/video/out/gpu/context.c
@@ -147,6 +147,7 @@ static bool get_desc(struct m_obj_desc *dst, int index)
const struct ra_ctx_fns *ctx = contexts[index];
*dst = (struct m_obj_desc) {
.name = ctx->name,
+ .description = ctx->description,
};
return true;
}
diff --git a/video/out/gpu/context.h b/video/out/gpu/context.h
index 0b422384d8..d2ab783bd7 100644
--- a/video/out/gpu/context.h
+++ b/video/out/gpu/context.h
@@ -34,6 +34,7 @@ struct ra_ctx {
struct ra_ctx_fns {
const char *type; // API type (for --gpu-api)
const char *name; // name (for --gpu-context)
+ const char *description; // description (for --gpu-context=help)
// Resize the window, or create a new window if there isn't one yet.
// Currently, there is an unfortunate interaction with ctx->vo, and
diff --git a/video/out/opengl/context_android.c b/video/out/opengl/context_android.c
index bc1717c1be..269f36dbc3 100644
--- a/video/out/opengl/context_android.c
+++ b/video/out/opengl/context_android.c
@@ -123,6 +123,7 @@ static int android_control(struct ra_ctx *ctx, int *events, int request, void *a
const struct ra_ctx_fns ra_ctx_android = {
.type = "opengl",
.name = "android",
+ .description = "Android/EGL",
.reconfig = android_reconfig,
.control = android_control,
.init = android_init,
diff --git a/video/out/opengl/context_angle.c b/video/out/opengl/context_angle.c
index 553718af24..3a70c09c7e 100644
--- a/video/out/opengl/context_angle.c
+++ b/video/out/opengl/context_angle.c
@@ -646,6 +646,7 @@ static int angle_control(struct ra_ctx *ctx, int *events, int request, void *arg
const struct ra_ctx_fns ra_ctx_angle = {
.type = "opengl",
.name = "angle",
+ .description = "Win32/ANGLE (via Direct3D)",
.init = angle_init,
.reconfig = angle_reconfig,
.control = angle_control,
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c
index ff4de187cb..ce86570efe 100644
--- a/video/out/opengl/context_drm_egl.c
+++ b/video/out/opengl/context_drm_egl.c
@@ -739,6 +739,7 @@ static void drm_egl_wakeup(struct ra_ctx *ctx)
const struct ra_ctx_fns ra_ctx_drm_egl = {
.type = "opengl",
.name = "drm",
+ .description = "DRM/EGL",
.reconfig = drm_egl_reconfig,
.control = drm_egl_control,
.init = drm_egl_init,
diff --git a/video/out/opengl/context_dxinterop.c b/video/out/opengl/context_dxinterop.c
index cda696f71b..3ebdfbeaa0 100644
--- a/video/out/opengl/context_dxinterop.c
+++ b/video/out/opengl/context_dxinterop.c
@@ -598,6 +598,7 @@ static int dxgl_control(struct ra_ctx *ctx, int *events, int request,
const struct ra_ctx_fns ra_ctx_dxgl = {
.type = "opengl",
.name = "dxinterop",
+ .description = "WGL rendering/Direct3D 9Ex presentation",
.init = dxgl_init,
.reconfig = dxgl_reconfig,
.control = dxgl_control,
diff --git a/video/out/opengl/context_glx.c b/video/out/opengl/context_glx.c
index a2a63e137a..14f84d9dd7 100644
--- a/video/out/opengl/context_glx.c
+++ b/video/out/opengl/context_glx.c
@@ -342,6 +342,7 @@ static void glx_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
const struct ra_ctx_fns ra_ctx_glx = {
.type = "opengl",
.name = "x11",
+ .description = "X11/GLX",
.reconfig = glx_reconfig,
.control = glx_control,
.wakeup = glx_wakeup,
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
index 2c5611b2e6..e091220349 100644
--- a/video/out/opengl/context_wayland.c
+++ b/video/out/opengl/context_wayland.c
@@ -220,6 +220,7 @@ static bool wayland_egl_init(struct ra_ctx *ctx)
const struct ra_ctx_fns ra_ctx_wayland_egl = {
.type = "opengl",
.name = "wayland",
+ .description = "Wayland/EGL",
.reconfig = wayland_egl_reconfig,
.control = wayland_egl_control,
.wakeup = wayland_egl_wakeup,
diff --git a/video/out/opengl/context_win.c b/video/out/opengl/context_win.c
index a582e2834e..69458218f8 100644
--- a/video/out/opengl/context_win.c
+++ b/video/out/opengl/context_win.c
@@ -380,6 +380,7 @@ static void wgl_update_render_opts(struct ra_ctx *ctx)
const struct ra_ctx_fns ra_ctx_wgl = {
.type = "opengl",
.name = "win",
+ .description = "Win32/WGL",
.init = wgl_init,
.reconfig = wgl_reconfig,
.control = wgl_control,
diff --git a/video/out/opengl/context_x11egl.c b/video/out/opengl/context_x11egl.c
index 3201f298f6..e5885b6106 100644
--- a/video/out/opengl/context_x11egl.c
+++ b/video/out/opengl/context_x11egl.c
@@ -216,6 +216,7 @@ static void mpegl_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
const struct ra_ctx_fns ra_ctx_x11_egl = {
.type = "opengl",
.name = "x11egl",
+ .description = "X11/EGL",
.reconfig = mpegl_reconfig,
.control = mpegl_control,
.wakeup = mpegl_wakeup,
diff --git a/video/out/vulkan/context_android.c b/video/out/vulkan/context_android.c
index ddab3917f1..d668bb4b94 100644
--- a/video/out/vulkan/context_android.c
+++ b/video/out/vulkan/context_android.c
@@ -89,6 +89,7 @@ static int android_control(struct ra_ctx *ctx, int *events, int request, void *a
const struct ra_ctx_fns ra_ctx_vulkan_android = {
.type = "vulkan",
.name = "androidvk",
+ .description = "Android/Vulkan",
.reconfig = android_reconfig,
.control = android_control,
.init = android_init,
diff --git a/video/out/vulkan/context_display.c b/video/out/vulkan/context_display.c
index 72f73adb20..7e3bc8ea2f 100644
--- a/video/out/vulkan/context_display.c
+++ b/video/out/vulkan/context_display.c
@@ -486,6 +486,7 @@ static void display_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
const struct ra_ctx_fns ra_ctx_vulkan_display = {
.type = "vulkan",
.name = "displayvk",
+ .description = "VK_KHR_display",
.reconfig = display_reconfig,
.control = display_control,
.wakeup = display_wakeup,
diff --git a/video/out/vulkan/context_mac.m b/video/out/vulkan/context_mac.m
index bedd0d4f9e..66093dd110 100644
--- a/video/out/vulkan/context_mac.m
+++ b/video/out/vulkan/context_mac.m
@@ -128,6 +128,7 @@ static int mac_vk_control(struct ra_ctx *ctx, int *events, int request, void *ar
const struct ra_ctx_fns ra_ctx_vulkan_mac = {
.type = "vulkan",
.name = "macvk",
+ .description = "mac/Vulkan (via Metal)",
.reconfig = mac_vk_reconfig,
.control = mac_vk_control,
.init = mac_vk_init,
diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c
index cdf1ba60b8..3af644ab8a 100644
--- a/video/out/vulkan/context_wayland.c
+++ b/video/out/vulkan/context_wayland.c
@@ -157,6 +157,7 @@ static void wayland_vk_update_render_opts(struct ra_ctx *ctx)
const struct ra_ctx_fns ra_ctx_vulkan_wayland = {
.type = "vulkan",
.name = "waylandvk",
+ .description = "Wayland/Vulkan",
.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 328753fa69..6484a31355 100644
--- a/video/out/vulkan/context_win.c
+++ b/video/out/vulkan/context_win.c
@@ -107,6 +107,7 @@ static void win_update_render_opts(struct ra_ctx *ctx)
const struct ra_ctx_fns ra_ctx_vulkan_win = {
.type = "vulkan",
.name = "winvk",
+ .description = "Win32/Vulkan",
.reconfig = win_reconfig,
.control = win_control,
.update_render_opts = win_update_render_opts,
diff --git a/video/out/vulkan/context_xlib.c b/video/out/vulkan/context_xlib.c
index 673dc312b7..dadfabdeb8 100644
--- a/video/out/vulkan/context_xlib.c
+++ b/video/out/vulkan/context_xlib.c
@@ -134,6 +134,7 @@ static void xlib_wait_events(struct ra_ctx *ctx, int64_t until_time_ns)
const struct ra_ctx_fns ra_ctx_vulkan_xlib = {
.type = "vulkan",
.name = "x11vk",
+ .description = "X11/Vulkan",
.reconfig = xlib_reconfig,
.control = xlib_control,
.wakeup = xlib_wakeup,
diff --git a/video/out/wldmabuf/context_wldmabuf.c b/video/out/wldmabuf/context_wldmabuf.c
index ea4688f04a..57403e2239 100644
--- a/video/out/wldmabuf/context_wldmabuf.c
+++ b/video/out/wldmabuf/context_wldmabuf.c
@@ -37,6 +37,7 @@ static bool init(struct ra_ctx *ctx)
const struct ra_ctx_fns ra_ctx_wldmabuf = {
.type = "none",
.name = "wldmabuf",
+ .description = "Wayland/DMA-BUF",
.init = init,
.uninit = uninit,
};