From 4c133f3b452ce4f013d805faf5de182414de93f8 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Mon, 26 Nov 2018 20:35:47 -0800 Subject: vo_gpu: ra_pl: Add getter for pl_gpu We need access to the underlying pl_gpu to make libplacebo calls from hwdecs. --- video/out/placebo/ra_pl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'video/out/placebo/ra_pl.c') diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c index 334f2f135f..18d8f37070 100644 --- a/video/out/placebo/ra_pl.c +++ b/video/out/placebo/ra_pl.c @@ -8,7 +8,7 @@ struct ra_pl { const struct pl_gpu *gpu; }; -static inline const struct pl_gpu *get_gpu(struct ra *ra) +static inline const struct pl_gpu *get_gpu(const struct ra *ra) { struct ra_pl *p = ra->priv; return p->gpu; @@ -16,6 +16,11 @@ static inline const struct pl_gpu *get_gpu(struct ra *ra) static struct ra_fns ra_fns_pl; +const struct pl_gpu *ra_pl_get(const struct ra *ra) +{ + return ra->fns == &ra_fns_pl ? get_gpu(ra) : NULL; +} + struct ra *ra_create_pl(const struct pl_gpu *gpu, struct mp_log *log) { assert(gpu); -- cgit v1.2.3