Keep texture refresh notifications through streaming bursts #896
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!896
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-896"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@gomeaw on GitHub · 2026-11-25 12:08 UTC · original
gomeaw:fix/keep-texture-changes→main· +186 −41 · 2 files · 3 commits · openProblem
A bindless texture that has finished uploading relies on mapping and storage-write notifications to become due again. When either notification buffer reached 32,768 entries, the next nonadjacent notification cleared every earlier entry. A texture could keep its old upload even after the layer had recorded a change to its memory.
Change
Merge touching and overlapping ranges before looking up affected slots. When the buffer fills, reclaim at least 4,096 entries before appending the next notification. If merging overlaps is insufficient, join just enough neighboring pairs to make room. This preserves coverage and avoids repeatedly sorting the full buffer under the producer lock when merging overlaps would free only one or two entries. The texture pass may check additional slots in those gaps. Diagnostics count the gaps joined at capacity.
Verification
0b0074e. The original code loses the earliest notification. With the patch, the already-uploaded slot becomes due again through both the remap and completed-write paths. The tests also check coverage across 65,536 disjoint changes and verify that a nearly disjoint queue leaves room after compaction. All 22 descriptor tests passed. Windows comparisonIssue #821 shows why a completed-write notification can matter to an already-uploaded texture. #606 handles a remap of a staged texture, and #221 and #733 optimize the later selection of due uploads. This PR covers the earlier loss of notifications at capacity. The frequency of that overflow in gameplay and the effect on frames remain unmeasured.
AI-assisted with Codex. All test and benchmark inputs were synthetic.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.