summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/context.c
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2023-12-20 23:05:31 -0500
committerDudemanguy <random342@airmail.cc>2024-01-20 17:12:07 +0000
commita0ba10b62e75329d1c707d9f95052c8c66323ac7 (patch)
treebffb7c9583fbb4fa5a20a828df29f79c9e8fa271 /video/out/gpu/context.c
parent700f72f8e424486633b1c8da9313182e63072592 (diff)
downloadmpv-a0ba10b62e75329d1c707d9f95052c8c66323ac7.tar.bz2
mpv-a0ba10b62e75329d1c707d9f95052c8c66323ac7.tar.xz
command: export current-gpu-context property
This exports `current-gpu-context` property, which is the string description of the current active GPU context. This allows scripts to uniquely identify the platform and backend used for --vo=gpu and --vo=gpu-next.
Diffstat (limited to 'video/out/gpu/context.c')
-rw-r--r--video/out/gpu/context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/gpu/context.c b/video/out/gpu/context.c
index 5ce18afbe2..41ec2a4107 100644
--- a/video/out/gpu/context.c
+++ b/video/out/gpu/context.c
@@ -208,6 +208,7 @@ struct ra_ctx *ra_ctx_create(struct vo *vo, struct ra_ctx_opts opts)
MP_VERBOSE(ctx, "Initializing GPU context '%s'\n", ctx->fns->name);
if (contexts[i]->init(ctx)) {
vo->probing = old_probing;
+ vo->context_name = ctx->fns->name;
return ctx;
}