mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-18 13:17:05 -04:00
destroyInstanceBones loops over both frame slots (i=0,1), deferring both boneSet[0] and boneSet[1] to the current frame's fence. When currentFrame=0, boneSet[1] is freed after only slot 0's fence completes while slot 1's command buffer may still be using it. Switch both M2Renderer and CharacterRenderer bone destruction from deferAfterFrameFence to deferAfterAllFrameFences to ensure all in-flight frames have completed before freeing cross-slot resources.