PR #24664 opened by Kacper Michajłow (kasper93) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24664 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24664.patch
From ca5c497727b34af0a86f8c6c97e6d01af10bce0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Thu, 24 Sep 2026 11:23:51 +0200 Subject: [PATCH] avcodec/vulkan_video: fix compilation when glslc is not available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d49fcd7f82 moved seg_gather.comp.spv.o to CONFIG_VULKAN, so every build with Vulkan enabled now compiles GLSL, and one without a GLSL compiler fails with "glslc: command not found". Vulkan itself does not need a GLSL compiler. Signed-off-by: Kacper Michajłow <[email protected]> --- configure | 8 +++++--- libavcodec/vulkan/Makefile | 2 +- libavcodec/vulkan_video.c | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 1ececff721..516a7c84c1 100755 --- a/configure +++ b/configure @@ -2800,6 +2800,7 @@ CONFIG_EXTRA=" vp3dsp vp8dsp vulkan_encode + vulkan_seg_gather vvc_sei wma_freqs wmv2dsp @@ -3102,7 +3103,7 @@ apng_encoder_select="deflate_wrapper llvidencdsp" aptx_encoder_select="audio_frame_queue" aptx_hd_encoder_select="audio_frame_queue" apv_decoder_select="cbs_apv" -apv_vulkan_encoder_select="vulkan spirv_compiler cbs_apv" +apv_vulkan_encoder_select="vulkan spirv_compiler cbs_apv vulkan_seg_gather" asv1_decoder_select="blockdsp bswapdsp idctdsp" asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp" asv2_decoder_select="blockdsp bswapdsp idctdsp" @@ -3140,7 +3141,7 @@ exr_decoder_select="bswapdsp" exr_encoder_deps="zlib" ffv1_decoder_select="rangecoder" ffv1_encoder_select="rangecoder" -ffv1_vulkan_encoder_select="vulkan spirv_compiler" +ffv1_vulkan_encoder_select="vulkan spirv_compiler vulkan_seg_gather" ffvhuff_decoder_select="huffyuv_decoder" ffvhuff_encoder_select="huffyuv_encoder" fic_decoder_select="golomb" @@ -3249,7 +3250,7 @@ prores_decoder_select="blockdsp idctdsp" prores_encoder_select="fdctdsp" prores_aw_encoder_select="fdctdsp" prores_ks_encoder_select="fdctdsp" -prores_ks_vulkan_encoder_select="vulkan spirv_compiler" +prores_ks_vulkan_encoder_select="vulkan spirv_compiler vulkan_seg_gather" prores_raw_decoder_select="blockdsp idctdsp" qcelp_decoder_select="lsp" qdm2_decoder_select="mpegaudiodsp" @@ -3538,6 +3539,7 @@ qsvvpp_select="qsv" vaapi_encode_deps="vaapi" vulkan_1_4_deps="vulkan" vulkan_encode_deps="vulkan" +vulkan_seg_gather_deps="vulkan spirv_compiler" v4l2_m2m_deps="linux_videodev2_h sem_timedwait" bilateral_cuda_filter_deps="ffnvcodec" diff --git a/libavcodec/vulkan/Makefile b/libavcodec/vulkan/Makefile index a2ff2a4d6d..6b97605e08 100644 --- a/libavcodec/vulkan/Makefile +++ b/libavcodec/vulkan/Makefile @@ -4,7 +4,7 @@ clean:: OBJS-$(CONFIG_APV_VULKAN_HWACCEL) += vulkan/apv_decode.comp.spv.o \ vulkan/apv_idct.comp.spv.o -OBJS-$(CONFIG_VULKAN) += vulkan/seg_gather.comp.spv.o +OBJS-$(CONFIG_VULKAN_SEG_GATHER) += vulkan/seg_gather.comp.spv.o OBJS-$(CONFIG_APV_VULKAN_ENCODER) += vulkan/apv_encode_dct.comp.spv.o \ vulkan/apv_encode_tiles.comp.spv.o diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c index 1a52401d1c..597372fd83 100644 --- a/libavcodec/vulkan_video.c +++ b/libavcodec/vulkan_video.c @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "libavutil/mem.h" #include "encode.h" #include "vulkan_video.h" @@ -545,6 +546,7 @@ fail: return err; } +#if CONFIG_VULKAN_SEG_GATHER typedef struct SegGatherPushData { VkDeviceAddress sparse; VkDeviceAddress compacted; @@ -633,6 +635,7 @@ int ff_vk_seg_gather(FFVulkanContext *s, FFVkExecContext *exec, FFVulkanShader * fail: return err; } +#endif /* CONFIG_VULKAN_SEG_GATHER */ int ff_vk_encode_loop_init(FFVulkanContext *s, FFVkExecPool *pool, FFVkEncodeLoop *l, int (*submit_frame)(AVCodecContext *avctx, FFVkExecContext *exec, AVFrame *frame), -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
