GPU: skip empty direct draw calls #2939
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2939
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2939/head"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 00:56 UTC · original
andrewpozdnakov7-jpg:codex1/skip-zero-count-draws→main· +50 −0 · 2 files · 1 commits · closed without mergingA direct
DrawInstancedorDrawIndexedInstancedwith zero vertices, indices, or instances still requests a pending graphics pipeline today. Return before preparation when either count is zero. The list still counts the guest call, and nonempty draws keep requesting their pipeline. This is the direct-graphics counterpart of #2556, and the two branches merge cleanly.The same Windows/WARP test exercises both entry points, with a fresh pending pipeline per case. For each entry point the cases are zero vertices or indices, zero instances, and a nonempty draw.
63bcca43c6a00a758510398fa43096ce7e4f7df01440d8c711364b85914ad0cc7a4c788e9921e7c9The regression failed on main and passed with the patch in all six paired runs. Full WARP GPU suite passed with 247 tests and one ignored under both D3D12 debug settings. Strict GPU Clippy in both configurations and asset policy passed.
Coordination · DrawInstanced · DrawIndexedInstanced
Please retain the Git author if cherry-picking the change. If folding the fix or test into another commit, please include
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with Codex. Synthetic tests only.
@fuzeofficlal on GitHub · 2026-11-26 01:08 UTC · original
Code review and RTX 5090 + WARP verification at head
1440d8c71136merged cleanly ontomain(63bcca43c6a0):crates/victory-gpu/src/draw.rs:1563-1565, 1670-1672):vertices == 0 || instances == 0inState::drawandindices == 0 || instances == 0inState::draw_indexedskipstrace,completes_rectangles(host_pipeline), andprepareso zero-count direct draws never push unused graphics pipelines into on-demand compilation (host.used).Stateand lazily sync against host snapshots on the next non-empty draw, with no state desync or missed resource transitions.VICTORY_D3D12_DEBUG=1, Rust 1.98.1):cargo xtask policy:191 files ok;cargo clippy(default +--features diagnostics): 0 warningsdraw::tests pipeline:: list::: 48/48 passed on RTX 5090 (default) and 51/51 passed on WARP (--features diagnostics), includingzero_count_draws_do_not_request_graphics_pipelines.LGTM.
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 01:12 UTC · original
Closing the duplicate in favor of #2654, which already has the same fix and covers both graphics entry points through the guest list vtable.
Pull request closed