Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2021-11-19 14:07:10 +0300
committerLynne <dev@lynne.ee>2021-11-19 15:44:47 +0300
commitb2aec70bd6bbf4620d363dfdc7d9e54f2f32f9ee (patch)
tree1762efe01831e0e0d9804c1d551c739b3bb58bbf /libavutil/vulkan.h
parentd1133e8c44f457f0698c48f2efcedbd8626b3cee (diff)
lavu/vulkan: add option to switch between shader compilers and cleanup glslang
Diffstat (limited to 'libavutil/vulkan.h')
-rw-r--r--libavutil/vulkan.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
index 14c69ce015..3d89f02732 100644
--- a/libavutil/vulkan.h
+++ b/libavutil/vulkan.h
@@ -22,6 +22,10 @@
#define VK_NO_PROTOTYPES
#define VK_ENABLE_BETA_EXTENSIONS
+#ifndef FF_VK_ENABLE_SHADER_COMPILATION
+#define FF_VK_ENABLE_SHADER_COMPILATION 1
+#endif
+
#include "pixdesc.h"
#include "bprint.h"
#include "hwcontext.h"
@@ -64,6 +68,15 @@ typedef struct FFVkSPIRVShader {
VkPipelineShaderStageCreateInfo shader;
} FFVkSPIRVShader;
+typedef struct FFVkSPIRVCompiler {
+ void *priv;
+ int (*compile_shader)(struct FFVkSPIRVCompiler *ctx, void *avctx,
+ struct FFVkSPIRVShader *shd, uint8_t **data,
+ size_t *size, const char *entrypoint, void **opaque);
+ void (*free_shader)(struct FFVkSPIRVCompiler *ctx, void **opaque);
+ void (*uninit)(struct FFVkSPIRVCompiler **ctx);
+} FFVkSPIRVCompiler;
+
typedef struct FFVkSampler {
VkSampler sampler[4];
} FFVkSampler;
@@ -194,6 +207,8 @@ typedef struct FFVulkanContext {
AVHWFramesContext *frames;
AVVulkanFramesContext *hwfc;
+ FFVkSPIRVCompiler *spirv_compiler;
+
/* Properties */
int output_width;
int output_height;