FFmpeg
vulkan_spirv.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 AVFILTER_VULKAN_SPIRV_H
20 #define AVFILTER_VULKAN_SPIRV_H
21 
22 #include "libavutil/vulkan.h"
23 
24 #include "vulkan.h"
25 #include "config.h"
26 
27 typedef struct FFVkSPIRVCompiler {
28  void *priv;
29  int (*compile_shader)(struct FFVkSPIRVCompiler *ctx, void *avctx,
30  struct FFVkSPIRVShader *shd, uint8_t **data,
31  size_t *size, const char *entrypoint, void **opaque);
32  void (*free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque);
33  void (*uninit)(struct FFVkSPIRVCompiler **ctx);
35 
36 #if CONFIG_LIBGLSLANG
38 #define ff_vk_spirv_init ff_vk_glslang_init
39 #endif
40 #if CONFIG_LIBSHADERC
42 #define ff_vk_spirv_init ff_vk_shaderc_init
43 #endif
44 
45 #endif /* AVFILTER_VULKAN_H */
vulkan.h
data
const char data[16]
Definition: mxf.c:148
FFVkSPIRVCompiler::uninit
void(* uninit)(struct FFVkSPIRVCompiler **ctx)
Definition: vulkan_spirv.h:33
ctx
AVFormatContext * ctx
Definition: movenc.c:48
FFVkSPIRVCompiler::compile_shader
int(* compile_shader)(struct FFVkSPIRVCompiler *ctx, void *avctx, struct FFVkSPIRVShader *shd, uint8_t **data, size_t *size, const char *entrypoint, void **opaque)
Definition: vulkan_spirv.h:29
FFVkSPIRVCompiler::priv
void * priv
Definition: vulkan_spirv.h:28
ff_vk_shaderc_init
FFVkSPIRVCompiler * ff_vk_shaderc_init(void)
Definition: vulkan_shaderc.c:109
size
int size
Definition: twinvq_data.h:10344
FFVkSPIRVCompiler
Definition: vulkan_spirv.h:27
vulkan.h
FFVkSPIRVCompiler::free_shader
void(* free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque)
Definition: vulkan_spirv.h:32
FFVkSPIRVShader
Definition: vulkan.h:75
int
int
Definition: ffmpeg_filter.c:409
ff_vk_glslang_init
FFVkSPIRVCompiler * ff_vk_glslang_init(void)
Definition: vulkan_glslang.c:263