diff options
author | Niklas Haas <git@haasn.dev> | 2023-01-21 15:48:57 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-01-24 16:40:37 +0100 |
commit | 16c0ac226a7de30c5d28b61e8e75a896376bdd99 (patch) | |
tree | a48d55112ad8f2f4af0d99e5275c1186d7144e60 /video | |
parent | 01374b683078f2d1fbb30f9dd805de8426b896c2 (diff) | |
download | mpv-16c0ac226a7de30c5d28b61e8e75a896376bdd99.tar.bz2 mpv-16c0ac226a7de30c5d28b61e8e75a896376bdd99.tar.xz |
vo_gpu_next: implement VO_DR_FLAG_HOST_CACHED
For sufficiently new versions of libplacebo.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_gpu_next.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 0f0732592a..704c0ae88a 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -196,6 +196,11 @@ static struct mp_image *get_image(struct vo *vo, int imgfmt, int w, int h, if (!gpu->limits.thread_safe || !gpu->limits.max_mapped_size) return NULL; +#if PL_API_VER >= 234 + if ((flags & VO_DR_FLAG_HOST_CACHED) && !gpu->limits.host_cached) + return NULL; +#endif + int size = mp_image_get_alloc_size(imgfmt, w, h, stride_align); if (size < 0) return NULL; |