FFmpeg
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 "thread.h"
27 #include "pixdesc.h"
28 #include "bprint.h"
29 #include "hwcontext.h"
30 #include "vulkan_functions.h"
31 #include "hwcontext_vulkan.h"
32 
33 /* GLSL management macros */
34 #define INDENT(N) INDENT_##N
35 #define INDENT_0
36 #define INDENT_1 INDENT_0 " "
37 #define INDENT_2 INDENT_1 INDENT_1
38 #define INDENT_3 INDENT_2 INDENT_1
39 #define INDENT_4 INDENT_3 INDENT_1
40 #define INDENT_5 INDENT_4 INDENT_1
41 #define INDENT_6 INDENT_5 INDENT_1
42 #define C(N, S) INDENT(N) #S "\n"
43 
44 #define GLSLC(N, S) \
45  do { \
46  av_bprintf(&shd->src, C(N, S)); \
47  } while (0)
48 
49 #define GLSLA(...) \
50  do { \
51  av_bprintf(&shd->src, __VA_ARGS__); \
52  } while (0)
53 
54 #define GLSLF(N, S, ...) \
55  do { \
56  av_bprintf(&shd->src, C(N, S), __VA_ARGS__); \
57  } while (0)
58 
59 #define GLSLD(D) \
60  do { \
61  av_bprintf(&shd->src, "\n"); \
62  av_bprint_append_data(&shd->src, D, strlen(D)); \
63  av_bprintf(&shd->src, "\n"); \
64  } while (0)
65 
66 /* Helper, pretty much every Vulkan return value needs to be checked */
67 #define RET(x) \
68  do { \
69  if ((err = (x)) < 0) \
70  goto fail; \
71  } while (0)
72 
73 #define DUP_SAMPLER(x) { x, x, x, x }
74 
76  const char *name;
77  VkDescriptorType type;
78  const char *mem_layout; /* Storage images (rgba8, etc.) and buffers (std430, etc.) */
79  const char *mem_quali; /* readonly, writeonly, etc. */
80  const char *buf_content; /* For buffers */
81  uint32_t dimensions; /* Needed for e.g. sampler%iD */
82  uint32_t elems; /* 0 - scalar, 1 or more - vector */
83  VkShaderStageFlags stages;
84  uint32_t buf_elems; /* Appends [buf_elems] to the contents. Avoids manually printing to a string. */
85  VkSampler samplers[4]; /* Sampler to use for all elems */
87 
88 typedef struct FFVkBuffer {
89  VkBuffer buf;
90  VkDeviceMemory mem;
91  VkMemoryPropertyFlagBits flags;
92  size_t size;
93  VkDeviceAddress address;
94 
95  /* Local use only */
96  VkPipelineStageFlags2 stage;
97  VkAccessFlags2 access;
98 
99  /* Only valid when allocated via ff_vk_get_pooled_buffer with HOST_VISIBLE or
100  * via ff_vk_host_map_buffer */
101  uint8_t *mapped_mem;
102 
103  /* Set by ff_vk_host_map_buffer. This is the offset at which the buffer data
104  * actually begins at.
105  * The address and mapped_mem fields will be offset by this amount. */
107 
108  /* If host mapping, reference to the backing host memory buffer */
110 } FFVkBuffer;
111 
112 typedef struct FFVkExecContext {
113  uint32_t idx;
114  const struct FFVkExecPool *parent;
117 
118  /* Queue for the execution context */
119  VkQueue queue;
120  int qf;
121  int qi;
122 
123  /* Command buffer for the context */
124  VkCommandBuffer buf;
125 
126  /* Fence for the command buffer */
127  VkFence fence;
128 
129  /* Opaque data, untouched, free to use by users */
130  void *opaque;
131 
132  void *query_data;
134 
135  /* Buffer dependencies */
138  unsigned int buf_deps_alloc_size;
139 
140  /* Frame dependencies */
142  unsigned int frame_deps_alloc_size;
144 
145  /* Software frame dependencies */
149 
150  VkSemaphoreSubmitInfo *sem_wait;
151  unsigned int sem_wait_alloc;
153 
154  VkSemaphoreSubmitInfo *sem_sig;
155  unsigned int sem_sig_alloc;
157 
158  uint64_t **sem_sig_val_dst;
159  unsigned int sem_sig_val_dst_alloc;
161 
162  uint8_t *frame_locked;
164 
165  VkAccessFlagBits *access_dst;
166  unsigned int access_dst_alloc;
167 
168  VkImageLayout *layout_dst;
169  unsigned int layout_dst_alloc;
170 
171  uint32_t *queue_family_dst;
173 
174  uint8_t *frame_update;
177 
178 typedef struct FFVulkanDescriptorSet {
179  /* Descriptor buffer */
180  VkDeviceSize layout_size;
181  VkDeviceSize aligned_size; /* descriptorBufferOffsetAlignment */
182  VkBufferUsageFlags usage;
183 
184  VkDescriptorSetLayoutBinding *binding;
185  VkDeviceSize *binding_offset;
187 
188  /* Descriptor set is shared between all submissions */
189  int singular;
191 
192 typedef struct FFVulkanShader {
193  /* Name for id/debugging purposes */
194  const char *name;
195 
196  /* Shader text */
197  AVBPrint src;
198 
199  /* Compute shader local group sizes */
200  int lg_size[3];
201 
202  /* Shader bind point/type */
203  VkPipelineStageFlags stage;
204  VkPipelineBindPoint bind_point;
205 
206  /* Creation info */
207  VkPipelineShaderStageRequiredSubgroupSizeCreateInfo subgroup_info;
208 
209  /* Base shader object */
210  VkShaderEXT object;
211  VkPipeline pipeline;
212 
213  /* Pipeline layout */
214  VkPipelineLayout pipeline_layout;
215 
216  /* Push consts */
217  VkPushConstantRange *push_consts;
219 
220  /* Descriptor sets */
223 
224  /* Descriptor buffer */
225  VkDescriptorSetLayout *desc_layout;
227 
228  /* Descriptor pool */
229  int use_push;
230  VkDescriptorPoolSize *desc_pool_size;
233 
235  /* Descriptor buffer */
237  uint8_t *desc_mem;
239 
240 typedef struct FFVulkanShaderData {
241  /* Shader to which this data belongs to */
244 
245  /* Descriptor buffer */
247  VkDescriptorBufferBindingInfoEXT *desc_bind;
248 
249  /* Descriptor pools */
250  VkDescriptorSet *desc_sets;
251  VkDescriptorPool desc_pool;
253 
254 typedef struct FFVkExecPool {
257 
258  VkCommandPool cmd_buf_pool;
259  VkCommandBuffer *cmd_bufs;
261 
262  VkQueryPool query_pool;
263  void *query_data;
269  size_t qd_size;
270 
271  /* Registered shaders' data */
274 } FFVkExecPool;
275 
276 typedef struct FFVulkanContext {
277  const AVClass *class;
278  void *log_parent;
279 
282  VkPhysicalDeviceProperties2 props;
283  VkPhysicalDeviceVulkan11Properties props_11;
284  VkPhysicalDeviceDriverProperties driver_props;
285  VkPhysicalDeviceMemoryProperties mprops;
286  VkPhysicalDeviceExternalMemoryHostPropertiesEXT hprops;
287  VkPhysicalDeviceDescriptorBufferPropertiesEXT desc_buf_props;
288  VkPhysicalDeviceSubgroupSizeControlProperties subgroup_props;
289  VkPhysicalDeviceCooperativeMatrixPropertiesKHR coop_matrix_props;
290  VkPhysicalDeviceOpticalFlowPropertiesNV optical_flow_props;
291  VkQueueFamilyQueryResultStatusPropertiesKHR *query_props;
292  VkQueueFamilyVideoPropertiesKHR *video_props;
293  VkQueueFamilyProperties2 *qf_props;
295 
296  VkCooperativeMatrixPropertiesKHR *coop_mat_props;
298 
299  VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomic_float_feats;
300  VkPhysicalDeviceVulkan12Features feats_12;
301  VkPhysicalDeviceFeatures2 feats;
302 
306 
311 
312  uint32_t qfs[64];
313  int nb_qfs;
314 
315  /* Properties */
321 
322 static inline int ff_vk_count_images(AVVkFrame *f)
323 {
324  int cnt = 0;
325  while (cnt < FF_ARRAY_ELEMS(f->img) && f->img[cnt])
326  cnt++;
327 
328  return cnt;
329 }
330 
331 static inline const void *ff_vk_find_struct(const void *chain, VkStructureType stype)
332 {
333  const VkBaseInStructure *in = chain;
334  while (in) {
335  if (in->sType == stype)
336  return in;
337 
338  in = in->pNext;
339  }
340 
341  return NULL;
342 }
343 
344 static inline void ff_vk_link_struct(void *chain, const void *in)
345 {
346  VkBaseOutStructure *out = chain;
347  while (out->pNext)
348  out = out->pNext;
349 
350  out->pNext = (void *)in;
351 }
352 
353 /* Identity mapping - r = r, b = b, g = g, a = a */
354 extern const VkComponentMapping ff_comp_identity_map;
355 
356 /**
357  * Initializes the AVClass, in case this context is not used
358  * as the main user's context.
359  * May use either a frames context reference, or a device context reference.
360  */
361 int ff_vk_init(FFVulkanContext *s, void *log_parent,
362  AVBufferRef *device_ref, AVBufferRef *frames_ref);
363 
364 /**
365  * Converts Vulkan return values to strings
366  */
367 const char *ff_vk_ret2str(VkResult res);
368 
369 /**
370  * Returns 1 if pixfmt is a usable RGB format.
371  */
373 
374 /**
375  * Since storage images may not be swizzled, we have to do this in the
376  * shader itself. This fills in a lookup table to do it.
377  */
378 void ff_vk_set_perm(enum AVPixelFormat pix_fmt, int lut[4], int inv);
379 
380 /**
381  * Get the aspect flag for a plane from an image.
382  */
383 VkImageAspectFlags ff_vk_aspect_flag(AVFrame *f, int p);
384 
385 /**
386  * Returns the format to use for images in shaders.
387  */
389  /* Native format with no conversion. May require casting. */
391  /* Float conversion of the native format. */
393  /* Signed integer version of the native format */
395  /* Unsigned integer version of the native format */
397 };
399  enum FFVkShaderRepFormat rep_fmt);
400 
401 /**
402  * Loads props/mprops/driver_props
403  */
405 
406 /**
407  * Chooses an appropriate QF.
408  */
410  VkQueueFlagBits dev_family,
411  VkVideoCodecOperationFlagBitsKHR vid_ops);
412 
413 /**
414  * Allocates/frees an execution pool.
415  * If used in a multi-threaded context, there must be at least as many contexts
416  * as there are threads.
417  * ff_vk_exec_pool_init_desc() MUST be called if ff_vk_exec_descriptor_set_add()
418  * has been called.
419  */
421  FFVkExecPool *pool, int nb_contexts,
422  int nb_queries, VkQueryType query_type, int query_64bit,
423  const void *query_create_pnext);
425 
426 /**
427  * Retrieve an execution pool. Threadsafe.
428  */
430 
431 /**
432  * Performs nb_queries queries and returns their results and statuses.
433  * 64_BIT and WITH_STATUS flags are ignored as 64_BIT must be specified via
434  * query_64bit in ff_vk_exec_pool_init() and WITH_STATUS is always enabled.
435  */
437  void **data, VkQueryResultFlagBits flags);
438 
439 /**
440  * Start/submit/wait an execution.
441  * ff_vk_exec_start() always waits on a submission, so using ff_vk_exec_wait()
442  * is not necessary (unless using it is just better).
443  */
447 
448 /**
449  * Execution dependency management.
450  * Can attach buffers to executions that will only be unref'd once the
451  * buffer has finished executing.
452  * Adding a frame dep will *lock the frame*, until either the dependencies
453  * are discarded, the execution is submitted, or a failure happens.
454  * update_frame will update the frame's properties before it is unlocked,
455  * only if submission was successful.
456  */
458  AVBufferRef **deps, int nb_deps, int ref);
460  VkSemaphore sem, uint64_t val,
461  VkPipelineStageFlagBits2 stage);
463  VkSemaphore *sem, int nb,
464  VkPipelineStageFlagBits2 stage,
465  int wait); /* Ownership transferred if !wait */
467  VkPipelineStageFlagBits2 wait_stage,
468  VkPipelineStageFlagBits2 signal_stage);
470  AVFrame *f);
472  VkImageMemoryBarrier2 *bar, uint32_t *nb_img_bar);
474  VkSemaphore *dst, uint64_t *dst_val,
475  AVFrame *f);
477 
478 /**
479  * Create a single imageview for a given plane.
480  */
482  VkImageView *img_view, VkImageAspectFlags *aspect,
483  AVFrame *f, int plane, enum FFVkShaderRepFormat rep_fmt);
484 
485 /**
486  * Create an imageview and add it as a dependency to an execution.
487  */
489  VkImageView views[AV_NUM_DATA_POINTERS],
490  AVFrame *f, enum FFVkShaderRepFormat rep_fmt);
491 
493  AVFrame *pic, VkImageMemoryBarrier2 *bar, int *nb_bar,
494  VkPipelineStageFlags src_stage,
495  VkPipelineStageFlags dst_stage,
496  VkAccessFlagBits new_access,
497  VkImageLayout new_layout,
498  uint32_t new_qf);
499 
500 /**
501  * Memory/buffer/image allocation helpers.
502  */
503 int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req,
504  VkMemoryPropertyFlagBits req_flags, void *alloc_extension,
505  VkMemoryPropertyFlagBits *mem_flags, VkDeviceMemory *mem);
507  void *pNext, void *alloc_pNext,
508  VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags);
509 
510 /**
511  * Buffer management code.
512  */
513 int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[],
514  int nb_buffers, int invalidate);
515 int ff_vk_unmap_buffers(FFVulkanContext *s, FFVkBuffer **buf, int nb_buffers,
516  int flush);
517 
518 static inline int ff_vk_map_buffer(FFVulkanContext *s, FFVkBuffer *buf, uint8_t **mem,
519  int invalidate)
520 {
521  return ff_vk_map_buffers(s, (FFVkBuffer *[]){ buf }, mem,
522  1, invalidate);
523 }
524 
525 static inline int ff_vk_unmap_buffer(FFVulkanContext *s, FFVkBuffer *buf, int flush)
526 {
527  return ff_vk_unmap_buffers(s, (FFVkBuffer *[]){ buf }, 1, flush);
528 }
529 
531 
532 /** Initialize a pool and create AVBufferRefs containing FFVkBuffer.
533  * Threadsafe to use. Buffers are automatically mapped on creation if
534  * VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT is set in mem_props. Users should
535  * synchronize access themselvesd. Mainly meant for device-local buffers. */
537  AVBufferRef **buf, VkBufferUsageFlags usage,
538  void *create_pNext, size_t size,
539  VkMemoryPropertyFlagBits mem_props);
540 
541 /** Maps a system RAM buffer into a Vulkan buffer.
542  * References the source buffer.
543  */
545  uint8_t *src_data, const AVBufferRef *src_buf,
546  VkBufferUsageFlags usage);
547 
548 /**
549  * Create a sampler.
550  */
551 int ff_vk_init_sampler(FFVulkanContext *s, VkSampler *sampler,
552  int unnorm_coords, VkFilter filt);
553 
554 /**
555  * Initialize a shader object, with a specific set of extensions, type+bind,
556  * local group size, and subgroup requirements.
557  */
558 int ff_vk_shader_init(FFVulkanContext *s, FFVulkanShader *shd, const char *name,
559  VkPipelineStageFlags stage,
560  const char *extensions[], int nb_extensions,
561  int lg_x, int lg_y, int lg_z,
562  uint32_t required_subgroup_size);
563 
564 /**
565  * Output the shader code as logging data, with a specific
566  * priority.
567  */
568 void ff_vk_shader_print(void *ctx, FFVulkanShader *shd, int prio);
569 
570 /**
571  * Link a shader into an executable.
572  */
574  uint8_t *spirv, size_t spirv_len,
575  const char *entrypoint);
576 
577 /**
578  * Add/update push constants for execution.
579  */
581  VkShaderStageFlagBits stage);
582 
583 /**
584  * Add descriptor to a shader. Must be called before shader init.
585  */
588  int singular, int print_to_shader_only);
589 
590 /**
591  * Register a shader with an exec pool.
592  * Pool may be NULL if all descriptor sets are read-only.
593  */
595  FFVulkanShader *shd);
596 
597 /**
598  * Bind a shader.
599  */
601  FFVulkanShader *shd);
602 
603 /**
604  * Update push constant in a shader.
605  * Must be called before binding the shader.
606  */
608  FFVulkanShader *shd,
609  VkShaderStageFlagBits stage,
610  int offset, size_t size, void *src);
611 
612 /**
613  * Update a descriptor in a buffer with a buffer.
614  * Must be called before binding the shader.
615  */
617  FFVulkanShader *shd,
618  int set, int bind, int elem,
619  FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len,
620  VkFormat fmt);
621 
622 /**
623  * Sets an image descriptor for specified shader and binding.
624  */
626  FFVulkanShader *shd, int set, int bind, int offs,
627  VkImageView view, VkImageLayout layout,
628  VkSampler sampler);
629 
630 /**
631  * Update a descriptor in a buffer with an image array..
632  * Must be called before binding the shader.
633  */
635  FFVulkanShader *shd, AVFrame *f,
636  VkImageView *views, int set, int binding,
637  VkImageLayout layout, VkSampler sampler);
638 
639 /**
640  * Free a shader.
641  */
643 
644 /**
645  * Frees main context.
646  */
648 
649 #endif /* AVUTIL_VULKAN_H */
FFVulkanShader::bind_point
VkPipelineBindPoint bind_point
Definition: vulkan.h:204
flags
const SwsFlags flags[]
Definition: swscale.c:61
ff_vk_ret2str
const char * ff_vk_ret2str(VkResult res)
Converts Vulkan return values to strings.
Definition: vulkan.c:35
pthread_mutex_t
_fmutex pthread_mutex_t
Definition: os2threads.h:53
ff_vk_exec_add_dep_bool_sem
int ff_vk_exec_add_dep_bool_sem(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore *sem, int nb, VkPipelineStageFlagBits2 stage, int wait)
Definition: vulkan.c:643
ff_vk_map_buffers
int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[], int nb_buffers, int invalidate)
Buffer management code.
Definition: vulkan.c:1043
ff_vk_unmap_buffers
int ff_vk_unmap_buffers(FFVulkanContext *s, FFVkBuffer **buf, int nb_buffers, int flush)
Definition: vulkan.c:1090
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
ff_vk_exec_discard_deps
void ff_vk_exec_discard_deps(FFVulkanContext *s, FFVkExecContext *e)
Definition: vulkan.c:521
FFVulkanContext::hwfc
AVVulkanFramesContext * hwfc
Definition: vulkan.h:310
ff_vk_uninit
void ff_vk_uninit(FFVulkanContext *s)
Frees main context.
Definition: vulkan.c:2893
ff_vk_exec_add_dep_frame
int ff_vk_exec_add_dep_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, VkPipelineStageFlagBits2 wait_stage, VkPipelineStageFlagBits2 signal_stage)
Definition: vulkan.c:709
FFVulkanContext::output_height
int output_height
Definition: vulkan.h:317
FFVulkanContext::props_11
VkPhysicalDeviceVulkan11Properties props_11
Definition: vulkan.h:283
FFVkExecContext::frame_deps_alloc_size
unsigned int frame_deps_alloc_size
Definition: vulkan.h:142
out
FILE * out
Definition: movenc.c:55
FFVulkanExtensions
uint64_t FFVulkanExtensions
Definition: vulkan_functions.h:29
AVBufferPool
The buffer pool.
Definition: buffer_internal.h:88
ff_vk_load_props
int ff_vk_load_props(FFVulkanContext *s)
Loads props/mprops/driver_props.
Definition: vulkan.c:106
ff_vk_exec_pool_init
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:296
ff_vk_exec_add_dep_sw_frame
int ff_vk_exec_add_dep_sw_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f)
Definition: vulkan.c:576
FFVulkanContext::device_ref
AVBufferRef * device_ref
Definition: vulkan.h:303
FFVkExecPool::contexts
FFVkExecContext * contexts
Definition: vulkan.h:255
FFVkExecPool::idx
atomic_uint_least64_t idx
Definition: vulkan.h:256
FFVulkanDescriptorSetData
Definition: vulkan.h:234
FFVulkanShader::nb_desc_pool_size
int nb_desc_pool_size
Definition: vulkan.h:231
thread.h
FFVulkanShaderData
Definition: vulkan.h:240
FFVkExecContext::qf
int qf
Definition: vulkan.h:120
FFVkBuffer::access
VkAccessFlags2 access
Definition: vulkan.h:97
FFVulkanDescriptorSet::aligned_size
VkDeviceSize aligned_size
Definition: vulkan.h:181
FFVulkanShaderData::shd
FFVulkanShader * shd
Definition: vulkan.h:242
ff_vk_init
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:2904
FFVkBuffer::stage
VkPipelineStageFlags2 stage
Definition: vulkan.h:96
FFVkBuffer::host_ref
AVBufferRef * host_ref
Definition: vulkan.h:109
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:410
pixdesc.h
FFVulkanDescriptorSetBinding::stages
VkShaderStageFlags stages
Definition: vulkan.h:83
ff_vk_map_buffer
static int ff_vk_map_buffer(FFVulkanContext *s, FFVkBuffer *buf, uint8_t **mem, int invalidate)
Definition: vulkan.h:518
FFVulkanShader::subgroup_info
VkPipelineShaderStageRequiredSubgroupSizeCreateInfo subgroup_info
Definition: vulkan.h:207
ff_vk_find_struct
static const void * ff_vk_find_struct(const void *chain, VkStructureType stype)
Definition: vulkan.h:331
FFVulkanShader::pipeline
VkPipeline pipeline
Definition: vulkan.h:211
FFVkExecContext::sem_sig_alloc
unsigned int sem_sig_alloc
Definition: vulkan.h:155
ff_vk_frame_barrier
void ff_vk_frame_barrier(FFVulkanContext *s, FFVkExecContext *e, AVFrame *pic, VkImageMemoryBarrier2 *bar, int *nb_bar, VkPipelineStageFlags src_stage, VkPipelineStageFlags dst_stage, VkAccessFlagBits new_access, VkImageLayout new_layout, uint32_t new_qf)
Definition: vulkan.c:1952
FFVulkanShaderData::desc_bind
VkDescriptorBufferBindingInfoEXT * desc_bind
Definition: vulkan.h:247
FFVulkanShader::src
AVBPrint src
Definition: vulkan.h:197
FFVulkanShader::use_push
int use_push
Definition: vulkan.h:229
ff_vk_exec_add_dep_wait_sem
int ff_vk_exec_add_dep_wait_sem(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore sem, uint64_t val, VkPipelineStageFlagBits2 stage)
Definition: vulkan.c:626
data
const char data[16]
Definition: mxf.c:149
ff_vk_shader_link
int ff_vk_shader_link(FFVulkanContext *s, FFVulkanShader *shd, uint8_t *spirv, size_t spirv_len, const char *entrypoint)
Link a shader into an executable.
Definition: vulkan.c:2284
FFVkBuffer::address
VkDeviceAddress address
Definition: vulkan.h:93
FFVkExecContext::sem_wait
VkSemaphoreSubmitInfo * sem_wait
Definition: vulkan.h:150
FF_VK_REP_NATIVE
@ FF_VK_REP_NATIVE
Definition: vulkan.h:390
FF_VK_REP_INT
@ FF_VK_REP_INT
Definition: vulkan.h:394
FFVulkanDescriptorSetBinding::buf_content
const char * buf_content
Definition: vulkan.h:80
ff_vk_shader_print
void ff_vk_shader_print(void *ctx, FFVulkanShader *shd, int prio)
Output the shader code as logging data, with a specific priority.
Definition: vulkan.c:2070
FFVkExecPool::query_pool
VkQueryPool query_pool
Definition: vulkan.h:262
FFVkExecPool::nb_reg_shd
int nb_reg_shd
Definition: vulkan.h:273
FFVulkanDescriptorSetData::desc_mem
uint8_t * desc_mem
Definition: vulkan.h:237
ff_vk_shader_add_descriptor_set
int ff_vk_shader_add_descriptor_set(FFVulkanContext *s, FFVulkanShader *shd, FFVulkanDescriptorSetBinding *desc, int nb, int singular, int print_to_shader_only)
Add descriptor to a shader.
Definition: vulkan.c:2359
FFVkExecContext::nb_sw_frame_deps
int nb_sw_frame_deps
Definition: vulkan.h:148
FFVulkanShaderData::desc_sets
VkDescriptorSet * desc_sets
Definition: vulkan.h:250
FFVulkanContext::tot_nb_qfs
int tot_nb_qfs
Definition: vulkan.h:294
FFVkShaderRepFormat
FFVkShaderRepFormat
Returns the format to use for images in shaders.
Definition: vulkan.h:388
FFVkBuffer::buf
VkBuffer buf
Definition: vulkan.h:89
FFVkExecContext::lock
pthread_mutex_t lock
Definition: vulkan.h:115
ff_vk_shader_free
void ff_vk_shader_free(FFVulkanContext *s, FFVulkanShader *shd)
Free a shader.
Definition: vulkan.c:2852
FFVkExecContext::frame_update_alloc_size
unsigned int frame_update_alloc_size
Definition: vulkan.h:175
FFVulkanShader::desc_layout
VkDescriptorSetLayout * desc_layout
Definition: vulkan.h:225
ff_vk_shader_register_exec
int ff_vk_shader_register_exec(FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
Register a shader with an exec pool.
Definition: vulkan.c:2492
ff_vk_shader_rep_fmt
const char * ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt, enum FFVkShaderRepFormat rep_fmt)
Definition: vulkan.c:1516
FFVulkanDescriptorSet::nb_bindings
int nb_bindings
Definition: vulkan.h:186
FFVulkanContext::feats
VkPhysicalDeviceFeatures2 feats
Definition: vulkan.h:301
ff_vk_exec_mirror_sem_value
int ff_vk_exec_mirror_sem_value(FFVulkanContext *s, FFVkExecContext *e, VkSemaphore *dst, uint64_t *dst_val, AVFrame *f)
Definition: vulkan.c:808
FFVulkanDescriptorSet::layout_size
VkDeviceSize layout_size
Definition: vulkan.h:180
AVVulkanFramesContext
Allocated as AVHWFramesContext.hwctx, used to set pool-specific options.
Definition: hwcontext_vulkan.h:208
FFVkExecPool::query_64bit
int query_64bit
Definition: vulkan.h:266
FFVulkanContext::subgroup_props
VkPhysicalDeviceSubgroupSizeControlProperties subgroup_props
Definition: vulkan.h:288
val
static double val(void *priv, double ch)
Definition: aeval.c:77
FFVulkanContext::frames_ref
AVBufferRef * frames_ref
Definition: vulkan.h:308
FFVulkanContext::atomic_float_feats
VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomic_float_feats
Definition: vulkan.h:299
FFVkExecPool::query_statuses
int query_statuses
Definition: vulkan.h:265
AVHWDeviceContext
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition: hwcontext.h:61
FFVulkanDescriptorSet::binding
VkDescriptorSetLayoutBinding * binding
Definition: vulkan.h:184
FFVulkanDescriptorSetBinding::type
VkDescriptorType type
Definition: vulkan.h:77
ff_vk_exec_get_query
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:449
FFVulkanDescriptorSetData::buf
FFVkBuffer buf
Definition: vulkan.h:236
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
FFVulkanDescriptorSetBinding::samplers
VkSampler samplers[4]
Definition: vulkan.h:85
FFVkExecContext::frame_deps
AVFrame ** frame_deps
Definition: vulkan.h:141
ff_vk_link_struct
static void ff_vk_link_struct(void *chain, const void *in)
Definition: vulkan.h:344
set
static void set(uint8_t *a[], int ch, int index, int ch_count, enum AVSampleFormat f, double v)
Definition: swresample.c:59
ff_vk_host_map_buffer
int ff_vk_host_map_buffer(FFVulkanContext *s, AVBufferRef **dst, uint8_t *src_data, const AVBufferRef *src_buf, VkBufferUsageFlags usage)
Maps a system RAM buffer into a Vulkan buffer.
Definition: vulkan.c:1281
FFVkExecContext::queue_family_dst
uint32_t * queue_family_dst
Definition: vulkan.h:171
FFVulkanDescriptorSetBinding::elems
uint32_t elems
Definition: vulkan.h:82
FFVulkanContext::output_width
int output_width
Definition: vulkan.h:316
ff_vk_shader_update_desc_buffer
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:2742
FFVulkanShader::push_consts
VkPushConstantRange * push_consts
Definition: vulkan.h:217
s
#define s(width, name)
Definition: cbs_vp9.c:198
FFVulkanContext::log_parent
void * log_parent
Definition: vulkan.h:278
FFVulkanContext::driver_props
VkPhysicalDeviceDriverProperties driver_props
Definition: vulkan.h:284
pix_fmt
static enum AVPixelFormat pix_fmt
Definition: demux_decode.c:41
FFVkExecContext::fence
VkFence fence
Definition: vulkan.h:127
ff_vk_free_buf
void ff_vk_free_buf(FFVulkanContext *s, FFVkBuffer *buf)
Definition: vulkan.c:1132
FF_VK_REP_FLOAT
@ FF_VK_REP_FLOAT
Definition: vulkan.h:392
FFVkExecContext::nb_buf_deps
int nb_buf_deps
Definition: vulkan.h:137
FFVulkanShader::stage
VkPipelineStageFlags stage
Definition: vulkan.h:203
ctx
AVFormatContext * ctx
Definition: movenc.c:49
ff_vk_create_buf
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext, void *alloc_pNext, VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags)
Definition: vulkan.c:951
FFVulkanDescriptorSetBinding::mem_layout
const char * mem_layout
Definition: vulkan.h:78
FFVkExecContext::frame_update
uint8_t * frame_update
Definition: vulkan.h:174
FFVkExecContext::query_idx
int query_idx
Definition: vulkan.h:133
FFVkExecPool::query_status_stride
int query_status_stride
Definition: vulkan.h:267
FFVkExecContext::parent
const struct FFVkExecPool * parent
Definition: vulkan.h:114
ff_vk_shader_update_push_const
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:2808
AVVulkanDeviceContext
Main Vulkan context, allocated as AVHWDeviceContext.hwctx.
Definition: hwcontext_vulkan.h:59
FFVulkanShaderData::desc_set_buf
FFVulkanDescriptorSetData * desc_set_buf
Definition: vulkan.h:246
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
FFVkExecContext::sw_frame_deps_alloc_size
unsigned int sw_frame_deps_alloc_size
Definition: vulkan.h:147
FFVkExecContext::sem_sig_val_dst_alloc
unsigned int sem_sig_val_dst_alloc
Definition: vulkan.h:159
NULL
#define NULL
Definition: coverity.c:32
FFVulkanDescriptorSetBinding::buf_elems
uint32_t buf_elems
Definition: vulkan.h:84
ff_vk_create_imageviews
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:1868
FFVkExecContext::access_dst_alloc
unsigned int access_dst_alloc
Definition: vulkan.h:166
FFVulkanDescriptorSet::singular
int singular
Definition: vulkan.h:189
FFVkExecContext::sem_sig_cnt
int sem_sig_cnt
Definition: vulkan.h:156
FFVulkanDescriptorSetBinding::dimensions
uint32_t dimensions
Definition: vulkan.h:81
FFVulkanContext::coop_matrix_props
VkPhysicalDeviceCooperativeMatrixPropertiesKHR coop_matrix_props
Definition: vulkan.h:289
FFVulkanContext::qf_props
VkQueueFamilyProperties2 * qf_props
Definition: vulkan.h:293
hwcontext_vulkan.h
flush
void(* flush)(AVBSFContext *ctx)
Definition: dts2pts.c:370
FFVkExecContext::qi
int qi
Definition: vulkan.h:121
FFVkExecContext::had_submission
int had_submission
Definition: vulkan.h:116
FFVkBuffer::size
size_t size
Definition: vulkan.h:92
FFVkExecPool::nb_queries
int nb_queries
Definition: vulkan.h:268
FFVkBuffer::mapped_mem
uint8_t * mapped_mem
Definition: vulkan.h:101
FFVulkanContext
Definition: vulkan.h:276
FFVulkanShader::nb_descriptor_sets
int nb_descriptor_sets
Definition: vulkan.h:222
FFVulkanShader::bound_buffer_indices
uint32_t * bound_buffer_indices
Definition: vulkan.h:226
ff_vk_init_sampler
int ff_vk_init_sampler(FFVulkanContext *s, VkSampler *sampler, int unnorm_coords, VkFilter filt)
Create a sampler.
Definition: vulkan.c:1399
FFVkExecContext::query_data
void * query_data
Definition: vulkan.h:132
ff_vk_shader_add_push_const
int ff_vk_shader_add_push_const(FFVulkanShader *shd, int offset, int size, VkShaderStageFlagBits stage)
Add/update push constants for execution.
Definition: vulkan.c:1378
ff_vk_exec_wait
void ff_vk_exec_wait(FFVulkanContext *s, FFVkExecContext *e)
Definition: vulkan.c:482
FFVulkanContext::device
AVHWDeviceContext * device
Definition: vulkan.h:304
usage
const char * usage
Definition: floatimg_cmp.c:60
f
f
Definition: af_crystalizer.c:122
FFVkExecContext::layout_dst
VkImageLayout * layout_dst
Definition: vulkan.h:168
ff_vk_get_pooled_buffer
int ff_vk_get_pooled_buffer(FFVulkanContext *ctx, AVBufferPool **buf_pool, AVBufferRef **buf, VkBufferUsageFlags usage, void *create_pNext, size_t size, VkMemoryPropertyFlagBits mem_props)
Initialize a pool and create AVBufferRefs containing FFVkBuffer.
Definition: vulkan.c:1174
FFVkExecContext::queue_family_dst_alloc
unsigned int queue_family_dst_alloc
Definition: vulkan.h:172
FFVulkanDescriptorSetBinding
Definition: vulkan.h:75
ff_vk_exec_start
int ff_vk_exec_start(FFVulkanContext *s, FFVkExecContext *e)
Start/submit/wait an execution.
Definition: vulkan.c:489
FFVulkanShaderData::nb_descriptor_sets
int nb_descriptor_sets
Definition: vulkan.h:243
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
AVVkFrame
Definition: hwcontext_vulkan.h:297
size
int size
Definition: twinvq_data.h:10344
FFVulkanShader::desc_pool_size
VkDescriptorPoolSize * desc_pool_size
Definition: vulkan.h:230
AV_NUM_DATA_POINTERS
#define AV_NUM_DATA_POINTERS
Definition: frame.h:411
FFVkExecContext::nb_frame_deps
int nb_frame_deps
Definition: vulkan.h:143
FFVulkanShader
Definition: vulkan.h:192
ff_vk_create_imageview
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:1816
FFVulkanShader::pipeline_layout
VkPipelineLayout pipeline_layout
Definition: vulkan.h:214
FFVkExecContext::sem_sig_val_dst_cnt
int sem_sig_val_dst_cnt
Definition: vulkan.h:160
FFVulkanContext::output_format
enum AVPixelFormat output_format
Definition: vulkan.h:318
FFVkBuffer::flags
VkMemoryPropertyFlagBits flags
Definition: vulkan.h:91
ff_vk_aspect_flag
VkImageAspectFlags ff_vk_aspect_flag(AVFrame *f, int p)
Get the aspect flag for a plane from an image.
Definition: vulkan.c:1431
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
FFVkExecContext
Definition: vulkan.h:112
FFVulkanDescriptorSetBinding::name
const char * name
Definition: vulkan.h:76
ff_vk_exec_add_dep_buf
int ff_vk_exec_add_dep_buf(FFVulkanContext *s, FFVkExecContext *e, AVBufferRef **deps, int nb_deps, int ref)
Execution dependency management.
Definition: vulkan.c:549
ff_vk_exec_bind_shader
void ff_vk_exec_bind_shader(FFVulkanContext *s, FFVkExecContext *e, FFVulkanShader *shd)
Bind a shader.
Definition: vulkan.c:2818
FFVulkanContext::input_frames_ref
AVBufferRef * input_frames_ref
Definition: vulkan.h:307
FFVkExecContext::sem_wait_cnt
int sem_wait_cnt
Definition: vulkan.h:152
layout
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
Definition: filter_design.txt:18
FFVkExecContext::queue
VkQueue queue
Definition: vulkan.h:119
FFVulkanContext::qfs
uint32_t qfs[64]
Definition: vulkan.h:312
ff_vk_shader_update_img
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:2664
ff_vk_exec_submit
int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
Definition: vulkan.c:834
bprint.h
FF_VK_REP_UINT
@ FF_VK_REP_UINT
Definition: vulkan.h:396
FFVulkanShaderData::desc_pool
VkDescriptorPool desc_pool
Definition: vulkan.h:251
VkFormat
enum VkFormat VkFormat
Definition: hwcontext_stub.c:25
FFVulkanShader::push_consts_num
int push_consts_num
Definition: vulkan.h:218
FFVkExecContext::layout_dst_alloc
unsigned int layout_dst_alloc
Definition: vulkan.h:169
ff_vk_exec_get
FFVkExecContext * ff_vk_exec_get(FFVulkanContext *s, FFVkExecPool *pool)
Retrieve an execution pool.
Definition: vulkan.c:477
ff_vk_mt_is_np_rgb
int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt)
Returns 1 if pixfmt is a usable RGB format.
Definition: vulkan.c:1448
FFVkExecPool::reg_shd
FFVulkanShaderData * reg_shd
Definition: vulkan.h:272
ff_vk_unmap_buffer
static int ff_vk_unmap_buffer(FFVulkanContext *s, FFVkBuffer *buf, int flush)
Definition: vulkan.h:525
FFVkBuffer::mem
VkDeviceMemory mem
Definition: vulkan.h:90
ff_vk_shader_init
int ff_vk_shader_init(FFVulkanContext *s, FFVulkanShader *shd, const char *name, VkPipelineStageFlags stage, const char *extensions[], int nb_extensions, int lg_x, int lg_y, int lg_z, uint32_t required_subgroup_size)
Initialize a shader object, with a specific set of extensions, type+bind, local group size,...
Definition: vulkan.c:1995
ff_vk_qf_find
AVVulkanDeviceQueueFamily * ff_vk_qf_find(FFVulkanContext *s, VkQueueFlagBits dev_family, VkVideoCodecOperationFlagBitsKHR vid_ops)
Chooses an appropriate QF.
Definition: vulkan.c:220
FFVulkanContext::hprops
VkPhysicalDeviceExternalMemoryHostPropertiesEXT hprops
Definition: vulkan.h:286
FFVulkanContext::props
VkPhysicalDeviceProperties2 props
Definition: vulkan.h:282
FFVkExecContext::frame_locked_alloc_size
unsigned int frame_locked_alloc_size
Definition: vulkan.h:163
len
int len
Definition: vorbis_enc_data.h:426
filt
static const int8_t filt[NUMTAPS *2]
Definition: af_earwax.c:40
FFVulkanContext::extensions
FFVulkanExtensions extensions
Definition: vulkan.h:281
FFVulkanContext::nb_qfs
int nb_qfs
Definition: vulkan.h:313
FFVulkanContext::mprops
VkPhysicalDeviceMemoryProperties mprops
Definition: vulkan.h:285
FFVulkanDescriptorSet::binding_offset
VkDeviceSize * binding_offset
Definition: vulkan.h:185
FFVkExecContext::sem_wait_alloc
unsigned int sem_wait_alloc
Definition: vulkan.h:151
AVHWFramesContext
This struct describes a set or pool of "hardware" frames (i.e.
Definition: hwcontext.h:116
ff_vk_shader_update_img_array
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:2729
FFVulkanContext::desc_buf_props
VkPhysicalDeviceDescriptorBufferPropertiesEXT desc_buf_props
Definition: vulkan.h:287
ff_comp_identity_map
const VkComponentMapping ff_comp_identity_map
Definition: vulkan.c:27
FFVulkanShader::name
const char * name
Definition: vulkan.h:194
FFVulkanContext::vkfn
FFVulkanFunctions vkfn
Definition: vulkan.h:280
FFVkExecContext::opaque
void * opaque
Definition: vulkan.h:130
FFVkExecPool
Definition: vulkan.h:254
FFVkExecContext::frame_locked
uint8_t * frame_locked
Definition: vulkan.h:162
FFVkExecPool::query_data
void * query_data
Definition: vulkan.h:263
FFVkExecContext::sem_sig
VkSemaphoreSubmitInfo * sem_sig
Definition: vulkan.h:154
FFVkExecContext::buf
VkCommandBuffer buf
Definition: vulkan.h:124
ff_vk_alloc_mem
int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, VkMemoryPropertyFlagBits req_flags, void *alloc_extension, VkMemoryPropertyFlagBits *mem_flags, VkDeviceMemory *mem)
Memory/buffer/image allocation helpers.
Definition: vulkan.c:900
FFVulkanContext::input_format
enum AVPixelFormat input_format
Definition: vulkan.h:319
FFVulkanShader::desc_set
FFVulkanDescriptorSet * desc_set
Definition: vulkan.h:221
FFVulkanContext::coop_mat_props_nb
uint32_t coop_mat_props_nb
Definition: vulkan.h:297
vulkan_functions.h
ff_vk_exec_update_frame
void ff_vk_exec_update_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f, VkImageMemoryBarrier2 *bar, uint32_t *nb_img_bar)
Definition: vulkan.c:789
FFVulkanContext::video_props
VkQueueFamilyVideoPropertiesKHR * video_props
Definition: vulkan.h:292
FFVulkanShader::object
VkShaderEXT object
Definition: vulkan.h:210
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:117
FFVulkanDescriptorSet::usage
VkBufferUsageFlags usage
Definition: vulkan.h:182
ff_vk_exec_pool_free
void ff_vk_exec_pool_free(FFVulkanContext *s, FFVkExecPool *pool)
Definition: vulkan.c:233
desc
const char * desc
Definition: libsvtav1.c:79
FFVulkanContext::hwctx
AVVulkanDeviceContext * hwctx
Definition: vulkan.h:305
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
FFVkExecPool::cmd_bufs
VkCommandBuffer * cmd_bufs
Definition: vulkan.h:259
FFVulkanContext::feats_12
VkPhysicalDeviceVulkan12Features feats_12
Definition: vulkan.h:300
FFVkExecContext::sw_frame_deps
AVFrame ** sw_frame_deps
Definition: vulkan.h:146
ff_vk_count_images
static int ff_vk_count_images(AVVkFrame *f)
Definition: vulkan.h:322
FFVkBuffer::virtual_offset
size_t virtual_offset
Definition: vulkan.h:106
FFVkExecContext::buf_deps_alloc_size
unsigned int buf_deps_alloc_size
Definition: vulkan.h:138
FFVkExecContext::buf_deps
AVBufferRef ** buf_deps
Definition: vulkan.h:136
FFVkBuffer
Definition: vulkan.h:88
hwcontext.h
AVVulkanDeviceQueueFamily
Definition: hwcontext_vulkan.h:33
FFVkExecPool::qd_size
size_t qd_size
Definition: vulkan.h:269
FFVulkanContext::frames
AVHWFramesContext * frames
Definition: vulkan.h:309
FFVulkanDescriptorSet
Definition: vulkan.h:178
FFVulkanContext::optical_flow_props
VkPhysicalDeviceOpticalFlowPropertiesNV optical_flow_props
Definition: vulkan.h:290
ff_vk_set_perm
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:1469
FFVkExecPool::query_results
int query_results
Definition: vulkan.h:264
FFVkExecContext::sem_sig_val_dst
uint64_t ** sem_sig_val_dst
Definition: vulkan.h:158
FFVulkanContext::query_props
VkQueueFamilyQueryResultStatusPropertiesKHR * query_props
Definition: vulkan.h:291
FFVulkanDescriptorSetBinding::mem_quali
const char * mem_quali
Definition: vulkan.h:79
FFVulkanFunctions
Definition: vulkan_functions.h:265
FFVkExecPool::pool_size
int pool_size
Definition: vulkan.h:260
FFVkExecPool::cmd_buf_pool
VkCommandPool cmd_buf_pool
Definition: vulkan.h:258
FFVulkanContext::coop_mat_props
VkCooperativeMatrixPropertiesKHR * coop_mat_props
Definition: vulkan.h:296
FFVkExecContext::idx
uint32_t idx
Definition: vulkan.h:113
src
#define src
Definition: vp8dsp.c:248
atomic_uint_least64_t
intptr_t atomic_uint_least64_t
Definition: stdatomic.h:69
FFVulkanShader::lg_size
int lg_size[3]
Definition: vulkan.h:200
FFVkExecContext::access_dst
VkAccessFlagBits * access_dst
Definition: vulkan.h:165