summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <[email protected]>2022-12-16 01:47:42 +0100
committerLynne <[email protected]>2023-05-29 00:41:46 +0200
commitbf69a641355771106b4836e0558d5c34e48870b9 (patch)
tree2ddf8d5122c7f1b1f60a4f54261cae7e5e8d222d
parentb18e20a4ee8d6c5fe540499ab17267d55e93d296 (diff)
vulkan: add size tracking to buffer structs
-rw-r--r--libavutil/vulkan.c2
-rw-r--r--libavutil/vulkan.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 0250f5aa39..faf5cd5508 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -295,6 +295,8 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size,
return AVERROR_EXTERNAL;
}
+ buf->size = size;
+
return 0;
}
diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
index d75be26977..f2c4a79102 100644
--- a/libavutil/vulkan.h
+++ b/libavutil/vulkan.h
@@ -94,6 +94,7 @@ typedef struct FFVkBuffer {
VkBuffer buf;
VkDeviceMemory mem;
VkMemoryPropertyFlagBits flags;
+ size_t size;
} FFVkBuffer;
typedef struct FFVkQueueFamilyCtx {