Repository navigation
GPU: skip empty command list submissions - #1268
EatCodeSleep2 wants to merge 1 commit into
Conversation
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 00c6c96 on Windows 11, RTX 5070, MSVC:
cargo test -p victory-gpupasses on the head (51 passed, 1 ignored).- Merged into our fork: workspace tests, shader tests and
clippy -D warnings(default and all features) are all clean.
The change is right. execute waits for every submission it makes while holding submitted, so the old empty call only signalled and waited on a fence with nothing behind it. Nothing ordered after it depended on that. The guest entry point's count == 0 return matches the existing lists.is_null() return. The new test pins both fence values.
AI-assisted (Claude Code).
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sak#928 Integrated: Marvisak#1476 (MD5 round constants precomputed, stack buffer instead of a per-block Vec), Marvisak#1590 (XMA frame counting follows the selected packet chain), Marvisak#1635 (an indirect call with no host pipeline is dropped before the argument refresh, so nothing transitions a buffer nothing will read), Marvisak#988 (a fault past the end of its title-memory copy now says how far past), and Marvisak#928 (GetDeviceRemovedReason reports the host's real state). Marvisak#1634 was merged earlier and then reverted: it hardcoded S_OK, which asserts a live device even when the host's was removed. Marvisak#928 is the same slot wired to the host, and its author had closed Marvisak#1634 in its favour. Duplicates confirmed: Marvisak#1268, Marvisak#522, Marvisak#528, Marvisak#1494, Marvisak#1636 (whose test this branch adds; the code was already right). Obsolete: Marvisak#1523. Gate at b976f7f: fmt 0 differing, both Clippy gates 0 errors, policy 219 files, workspace 678 passed / 0 failed with the 10 documented GPU skips.
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1424. Same early return for an empty host submission as #1424, plus a count == 0 check in the queue entry that the host-side check already covers. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
The limit counts the compressed bytes of requests in flight (nothing is allocated for it) and is the console's 32 MiB as the title asks. With the switch it is at least that many MiB: more requests of a busy queue read at once. Unset, nothing changes. fxceless/victory-fork issue Marvisak#1268 ran with 256 for loading, together with other changes, so the switch is there to measure its own share. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the card's memory, VICTORY_CARD_HASH_LEN hashes only their own bytes (opt-in; after fxceless, avatarmanz) After fxceless' c36971b (the shadow.rs part) and avatarmanz's 17c4717, reimplemented on our card copies. In the 4080 recipe of fork Marvisak#1268 the step to 64 KiB (with VICTORY_CARD_BUFFERS_MB=2048) took 25.7 to 32.0 fps; fxceless measured the title's lists 68.0 to 49.8 ms of card time a frame. - VICTORY_CARD_BUFFERS_MIN_KB=<KiB> (unset: as before, the least from VICTORY_CARD_BUFFERS_MIN_MB and never under 1 MiB): the least title buffer whose host copy goes to the card's memory, in KiB, so that it can go under 1 MiB; 64 is every title buffer (a copy is rounded up to 64 KiB). Copies under 1 MiB are nearly all there are, and in the PC's memory every load, store and atomic a shader does on them crosses the bus. - VICTORY_CARD_HASH_LEN: the card's hash and compare passes walk the title buffer's own bytes, rounded up to 16, instead of the copy's whole 64 KiB-rounded buffer (4,096 steps for a 288-byte buffer where 18 hold all that can go back). =1 on, =0 off; unset, on with MIN_KB and off without it. The hash after a send-up and the compare after the lists use the same length; the in-flight fetch is unchanged (pieces fetched are cut to the title buffer anyway). - Logs: one line with the limits when MIN_KB is set; a card copy under 1 MiB is said for the first 32 and every 256th, with the running count and bytes (the line for bigger copies is unchanged). Both unset: the same limits and passes as before, and the same log lines. Not ported: avatarmanz's VICTORY_FETCH_CHECK (017fb0b, +1,688 lines). It repairs a race of their VICTORY_RELAY_COPY, fetches beside later submissions, which this tree does not have; our nearest equivalent is VICTORY_QUEUE2 bit 1 with VICTORY_QUEUE2_REFETCH (on by default there). Fork Marvisak#1268 reports ~18 one-frame black-shard flashes a minute with MIN_KB=64 without that check on their tree: to watch for here. Tests: the KiB value's parsing, the hash-length switch's resolution and the bytes hashed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4bpLmErkufJL3LGgfR561
Summary
Refs #1249, finding VIC-BT-035.
Verification
A synthetic D3D12 test reproduced the empty submission advancing the fence from 0 to 1 on main. With this change an empty batch leaves it at 0, and submitting one closed list advances it to 1.
cargo test --locked -p victory-gpu --lib(51 passed, 1 ignored)cargo test --locked -p victory-gpu --lib --features diagnostics(54 passed, 1 ignored)VICTORY_D3D12_WARP=1cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warningsAI-assisted. Only synthetic command lists were used.