Conversation
asundqui
force-pushed
the
fix-lod-dirty-stall
branch
from
September 24, 2026 17:36
564d412 to
9c5c839
Compare
- SparkRenderer: move callback body to driveLodExclusive; finally requests a render if lodDirty, lodInitQueue or queued pager data remain - Harness: settle() requestRender/ignorePendingLod options, waitUntil options object - Tests: budget change during callback (lod), chunk landing during callback (paged-lod) - ci-browser: also run on push to fix-lod-dirty-stall
asundqui
force-pushed
the
fix-lod-dirty-stall
branch
from
September 25, 2026 17:44
9c5c839 to
804c9bc
Compare
Contributor
Author
|
Rebased after merge of #452 . All tests including browser tests successful. |
Contributor
|
needs rebase |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on top of #452 , #451 , and #449 and fixes issue labeled D3 from earlier draft PR #428 . The last commit in this PR is stacked on top. Once the previous PRs are merged I'll rebase this onto main before merging. The delta can be seen here: asundqui/spark@fix-paged-late-chunks-add-spark-hooks...fix-lod-dirty-stall
Two new browser tests were added, which both fail before the fixes in the PR and succeed with these changes:
lod.test.ts: "applies a LoD budget change made while the LoD callback is busy": changes the LoD splat budget while the LoD callback is busy and makes sure it automatically drives the update and shows the new splat budgetpaged-lod.test.ts: "pages in a chunk that landed while the LoD callback was busy": paged LoD chunk arrives while the LoD callback is busy and makes sure it automatically drives the update and renders the fetched splatsBoth tests use the
lod.beforeCleanuphook introduced in the last PR.In order to run these tests deterministically we add two options to
Harness.settle():requestRender(default true): Fire off a render request to begin with before waiting to settleignorePendingLod(default false): Ignore theSparkRenderer.lodDirtyflag andSplatPager.hasQueued()signals while waiting to settle. By setting this totruewe allow the above new test runner to "settle" even though the LoD state says it's pending, which the bug causes.Without the fix, if the update happened while the LoD callback was busy,
setDirtywouldn't be called, and the LoD stalls until something triggers a re-render anddriveLod. Without theignorePendingLodoption, our tests would timeout after 60s, which is a viable test. However, by ignoring the pendingLod we can make the tests finish quickly and see that it never updated from the screenshot.The fix is to check if there are LoD updates pending after finishing the exclusive LoD worker, and fire off another render loop if so:
CI Browser test result with new tests at test nr. 6+12: https://github.com/asundqui/spark/actions/runs/35942654087