Why traditional descriptor set binding is a bottleneck in modern graphics engines:
In legacy Vulkan, drawing a mesh with 20 different materials required updating and rebinding descriptor sets (vkCmdBindDescriptorSets) between draw calls, stalling the CPU-GPU pipeline.
Bindless Descriptor Indexing:
- Array of all 10,000 textures in the game bound to a single unbounded descriptor array:
layout(binding = 0) uniform sampler2D textures[];. - Vertex / Material data passes an integer texture index (
uint textureId). - Shaders sample dynamically:
vec4 color = texture(textures[nonuniformEXT(mat.textureId)], uv);.
Reduces 1,000 draw call state changes down to a single batched multi-draw indirect command!