title: Why multiple vertex buffer bindings should be consecutive?
body: <p>I created a couple of vertex buffers and bindings for them:</p>
  
  <pre><code>VkVertexInputBindingDescription binding1{0, stride1, VK_VERTEX_INPUT_RATE_VERTEX};
  VkVertexInputBindingDescription binding2{1, stride2, VK_VERTEX_INPUT_RATE_VERTEX};
  </code></pre>
  
  <p>Here you can see the consecutive 0 and 1 binding indices.</p>
  
  <p>Next I record a command buffer:</p>
  
  <pre><code>vkCmdBindVertexBuffers(commandBuffer, 0, 1, &amp;buffer1, &amp;offset);
  vkCmdBindVertexBuffers(commandBuffer, 1, 1, &amp;buffer2, &amp;offset);
  </code></pre>
  
  <p>It can be done in one call, I know, but stay with me.</p>
  
  <p>Now I'm trying non-consecutive bindings:</p>
  
  <pre><code>VkVertexInputBindingDescription binding1{0, stride1, VK_VERTEX_INPUT_RATE_VERTEX};
  VkVertexInputBindingDescription binding2{2, stride2, VK_VERTEX_INPUT_RATE_VERTEX};
  
  vkCmdBindVertexBuffers(commandBuffer, 0, 1, &amp;buffer1, &amp;offset);
  vkCmdBindVertexBuffers(commandBuffer, 2, 1, &amp;buffer2, &amp;offset);
  </code></pre>
  
  <p>Notice 0 and 2 non-consecutive binding indices.</p>
  
  <p>The rendered model is indeed correct in both cases but in the second case I'm getting <code>validation layer: Cannot submit cmd buffer using deleted buffer 0x0.</code> warning. Why?</p>