[FFmpeg-cvslog] hwcontext_vulkan: add HOST_CACHED flag to transfer buffer
Lynne
git at videolan.org
Sun Aug 11 06:21:01 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Aug 9 01:42:06 2024 +0200| [9e606b33a8e25fa8df383bcf3229e0203f79fae3] | committer: Lynne
hwcontext_vulkan: add HOST_CACHED flag to transfer buffer
Significantly speeds up downloads on devices without host mapping.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e606b33a8e25fa8df383bcf3229e0203f79fae3
---
libavutil/hwcontext_vulkan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 05e078e7d9..a022eda93b 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -3541,7 +3541,8 @@ static int get_plane_buf(AVHWFramesContext *hwfc, AVBufferRef **dst,
VK_BUFFER_USAGE_TRANSFER_SRC_BIT |
VK_BUFFER_USAGE_TRANSFER_DST_BIT,
NULL, buf_offset,
- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
+ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
if (err < 0)
return err;
More information about the ffmpeg-cvslog
mailing list