Publish the remap cursor when a texture heap is created #547
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!547
Loading…
Reference in a new issue
No description provided.
Delete branch "holoslicer/Darner:fix/publish-texture-remap-cursor"
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?
Refs #539 and #542.
Contributor role (optional)
Fluxer ID
1577921940104949761. Please grant the Contributor role when this merges.What it changes
A new texture heap starts its remap cursor at the latest write. On upstream main this read leaves older entries eligible for extension or compaction. A later write can therefore put a pre-existing span under a new sequence number. A heap watching the narrow write sees extra slots from that older span.
Publish the initial cursor under the existing journal lock. Older heaps can still consume their pending ranges. The test covers a broad range written before the heap exists, a later narrow write and the same broad range recorded after the heap exists. Separate coverage checks that an older heap can still see its pending writes and that a stale completion cannot cancel a newer upload.
How it was tested
Upstream baseline
c8258f9. Tested revision0ea931e9. Windows x64 and RTX 3090, driver 617.42.Run
cargo test --locked -p darner-gpu --lib a_full_texture_queue_only_replays_remaps_after_its_heap_was_createdandcargo test --locked -p darner-gpu --lib publishing_a_remap_cursor_preserves_pending_ranges_for_older_heaps. Both pass on the fix. The first fixture uses an isolated journal so the input order is repeatable.Native A/B used the existing full-queue alias test and a synthetic predecessor heap. Register two live mapped views, submit overlapping remaps through
remapped_rangesbefore creating the test heap, and perform its two narrow writes with 8,192 unrelated uploads waiting. Upstream and this change each ran in three fresh processes. On upstream, all three first-page reads selected slot 2 with 8,194 pending and matched 0/1,024 pixels. On this revision, all three selected slot 0 then slot 1 with 8,193 pending each time. Both pages matched 1,024/1,024 pixels and left 8,192 uploads queued. The neighbouring slot kept its original write generation.In a separate model check, the production journal was compared with an independent bitset of writes since each subscriber's cursor. Three consumers, 512 seeds at each of five queue limits (1, 2, 4, 8, 32), 409,600 total operations. Each input stream was identical between revisions.
Verification on this revision used both strict workspace Clippy commands (default features and all features), cargo xtask policy, and the full serial cargo test --workspace --locked --offline --no-fail-fast suite with --config profile.test.package.darner-shader.opt-level=3. All exited 0. Top-level harness totals were 3,521 passed, 0 failed and 121 ignored. The synthetic regression and the ordinary two-page GPU readback both passed in the full suite.
With the default settings, every new heap observes the publication boundary. No configuration change. Shader and gameplay performance were outside this test. The earlier suite failure lacked a trace identifying its original journal input.
Checklist
Checked for overlap
WIP: [pr-fix][rendering][memory] Publish the remap cursor when a texture heap is createdto [pr-fix][rendering][memory] Publish the remap cursor when a texture heap is createdTested merged onto
c8258f95(release), head0ea931e9. RTX 3090 24 GB, driver 621.24, i5-10600K, 32 GB, Windows 11.One unattended run, 60 s in the world: exit code 0, no device removed, no new kind of WARN or ERROR line compared with
main.Note: #547 and #563 seem to make the same fix (the remap cursor is published when
HostHeap::newsets it up). I tested both and saw no difference between them in this run. Only one of them is probably needed.AI-assisted testing (Claude Code, Claude Opus 5.5); results and text reviewed by me.
[pr-fix][rendering][memory] Publish the remap cursor when a texture heap is createdto Publish the remap cursor when a texture heap is createdView 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.