I have 10 samplers as an uniform array in a fragment shader. When rendering, I only used 3 of them. So the descriptor set layout and descriptor set only have 3 combined image samplers. That's why I am getting this validation layer warning:
validation layer: Shader expects at least 10 descriptors for binding 0.1 but only 3 provided
Is there any way to get rid of this other than changing
layout(set = 0, binding = 1) uniform sampler2D lightTextureArray[10];
to
layout(set = 0, binding = 1) uniform sampler2D lightTextureArray[3];
If I fill up remaining descriptors with default image info (use null handle for view and sampler), the validation layer will complain about invalid combined image sampler/view or something like that. The only way I can think of now is to repeat the existing descriptors. Is there any other way to get around this? What is the standard way to solve this problem?