aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/vulkan.h
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2025-04-20 10:57:42 +0200
committerLynne <dev@lynne.ee>2025-04-22 13:43:19 +0200
commit96ddce1b3c11a998ab249569b51a027cd5d74c45 (patch)
tree596dd20d84de003bf5c5fe2be40edb88fa14cf62 /libavutil/vulkan.h
parentcee34e0a550eddccdd4984926d519f5cd46a9d55 (diff)
downloadffmpeg-96ddce1b3c11a998ab249569b51a027cd5d74c45.tar.gz
vulkan: move OPT_CHAIN out of hwcontext_vulkan
This allows for it to be shared. Technically, implementations should not give drivers structs that the drivers are not familiar with.
Diffstat (limited to 'libavutil/vulkan.h')
-rw-r--r--libavutil/vulkan.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
index 649a28be27..d5dd1bce41 100644
--- a/libavutil/vulkan.h
+++ b/libavutil/vulkan.h
@@ -349,6 +349,15 @@ static inline void ff_vk_link_struct(void *chain, const void *in)
out->pNext = (void *)in;
}
+#define FF_VK_STRUCT_EXT(CTX, BASE, STRUCT_P, EXT_FLAG, TYPE) \
+ do { \
+ if ((EXT_FLAG == FF_VK_EXT_NO_FLAG) || \
+ ((CTX)->extensions & EXT_FLAG)) { \
+ (STRUCT_P)->sType = TYPE; \
+ ff_vk_link_struct(BASE, STRUCT_P); \
+ } \
+ } while (0)
+
/* Identity mapping - r = r, b = b, g = g, a = a */
extern const VkComponentMapping ff_comp_identity_map;