- vk.CmdDrawIndexed(pass_buffer, batch.size(), count, first_index, 0, 0);
+ vkCmd.DrawIndexed(batch.size(), count, first_index, 0, 0);
+}
+
+void VulkanCommands::dispatch(unsigned count_x, unsigned count_y, unsigned count_z)
+{
+ if(!pipeline_state)
+ throw invalid_operation("VulkanCommands::draw_instanced");
+
+ if(framebuffer)
+ end_render_pass();
+
+ VulkanCommandRecorder vkCmd(device.get_functions(), primary_buffer);
+
+ pipeline_state->refresh();
+ pipeline_state->synchronize_resources();
+ device.get_synchronizer().barrier(vkCmd);
+ pipeline_state->apply(vkCmd, 0, frame_index, false);
+ vkCmd.Dispatch(count_x, count_y, count_z);