Limitation with descriptor indexing?

I set up descriptor indexing (for images and samplers), all works fine.
Now I’m trying to support Ycbcr formats and it’s… not possible?

Ycbcr formats such as VK_FORMAT_B8G8R8G8_422_UNORM need a combined sampler image and the sampler must be set in pImmutableSamplers in VkDescriptorSetLayoutBinding. At least that’s what the validation layers tell. But then I can’t late bind any combined image / samplers anymore.

Am I missing something?

Immutable samplers are permanently bound to descriptor set layouts. Once assembled at creation time, you can not update it.

Well isn’t that a coincidence. Khronos just released a talk from Sergey Kosarevsky that talks about exactly this problem. https://youtu.be/onn4GLtEXoA?si=2aTi20mlc1mMjk-M

His solution is to use a specialized constant to index into the bindless array.

You’d still need an immutable sampler… So a dedicated array for each sampler configuration. And the id must be known at pipeline creation time.

I opted for an additional non bindless draw call, that does the conversion.