Commit a6d188384c for ffmpeg
commit a6d188384c38d0e979f024ef47f6345d9a254d93
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Wed Nov 18 17:19:30 2026 +0000
avfilter/chromaber_vulkan: restore immutable sampler binding
The compile-time SPIR-V conversion dropped the input descriptor's sampler
initialization. ff_vk_shader_add_descriptor_set() passes the embedded
samplers array as pImmutableSamplers, so leaving it zero-initialized
supplies invalid VkSampler handles to vkCreateDescriptorSetLayout().
Restore the existing sampler for every input plane. This fixes the
first-frame crash and VUID-VkDescriptorSetLayoutBinding-descriptorType-00282
on both lavapipe and NVIDIA.
Fixes: 8483de2858aa12f7c0d8274634da3e51bb2793da
Fixes: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/26112
Assisted-by: Fairy
diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c
index 934aab0ee3..4dd4fa1d87 100644
--- a/libavfilter/vf_chromaber_vulkan.c
+++ b/libavfilter/vf_chromaber_vulkan.c
@@ -75,6 +75,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
const FFVulkanDescriptorSetBinding desc[] = {
{ /* input_img */
.type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
+ .samplers = DUP_SAMPLER(s->sampler),
.stages = VK_SHADER_STAGE_COMPUTE_BIT,
.elems = planes,
},