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 AVUTIL_VULKAN_SPIRV_H
20 #define AVUTIL_VULKAN_SPIRV_H
21 
22 #include "vulkan.h"
23 
24 #include "config.h"
25 
26 typedef struct FFVkSPIRVCompiler {
27  void *priv;
29  FFVulkanShader *shd, uint8_t **data,
30  size_t *size, const char *entrypoint, void **opaque);
31  void (*free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque);
32  void (*uninit)(struct FFVkSPIRVCompiler **ctx);
34 
35 #if CONFIG_LIBGLSLANG
37 #define ff_vk_spirv_init ff_vk_glslang_init
38 #endif
39 #if CONFIG_LIBSHADERC
41 #define ff_vk_spirv_init ff_vk_shaderc_init
42 #endif
43 
44 #endif /* AVUTIL_VULKAN_H */
data
const char data[16]
Definition: mxf.c:149
FFVkSPIRVCompiler::uninit
void(* uninit)(struct FFVkSPIRVCompiler **ctx)
Definition: vulkan_spirv.h:32
s
#define s(width, name)
Definition: cbs_vp9.c:198
ctx
AVFormatContext * ctx
Definition: movenc.c:49
FFVkSPIRVCompiler::priv
void * priv
Definition: vulkan_spirv.h:27
ff_vk_shaderc_init
FFVkSPIRVCompiler * ff_vk_shaderc_init(void)
Definition: vulkan_shaderc.c:129
ff_vk_glslang_init
FFVkSPIRVCompiler * ff_vk_glslang_init(void)
Definition: vulkan_glslang.c:288
FFVulkanContext
Definition: vulkan.h:268
vulkan.h
size
int size
Definition: twinvq_data.h:10344
FFVulkanShader
Definition: vulkan.h:184
FFVkSPIRVCompiler::compile_shader
int(* compile_shader)(FFVulkanContext *s, struct FFVkSPIRVCompiler *ctx, FFVulkanShader *shd, uint8_t **data, size_t *size, const char *entrypoint, void **opaque)
Definition: vulkan_spirv.h:28
FFVkSPIRVCompiler
Definition: vulkan_spirv.h:26
FFVkSPIRVCompiler::free_shader
void(* free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque)
Definition: vulkan_spirv.h:31