Repository navigation
GPU: read marks of slots forgotten before a submission are cleared before it runs - #2576
BastienRodz wants to merge 1 commit into
Conversation
…fore it runs Since 52d14b1 a heap slot whose texture view is left null (a placed texture written into the heap, or one given up since 69d1e8e) is forgotten (forget_read) so that its next read marks it again and take_reads, after the submission, has its view made. Both happen before the submission runs (sync_heaps, evict_unused), but the forgotten marks were only cleared inside take_reads, after it ran: the mark a shader of that very submission had just set was wiped with them. The slot was made only after a later submission read it again (another frame of a null view), or never if nothing read it again. The marks of slots forgotten since the last submission are now cleared just before the next one runs (clear_forgotten_reads); take_reads still clears those forgotten while it ran. Co-Authored-By: Gemini 4 Neon <noreply@google.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
I also counted slot indices forgotten immediately before a submission and returned by Tested with OpenAI Codex assistance. |
|
oni-swr verification — head Environment: Windows 11 Pro (26200), rustc 1.98.1, WARP only ( Commands / results
Review: the logic matches #2574: forgotten marks (from Overlap: #2574 is the issue this fixes; no other open PR addresses it. #2472, #2545, #2540, #2474, #2559 and #2573 also touch AI disclosure: this review and verification were done by Claude Code (Claude Sonnet 5.5), not a human reviewer. Comment-only; no code changed. |
|
Setup: RTX 3080 Ti (driver 621.24), Windows 11, a local stack of open PRs merged with main 67e8ae1. Applied cleanly on that stack, together with #2601, #2598, #2611, #2626. One 10-minute game run reached gameplay with no device removal. These five PRs were not tested one by one, so nothing in that run is attributed to this PR alone. Written with Claude Code; tested locally. |
|
Automated triage for the maintainers. Merge candidate. This fixes #2574. Read marks of slots forgotten by CI: Generated by Claude Code |
What's wrong
HostHeap::mirror(a placed texture view left null until read) andHostHeap::evict(a texture given up) callshadow::forget_read(slot)so the slot's next read marks it again. Both run before the submission executes, insidesync_heapsandevict_unusedinHost::execute. The forgotten marks were cleared only insidetake_reads, after the submission. That wiped the mark a shader of that very submission had just set, so the slot was not made until a later submission read it again: at least one more frame with a null view, or forever if it was read only once. The behaviour comes from 52d14b1, and since 69d1e8e it also follows every eviction.What the fix does
shadow::clear_forgotten_reads()clears the marks (bitmaps andseen) of slots forgotten since the last submission.Host::executecalls it just beforeExecuteCommandLists, afterevict_unusedandsync_heaps.take_readsstill clears slots forgotten while the submission ran, such as a title thread rewriting a slot meanwhile.read_marksandclear_forgotten. The marks are unchanged otherwise.Tests
New
host::tests::forgotten_slot_read_in_the_next_submission_is_made:Results:
main(67e8ae1) it fails:made after its first read.host::tests,shadow::tests(8) anddescriptor::host::tests. The exception isdynamic_slots_are_held_until_released, which also fails onmainunder vkd3d-proton (its heap cap is belowHEAP_VIEWS). Run under Wine 10 with vkd3d-proton 3.1 on llvmpipe; without a host device the test returns early.Not tested
No title run, and no AMD/NVIDIA GPU. How many slots a frame loses this way is not measured.
Fixes #2574
AI-assisted (Gemini 4 Neon found and wrote it, Claude Code reviewed, simplified and verified it). No game data used.
🤖 Generated with Claude Code