Plan dependent GPU fills behind placed copies #344
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/TaynanGT--Vice-Tay!344
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-344"
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?
@TaynanGT on GitHub · 2026-11-27 18:34 UTC · original
TaynanGT:perf/placed-fill-dependencies→main· +1191 −88 · 6 files · 7 commits · merged 2026-11-27 18:42 UTCReuse the card-step plan while pending writes and the placed-copy mode still match. Use the recorded source of an earlier placed copy when it covers a GPU fill. If the first plan leaves another eligible fill behind, retry with that fill included. The regular wait still handles pending CPU readers and changes to the mapping.
Enable the path with
VICTORY_PLACED_FILL_REDIRECT=1andVICTORY_PLACED_ORDER=1.This builds on Petr Seifert's work in #322 and #285. Windows workspace tests, both Clippy configurations, and the D3D12 copy test passed. The GPU test completed 48 of 48 copies on the card.
A local RTX 4090 comparison used the Series S profile, 4K output, DLSS Quality, and 2× frame generation. Across two 15-second windows per mode, rendered FPS rose from 14.83 to 16.52. The median of the two frame-time medians fell from 66.5 ms to 58.2 ms.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-27 18:34 UTC · original · edited 2026-11-27 18:38 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
15aaa8415aaa84ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-27 18:38 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
15aaa8413eℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -378,0 +533,4 @@return Some((i, i));}if source_pending || touches(written, dst, dst + len) {pending.push((i, (dst, dst + len)));@chatgpt-codex-connector[bot] on GitHub · 2026-11-27 18:38 UTC · original
With fill redirection enabled, a chain of card-sourced placed copies can leave a CPU fill reading stale bytes. For example, let flights write
[100,116)and[200,204), followed by a placed copy100→200of 16 bytes, a redirected fill of[200,204), a placed copy204→400of 4 bytes, and a fill of[400,404). The planner accepts this sequence and leaves the last fill on the CPU: only the first copy is added topending, and card-sourced copies are not treated as CPU readers. However,Step::Placedpreparation inhost.rsconsiders the second copy free against the flight ranges, so itsprepare(true)copies the still-stale title bytes at 204 into 400 before the final fill reads them. The previous planner refused the first redirected fill and waited instead. Propagate pending destinations through subsequent placed copies, or refuse this dependency chain before accepting the plan.Useful? React with 👍 / 👎.
@ -321,0 +392,4 @@!does.iter().enumerate().any(|(k, step)| match *step {Does::Copy { dst: cd, len: cl, .. } => meet((cd, cd + cl), from),Does::Placed { dst: pd, len: pl, .. } if k < p => meet((pd, pd + pl), from),Does::GpuWrite { from: gf, to: gt } if k < p => meet((gf, gt), from),@chatgpt-codex-connector[bot] on GitHub · 2026-11-27 18:38 UTC · original
When a shader before the placed copy writes its source through a dynamically picked UAV, this check can incorrectly declare the source clean and redirect a later fill to its pre-dispatch contents. These writes do not necessarily produce
Step::GpuWrite:draw.rs:1861–1862recordspicked::runs_in(list), which only sets a list-use key, and the known picked-write ranges are declared submission-wide bypicked::declareinhost.rs:7449, after card-step planning. Thus, with picked writes and fill redirection enabled, an earlier dispatch can update a previously shader-written source buffer, the placed copy correctly copies that updated GPU value, but its redirected fill reads the old value in the front list. The old planner refused this dependent fill rather than hoisting it. Include picked-write hazards in the planner, or conservatively refuse redirection when an earlier picked-view shader could modify the source or intervening destination.Useful? React with 👍 / 👎.