fix(rendering): defer character renderer bone descriptor destruction

CharacterRenderer::destroyInstanceBones had the same immediate-free bug
as M2Renderer — freeing bone descriptor sets and buffers while in-flight
command buffers still reference them. Applies the same deferred pattern
via deferAfterFrameFence for the removeInstance streaming path.
This commit is contained in:
Kelsi 2026-04-03 18:53:06 -07:00
parent 345b41b810
commit e19bf76d88
2 changed files with 31 additions and 13 deletions

View file

@ -209,7 +209,7 @@ private:
glm::mat4 getBoneTransform(const pipeline::M2Bone& bone, float time, int sequenceIndex);
glm::mat4 getModelMatrix(const CharacterInstance& instance) const;
void destroyModelGPU(M2ModelGPU& gpuModel);
void destroyInstanceBones(CharacterInstance& inst);
void destroyInstanceBones(CharacterInstance& inst, bool defer = false);
// Keyframe interpolation helpers
static int findKeyframeIndex(const std::vector<uint32_t>& timestamps, float time);