Repository navigation
Conversation
|
Independent test run on commit
AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report. |
|
Merged onto main 90228a7 and ran No change: every failure count is the same as main, and no new reason appears. So no regression in translation. What this PR changes at run time isn't covered by this check. |
|
RTX 3070 Ti 8 GB (32-lane waves), driver 621.x, Windows 11, fork With #83 on top, the driver refuses six more compute pipelines with
Reproduced offline in seconds: AI-assisted (Claude Code); counts and hashes only, nothing from the game. |
An empty wave can skip an LDS store that the translated shader executes. If a comparison leaves no lanes active,
s_cbranch_execzjumps over its body. Removing that branch lets a scalars_mov_b64 exec, savedrestore a nonempty mask and activate the store. The scalar values at the join can still agree, so the existing join check accepts the rewrite.This changes both the early-out and skip-removal passes. They now check that each EXEC write in the skipped region preserves an empty mask. A nested save and restore can still be optimized when the restore reads the exact SSA value saved inside the region. This check covers lane reactivation. The save-and-mask semantics are in section 12.3 of the AMD RDNA 2 ISA reference.
Thanks to @Xeltax for narrowing #62 to a small set of compute programs. On the 14 lighting programs in that report, both builds produced 14/14 DXIL binaries that passed validation in 32-lane host mode. Eleven outputs stayed byte-identical. The three changed Cascades programs selected the existing approximate local-wave fallback. That establishes which translations changed. The visual impact needs a checkpoint comparison.
Tests
4e17478and passes here. It covers an early return, an external restore, an OR-save, and a safe nested restore. A second test takes a guarded vector write and a safe inner restore through the compute emitter.VICTORY_HOST_WAVE=32 cargo test --offline --locked -p victory-shader --lib— 172 passed, 2 ignored.AI-assisted implementation and review. Tests use hand-built inputs.