Keep texture refresh notifications through streaming bursts #895
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by gomeaw on 2026-11-25T12:08:21Z.
Problem
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.
Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-26T22:59:40Z.
I re-ran the burst case on current main
52ac4ec. The unpatched test lost the earliest change. With this PR applied on the same Bazzite 44 and GE-Proton11-14 setup, the physical RTX 5060 Laptop test kept the earlier range and made the already-uploaded view due again through both remaps and completed writes. The disjoint-coverage and compaction-headroom tests also passed.Updated source-only review branch at
f918253a348dea41af2214689a91ee36687e290f. It includes #1357's existing test-file split for the inherited asset-policy size failures and preserves the newer completed-write diagnostics. Windows-target GPU Clippy with warnings denied and the full asset policy passed. Review branchAssisted by Codex (GPT-6.2-Sol High).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.