Repository navigation
GPU: keep CPU descriptor slots until recording consumes them - #2844
andrewpozdnakov7-jpg wants to merge 2 commits into
Conversation
kotekompotek
left a comment
There was a problem hiding this comment.
Right lifetime fix — a bare CPU handle from the RTV/DSV ring can be recycled by another view before OMSetRenderTargets records it; holding the View guard in scope through the call closes that. The MAX_TARGETS cap also handles >8 target sets gracefully now. Heads-up: this changes the same rtv()/dsv() signatures as #2834 (Option there vs Option here) — whichever lands second needs the other's shape.
|
Independent synthetic Windows WARP check for
AI-assisted with Codex (gpt-6.2-sol). Claude Code (claude-opus-5-5) prepared the initial WARP guard and comparison worktrees. Synthetic data only. |
|
Verified
|
|
I checked the signature overlap with #2834. The verified fork composition includes exact heads The resolution checks the format's attachment permission before reserving a slot. Valid views keep the The two-texture RTV regression, the unsupported attachment format regression, and both depth-bounds tests passed together. Full Windows/WARP GPU diagnostics passed (250 passed, 1 ignored), along with strict GPU Clippy with and without diagnostics and asset policy. If the combination is taken, please keep the original Git authors. If our change is folded into another commit, please add: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com |
|
Automated triage for the maintainers. Merge candidate. Thanks for merging CI: passing. Generated by Claude Code |
|
I merged current The plain merge failed The tested #2834 composition has the same fixture adjustment. Its attachment-guard resolution is available for the merge order the maintainers choose. Please retain the Git author if you move the fix, or include this trailer if you fold in the patch or regression: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com AI-assisted with Codex. |
Dukestar69
left a comment
There was a problem hiding this comment.
Verified on RTX 5090 against origin/main (63bcca4):
cargo test -p victory-gpu --lib descriptor:: -- --test-threads=1 --skip dynamic_slots_are_held_until_released: 21/21 passed.cargo test -p victory-gpu --lib draw:: -- --test-threads=1: 20/20 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Cleanly keeps CPU descriptor slots alive until command-list recording consumes them.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
fuzeofficlal
left a comment
There was a problem hiding this comment.
Verified 48ae0960 locally on Windows 11 (RTX 5090 and WARP, with VICTORY_D3D12_DEBUG=1):
cargo xtask policyandcargo clippy -p victory-gpu --tests -- -D warnings(default and--all-features): clean.host::tests::pending_rtv_survives_other_recorders(--features diagnostics),draw::tests(20/20),pipeline::depth_bounds_test(2/2), andqueue::tests(5/5) all passed on RTX 5090, RTX 5090 +VICTORY_D3D12_DEBUG=1, and WARP +VICTORY_D3D12_DEBUG=1.- Also checked the >1024 pool-exhaustion standalone heap fallback directly (holding 1,030 live RTVs, recording
ClearRenderTargetViewwith a standalone fallback descriptor, and verifying all 1,024 pooled slots return on drop) underVICTORY_D3D12_DEBUG=1on both RTX 5090 and WARP.
Lifetimes are held cleanly across every recording site (set_targets, clear_unordered, clear_rtv, clear_dsv, and tests), set_targets properly caps at D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT and only records self.targets/self.depth once the view is created, and clear_unordered acquires cpu_view before taking a dynamic slot. Looks ready to merge.
CPU-only descriptors are read when the command list records the bind or clear. The global descriptor rings can wrap between creating a view and recording it, so another recording thread can substitute a different texture into the pending command.
Keep a slot reserved until its recording call returns. Render-target binds hold each slot through
OMSetRenderTargets. Render-target, depth, and unordered-access clears hold their CPU descriptor through the clear call. If all pooled slots are busy, a short-lived CPU-only heap lets recording continue.The same two-texture WARP scenario on
5c7489fleaves the left pixel black and clears the right pixel red. With this change the left pixel is red and the right pixel stays blue. Six paired runs across both D3D12 debug settings. The full serial GPU suite passed 242 tests with one ignored in each setting. Strict GPU Clippy in both feature configurations and asset policy passed.CPU descriptor recording specification · Coordination claim
Please retain my Git author on cherry-pick or rebase. If you fold the fix or test into another commit, please add this trailer.
Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com
AI-assisted with Codex. Synthetic textures on Windows/WARP.