Shaders: keep missing values live through joined phis #647

Closed
github-bot wants to merge 2 commits from gh-pr/647/head into gh-pr/647/base
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 06:08 UTC · original
Quat3rnion:victory-phi-liveness → main · +51 −7 · 1 files · 2 commits · closed without merging

What

An unsupported value such as s_memtime was refused when a branch read it
directly, but accepted after two conditional assignments. fill_phis reads
an incoming phi's stored value without going through get, so a phi used
only as an input to another phi was never marked as read; a missing value
could then be replaced with zero and pass lowering. Reading a phi now marks
the phis feeding it as live too, so both forms agree. Regression reproducer
comes from issue #604 (credited in the branch history).

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace: 165 passed, 0 failed, 3 ignored. The reproducer compares direct and joined reads of a missing timestamp and checks that a dead timestamp still lowers.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. No Windows host here.
  • cargo xtask policy passes (150 files ok). No game files or data from them were added.

Checklist

  • Workspace tests and Windows cross-check pass.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.
**@⁠Quat3rnion** on GitHub · 2026-11-24 06:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/647) `Quat3rnion:victory-phi-liveness` → `main` · +51 −7 · 1 files · 2 commits · closed without merging ## What An unsupported value such as `s_memtime` was refused when a branch read it directly, but accepted after two conditional assignments. `fill_phis` reads an incoming phi's stored value without going through `get`, so a phi used only as an input to another phi was never marked as read; a missing value could then be replaced with zero and pass lowering. Reading a phi now marks the phis feeding it as live too, so both forms agree. Regression reproducer comes from issue #604 (credited in the branch history). An AI tool wrote part of this change. ## Tested - Linux: `cargo test --workspace`: 165 passed, 0 failed, 3 ignored. The reproducer compares direct and joined reads of a missing timestamp and checks that a dead timestamp still lowers. - Windows cross-build: `cargo check --target x86_64-pc-windows-gnu --workspace --tests` passes. No Windows host here. - `cargo xtask policy` passes (150 files ok). No game files or data from them were added. ## Checklist - [x] Workspace tests and Windows cross-check pass. - [x] `cargo xtask policy` passes. No game files or data from them were added. - [x] AI authorship is disclosed above.
fill_phis reads an incoming phi's stored value directly, so a phi used only as an input to another phi was never marked read. A missing value such as an unsupported s_memtime could then be replaced with zero and pass lowering. Mark a phi and the phis feeding it when it is read through get, so both the direct and two-join cases refuse consistently. Regression from issue #604's reproducer.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:11:25 +00:00
github-bot closed this pull request 2026-11-26 04:11:25 +00:00
Author
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 06:15 UTC · original

Duplicate of #612, which makes the same transitive phi-liveness change with the same reproducer. Closing in favour of that PR.

**@⁠Quat3rnion** on GitHub · 2026-11-24 06:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/647#issuecomment-7123755275) Duplicate of #612, which makes the same transitive phi-liveness change with the same reproducer. Closing in favour of that PR.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!647
No description provided.