Extend extended loader to avoid state leakage across asset parses#32
Extend extended loader to avoid state leakage across asset parses#32
Conversation
|
Please add a release note line to NEW_RELEASE_NOTES.md. If this PR does not warrant a release note, add the 'internal' label to this PR. |
There was a problem hiding this comment.
Pull request overview
Fixes a state-lifetime issue in the extended glTF loader where per-parse buffer/decode bookkeeping could leak across multiple asset parses performed by the same AssetLoader, causing later loads to incorrectly skip required work.
Changes:
- Introduce per-parse bookkeeping in
AssetLoaderExtendedand reset it via a newbeginAssetLoad()method. - Replace the previous single boolean “buffers loaded” flag with a set-based tracker and ensure failed loads don’t poison subsequent retries.
- Invoke
beginAssetLoad()fromFAssetLoader::createInstancedAssetbefore starting a fresh parse.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| libs/gltfio/src/extended/AssetLoaderExtended.h | Adds beginAssetLoad() and new per-parse tracking container for buffer-load bookkeeping. |
| libs/gltfio/src/extended/AssetLoaderExtended.cpp | Gates loadCgltfBuffers + meshopt decode behind the new per-parse tracking. |
| libs/gltfio/src/AssetLoader.cpp | Resets extended-loader per-parse state before creating a new asset from parsed cgltf data. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eed9496 to
e6c4a70
Compare
Co-authored-by: George Jone <g.george.jone@gmail.com>
https://fieldwire.atlassian.net/browse/ME-6870
Resets extended-loader parse state so later asset parses do not reuse stale loaded-state.
This updates the extended loader to clear the loaded-state for buffer/decode work before a new asset parse begins, while still preserving the intended once-per-asset behavior within a single parse. The goal is to prevent later asset loads on the same loader from incorrectly skipping required work because state from an earlier parse was left behind.
This change is limited to the extended-loader state lifetime issue. It does not add Android-side multi-model integration, sample or harness support, or broader federated BIM behavior. It also does not change placement, framing, picking, transforms, or app lifecycle handling.
update: previously was using a set to track load. current implementation just keeps the boolean and resets it on each new asset
Screenshots
N/A
Testing Notes
What did you do to test this PR?
test_gltfio; the new repeated-parse test passedgltf_viewerharness-only changes outside this PR