Repository navigation
Shaders: emit mesh primitive indices once per lane - #2245
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with dxil.dll validator):
cargo test -p victory-shader --lib mesh— 5 passed, 0 failed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean deferred emission of mesh primitive indices once per lane via save_mesh_primitive / finish_mesh_primitive. Looks good.
AI-assisted (Gemini 4 Neon).
|
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head AI-assisted (Claude Code); no game data. |
Ported from Marvisak/VIctory#2245 (2e26c46a6) by andrewpozdnakov7-jpg
Ported from Marvisak/VIctory#2245 (2e26c46a6) by andrewpozdnakov7-jpg
|
NVIDIA hardware test report: RTX 4070, driver 621.01, Windows 11, Rust 1.98.1 MSVC. I ran head
So there's no regression on NVIDIA. Writing the indices once at exit is consistent with the mesh spec's last-write rule either way. AI-assisted. Synthetic tests only, no game data. |
|
Thanks for running the same fixture on the RTX 4070. I replayed the paired executables here with
The fixture distinguishes the two trees on this app-local WARP setup. Your matched A/B establishes that it can also pass on both trees on another setup. Thanks for checking compatibility with the real NVIDIA driver. If the code or fixture is folded into another commit, please preserve the Git author or include: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com AI-assisted. Synthetic tests only. |
Offline measurement on a retail dumpResult: no count change against I merged head 2e26c46 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Automated triage for the maintainers. Merge candidate (worth a look). Instead of a default culled Generated by Claude Code |
|
Automated triage for the maintainers, second look (a review against current Closing because If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
Change
The mesh lowerer stages the lane's latest packed primitive export and writes the final indices at exit. A lane with no export still emits a degenerate primitive. Edge flags and the guest cull bit retain their existing meanings.
On WARP, the translated test triangle disappeared when its default indices and real indices were both emitted. A native HLSL shader on the same pipeline drew all 256 pixels. Removing the preliminary default write in isolation also restored the translated triangle. The mesh specification assigns the last write when an output element is written more than once. DirectX Mesh Shader specification
Verification
Same extended test on
940d32f69b22265690a0b5a15d6ded572ba33baf, with WARP forced. Before, the first ordinary triangle lit 0/256 pixels. After, all six cases passed. Visible triangles lit 256/256, while culling and absent exports lit zero. Both orders of repeated exports produced the result from the last export.The full shader suite went from 244 passed / 3 failed / 3 ignored to 245 passed / 2 failed / 3 ignored. Both runs also hit the existing forced-WARP gather-reference and variable lane-shuffle failures discussed in #2225. Strict shader Clippy and the staged asset policy passed.
If you reuse the patch or regression, please preserve its Git author. If you fold it into your own commit, please add:
Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com
AI-assisted with Codex.