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-08 11:31:05 +0300
committerLynne <dev@lynne.ee>2021-11-12 07:23:41 +0300
commit246f841b53e16f2cccf3101cb61c264014f54e5c (patch)
tree6850f70277522b919b3b14d7b312e8bf960a4cac /libavfilter/vulkan.h
parentfef85c376adabc15715ed8d9c53cc8e889c9c7dc (diff)
lavfi/glslang: migrate to the C API and robustify library detection
Finally, this is as close to usable as it gets for glslang. Much faster to compile as well, and eliminates the need for a C++ compiler, which is great. Also, changes to the resource limits won't break users, as we can use designated initializers in C90.
Diffstat (limited to 'libavfilter/vulkan.h')
-rw-r--r--libavfilter/vulkan.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/libavfilter/vulkan.h b/libavfilter/vulkan.h
index da5936dd43..89b76ba355 100644
--- a/libavfilter/vulkan.h
+++ b/libavfilter/vulkan.h
@@ -55,12 +55,12 @@
/* Useful for attaching immutable samplers to arrays */
#define DUP_SAMPLER_ARRAY4(x) (VkSampler []){ x, x, x, x, }
-typedef struct SPIRVShader {
+typedef struct FFSPIRVShader {
const char *name; /* Name for id/debugging purposes */
AVBPrint src;
int local_size[3]; /* Compute shader workgroup sizes */
VkPipelineShaderStageCreateInfo shader;
-} SPIRVShader;
+} FFSPIRVShader;
typedef struct VulkanDescriptorSetBinding {
const char *name;
@@ -89,7 +89,7 @@ typedef struct VulkanPipeline {
VkPipeline pipeline;
/* Shaders */
- SPIRVShader **shaders;
+ FFSPIRVShader **shaders;
int shaders_num;
/* Push consts */
@@ -249,29 +249,34 @@ VulkanPipeline *ff_vk_create_pipeline(AVFilterContext *avctx);
/**
* Inits a shader for a specific pipeline. Will be auto-freed on uninit.
*/
-SPIRVShader *ff_vk_init_shader(AVFilterContext *avctx, VulkanPipeline *pl,
- const char *name, VkShaderStageFlags stage);
+FFSPIRVShader *ff_vk_init_shader(AVFilterContext *avctx, VulkanPipeline *pl,
+ const char *name, VkShaderStageFlags stage);
/**
* Writes the workgroup size for a shader.
*/
-void ff_vk_set_compute_shader_sizes(AVFilterContext *avctx, SPIRVShader *shd,
+void ff_vk_set_compute_shader_sizes(AVFilterContext *avctx, FFSPIRVShader *shd,
int local_size[3]);
/**
* Adds a descriptor set to the shader and registers them in the pipeline.
*/
int ff_vk_add_descriptor_set(AVFilterContext *avctx, VulkanPipeline *pl,
- SPIRVShader *shd, VulkanDescriptorSetBinding *desc,
+ FFSPIRVShader *shd, VulkanDescriptorSetBinding *desc,
int num, int only_print_to_shader);
/**
* Compiles the shader, entrypoint must be set to "main".
*/
-int ff_vk_compile_shader(AVFilterContext *avctx, SPIRVShader *shd,
+int ff_vk_compile_shader(AVFilterContext *avctx, FFSPIRVShader *shd,
const char *entrypoint);
/**
+ * Pretty print shader, mainly used by shader compilers.
+ */
+void ff_vk_print_shader(AVFilterContext *avctx, FFSPIRVShader *shd, int prio);
+
+/**
* Initializes the pipeline layout after all shaders and descriptor sets have
* been finished.
*/