FFmpeg
Loading...
Searching...
No Matches
vulkan.h
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef AVUTIL_VULKAN_H
20#define AVUTIL_VULKAN_H
21
22#define VK_NO_PROTOTYPES
23
24#include <stdatomic.h>
25
26#include "refstruct.h"
27
28#include "thread.h"
29#include "pixdesc.h"
30#include "hwcontext.h"
31#include "vulkan_functions.h"
32#include "hwcontext_vulkan.h"
33#include "avassert.h"
34#include "intreadwrite.h"
35
36/* Helper, pretty much every Vulkan return value needs to be checked */
37#define RET(x) \
38 do { \
39 if ((err = (x)) < 0) \
40 goto fail; \
41 } while (0)
42
43/* Convenience macros for specialization lists */
44#define SPEC_LIST_MAX 256
45#define SPEC_LIST_CREATE(name, max_length, max_size) \
46 av_assert1((max_length) < (SPEC_LIST_MAX - 3)); \
47 uint8_t name##_data[(max_size) + 3*sizeof(uint32_t)]; \
48 VkSpecializationMapEntry name##_entries[(max_length) + 3]; \
49 VkSpecializationInfo name##_info = { \
50 .pMapEntries = name##_entries, \
51 .pData = name##_data, \
52 }; \
53 VkSpecializationInfo *name = &name##_info;
54
55#define SPEC_LIST_ADD(name, idx, val_bits, val) \
56do { \
57 unsigned int name##_cnt = name->mapEntryCount; \
58 size_t name##_off = name->dataSize; \
59 uint8_t *name##_dp = (uint8_t *)name->pData; \
60 void *name##_ep = (void *)&name->pMapEntries[name##_cnt]; \
61 AV_WN(val_bits, name##_dp + name##_off, (val)); \
62 VkSpecializationMapEntry name##_new_entry = { \
63 .constantID = (idx), \
64 .offset = name##_off, \
65 .size = val_bits >> 3, \
66 }; \
67 memcpy(name##_ep, &name##_new_entry, \
68 sizeof(VkSpecializationMapEntry)); \
69 name->dataSize = name##_off + (val_bits >> 3); \
70 name->mapEntryCount = name##_cnt + 1; \
71} while (0)
72
73#define DUP_SAMPLER(x) { x, x, x, x }
74
75#define FF_VK_MAX_DESCRIPTOR_SETS 4
76#define FF_VK_MAX_DESCRIPTOR_BINDINGS 16
77#define FF_VK_MAX_DESCRIPTOR_TYPES 16
78#define FF_VK_MAX_PUSH_CONSTS 4
79#define FF_VK_MAX_SHADERS 16
80
82 const char *name;
83 VkDescriptorType type;
84 const char *mem_layout; /* Storage images (rgba8, etc.) and buffers (std430, etc.) */
85 const char *mem_quali; /* readonly, writeonly, etc. */
86 const char *buf_content; /* For buffers */
87 uint32_t dimensions; /* Needed for e.g. sampler%iD */
88 uint32_t elems; /* 0 - scalar, 1 or more - vector */
89 VkShaderStageFlags stages;
90 uint32_t buf_elems; /* Appends [buf_elems] to the contents. Avoids manually printing to a string. */
91 VkSampler samplers[4]; /* Sampler to use for all elems */
93
94typedef struct FFVkBuffer {
95 VkBuffer buf;
96 VkDeviceMemory mem;
97 VkMemoryPropertyFlagBits flags;
98 size_t size;
99 VkDeviceAddress address;
100
101 /* Only valid when allocated via ff_vk_get_pooled_buffer with HOST_VISIBLE or
102 * via ff_vk_host_map_buffer */
103 uint8_t *mapped_mem;
104
105 /* Set by ff_vk_host_map_buffer. This is the offset at which the buffer data
106 * actually begins at.
107 * The address and mapped_mem fields will be offset by this amount. */
109
110 /* If host mapping, reference to the backing host memory buffer */
112} FFVkBuffer;
113
114/* Fixed dependency limits per exec context (with room to spare) */
115#define FF_VK_EXEC_MAX_FRAME_DEPS 64
116#define FF_VK_EXEC_MAX_BUF_DEPS 256
117#define FF_VK_EXEC_MAX_SW_FRAME_DEPS 16
118#define FF_VK_EXEC_MAX_SEM_OPS (FF_VK_EXEC_MAX_FRAME_DEPS*AV_NUM_DATA_POINTERS)
119
120/* Default number of in-flight execution contexts per pool */
121#define FF_VK_DEFAULT_EXEC_CONTEXTS 4
122
123typedef struct FFVkExecObjDep {
124 uint64_t obj;
125 VkObjectType type;
127
128typedef struct FFVkExecContext {
129 uint32_t idx;
130 const struct FFVkExecPool *parent;
131
132 /* Set on submission; pool-rolling users check and clear it to tell
133 * contexts with uncollected results apart from fresh ones */
135
136 /* Queue for the execution context */
137 VkQueue queue;
138 int qf;
139 int qi;
140
141 /* Command buffer for the context */
142 VkCommandBuffer buf;
143
144 /* Busy (claimed or executing) while the counter is below sem_value;
145 * signalled by the submission, or by ff_vk_exec_discard() */
146 VkSemaphore sem;
147 uint64_t sem_value;
148
149 /* Briefly guards the dependency lists; the busy state is carried by the
150 * semaphore above */
152
153 /* Opaque data, untouched, free to use by users */
154 void *opaque;
155
158
159 /* Buffer dependencies */
162
163 /* AVRefStruct object dependencies */
166
167 /* Raw Vulkan object dependencies, destroyed on release */
170
171 /* Frame dependencies */
174
175 /* Software frame dependencies */
178
179 VkSemaphoreSubmitInfo sem_wait[FF_VK_EXEC_MAX_SEM_OPS];
181
182 VkSemaphoreSubmitInfo sem_sig[FF_VK_EXEC_MAX_SEM_OPS];
184
187
194
195typedef struct FFVulkanDescriptorSet {
196 /* Descriptor buffer */
197 VkDeviceSize layout_size;
198 VkDeviceSize aligned_size; /* descriptorBufferOffsetAlignment */
199 VkBufferUsageFlags usage;
200
201 VkDescriptorSetLayoutBinding binding[FF_VK_MAX_DESCRIPTOR_BINDINGS];
203
205
206 /* Descriptor set is shared between all submissions */
209
210typedef struct FFVulkanShader {
211 /* Name for id/debugging purposes */
212 const char *name;
213
214 /* Whether shader is precompiled or not */
216 VkSpecializationInfo *specialization_info;
217
218 /* Compute shader local group sizes */
219 uint32_t lg_size[3];
220
221 /* Shader bind point/type */
222 VkPipelineStageFlags stage;
223 VkPipelineBindPoint bind_point;
224
225 /* Creation info */
226 VkPipelineShaderStageRequiredSubgroupSizeCreateInfo subgroup_info;
227
228 VkPipeline pipeline;
229
230 /* Pipeline layout */
231 VkPipelineLayout pipeline_layout;
232
233 /* Push consts */
234 VkPushConstantRange push_consts[FF_VK_MAX_PUSH_CONSTS];
236
237 /* Descriptor sets */
240
241 /* Descriptors */
243
244 /* Descriptor pool */
249
251 /* Descriptor buffer */
253 uint8_t *desc_mem;
255
256typedef struct FFVulkanShaderData {
257 /* Shader to which this data belongs to */
260
261 /* Descriptor buffer */
263 VkDescriptorBufferBindingInfoEXT desc_bind[FF_VK_MAX_DESCRIPTOR_SETS];
264
265 /* Descriptor pools */
266 VkDescriptorSet *desc_sets;
267 VkDescriptorPool desc_pool;
269
291
292typedef struct FFVulkanContext {
293 const AVClass *class;
295
298 VkPhysicalDeviceProperties2 props;
299 VkPhysicalDeviceVulkan11Properties props_11;
300 VkPhysicalDeviceDriverProperties driver_props;
301 VkPhysicalDeviceMemoryProperties mprops;
302 VkPhysicalDeviceExternalMemoryHostPropertiesEXT hprops;
303 VkPhysicalDeviceDescriptorBufferPropertiesEXT desc_buf_props;
304 VkPhysicalDeviceSubgroupSizeControlProperties subgroup_props;
305 VkPhysicalDeviceCooperativeMatrixPropertiesKHR coop_matrix_props;
306 VkPhysicalDevicePushDescriptorPropertiesKHR push_desc_props;
307 VkPhysicalDeviceOpticalFlowPropertiesNV optical_flow_props;
308#ifdef VK_EXT_shader_long_vector
309 VkPhysicalDeviceShaderLongVectorPropertiesEXT long_vector_props;
310#endif
311 VkQueueFamilyQueryResultStatusPropertiesKHR *query_props;
312 VkQueueFamilyVideoPropertiesKHR *video_props;
313#ifdef VK_KHR_maintenance9
314 VkQueueFamilyOwnershipTransferPropertiesKHR *ownership_props;
315#endif
316 VkQueueFamilyProperties2 *qf_props;
318 VkPhysicalDeviceHostImageCopyPropertiesEXT host_image_props;
320
321 VkCooperativeMatrixPropertiesKHR *coop_mat_props;
323
324 VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomic_float_feats;
326
327 VkPhysicalDeviceVulkan12Features feats_12;
328#ifdef VK_KHR_unified_image_layouts
329 VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR unified_layout_feats;
330#endif
331#ifdef VK_KHR_maintenance11
332 VkPhysicalDeviceMaintenance11FeaturesKHR maintenance_11_feats;
333#endif
334 VkPhysicalDeviceFeatures2 feats;
335
336 VkMemoryPropertyFlagBits host_cached_flag;
337
341
346
347 uint32_t qfs[64];
349
350 /* Properties */
356
357static inline int ff_vk_count_images(AVVkFrame *f)
358{
359 int cnt = 0;
360 while (cnt < FF_ARRAY_ELEMS(f->img) && f->img[cnt])
361 cnt++;
362
363 return cnt;
364}
365
366static inline const void *ff_vk_find_struct(const void *chain, VkStructureType stype)
367{
368 const VkBaseInStructure *in = chain;
369 while (in) {
370 if (in->sType == stype)
371 return in;
372
373 in = in->pNext;
374 }
375
376 return NULL;
377}
378
379static inline void ff_vk_link_struct(void *chain, const void *in)
380{
381 VkBaseOutStructure *out = chain;
382 while (out->pNext)
383 out = out->pNext;
384
385 out->pNext = (void *)in;
386}
387
388#define FF_VK_STRUCT_EXT(CTX, BASE, STRUCT_P, EXT_FLAG, TYPE) \
389 do { \
390 if ((EXT_FLAG == FF_VK_EXT_NO_FLAG) || \
391 ((CTX)->extensions & EXT_FLAG)) { \
392 (STRUCT_P)->sType = TYPE; \
393 ff_vk_link_struct(BASE, STRUCT_P); \
394 } \
395 } while (0)
396
397/* Identity mapping - r = r, b = b, g = g, a = a */
398extern const VkComponentMapping ff_comp_identity_map;
399
400/**
401 * Initializes the AVClass, in case this context is not used
402 * as the main user's context.
403 * May use either a frames context reference, or a device context reference.
404 */
405int ff_vk_init(FFVulkanContext *s, void *log_parent,
406 AVBufferRef *device_ref, AVBufferRef *frames_ref);
407
408/**
409 * Converts Vulkan return values to strings
410 */
411const char *ff_vk_ret2str(VkResult res);
412
413/**
414 * Map between usage and features.
415 */
416VkImageUsageFlags ff_vk_map_feats_to_usage(VkFormatFeatureFlagBits2 feats);
417VkFormatFeatureFlagBits2 ff_vk_map_usage_to_feats(VkImageUsageFlags usage);
418
419/**
420 * Returns 1 if pixfmt is a usable RGB format.
421 */
423
424/**
425 * Since storage images may not be swizzled, we have to do this in the
426 * shader itself. This fills in a lookup table to do it.
427 */
428void ff_vk_set_perm(enum AVPixelFormat pix_fmt, int lut[4], int inv);
429
430/**
431 * Get the aspect flag for a plane from an image.
432 */
433VkImageAspectFlags ff_vk_aspect_flag(AVFrame *f, int p);
434
435/**
436 * Returns the format to use for images in shaders.
437 */
439 /* Native format with no conversion. May require casting. */
441 /* Float conversion of the native format. */
443 /* Signed integer version of the native format */
445 /* Unsigned integer version of the native format */
447};
449 enum FFVkShaderRepFormat rep_fmt);
450
451/**
452 * Returns the view format for the given representation of fmt, or
453 * VK_FORMAT_UNDEFINED if there is none.
454 */
456
457/**
458 * Loads props/mprops/driver_props
459 */
461
462/**
463 * Chooses an appropriate QF.
464 */
466 VkQueueFlagBits dev_family,
467 VkVideoCodecOperationFlagBitsKHR vid_ops);
468
469/**
470 * Allocates/frees an execution pool.
471 * If used in a multi-threaded context, there must be at least as many contexts
472 * as there are threads.
473 * ff_vk_exec_pool_init_desc() MUST be called if ff_vk_exec_descriptor_set_add()
474 * has been called.
475 */
477 FFVkExecPool *pool, int nb_contexts,
478 int nb_queries, VkQueryType query_type, int query_64bit,
479 const void *query_create_pnext);
481
482/**
483 * Retrieve an execution pool. Threadsafe.
484 */
486
487/**
488 * Performs nb_queries queries and returns their results and statuses.
489 * 64_BIT and WITH_STATUS flags are ignored as 64_BIT must be specified via
490 * query_64bit in ff_vk_exec_pool_init() and WITH_STATUS is always enabled.
491 */
493 void **data, VkQueryResultFlagBits flags);
494
495/**
496 * Start/submit/wait an execution.
497 * ff_vk_exec_start() always waits on a submission, so using ff_vk_exec_wait()
498 * is not necessary (unless using it is just better).
499 */
503
504/**
505 * Execution dependency management.
506 * Can attach buffers to executions that will only be unref'd once the
507 * buffer has finished executing.
508 * Adding a frame dep will *lock the frame*, until either the dependencies
509 * are discarded, the execution is submitted, or a failure happens.
510 * update_frame will update the frame's properties before it is unlocked,
511 * only if submission was successful.
512 * ff_vk_exec_discard() abandons a started, unsubmitted recording: call it
513 * exactly once, from the claiming thread. ff_vk_exec_submit() cleans up
514 * after its own failures.
515 */
516
517/* Takes a new reference to an AVRefStruct-managed object, held until the
518 * execution's dependencies are released. */
520 void *obj);
521
522/* Moves the caller's reference into the execution's dependencies, given a
523 * pointer to it; a duplicate of an already-tracked object is released. */
525 void *obj);
526
527/* Takes ownership of a raw Vulkan object, destroyed when the execution's
528 * dependencies are released. */
530 VkObjectType type, uint64_t obj);
531
533 VkSemaphore sem, uint64_t val,
534 VkPipelineStageFlagBits2 stage);
536 VkSemaphore sem, uint64_t val,
537 VkPipelineStageFlagBits2 stage);
539 VkSemaphore *sem, int nb,
540 VkPipelineStageFlagBits2 stage,
541 int wait); /* Ownership transferred if !wait */
543 VkPipelineStageFlagBits2 wait_stage,
544 VkPipelineStageFlagBits2 signal_stage);
546 AVFrame *f);
548 VkImageMemoryBarrier2 *bar, uint32_t *nb_img_bar);
550 VkSemaphore *dst, uint64_t *dst_val,
551 AVFrame *f);
553
554/**
555 * Create a single imageview for a given plane.
556 */
558 VkImageView *img_view, VkImageAspectFlags *aspect,
559 AVFrame *f, int plane, enum FFVkShaderRepFormat rep_fmt);
560
561/* Refcounted set of image views; stashes destruction handles to be context-free */
562typedef struct FFVkImageViews {
564
565 VkDevice dev;
566 const VkAllocationCallbacks *alloc;
567 PFN_vkDestroyImageView destroy_image_view;
568
571
572/**
573 * Allocate a reference-counted set of image views, zero-initialized for the
574 * caller to create.
575 */
577
578/**
579 * Create an imageview and add it as a dependency to an execution.
580 */
582 VkImageView views[AV_NUM_DATA_POINTERS],
583 AVFrame *f, enum FFVkShaderRepFormat rep_fmt);
584
585/**
586 * Same as ff_vk_create_imageviews(), but with an explicit view format for
587 * each plane, which must be compatible with the format of the image.
588 */
590 VkImageView views[AV_NUM_DATA_POINTERS],
591 AVFrame *f,
592 const VkFormat fmts[AV_NUM_DATA_POINTERS]);
593
594#define ff_vk_buf_barrier(dst, vkb, s_stage, s_access, s_access2, \
595 d_stage, d_access, d_access2, offs, bsz) \
596 do { \
597 dst = (VkBufferMemoryBarrier2) { \
598 .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2, \
599 .srcStageMask = VK_PIPELINE_STAGE_2_ ##s_stage, \
600 .srcAccessMask = VK_ACCESS_2_ ##s_access | \
601 VK_ACCESS_2_ ##s_access2, \
602 .dstStageMask = VK_PIPELINE_STAGE_2_ ##d_stage, \
603 .dstAccessMask = VK_ACCESS_2_ ##d_access | \
604 VK_ACCESS_2_ ##d_access2, \
605 .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, \
606 .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, \
607 .buffer = vkb->buf, \
608 .offset = offs, \
609 .size = bsz \
610 }; \
611 } while(0)
612
614 AVFrame *pic, VkImageMemoryBarrier2 *bar, int *nb_bar,
615 VkPipelineStageFlags2 src_stage,
616 VkPipelineStageFlags2 dst_stage,
617 VkAccessFlagBits2 new_access,
618 VkImageLayout new_layout,
619 uint32_t new_qf);
620
621/**
622 * Memory/buffer/image allocation helpers.
623 */
624/**
625 * Create a standalone internal-use image: exclusive sharing, dedicated
626 * memory. Not for interop or mapping.
627 */
628int ff_vk_image_create(FFVulkanContext *s, VkImage *img, VkDeviceMemory *mem,
629 int width, int height, VkFormat format, int nb_layers,
630 VkImageTiling tiling, VkImageUsageFlags usage,
631 VkImageCreateFlags flags, void *create_pnext);
632
633/**
634 * Free an image created by ff_vk_image_create(); all GPU use must have
635 * completed.
636 */
637void ff_vk_image_free(FFVulkanContext *s, VkImage *img, VkDeviceMemory *mem);
638
639int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req,
640 VkMemoryPropertyFlagBits req_flags, void *alloc_extension,
641 VkMemoryPropertyFlagBits *mem_flags, VkDeviceMemory *mem);
643 void *pNext, void *alloc_pNext,
644 VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags);
645
646/**
647 * Flush or invalidate a single buffer, with a given size and offset.
648 */
650 VkDeviceSize offset, VkDeviceSize mem_size,
651 int flush);
652
653/**
654 * Buffer management code.
655 */
656int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[],
657 int nb_buffers, int invalidate);
658int ff_vk_unmap_buffers(FFVulkanContext *s, FFVkBuffer **buf, int nb_buffers,
659 int flush);
660
661static inline int ff_vk_map_buffer(FFVulkanContext *s, FFVkBuffer *buf, uint8_t **mem,
662 int invalidate)
663{
664 return ff_vk_map_buffers(s, (FFVkBuffer *[]){ buf }, mem,
665 1, invalidate);
666}
667
669{
670 return ff_vk_unmap_buffers(s, (FFVkBuffer *[]){ buf }, 1, flush);
671}
672
674
675/** Initialize a pool and create AVBufferRefs containing FFVkBuffer.
676 * Threadsafe to use. Buffers are automatically mapped on creation if
677 * VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT is set in mem_props. Users should
678 * synchronize access themselvesd. Mainly meant for device-local buffers. */
680 FFVkBuffer **buf, VkBufferUsageFlags usage,
681 void *create_pNext, size_t size,
682 VkMemoryPropertyFlagBits mem_props);
683
684/** Maps a system RAM buffer into a Vulkan buffer.
685 * References the source buffer. Imports size bytes starting at src_data,
686 * rounded up to the host-pointer import alignment and clamped to the end
687 * of src_buf. */
689 uint8_t *src_data, VkDeviceSize size,
690 const AVBufferRef *src_buf,
691 VkBufferUsageFlags usage);
692
693/**
694 * Create a sampler.
695 */
696int ff_vk_init_sampler(FFVulkanContext *s, VkSampler *sampler,
697 int unnorm_coords, VkFilter filt);
698
699/**
700 * Initialize a shader object.
701 * If spec is non-null, it must have been created with SPEC_LIST_CREATE().
702 * The IDs for the workgroup size must be 253, 254, 255.
703 */
705 VkPipelineStageFlags stage, VkSpecializationInfo *spec,
706 uint32_t wg_size[3], uint32_t required_subgroup_size);
707
708/**
709 * Link a shader into an executable.
710 */
712 const char *spirv, size_t spirv_len,
713 const char *entrypoint);
714
715/**
716 * Add/update push constants for execution.
717 */
719 VkShaderStageFlagBits stage);
720
721/**
722 * Add descriptor to a shader. Must be called before shader init.
723 */
725 const FFVulkanDescriptorSetBinding *desc, int nb,
726 int singular);
727
728/**
729 * Register a shader with an exec pool.
730 * Pool may be NULL if all descriptor sets are read-only.
731 */
733 FFVulkanShader *shd);
734
735/**
736 * Bind a shader.
737 */
739 const FFVulkanShader *shd);
740
741/**
742 * Update push constant in a shader.
743 * Must be called before binding the shader.
744 */
746 FFVulkanShader *shd,
747 VkShaderStageFlagBits stage,
748 int offset, size_t size, void *src);
749
750/**
751 * Update a descriptor in a buffer with a buffer.
752 * Must be called before binding the shader.
753 */
755 FFVulkanShader *shd,
756 int set, int bind, int elem,
757 FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len,
758 VkFormat fmt);
759
760/**
761 * Sets an image descriptor for specified shader and binding.
762 */
764 FFVulkanShader *shd, int set, int bind, int offs,
765 VkImageView view, VkImageLayout layout,
766 VkSampler sampler);
767
768/**
769 * Update a descriptor in a buffer with an image array..
770 * Must be called before binding the shader.
771 */
773 FFVulkanShader *shd, AVFrame *f,
774 VkImageView *views, int set, int binding,
775 VkImageLayout layout, VkSampler sampler);
776
777/**
778 * Free a shader.
779 */
781
782/**
783 * Frees main context.
784 */
786
787#endif /* AVUTIL_VULKAN_H */
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:97
static double val(void *priv, double ch)
Definition aeval.c:77
static const char *const format[]
Definition af_aiir.c:445
static const int8_t filt[NUMTAPS *2]
Definition af_earwax.c:40
static FILE * out
static AVFormatContext * ctx
simple assert() macros that are a bit more flexible than ISO C assert().
#define flags(name, subs,...)
Definition cbs_h264.c:74
#define f(width, name)
Definition cbs_vp8.c:236
#define s(width, name)
Definition cbs_vp9.c:198
#define NULL
Definition coverity.c:32
static enum AVPixelFormat pix_fmt
void(* flush)(AVBSFContext *ctx)
Definition dts2pts.c:610
const char * usage
#define AV_NUM_DATA_POINTERS
Definition frame.h:480
enum VkFormat VkFormat
API-specific header for AV_HWDEVICE_TYPE_VULKAN.
uint32_t type
Definition jpegmpfenc.c:80
unsigned offset
Definition libaomenc.c:763
const VkComponentMapping ff_comp_identity_map
Definition vulkan.c:34
const char * desc
Definition libsvtav1.c:83
uint64_t layout
static const char * obj
Definition mscl.c:57
const char data[16]
Definition mxf.c:149
_fmutex pthread_mutex_t
Definition os2threads.h:53
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
#define FF_ARRAY_ELEMS(a)
FF_ATOMIC_ALIGN64 uint_least64_t atomic_uint_least64_t
Definition stdatomic.h:80
A reference to a data buffer.
Definition buffer.h:82
Describe the class of an AVClass context structure.
Definition log.h:76
This structure describes decoded (raw) audio or video data.
Definition frame.h:479
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition hwcontext.h:63
This struct describes a set or pool of "hardware" frames (i.e.
Definition hwcontext.h:118
AVRefStructPool is an API for a thread-safe pool of objects managed via the RefStruct API.
Definition refstruct.c:184
Main Vulkan context, allocated as AVHWDeviceContext.hwctx.
Allocated as AVHWFramesContext.hwctx, used to set pool-specific options.
VkBuffer buf
Definition vulkan.h:95
VkDeviceAddress address
Definition vulkan.h:99
size_t size
Definition vulkan.h:98
VkMemoryPropertyFlagBits flags
Definition vulkan.h:97
AVBufferRef * host_ref
Definition vulkan.h:111
size_t virtual_offset
Definition vulkan.h:108
VkDeviceMemory mem
Definition vulkan.h:96
uint8_t * mapped_mem
Definition vulkan.h:103
VkAccessFlagBits access_dst[FF_VK_EXEC_MAX_FRAME_DEPS]
Definition vulkan.h:189
AVBufferRef * buf_deps[FF_VK_EXEC_MAX_BUF_DEPS]
Definition vulkan.h:160
uint32_t idx
Definition vulkan.h:129
uint8_t frame_update[FF_VK_EXEC_MAX_FRAME_DEPS]
Definition vulkan.h:192
void * opaque
Definition vulkan.h:154
void * query_data
Definition vulkan.h:156
uint64_t sem_value
Definition vulkan.h:147
VkSemaphoreSubmitInfo sem_wait[FF_VK_EXEC_MAX_SEM_OPS]
Definition vulkan.h:179
FFVkExecObjDep obj_deps[FF_VK_EXEC_MAX_BUF_DEPS]
Definition vulkan.h:168
VkQueue queue
Definition vulkan.h:137
AVFrame * sw_frame_deps[FF_VK_EXEC_MAX_SW_FRAME_DEPS]
Definition vulkan.h:176
pthread_mutex_t lock
Definition vulkan.h:151
uint32_t queue_family_dst[FF_VK_EXEC_MAX_FRAME_DEPS]
Definition vulkan.h:191
uint64_t * sem_sig_val_dst[FF_VK_EXEC_MAX_SEM_OPS]
Definition vulkan.h:185
VkSemaphoreSubmitInfo sem_sig[FF_VK_EXEC_MAX_SEM_OPS]
Definition vulkan.h:182
const struct FFVkExecPool * parent
Definition vulkan.h:130
int had_submission
Definition vulkan.h:134
int sem_sig_val_dst_cnt
Definition vulkan.h:186
int nb_sw_frame_deps
Definition vulkan.h:177
VkSemaphore sem
Definition vulkan.h:146
uint8_t frame_locked[FF_VK_EXEC_MAX_FRAME_DEPS]
Definition vulkan.h:188
void * refstruct_deps[FF_VK_EXEC_MAX_BUF_DEPS]
Definition vulkan.h:164
VkImageLayout layout_dst[FF_VK_EXEC_MAX_FRAME_DEPS]
Definition vulkan.h:190
AVFrame * frame_deps[FF_VK_EXEC_MAX_FRAME_DEPS]
Definition vulkan.h:172
int nb_frame_deps
Definition vulkan.h:173
int nb_refstruct_deps
Definition vulkan.h:165
VkCommandBuffer buf
Definition vulkan.h:142
VkObjectType type
Definition vulkan.h:125
uint64_t obj
Definition vulkan.h:124
FFVulkanShaderData reg_shd[FF_VK_MAX_SHADERS]
Definition vulkan.h:288
int query_results
Definition vulkan.h:280
atomic_uint_least64_t idx
Definition vulkan.h:272
VkQueryPool query_pool
Definition vulkan.h:278
FFVkExecContext * contexts
Definition vulkan.h:271
VkCommandBuffer * cmd_bufs
Definition vulkan.h:275
int pool_size
Definition vulkan.h:276
int nb_queries
Definition vulkan.h:284
VkCommandPool * cmd_buf_pools
Definition vulkan.h:274
int nb_reg_shd
Definition vulkan.h:289
void * query_data
Definition vulkan.h:279
size_t qd_size
Definition vulkan.h:285
int query_status_stride
Definition vulkan.h:283
int query_statuses
Definition vulkan.h:281
int query_64bit
Definition vulkan.h:282
PFN_vkDestroyImageView destroy_image_view
Definition vulkan.h:567
const VkAllocationCallbacks * alloc
Definition vulkan.h:566
VkImageView views[AV_NUM_DATA_POINTERS]
Definition vulkan.h:569
VkDevice dev
Definition vulkan.h:565
uint32_t qfs[64]
Definition vulkan.h:347
AVHWFramesContext * frames
Definition vulkan.h:344
VkPhysicalDeviceMemoryProperties mprops
Definition vulkan.h:301
VkPhysicalDeviceVulkan12Features feats_12
Definition vulkan.h:327
FFVulkanExtensions extensions
Definition vulkan.h:297
int output_height
Definition vulkan.h:352
VkPhysicalDeviceOpticalFlowPropertiesNV optical_flow_props
Definition vulkan.h:307
VkImageLayout * host_image_copy_layouts
Definition vulkan.h:319
VkQueueFamilyVideoPropertiesKHR * video_props
Definition vulkan.h:312
AVVulkanDeviceContext * hwctx
Definition vulkan.h:340
VkPhysicalDeviceHostImageCopyPropertiesEXT host_image_props
Definition vulkan.h:318
VkPhysicalDeviceCooperativeMatrixPropertiesKHR coop_matrix_props
Definition vulkan.h:305
VkMemoryPropertyFlagBits host_cached_flag
Definition vulkan.h:336
void * log_parent
Definition vulkan.h:294
AVBufferRef * input_frames_ref
Definition vulkan.h:342
VkCooperativeMatrixPropertiesKHR * coop_mat_props
Definition vulkan.h:321
VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomic_float_feats
Definition vulkan.h:324
enum AVPixelFormat input_format
Definition vulkan.h:354
AVRefStructPool * imageviews_pool
Definition vulkan.h:325
VkPhysicalDeviceExternalMemoryHostPropertiesEXT hprops
Definition vulkan.h:302
VkPhysicalDevicePushDescriptorPropertiesKHR push_desc_props
Definition vulkan.h:306
VkPhysicalDeviceSubgroupSizeControlProperties subgroup_props
Definition vulkan.h:304
uint32_t coop_mat_props_nb
Definition vulkan.h:322
VkPhysicalDeviceVulkan11Properties props_11
Definition vulkan.h:299
FFVulkanFunctions vkfn
Definition vulkan.h:296
VkPhysicalDeviceDriverProperties driver_props
Definition vulkan.h:300
AVBufferRef * frames_ref
Definition vulkan.h:343
AVHWDeviceContext * device
Definition vulkan.h:339
VkPhysicalDeviceProperties2 props
Definition vulkan.h:298
VkQueueFamilyProperties2 * qf_props
Definition vulkan.h:316
VkPhysicalDeviceFeatures2 feats
Definition vulkan.h:334
enum AVPixelFormat output_format
Definition vulkan.h:353
VkPhysicalDeviceDescriptorBufferPropertiesEXT desc_buf_props
Definition vulkan.h:303
AVVulkanFramesContext * hwfc
Definition vulkan.h:345
VkQueueFamilyQueryResultStatusPropertiesKHR * query_props
Definition vulkan.h:311
AVBufferRef * device_ref
Definition vulkan.h:338
const char * buf_content
Definition vulkan.h:86
VkDescriptorType type
Definition vulkan.h:83
const char * mem_layout
Definition vulkan.h:84
VkShaderStageFlags stages
Definition vulkan.h:89
VkDeviceSize aligned_size
Definition vulkan.h:198
VkDeviceSize binding_offset[FF_VK_MAX_DESCRIPTOR_BINDINGS]
Definition vulkan.h:202
VkDescriptorSetLayoutBinding binding[FF_VK_MAX_DESCRIPTOR_BINDINGS]
Definition vulkan.h:201
VkBufferUsageFlags usage
Definition vulkan.h:199
VkDeviceSize layout_size
Definition vulkan.h:197
VkDescriptorSet * desc_sets
Definition vulkan.h:266
FFVulkanDescriptorSetData desc_set_buf[FF_VK_MAX_DESCRIPTOR_SETS]
Definition vulkan.h:262
VkDescriptorBufferBindingInfoEXT desc_bind[FF_VK_MAX_DESCRIPTOR_SETS]
Definition vulkan.h:263
FFVulkanShader * shd
Definition vulkan.h:258
VkDescriptorPool desc_pool
Definition vulkan.h:267
VkPipelineLayout pipeline_layout
Definition vulkan.h:231
FFVulkanDescriptorSet desc_set[FF_VK_MAX_DESCRIPTOR_SETS]
Definition vulkan.h:238
VkPipeline pipeline
Definition vulkan.h:228
VkPipelineShaderStageRequiredSubgroupSizeCreateInfo subgroup_info
Definition vulkan.h:226
VkPipelineStageFlags stage
Definition vulkan.h:222
int push_consts_num
Definition vulkan.h:235
VkSpecializationInfo * specialization_info
Definition vulkan.h:216
int nb_descriptor_sets
Definition vulkan.h:239
int precompiled
Definition vulkan.h:215
VkPushConstantRange push_consts[FF_VK_MAX_PUSH_CONSTS]
Definition vulkan.h:234
uint32_t lg_size[3]
Definition vulkan.h:219
const char * name
Definition vulkan.h:212
VkDescriptorSetLayout desc_layout[FF_VK_MAX_DESCRIPTOR_SETS]
Definition vulkan.h:242
VkPipelineBindPoint bind_point
Definition vulkan.h:223
VkDescriptorPoolSize desc_pool_size[FF_VK_MAX_DESCRIPTOR_TYPES]
Definition vulkan.h:246
int nb_desc_pool_size
Definition vulkan.h:247
#define src
Definition vp8dsp.c:248
#define height
Definition dsp.h:99
#define width
Definition dsp.h:99
static void set(uint8_t *a[], int ch, int index, int ch_count, enum AVSampleFormat f, double v)
Definition swresample.c:56
int size
#define img
int len
void ff_vk_set_perm(enum AVPixelFormat pix_fmt, int lut[4], int inv)
Since storage images may not be swizzled, we have to do this in the shader itself.
Definition vulkan.c:1716
void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, AVFrame *f, VkImageView *views, int set, int binding, VkImageLayout layout, VkSampler sampler)
Update a descriptor in a buffer with an image array.
Definition vulkan.c:2707
int ff_vk_shader_load(FFVulkanShader *shd, VkPipelineStageFlags stage, VkSpecializationInfo *spec, uint32_t wg_size[3], uint32_t required_subgroup_size)
Initialize a shader object.
Definition vulkan.c:2279
void ff_vk_shader_add_descriptor_set(FFVulkanContext *s, FFVulkanShader *shd, const FFVulkanDescriptorSetBinding *desc, int nb, int singular)
Add descriptor to a shader.
Definition vulkan.c:2538
void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
Definition vulkan.c:335
FFVkShaderRepFormat
Returns the format to use for images in shaders.
Definition vulkan.h:438
@ FF_VK_REP_UINT
Definition vulkan.h:446
@ FF_VK_REP_INT
Definition vulkan.h:444
@ FF_VK_REP_NATIVE
Definition vulkan.h:440
@ FF_VK_REP_FLOAT
Definition vulkan.h:442
const char * ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt, enum FFVkShaderRepFormat rep_fmt)
Definition vulkan.c:1770
int ff_vk_unmap_buffers(FFVulkanContext *s, FFVkBuffer **buf, int nb_buffers, int flush)
Definition vulkan.c:1376
VkImageAspectFlags ff_vk_aspect_flag(AVFrame *f, int p)
Get the aspect flag for a plane from an image.
Definition vulkan.c:1675
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext, void *alloc_pNext, VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags)
Definition vulkan.c:1204
int ff_vk_exec_pool_init(FFVulkanContext *s, AVVulkanDeviceQueueFamily *qf, FFVkExecPool *pool, int nb_contexts, int nb_queries, VkQueryType query_type, int query_64bit, const void *query_create_pnext)
Allocates/frees an execution pool.
Definition vulkan.c:399
void ff_vk_image_free(FFVulkanContext *s, VkImage *img, VkDeviceMemory *mem)
Free an image created by ff_vk_image_create(); all GPU use must have completed.
Definition vulkan.c:1190
void ff_vk_exec_wait(FFVulkanContext *s, FFVkExecContext *e)
Definition vulkan.c:649
int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, VkMemoryPropertyFlagBits req_flags, void *alloc_extension, VkMemoryPropertyFlagBits *mem_flags, VkDeviceMemory *mem)
Definition vulkan.c:1062
int ff_vk_image_create(FFVulkanContext *s, VkImage *img, VkDeviceMemory *mem, int width, int height, VkFormat format, int nb_layers, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, void *create_pnext)
Memory/buffer/image allocation helpers.
Definition vulkan.c:1113
int ff_vk_shader_add_push_const(FFVulkanShader *shd, int offset, int size, VkShaderStageFlagBits stage)
Add/update push constants for execution.
Definition vulkan.c:1631
int ff_vk_shader_update_img(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, int set, int bind, int offs, VkImageView view, VkImageLayout layout, VkSampler sampler)
Sets an image descriptor for specified shader and binding.
Definition vulkan.c:2682
void ff_vk_uninit(FFVulkanContext *s)
Frees main context.
Definition vulkan.c:2796
int ff_vk_load_props(FFVulkanContext *s)
Loads props/mprops/driver_props.
Definition vulkan.c:151
int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[], int nb_buffers, int invalidate)
Buffer management code.
Definition vulkan.c:1296
VkFormat ff_vk_map_fmt_to_rep(VkFormat fmt, enum FFVkShaderRepFormat rep_fmt)
Returns the view format for the given representation of fmt, or VK_FORMAT_UNDEFINED if there is none.
Definition vulkan.c:1999
const char * ff_vk_ret2str(VkResult res)
Converts Vulkan return values to strings.
Definition vulkan.c:42
#define FF_VK_EXEC_MAX_SEM_OPS
Definition vulkan.h:118
int ff_vk_init(FFVulkanContext *s, void *log_parent, AVBufferRef *device_ref, AVBufferRef *frames_ref)
Initializes the AVClass, in case this context is not used as the main user's context.
Definition vulkan.c:2812
static const void * ff_vk_find_struct(const void *chain, VkStructureType stype)
Definition vulkan.h:366
int ff_vk_exec_add_dep_sw_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f)
Definition vulkan.c:815
void ff_vk_exec_add_dep_obj(FFVulkanContext *s, FFVkExecContext *e, VkObjectType type, uint64_t obj)
Definition vulkan.c:808
void ff_vk_free_buf(FFVulkanContext *s, FFVkBuffer *buf)
Definition vulkan.c:1418
void ff_vk_frame_barrier(FFVulkanContext *s, FFVkExecContext *e, AVFrame *pic, VkImageMemoryBarrier2 *bar, int *nb_bar, VkPipelineStageFlags2 src_stage, VkPipelineStageFlags2 dst_stage, VkAccessFlagBits2 new_access, VkImageLayout new_layout, uint32_t new_qf)
Definition vulkan.c:2233
VkFormatFeatureFlagBits2 ff_vk_map_usage_to_feats(VkImageUsageFlags usage)
int ff_vk_exec_start(FFVulkanContext *s, FFVkExecContext *e)
Start/submit/wait an execution.
Definition vulkan.c:664
int ff_vk_create_imageviews(FFVulkanContext *s, FFVkExecContext *e, VkImageView views[AV_NUM_DATA_POINTERS], AVFrame *f, enum FFVkShaderRepFormat rep_fmt)
Create an imageview and add it as a dependency to an execution.
Definition vulkan.c:2211
#define FF_VK_MAX_SHADERS
Definition vulkan.h:79
void ff_vk_shader_free(FFVulkanContext *s, FFVulkanShader *shd)
Free a shader.
Definition vulkan.c:2774
FFVkImageViews * ff_vk_imageviews_alloc(FFVulkanContext *s, int nb_views)
Allocate a reference-counted set of image views, zero-initialized for the caller to create.
Definition vulkan.c:1980
static int ff_vk_unmap_buffer(FFVulkanContext *s, FFVkBuffer *buf, int flush)
Definition vulkan.h:668
VkResult ff_vk_exec_get_query(FFVulkanContext *s, FFVkExecContext *e, void **data, VkQueryResultFlagBits flags)
Performs nb_queries queries and returns their results and statuses.
Definition vulkan.c:598
int ff_vk_shader_register_exec(FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
Register a shader with an exec pool.
Definition vulkan.c:2572
int ff_vk_init_sampler(FFVulkanContext *s, VkSampler *sampler, int unnorm_coords, VkFilter filt)
Create a sampler.
Definition vulkan.c:1642
#define FF_VK_EXEC_MAX_FRAME_DEPS
Definition vulkan.h:115
static int ff_vk_count_images(AVVkFrame *f)
Definition vulkan.h:357
void ff_vk_exec_update_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, VkImageMemoryBarrier2 *bar, uint32_t *nb_img_bar)
Definition vulkan.c:943
FFVkExecContext * ff_vk_exec_get(FFVulkanContext *s, FFVkExecPool *pool)
Retrieve an execution pool.
Definition vulkan.c:626
int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt)
Returns 1 if pixfmt is a usable RGB format.
Definition vulkan.c:1692
#define FF_VK_MAX_PUSH_CONSTS
Definition vulkan.h:78
int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
Definition vulkan.c:987
void ff_vk_exec_bind_shader(FFVulkanContext *s, FFVkExecContext *e, const FFVulkanShader *shd)
Bind a shader.
Definition vulkan.c:2756
#define FF_VK_MAX_DESCRIPTOR_BINDINGS
Definition vulkan.h:76
void ff_vk_exec_move_dep_refstruct(FFVulkanContext *s, FFVkExecContext *e, void *obj)
Definition vulkan.c:790
int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, int set, int bind, int elem, FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len, VkFormat fmt)
Update a descriptor in a buffer with a buffer.
Definition vulkan.c:2720
#define FF_VK_EXEC_MAX_BUF_DEPS
Definition vulkan.h:116
VkImageUsageFlags ff_vk_map_feats_to_usage(VkFormatFeatureFlagBits2 feats)
Map between usage and features.
AVVulkanDeviceQueueFamily * ff_vk_qf_find(FFVulkanContext *s, VkQueueFlagBits dev_family, VkVideoCodecOperationFlagBitsKHR vid_ops)
Chooses an appropriate QF.
Definition vulkan.c:320
int ff_vk_host_map_buffer(FFVulkanContext *s, FFVkBuffer **dst, uint8_t *src_data, VkDeviceSize size, const AVBufferRef *src_buf, VkBufferUsageFlags usage)
Maps a system RAM buffer into a Vulkan buffer.
Definition vulkan.c:1540
void ff_vk_exec_add_dep_refstruct(FFVulkanContext *s, FFVkExecContext *e, void *obj)
Execution dependency management.
Definition vulkan.c:783
int ff_vk_create_imageview(FFVulkanContext *s, VkImageView *img_view, VkImageAspectFlags *aspect, AVFrame *f, int plane, enum FFVkShaderRepFormat rep_fmt)
Create a single imageview for a given plane.
Definition vulkan.c:2098
int ff_vk_get_pooled_buffer(FFVulkanContext *ctx, AVRefStructPool **buf_pool, FFVkBuffer **buf, VkBufferUsageFlags usage, void *create_pNext, size_t size, VkMemoryPropertyFlagBits mem_props)
Initialize a pool and create AVBufferRefs containing FFVkBuffer.
Definition vulkan.c:1444
#define FF_VK_EXEC_MAX_SW_FRAME_DEPS
Definition vulkan.h:117
int ff_vk_flush_buffer(FFVulkanContext *s, FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize mem_size, int flush)
Flush or invalidate a single buffer, with a given size and offset.
Definition vulkan.c:1345
int ff_vk_exec_mirror_sem_value(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore *dst, uint64_t *dst_val, AVFrame *f)
Definition vulkan.c:962
static void ff_vk_link_struct(void *chain, const void *in)
Definition vulkan.h:379
void ff_vk_exec_add_dep_signal_sem(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore sem, uint64_t val, VkPipelineStageFlagBits2 stage)
Definition vulkan.c:843
void ff_vk_exec_discard(FFVulkanContext *s, FFVkExecContext *e)
Definition vulkan.c:767
#define FF_VK_MAX_DESCRIPTOR_SETS
Definition vulkan.h:75
int ff_vk_create_imageviews_fmt(FFVulkanContext *s, FFVkExecContext *e, VkImageView views[AV_NUM_DATA_POINTERS], AVFrame *f, const VkFormat fmts[AV_NUM_DATA_POINTERS])
Same as ff_vk_create_imageviews(), but with an explicit view format for each plane,...
Definition vulkan.c:2149
void ff_vk_exec_add_dep_bool_sem(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore *sem, int nb, VkPipelineStageFlagBits2 stage, int wait)
Definition vulkan.c:857
int ff_vk_shader_link(FFVulkanContext *s, FFVulkanShader *shd, const char *spirv, size_t spirv_len, const char *entrypoint)
Link a shader into an executable.
Definition vulkan.c:2442
int ff_vk_exec_add_dep_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, VkPipelineStageFlagBits2 wait_stage, VkPipelineStageFlagBits2 signal_stage)
Definition vulkan.c:885
static int ff_vk_map_buffer(FFVulkanContext *s, FFVkBuffer *buf, uint8_t **mem, int invalidate)
Definition vulkan.h:661
#define FF_VK_MAX_DESCRIPTOR_TYPES
Definition vulkan.h:77
void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd, VkShaderStageFlagBits stage, int offset, size_t size, void *src)
Update push constant in a shader.
Definition vulkan.c:2746
void ff_vk_exec_add_dep_wait_sem(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore sem, uint64_t val, VkPipelineStageFlagBits2 stage)
Definition vulkan.c:829
uint64_t FFVulkanExtensions