Repository navigation
GPU: skip pipeline demand for empty direct draws - #2654
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
|
Reviewed: early-out on |
|
Independent verification of head Environment: Windows 11 Pro 10.0.26100, WARP (d3d10warp 10.0.26100.9818) only, rustc/cargo 1.98.1 (per rust-toolchain.toml), DXC 1.8.2502.11 / dxil.dll 1.8.2502.11 (Windows SDK 10.0.26100.0 x64).
AI disclosure: independent verification by Claude Code / Claude Sonnet 5.5, run for a user; no game files, dumps or hashes involved. |
|
Automated triage for the maintainers. Merge candidate. Generated by Claude Code |
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090):
cargo test -p victory-gpu --lib pipeline::make::tests: 3 passed, 0 failed (including newempty_draws_do_not_request_graphics_pipelines).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
fuzeofficlal
left a comment
There was a problem hiding this comment.
Reviewed and verified 5a603b00 merged locally onto origin/main (63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 and WARP, Rust 1.98.1 MSVC, Windows SDK 10.0.26100.0 dxil.dll; synthetic tests only, no game files).
Verification
git merge-treeagainstorigin/main(63bcca43) and combined with#2696: clean.cargo xtask policy(PR head):184 files ok.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--all-features, both PR head and merged): 0 warnings.- RTX 5090 (merged, default):
cargo test --locked -p victory-gpu --lib -- pipeline::make::tests draw::tests— 23 passed, 0 failed (includingempty_draws_do_not_request_graphics_pipelines). - RTX 5090 (
VICTORY_D3D12_DEBUG=1,--features diagnostics): 24 passed, 0 failed. - WARP (
VICTORY_D3D12_WARP=1,VICTORY_D3D12_DEBUG=1,--features diagnostics): 24 passed, 0 failed. - Combined
#2654 + #2696on63bcca43(RTX 5090): Clippy clean in both feature modes;pipeline::tests,pipeline::make::tests, anddraw::tests— 27 passed, 0 failed.
Review Notes
- Early-returning in
State::draw(crates/victory-gpu/src/draw.rs:1486-1496) andState::draw_indexed(crates/victory-gpu/src/draw.rs:1592-1603) when the vertex/index or instance count is zero is a strict D3D12 no-op. Skipping beforeself.prepareavoids queuing host PSO work or burning pipeline wait budget while leavingdraw::Stateuntouched for subsequent non-empty draws. - The guest-vtable regression test in
crates/victory-gpu/src/pipeline/make.rs:340-401cleanly covers all four zero-count combinations plus both non-empty controls.
Looks good to merge.
Direct DrawInstanced and DrawIndexedInstanced with no vertices, indices or instances still request a host PSO. That can queue work and consume pipeline wait budget before the next draw. Return before preparing state for these empty calls. This covers the two graphics entry points. The related compute change is #2556.
The same WARP test calls the normal VIctory list vtable with a fresh pending pipeline for each case. On 13f91ca, all four empty cases mark the pipeline as used. On 5a603b0, none marks it. The nonempty instanced and indexed controls still request their pipelines. Six alternating A/B runs covered both D3D12 debug flag settings.
The serial victory-gpu suite passed with 199 passed and 1 ignored in each setting. Strict GPU Clippy in both modes and repository policy passed. Local merge checks with #2556, #2624 and the offered #1254 rebase were clean. AI-assisted. Synthetic tests only.
Coordination claim
Please preserve the Git author when reapplying the change. If you fold the code or test into another commit, please add this trailer.
Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com
Current main retest
The original guest-vtable test on
63bcca43c6a00a758510398fa43096ce7e4f7df0requests a pipeline for all four empty cases. The same test with5a603b00b1343bea8188de74bfb7a5521161b9b3merged locally into that base requests none of them. Both nonempty controls request a pipeline. Six paired WARP runs, full GPU suite with 247 passed and one ignored under both D3D12 debug settings, strict GPU Clippy, and asset policy passed.