27 if (batch_ !=
batch) {
34 const VKIndexBuffer *index_buffer = batch_->index_buffer_get();
35 const bool is_indexed = index_buffer !=
nullptr;
42 const bool new_buffer_needed = command_index_ == 0;
44 VkDrawIndexedIndirectCommand &command = get_command<VkDrawIndexedIndirectCommand>(*buffer);
48 command.firstInstance = instance_first;
49 command.instanceCount = instance_count;
52 const VKVertexBuffer *vertex_buffer = batch_->vertex_buffer_get(0);
54 if (vertex_buffer ==
nullptr || vertex_buffer->
vertex_len == 0) {
58 const bool new_buffer_needed = command_index_ == 0;
60 VkDrawIndirectCommand &command = get_command<VkDrawIndirectCommand>(*buffer);
61 command.vertexCount = vertex_buffer->
vertex_len;
62 command.instanceCount = instance_count;
63 command.firstVertex = 0;
64 command.firstInstance = instance_first;
69 if (command_index_ == length_) {
76 if (batch_ ==
nullptr || command_index_ == 0) {
82 const VKIndexBuffer *index_buffer = batch_->index_buffer_get();
83 const bool is_indexed = index_buffer !=
nullptr;
85 batch_->multi_draw_indirect(buffer.
vk_handle(),
88 is_indexed ?
sizeof(VkDrawIndexedIndirectCommand) :
89 sizeof(VkDrawIndirectCommand));