]> git.sesse.net Git - ffmpeg/commit
hwcontext_vulkan: always attempt to map host memory when transferring
authorLynne <dev@lynne.ee>
Tue, 24 Nov 2020 23:20:06 +0000 (00:20 +0100)
committerLynne <dev@lynne.ee>
Wed, 25 Nov 2020 22:14:01 +0000 (23:14 +0100)
commit18a6535b0802b46989afac6f57a6a046bd4c26a3
tree2c64fe078e3c8de759ccd530bedc589c6694f43c
parent9cf1811d3d1df429bd882090dcab32e3449777f4
hwcontext_vulkan: always attempt to map host memory when transferring

This relies on the fact that host memory is always going to be required
to be aligned to the platform's page size, which means we can adjust
the pointers when we map them to buffers and therefore skip an entire
copy. This has already had extensive testing in libplacebo without
problems, so its safe to use here as well.

Speeds up downloads and uploads on platforms which do not pool their
memory hugely, but less so on platforms that do.

We can pool the buffers ourselves, but that can come as a later patch
if necessary.
libavutil/hwcontext_vulkan.c