mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 01:22:30 +00:00
ffb8ffdd55
When interacting directly with libplacebo, we may need to pass a pl_fmt based on an ra_format. Although the mapping is currently trivial, it's worth wrapping to make it easy to adapt if this changes in the future.
18 lines
477 B
C
18 lines
477 B
C
#pragma once
|
|
|
|
#include "video/out/gpu/ra.h"
|
|
#include <libplacebo/gpu.h>
|
|
|
|
struct ra *ra_create_pl(const struct pl_gpu *gpu, struct mp_log *log);
|
|
|
|
const struct pl_gpu *ra_pl_get(const struct ra *ra);
|
|
|
|
static inline const struct pl_fmt *ra_pl_fmt_get(const struct ra_format *format)
|
|
{
|
|
return format->priv;
|
|
}
|
|
|
|
// Wrap a pl_tex into a ra_tex struct, returns if successful
|
|
bool mppl_wrap_tex(struct ra *ra, const struct pl_tex *pltex,
|
|
struct ra_tex *out_tex);
|