mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
fix(editor): remove per-model upload waits, single batch flush
Log showed: models=2, instances=3, draws=0 — models loaded and instances created but zero draw calls. The M2 renderer skips instances where cachedIsValid is false, which depends on the GPU vertex buffer being valid after upload. The per-model waitAllUploads/pollUploadBatches calls inside the loading loop may have corrupted the upload batch context (started at beginUploadBatch but flushed mid-loop). Now all models upload in a single batch with one final waitAllUploads+pollUploadBatches at the end of rebuildObjects.
This commit is contained in:
parent
c077ee2cee
commit
c9c4a15e9a
1 changed files with 0 additions and 6 deletions
|
|
@ -215,8 +215,6 @@ void EditorViewport::rebuildObjects(const std::vector<PlacedObject>& objects,
|
|||
LOG_WARNING("M2 failed to upload to GPU: ", obj.path);
|
||||
continue;
|
||||
}
|
||||
vkCtx_->waitAllUploads();
|
||||
vkCtx_->pollUploadBatches();
|
||||
LOG_INFO("M2 loaded: ", obj.path, " (modelId=", modelId, ", ",
|
||||
model.vertices.size(), " verts)");
|
||||
m2ModelIds[obj.path] = modelId;
|
||||
|
|
@ -262,8 +260,6 @@ void EditorViewport::rebuildObjects(const std::vector<PlacedObject>& objects,
|
|||
LOG_WARNING("WMO failed to upload to GPU: ", obj.path);
|
||||
continue;
|
||||
}
|
||||
vkCtx_->waitAllUploads();
|
||||
vkCtx_->pollUploadBatches();
|
||||
LOG_INFO("WMO loaded: ", obj.path, " (modelId=", modelId, ", ",
|
||||
model.groups.size(), " groups)");
|
||||
wmoModelIds[obj.path] = modelId;
|
||||
|
|
@ -370,8 +366,6 @@ void EditorViewport::rebuildObjects(const std::vector<PlacedObject>& objects,
|
|||
model.batches.size(), "b)");
|
||||
continue;
|
||||
}
|
||||
vkCtx_->waitAllUploads();
|
||||
vkCtx_->pollUploadBatches();
|
||||
m2ModelIds[npc.modelPath] = modelId;
|
||||
}
|
||||
glm::vec3 rotRad = glm::radians(glm::vec3(0, 0, npc.orientation));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue