summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan/ra_vk.h
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2018-10-14 17:37:05 -0700
committersfan5 <sfan5@live.de>2018-10-22 21:35:48 +0200
commita782197d216b2343abe04045b9bb3076864aca80 (patch)
tree6f344aa3c221f073784e695d70d676ae87442cfa /video/out/vulkan/ra_vk.h
parent93f800a00f3f8ef416082e0a3f9d34d979a1e9a6 (diff)
downloadmpv-a782197d216b2343abe04045b9bb3076864aca80.tar.bz2
mpv-a782197d216b2343abe04045b9bb3076864aca80.tar.xz
vo_gpu: vulkan: Add arbitrary user data for an ra_vk_buf
This is arguably a little contrived, but in the case of CUDA interop, we have to track additional state on the cuda side for each exported buffer. If we want to be able to manage buffers with an ra_buf_pool, we need some way to keep that CUDA state associated with each created buffer. The easiest way to do that is to attach it directly to the buffers.
Diffstat (limited to 'video/out/vulkan/ra_vk.h')
-rw-r--r--video/out/vulkan/ra_vk.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/vulkan/ra_vk.h b/video/out/vulkan/ra_vk.h
index 89eb310146..393c01a3c1 100644
--- a/video/out/vulkan/ra_vk.h
+++ b/video/out/vulkan/ra_vk.h
@@ -43,3 +43,9 @@ struct vk_external_mem {
// Export an ra_buf for importing by another api.
bool ra_vk_buf_get_external_info(struct ra *ra, struct ra_buf *buf, struct vk_external_mem *ret);
+
+// Set the buffer user data
+void ra_vk_buf_set_user_data(struct ra_buf *buf, void *priv);
+
+// Get the buffer user data
+void *ra_vk_buf_get_user_data(struct ra_buf *buf);