summaryrefslogtreecommitdiff
path: root/libavutil/vulkan.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2021-11-19 13:45:21 +0100
committerLynne <dev@lynne.ee>2021-11-19 16:47:30 +0100
commitda72aca7b02503cdcdacd915dcf11929d29eecd1 (patch)
tree52a61164903e33c56d2d6701cda10909dc2c3bfd /libavutil/vulkan.c
parent1d06084171604038ccae2d8a0a9c8fa99229ee52 (diff)
downloadffmpeg-da72aca7b02503cdcdacd915dcf11929d29eecd1.tar.gz
lavu/vulkan: add support for using libshaderc as a GLSL compiler
It's got a much better API that's actually maintained, it eliminates race conditions, it comes with a pkg-config file by default, and unfortunately isn't currently packaged by Debian or other large distributions.
Diffstat (limited to 'libavutil/vulkan.c')
-rw-r--r--libavutil/vulkan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 3a70afe6a5..a6463de622 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -23,6 +23,8 @@
#if CONFIG_LIBGLSLANG
#include "vulkan_glslang.c"
+#elif CONFIG_LIBSHADERC
+#include "vulkan_shaderc.c"
#endif
/* Generic macro for creating contexts which need to keep their addresses
@@ -859,6 +861,8 @@ int ff_vk_compile_shader(FFVulkanContext *s, FFVkSPIRVShader *shd,
if (!s->spirv_compiler) {
#if CONFIG_LIBGLSLANG
s->spirv_compiler = ff_vk_glslang_init();
+#elif CONFIG_LIBSHADERC
+ s->spirv_compiler = ff_vk_shaderc_init();
#else
return AVERROR(ENOSYS);
#endif