fix(gpu): recheck uncommitted blocks before skipping writes #514
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!514
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/514/head"
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?
@jeremygold02 on GitHub · 2026-11-24 04:21 UTC · original
jeremygold02:codex/watch-sparse-region-refresh→main· +207 −13 · 1 files · 2 commits · closed without mergingDependency and scope
This follow-up is stacked on #464 at
41af42e. The additional change is the single commit8540a0e. It keeps the sparse-memory copy optimization and fixes two ways it can miss ordinary writes.#185 also exercises a partially committed range in its broader shadow-copy implementation. This patch targets the
Guards::absentcache introduced by #464 and inherited by #490.After a failed attempt to guard a 64 KiB block, #464 queries its first address. A section can have a reserved first page and a committed, writable 4 KiB page farther into that same block. Marking the entire block absent makes a later write to the committed page invisible to the journal. An ordinary page commit after the first refresh can also go unnoticed if it does not go through the runtime's physical-view remap hook.
The change requires the queried uncommitted region to cover the entire block. Before skipping a previously absent block, the next refresh rechecks the region. Adjacent absent blocks use the same query result for that pass. A failed query or partial coverage leaves the block eligible to be reported dirty.
Windows verification
0x19and0x27. After the guest wrote0xA6and0xB7, submission throughHost::executeleft both mapped D3D12 shadows at their seed values on #464. With this commit both host shadows contained the new bytes. The synthetic submissions contained no draws or dispatches.host.rson #464 and on this branch.The focused test command is
cargo test -p victory-gpu --lib watch::tests:: -- --test-threads=1.@desplmfao on GitHub · 2026-11-24 04:36 UTC · original
Ran this in the world on NVIDIA / Linux, in case that helps (it was tested on Windows only).
RTX 5080, CachyOS, proton-cachyos (vkd3d-proton 3.2.0), Series X 1.0.2.1, diagnostics build of
maind2a4bae+ this (with #464) + #515, #185, #436, #462, #440, #493 (+#336), #259, #177, #151, story mode byVICTORY_KEYS. One run, 7.5 min, about 6 min in the world: no GPU fault or hang, nothing incrashes.log, no visible corruption beyond what this stack already has (most draws are still dropped here). Unwatched whole copies per world frame were 1–81 MB, down from 0.1–0.8 GB with #464 alone in the same stack, though #515's second commit changed in the same step, so that is not this PR's effect alone.AI-assisted (Claude Code); numbers from the run's log.
@Raxstreams on GitHub · 2026-11-24 05:00 UTC · original
Tested the partly committed view-block change in a Windows integration build alongside #515. All nine watch tests passed, including writes_in_partly_committed_view_blocks_are_reported and unmapped_blocks_are_reported_once_until_mapped. I have no isolated frame-time measurement for this patch.
@neonbyte1 on GitHub · 2026-11-24 16:29 UTC · original
Measured on Linux: RTX 5090 (620.73.04), Wine 11.22 with the wineserver view-tree patch from #340, vkd3d-proton from GE-Proton11-14. Prologue, about 3,100 draws per frame; medians over about 55 world summary lines per run.
Base:
main@ffe310eplus #190, #217, #347, #322, #454, #493, #579, #177, #259 and #542.After: the same base plus this PR (which includes #464), #388, and #1217. #1217 only fixes how
copiesis timed.saturating_addfix intitle_memory_remappedneeds a three-line conflict resolution inwatch.rs: keepat.saturating_add(len)in the newrange.watch::tests pass under Wine, including the new partly-committed-view and unmapped-block ones.AI-assisted (Claude Code).
Pull request closed