diff options
author | Niklas Haas <git@haasn.dev> | 2023-10-19 17:59:14 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2023-10-19 18:26:05 +0200 |
commit | bd1ba99ab2f64f218128100cbf3a91e5cb1b4872 (patch) | |
tree | 4dcafd5a2c7d2432043193d8f7b923bf8505a3ae /video | |
parent | f369e6526186c38bb7d86669a3963b216d6fe0bc (diff) | |
download | mpv-bd1ba99ab2f64f218128100cbf3a91e5cb1b4872.tar.bz2 mpv-bd1ba99ab2f64f218128100cbf3a91e5cb1b4872.tar.xz |
vo_gpu_next: optimally align DR buffers
May increase performance, especially when using DR with a dedicated
transfer queue.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_gpu_next.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 4ed0224ff4..53147d55cf 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -244,6 +244,8 @@ static struct mp_image *get_image(struct vo *vo, int imgfmt, int w, int h, if ((flags & VO_DR_FLAG_HOST_CACHED) && !gpu->limits.host_cached) return NULL; + stride_align = mp_lcm(stride_align, gpu->limits.align_tex_xfer_pitch); + stride_align = mp_lcm(stride_align, gpu->limits.align_tex_xfer_offset); int size = mp_image_get_alloc_size(imgfmt, w, h, stride_align); if (size < 0) return NULL; |