mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-06-02 21:23:49 -04:00
beginSingleTimeCommands was calling vkAllocateCommandBuffers and pairing it with vkFreeCommandBuffers in endSingleTimeCommands — one allocate/ free round-trip every immediate submit. The M2 frustum-cull dispatch fires this every frame in beginFrame(), so that's two kernel calls per frame just to obtain and release a command buffer. The immediate pool already has RESET_COMMAND_BUFFER_BIT set, so cache one buffer and reset it on each begin instead. The pool destruction in shutdown reclaims the underlying allocation automatically.