How to enable feature from descriptor indexing extension?

In my fragment shader I want to use non uniform integer to index textures. I discovered that it’s actually possible with the VK_EXT_descriptor_indexing extension and shaderSampledImageArrayNonUniformIndexing feature. I think I enabled it correctly by defining all required extensions and passing VkPhysicalDeviceDescriptorIndexingFeaturesEXT with shaderSampledImageArrayNonUniformIndexing set to true to VkDeviceCreateInfo. However, it’s still doesn’t work because I can see that my textures are not sampled correctly. I think I have to do something in my GLSL source (enable extension maybe ?) but I don’t know what. Extensions and feature is available on my device according to caps viewer.

Yes, you need SPV_EXT_descriptor_indexing SPIR-V extension, which means GL_EXT_nonuniform_qualifier in GLSL. Then you probably need to qualify the variables as the extension says.

PS: the related SPIR-V and OGL extensions should always be mentioned in the Vulkan extension appendix in the specification for convenience.