Repository navigation
GPU: release descriptor tables after a rejected bind - #1126
EatCodeSleep2 wants to merge 1 commit into
Conversation
|
Grepping the reviews for this one turns up nothing yet, so here is one with the failure reproduced both ways. Reviewed on Windows 11 / Rust 1.98.1, The leak is real and the test proves it. With That is The shape is better than the flag it replaces. Nothing else needs rolling back, and it is worth saying so in the function. I went looking for the second half of the leak and there is not one: the constant data for an abandoned fresh table goes through Two things I would change in the test, both about surviving machines that are not this one.
Minor. |
|
The authored reservation test also passed under Wine/GE 3.2 on an RTX 4090. The checkpoint sits before the stage loop, so if a later stage runs out of room, the bind returns the ranges acquired since that checkpoint and preserves the cached table from the earlier accepted bind. One qualification to the earlier review: |
|
Reviewed and tested rejected descriptor reservation rollback on RTX 5090 and WARP (
Reference commit with synthetic SM 6.6 GPU readback + multi-stage/post-bind regression tests: fuzeofficlal@4fd6e2c |
DoubleD17
left a comment
There was a problem hiding this comment.
On bb65bc3, the rollback makes the descriptor slots reusable. A populated slot can still hold its ID3D12Resource reference after rollback and command-list reset. HostHeap::make_at stores that reference in kept, and HostHeap::release clears only the occupancy bits. The heap can therefore retain the reference until the slot is rewritten or the heap is destroyed. This behavior is also present on ffe310e. The empty-slot fixture checks reservation recovery and leaves resource lifetime untested. This is a source inspection. I did not measure runtime memory impact.
AI-assisted.
|
@EatCodeSleep2 The composition with #562 kept your original commit. In a capped 65,536-slot fixture, 16 and 178 slots fit before a 256-slot request rejected the bind. The rollback returned all 194 slots, restored the prior CBV version and accepted a retry after the blocker was removed. The reservation and separate mixed replay checks passed on AMD, NVIDIA and WARP with GBV. |
|
Following up on #911 and the descriptor rollback implemented here, I found a potentially related but distinct preparation-side effect. During The current #1126 diff releases descriptor reservations but does not remove these declarations. I prepared an experimental opt-in census measuring rejected write declarations per submission, including:
The diagnostic patch preserves baseline behavior. The interval analysis passed nine Python tests, including 20,000 synthetic submissions and 240,183 range declarations, with no discrepancies against an independent oracle. Native compilation and end-to-end bind validation remain pending. #1322 may mitigate the stale-data consequence on the synchronous path, but the unnecessary write declarations and their potential bookkeeping costs are a separate question. I suggest measuring their actual frequency before extending the rollback. |
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
|
@EatCodeSleep2, in case it saves you the rebase the triage asked for: your commit on today's It is not a mechanical rebase, so here is what changed:
On an RTX 5080 (driver 32.0.16.1742), the test passes, and it fails with the rollback turned off ( In the world, which the description lists as unmeasured. The base is
Fewer drops in the first minutes, and about the same after five; one run each. On this card most of the drops come from the 2^16 dynamic slots of the capped heap running out (#747), which this change does not touch. AI-assisted. |
|
Merge note: the offered rebase ( Checked by cherry-picking AI-assisted (Claude Code). |
Summary
Refs #911. This addresses the partial reservation described there. The frequency and performance impact during gameplay remain unmeasured.
Verification
cargo test --locked -p victory-gpu --lib --features diagnostics -- --quiet(54 passed, 1 ignored)VICTORY_D3D12_WARP=1. Disabling rollback reproduced the retained table on native D3D12.cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warningsAI-assisted. Synthetic inputs only.