summaryrefslogtreecommitdiffstats
path: root/video/out/gpu_next
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-03-11 08:57:37 -0500
committerDudemanguy <random342@airmail.cc>2024-03-13 22:39:31 +0000
commit38b5dcb441d5df075e0cbca6748e5d22ed82dd6a (patch)
tree10297c56aa6a20bd1c6db25b1f172a4b2c272512 /video/out/gpu_next
parentfbf3ae5a84a3b9aac81258ea8996e4e647adddb8 (diff)
downloadmpv-38b5dcb441d5df075e0cbca6748e5d22ed82dd6a.tar.bz2
mpv-38b5dcb441d5df075e0cbca6748e5d22ed82dd6a.tar.xz
vo_gpu/vo_gpu_next: fix transparency in glx
It seems that GLX requires us to explicitly set opts.want alpha before ra_ctx_create is called. b7fd232524bc213df91fa77ca0261ff514fad1e4 rearranged the function calls in a way made this not work. Fix this by rearranging it again so the value is set before ra_ctx is created.
Diffstat (limited to 'video/out/gpu_next')
-rw-r--r--video/out/gpu_next/context.c4
-rw-r--r--video/out/gpu_next/context.h4
2 files changed, 3 insertions, 5 deletions
diff --git a/video/out/gpu_next/context.c b/video/out/gpu_next/context.c
index b742511d20..597d6d6ed9 100644
--- a/video/out/gpu_next/context.c
+++ b/video/out/gpu_next/context.c
@@ -107,12 +107,10 @@ err_out:
}
#endif // HAVE_D3D11
-struct gpu_ctx *gpu_ctx_create(struct vo *vo, struct gl_video_opts *gl_opts)
+struct gpu_ctx *gpu_ctx_create(struct vo *vo, struct ra_ctx_opts *ctx_opts)
{
struct gpu_ctx *ctx = talloc_zero(NULL, struct gpu_ctx);
ctx->log = vo->log;
-
- struct ra_ctx_opts *ctx_opts = mp_get_config_group(ctx, vo->global, &ra_ctx_conf);
ctx->ra_ctx = ra_ctx_create(vo, *ctx_opts);
if (!ctx->ra_ctx)
goto err_out;
diff --git a/video/out/gpu_next/context.h b/video/out/gpu_next/context.h
index b98b9e7251..aa441964fb 100644
--- a/video/out/gpu_next/context.h
+++ b/video/out/gpu_next/context.h
@@ -21,8 +21,8 @@
struct mp_log;
struct ra_ctx;
+struct ra_ctx_opts;
struct vo;
-struct gl_video_opts;
struct gpu_ctx {
struct mp_log *log;
@@ -35,6 +35,6 @@ struct gpu_ctx {
void *priv;
};
-struct gpu_ctx *gpu_ctx_create(struct vo *vo, struct gl_video_opts *gl_opts);
+struct gpu_ctx *gpu_ctx_create(struct vo *vo, struct ra_ctx_opts *ctx_opts);
bool gpu_ctx_resize(struct gpu_ctx *ctx, int w, int h);
void gpu_ctx_destroy(struct gpu_ctx **ctxp);