GPU: a mesh dispatch with an empty dimension runs nothing #2012
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2014"
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?
Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-25T03:07:15Z.
Summary
Split from #24, as the triage there suggested: only the direct
DispatchMeshfix.Evidence
No game files used; untested against the game. New test
mesh_dispatches_run_x_groups_unless_empty:(5,1,1) → 5;(0,1,1),(5,0,1),(5,1,0) → none;(5,2,3) → 5;(5,MAX,MAX) → 5with no overflow.cargo test -p victory-gpu --lib: 142 passed, 2 failed (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views, which fail on main too). Changed lines are rustfmt-clean.Merge Danger
Door: two-way
Blast Radius: small. Only a
DispatchMeshwith a zero dimension changes (it no longer draws).🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T03:33:13Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Mesh dispatch with an empty dimension runs nothing — degenerate-dispatch guard; cheap correctness fix.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T03:20:46Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
10be798.victory-gpu: 142 passed, 2 failed, 2 ignored; the newmesh_dispatches_run_x_groups_unless_emptypasses. The 2 are #1744's NVIDIA failures onmain(dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, the heap-cap ones). Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:18:18Z.
Automated triage for the maintainers.
Merge candidate. In
crates/victory-gpu/src/list.rs,state::dispatch_meshnow drops aDispatchMeshthat has a zero dimension, as the D3D12 API does. Before, it ranxgroups even whenyorzwas 0. It also replaces they * z != 1check, which overflowsu32and panics in a debug build (inside anextern "system"function), with separate checks onyandz. The warning for y or z above 1 is unchanged,DispatchMeshXis untouched, and the new puremesh_groupshas a test for the edge cases. This is the part split out of #24 at triage's request, and I found no other open PR touching this function.Recommending a look, not approving.
CI:
checkpassing.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:35:17Z.
Code review and RTX 5090 + WARP verification at head
10be798007f2merged cleanly ontomain(63bcca43c6a0):crates/victory-gpu/src/list.rs:1508-1527):mesh_groups(x, y, z)returnsNonewhen any dimension is0and replacesy * z != 1withy != 1 || z != 1(also eliminatingu32overflow in debug builds, verified bymesh_groups(5, u32::MAX, u32::MAX) == Some(5)).with_state/host_pipeline/DispatchMeshcleanly leaves lazyStatecoherent for subsequent draws. Minor non-blocking note:dispatch_mesh_x(list.rs:1528) does not share thisx == 0early-out yet (easy follow-up if desired).VICTORY_D3D12_DEBUG=1, Rust 1.98.1):cargo xtask policy:191 files ok;cargo clippy -p victory-gpu --all-targets -- -D warnings(default +--features diagnostics): 0 warningsdraw::tests pipeline:: list:: --test-threads 1): 48/48 passed; WARP (--features diagnostics, same filter): 51/51 passed.LGTM.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.