summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-01-21 15:48:57 +0100
committerNiklas Haas <github-daiK1o@haasn.dev>2023-01-23 14:13:34 +0100
commit2531a89fcb93d7c7578cec4c5536c37244f08d39 (patch)
tree150198dcc71ccf18246419009489c40a1108cd6b /video/out
parentc7ea0cd68f2cd68edea2f64060c1bcb483005a50 (diff)
downloadmpv-2531a89fcb93d7c7578cec4c5536c37244f08d39.tar.bz2
mpv-2531a89fcb93d7c7578cec4c5536c37244f08d39.tar.xz
vo_gpu_next: implement VO_DR_FLAG_HOST_CACHED
For sufficiently new versions of libplacebo.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_gpu_next.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index a5d19ad4f9..8cb05d7704 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;