victory-shader: support line-topology mesh shaders #1712
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!1712
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1712"
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?
@tjthebigbearcat-hub on GitHub · 2026-11-24 21:05 UTC · original
tjthebigbearcat-hub:fix/second-pr→main· +231 −21 · 2 files · 1 commits · openSummary
Adds support for line-output mesh shaders (
topology = 1) alongside triangles (topology = 2) invictory-shader:emit/lower.rswithemit_primitiveto unpack two vertex indices (bits 0 and 10) for lines—leaving the third DXILemitIndicesindexundef—while preserving primitive culling (bit 31 and unexported primitives).0,3, etc.) cleanly refused with clearer diagnostic messages.emit/mod.rsmodule docs to reflect line and triangle mesh shader support.Verification (Windows 11 + SDK
dxil.dll10.0.26100 + WARP)emit/mod.rs(zero game bytes; verified withxtaskasset-policy check):mesh_programs_draw_lines_or_triangles: validates line and triangle programs (normal and culled) againstdxil.dll 10.0.26100and verifiesPSV0topology output, while confirming topologies0and3are refused.mesh_lines_light_one_texel_row: executes a line mesh pipeline on WARP (D3D12), verifying 15 lit texels along row 8 and 0 lit texels when culled (verified failure when bit-unpacking offset was mutated).cargo test --workspace --locked: all crates pass, 0 failures.cargo clippy --workspace --all-targets --locked -- -D warnings: 0 warnings.@steven-seagull27 on GitHub · 2026-11-24 21:42 UTC · original
Tested PR head
57c2560on an RTX 5080 (driver 621.24) and built-in Windows WARP. Both lit exactly the same 15 pixels on row 8, columns 0–14 inclusive, on the 16 × 16 target. With the cull bit set, both lit 0 of 256 pixels.The full RGBA readbacks matched bit for bit between adapters on both draws. Both original mesh tests also passed on the clean PR head.
@kais7654 on GitHub · 2026-11-24 22:35 UTC · original
Reviewed and verified at runtime (Windows): the six mesh tests pass,
including the draw one — the line lit exactly texel row 8 on both the
hardware device and WARP, the culled export lit nothing, and the
translated modules' PSV0 carries the right topology byte. Topologies
other than lines and triangles stay refused with the new message.
One coordination note: this and #1718 touch the same mask line in
emit_indices (10-bit here, 9-bit plus edge flags there) — whoever
merges second needs a trivial rebase of that one line.
@DeerSilver on GitHub · 2026-11-24 23:06 UTC · original
Setup: one laptop with an NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell,
10de:2d59, driver 621.24) and an Intel UHD Graphics (Raptor Lake Xe-LP,8086:a788, driver 32.0.101.7088), Windows 11 26300, Rust 1.98.1. The PR was merged ontomain70564ae.cargo test --workspace --all-features --locked --no-fail-fast -- --test-threads=1with the D3D12 debug layer on (VICTORY_D3D12_DEBUG=1, and a local, uncommitted change that also turns the debug layer on in victory-shader's testHost): 477 passed, 5 failed, 7 ignored. The 5 failures are the onesmain70564aehas by itself on NVIDIA (the view-heap cap and the structured-view stride, already reported in #1744); this PR adds none. No new debug-layer messages compared withmain.cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: cleanmesh_lines_light_one_texel_rowgives the same result on both devices:hardware: the line lit 15 texels of row 8on the RTX, and the same on WARP.mesh_programs_draw_lines_or_trianglespasses.No game data used. AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 01:34 UTC · original · edited 2026-11-25 06:25 UTC
Automated triage for the maintainers.
Merge candidate. This lets mesh programs that draw lines translate.
mesh_prologueand the primitive export incrates/victory-shader/src/emit/lower.rsgo through a newemit_primitive, which passes as many 9-bit indices ascorners(topology)gives and leaves the third undefined for a line. Topologies other than 1 and 2 stay refused. The topology numbering (1 lines, 2 triangles) is the oneMeshIo::topologyinnative.rsalready documents, and it matches DXIL's, which passes it through to PSV0. Upstream's0x1FFindex mask is kept. The new draw test,mesh_lines_light_one_texel_row, was reported in this thread to light only row 8 and to cull completely on an RTX 5080, an RTX 5060 Laptop, an Intel UHD and WARP.Thanks for the rebase, which kept
main's edge-flag tests. It merges cleanly now, so this is the first content review.CI: passing (
check).Generated by Claude Code
@tjthebigbearcat-hub on GitHub · 2026-11-25 03:21 UTC · original
Rebased cleanly onto current
main(940d32f→ff8c445):0x1FFvertex index edge-flag mask into the line/triangle primitive export loop and kept both upstream's edge-flag tests and our line-mesh tests.cargo test -p victory-shader --locked mesh(7 passed, 0 failed) andcargo clippy(0 warnings).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.