Repository navigation
Conversation
…with-default - cargo fmt: 168 formatting differences in 32 files - xmem.rs: initialize PERFORMANCE_INFORMATION cb in the struct literal (clippy::field_reassign_with_default)
Speech streams were valid empty WAVE files, so the title's narration (accessibility menus and the like) was silent. Route text (0x68) and SSML (0xa8) through Windows.Media.SpeechSynthesis and hand the title the spoken RIFF stream; when the host has no voice (no voices installed, WinRT unavailable), keep the empty-WAVE fallback so the title still plays the stream and goes on. - streams become boxed handles, reclaimed by close (0x70); the synthesizer handle stays a fixed address - enumerate_voices stays a no-op: no title of ours asks, and the host's default voice speaks - the windows crate moves out of the diagnostics-only feature so its WinRT bindings link in release builds too Verified on Windows 11: the unit test now speaks "Hello" and validates the returned WAVE (RIFF chunk walk, PCM 16 kHz mono 16-bit, non-empty data); cargo test --workspace 264 passed.
The diagnostics gate checked only the variable's presence, so VICTORY_D3D12_WARP=0 still created the device on WARP; the workaround was to remove the variable entirely (issue Marvisak#610). Treat "0" like unset, keep documented "1" and presence-means-on for other values, and keep the diagnostics feature gate. The predicate moves into warp_selected/warp_selected_at, covered by a table test (unset, 0, 1, empty); README documents the opt-out. Verified: cargo test -p victory-gpu --features diagnostics --locked warp_ passes; cargo clippy --workspace --all-features clean.
…g value The emitter refused a branch on a live timestamp read (s_memtime result) but accepted the same read through two conditional joins: fill_phis substitutes zero for a missing incoming value of a phi no reader marks, and Lower::get marked only the phi a comparison reads directly. A phi whose value flows solely into another phi's arguments was never marked, so its missing timestamp value became zero instead of the refusal the direct read gets (issue Marvisak#604). Follow incoming phi dependencies from the phis actual readers mark, by fixpoint, before the substitution decision; a dead phi (read by nothing live) still lowers with the zero substitution. The regression test is Dathinel's probe from the issue (test-only commit 4b2ea70), applied unmodified. Verified: cargo test -p victory-shader --features host a_missing_value_stays_missing_through_two_live_joins passes; cargo test --workspace 266 passed; cargo clippy --workspace --all-features clean.
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Tested on Windows 11 MSVC (rustc 1.98.1):
- cargo test -p victory-shader: 70 passed, 0 failed (including emit::lower::tests::a_missing_value_stays_missing_through_two_live_joins)
- cargo xtask policy: 151 files ok
Fixpoint propagation correctly ensures phis whose values flow exclusively into subsequent join phis retain their missing incoming status rather than erroneously substituting zero.
catminou4
left a comment
There was a problem hiding this comment.
Heads-up on the branch shape: this PR's diff against main includes #692's fmt commit, #691's WinRT speech commit, and a WARP opt-out commit — only the tip commit db0257e ("shader: a phi read only through another phi…") is this PR's own change. That's why it's unmergeable/conflicting as-is. Retargeting the base or rebasing onto main after #691/#692 land would make the actual change reviewable.
Reviewed the tip commit itself (52+/7- in emit/lower.rs):
fill_phisnow transitively propagates "read" fromread_phisthrough phi incoming args, so a phi consumed only by another phi is treated as read — a missing incoming value now raisesStop::Retryinstead of being zero-substituted on its way to a live read. Dead phis keep the zero substitution. The comment explains exactly this.- The synthetic compute-program tests (
lowersgained anrsrc2parameter) exercise the branch-on-live-timestamp-read path.
Verification on macOS 26 arm64, rustc 1.98.1: cargo test -p victory-shader --locked on the head: 57 passed / 0 failed (against its own base). The change is in the portable lowering path, so this is real coverage; the GPU-visible outcome still needs the Windows shader run.
|
Measured offline against main
AI-assisted. |
|
Measured on the full retail shader pack (26,503 containers) with This PR conflicts with current main ( With this PR: VS/PS 12220 / 12130, CS 1440 / 1417, MS 8163 / 8101. That is the same loss of 323 validated programs (42 VS/PS, 253 CS, 28 MS) as the merged #612 shows (see my measurement there), with the same refusal reasons. So it fixes #604 the same way, but it now duplicates #612. |
|
Automated triage for the maintainers. Closing because this change is already in The fix for #604 (a phi read only through another phi is live) is already in main through #612 (commit 3dd467c), and this copy carries a workspace-wide cargo fmt. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
Closes #604.
The emitter refused a branch on a live
s_memtimeread but accepted the same read through two conditional joins:fill_phissubstitutes zero for a missing incoming value of a phi no reader marks, andLower::getmarked only the phi a comparison reads directly. A phi whose value flows solely into another phi's arguments was never marked, so its missing timestamp value silently became zero instead of surfacing the refusal the direct read gets.The fix follows incoming phi dependencies from the phis actual readers mark (fixpoint) before the substitution decision. A dead phi (read by nothing live) still lowers with the zero substitution, matching the issue's expectation.
The regression test is Dathinel's probe from the issue (test-only commit 4b2ea70f), applied unmodified; it compares the direct and the twice-joined read and expects the dead-timestamp variant to keep lowering.
Verified:
cargo test -p victory-shader --features host a_missing_value_stays_missing_through_two_live_joinspasses;cargo test --workspace266 passed;cargo clippy --workspace --all-featuresclean.