Shaders: live phi edges look up the earlier condition sets they cover #2864

Open
github-bot wants to merge 2 commits from github-bot/gh-2864 into main AGit
Owner

@⁠Anzymanz on GitHub · 2026-11-25 22:39 UTC · original
Anzymanz:live-edges-subset-index → main · +172 −37 · 3 files · 2 commits · open

From a tester working with Claude (AI-assisted: Claude Code, Claude Opus 5.5 found the hot spot, wrote the change and ran the measurements; I directed and checked it).

The problem

Some programs take tens of seconds to translate, nearly all of it in Lower::live_edges. On 13f91ca one program took 527 s inside translate --cache under Proton (the warm-up sat at 26,502 of 26,503 containers for minutes and looked hung); #2062 made each step cheaper, but the shape is still quadratic.

live_edges skips a phi reached with a set of conditions when an earlier set of that phi is a subset of it. It finds one by scanning every earlier set of the phi, and in programs with a lot of control flow a phi is reached with very many sets (up to about 24,000 on one phi in the three slow programs below), so the scan grows with the square of them. A profile of one such program (Linux perf, release build with debug info) put 92% of its translation time in that scan (fill_phis → live_edges → slice::contains).

The change

One function, live_edges in emit/lower.rs:

  • A set holds at most MAX_KNOWN (4) conditions, so it has at most 16 subsets. Once a phi has 16 earlier sets, they are also kept in an index as sets (sorted, without repeats), and each subset of the new set is looked up there instead of scanning.
  • Below 16 the scan stays as it is: it is cheaper than the lookups for the common case.
  • Known gets set() (sorted, without repeats) and subsets(); none becomes the NONE constant they share.

The walk takes the same decisions (an earlier set is a subset of the new one exactly when one of its subsets is in the index), so the live edges are the same.

Measurements

All on the title's shader pack (1.0.2.1, my own copy), 25,889 distinct containers, each through emit::translate_with from a small harness outside the tree (native Linux, release build), main f3578e3 against this branch. No game data here, only counts, times and hashes.

Output: for every one of the 25,889 containers the result is identical (BLAKE3 of the Debug form of the HostShader, or the same error): 0 differences.

Work (user-mode instructions retired, perf stat, 8 threads, three alternating rounds, the harness's own parsing subtracted; instructions rather than time because the machine was shared):

sample main this branch
the 100 slowest programs on main 896 / 1,563 / 2,337 G 536 / 492 / 596 G
600 programs picked at random 81.8 / 81.9 / 81.9 G 82.3 / 82.3 / 82.4 G

So the slow programs do 2-4x less work, and typical programs about 0.6% more (the sets are sorted when stored). On main the cost of the slow ones varies a lot between runs: the walk's order follows hash-map iteration order.

Time, one thread, single programs (two runs each, main → branch):

program main this branch
cbe258e224519eac 24.8 s, 22.3 s 3.4 s, 3.1 s
6f06d377496b2eb7 8.1 s, 9.4 s 3.1 s, 2.0 s
134379ec4e54d218 0.4 s, 8.4 s 2.5 s, 0.7 s

Testing

  • cargo test -p victory-shader --lib --release -- --test-threads=1, cross-built for Windows and run under GE-Proton 11-14 (vkd3d-proton) on an RX 9070 XT with RADV (Mesa 26.3.1), dxil.dll from DXC v1.9.2609: 300 passed, 2 failed, the same 2 as on main with the same setup (hosts_that_do_not_fuse_are_named and stub_pipeline_is_created: under vkd3d-proton the "WARP" adapter is the real GPU and the DXIL digest is not checked).
  • Native Linux cargo test --release -p victory-shader (with #2766 so the tests build off Windows): 172 passed, 0 failed.
  • cargo clippy -p victory-shader --locked -- -D warnings: clean. rustfmt: no change in the edited lines.

🤖 Generated with Claude Code

**@⁠Anzymanz** on GitHub · 2026-11-25 22:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864) `Anzymanz:live-edges-subset-index` → `main` · +172 −37 · 3 files · 2 commits · open From a tester working with Claude (AI-assisted: Claude Code, Claude Opus 5.5 found the hot spot, wrote the change and ran the measurements; I directed and checked it). ## The problem Some programs take tens of seconds to translate, nearly all of it in `Lower::live_edges`. On `13f91ca` one program took 527 s inside `translate --cache` under Proton (the warm-up sat at 26,502 of 26,503 containers for minutes and looked hung); #2062 made each step cheaper, but the shape is still quadratic. `live_edges` skips a phi reached with a set of conditions when an earlier set of that phi is a subset of it. It finds one by scanning every earlier set of the phi, and in programs with a lot of control flow a phi is reached with very many sets (up to about 24,000 on one phi in the three slow programs below), so the scan grows with the square of them. A profile of one such program (Linux `perf`, release build with debug info) put 92% of its translation time in that scan (`fill_phis` → `live_edges` → `slice::contains`). ## The change One function, `live_edges` in `emit/lower.rs`: - A set holds at most `MAX_KNOWN` (4) conditions, so it has at most 16 subsets. Once a phi has 16 earlier sets, they are also kept in an index as sets (sorted, without repeats), and each subset of the new set is looked up there instead of scanning. - Below 16 the scan stays as it is: it is cheaper than the lookups for the common case. - `Known` gets `set()` (sorted, without repeats) and `subsets()`; `none` becomes the `NONE` constant they share. The walk takes the same decisions (an earlier set is a subset of the new one exactly when one of its subsets is in the index), so the live edges are the same. ## Measurements All on the title's shader pack (1.0.2.1, my own copy), 25,889 distinct containers, each through `emit::translate_with` from a small harness outside the tree (native Linux, release build), `main` `f3578e3` against this branch. No game data here, only counts, times and hashes. **Output:** for every one of the 25,889 containers the result is identical (BLAKE3 of the `Debug` form of the `HostShader`, or the same error): 0 differences. **Work** (user-mode instructions retired, `perf stat`, 8 threads, three alternating rounds, the harness's own parsing subtracted; instructions rather than time because the machine was shared): | sample | `main` | this branch | |---|---|---| | the 100 slowest programs on `main` | 896 / 1,563 / 2,337 G | 536 / 492 / 596 G | | 600 programs picked at random | 81.8 / 81.9 / 81.9 G | 82.3 / 82.3 / 82.4 G | So the slow programs do 2-4x less work, and typical programs about 0.6% more (the sets are sorted when stored). On `main` the cost of the slow ones varies a lot between runs: the walk's order follows hash-map iteration order. **Time, one thread, single programs** (two runs each, `main` → branch): | program | `main` | this branch | |---|---|---| | `cbe258e224519eac` | 24.8 s, 22.3 s | 3.4 s, 3.1 s | | `6f06d377496b2eb7` | 8.1 s, 9.4 s | 3.1 s, 2.0 s | | `134379ec4e54d218` | 0.4 s, 8.4 s | 2.5 s, 0.7 s | ## Testing - `cargo test -p victory-shader --lib --release -- --test-threads=1`, cross-built for Windows and run under GE-Proton 11-14 (vkd3d-proton) on an RX 9070 XT with RADV (Mesa 26.3.1), `dxil.dll` from DXC v1.9.2609: 300 passed, 2 failed, the same 2 as on `main` with the same setup (`hosts_that_do_not_fuse_are_named` and `stub_pipeline_is_created`: under vkd3d-proton the "WARP" adapter is the real GPU and the DXIL digest is not checked). - Native Linux `cargo test --release -p victory-shader` (with #2766 so the tests build off Windows): 172 passed, 0 failed. - `cargo clippy -p victory-shader --locked -- -D warnings`: clean. `rustfmt`: no change in the edited lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`Lower::live_edges` skips a phi reached with a set of conditions when an
earlier set of that phi is a subset of it. It found one by scanning every
earlier set, and in programs with much control flow a phi is reached with
tens of thousands of sets, so the scan made the walk quadratic: some
programs took tens of seconds to lower, nearly all of it here.

A set holds at most four conditions, so it has at most 16 subsets. Once a
phi has 16 earlier sets, they are also kept in an index, as sets (sorted,
without repeats), and each subset of the new set is looked up there instead.
Below that the scan stays: it is cheaper than the lookups. The walk takes
the same decisions, so the live edges are the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`Known` and the sets of it each phi was reached with (`Reached`, the scan
and the index) move from `Lower::live_edges` into `emit/lower/known.rs`,
so the index path can be tested on its own: a test adds 4,000 paths of
two to four of twelve conditions and checks each answer against a scan of
every earlier set (well past the 16 sets where the index takes over), and
one checks a set's sorting and subsets. `lower.rs` gets about 1 KB smaller.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:16:14 +00:00
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 23:00 UTC · original

Reviewed and verified 5e5cd11f on Windows 11 (RTX 5090 + WARP + dxil.dll) against main (842b0cb):

  • The Known::set() + subsets() subset lookup once a phi reaches INDEXED = 16 sets is mathematically equivalent to the original linear subset scan (Known::and caps length at MAX_KNOWN = 4, so O(2^4) = 16 lookups match canonical sorted deduped subsets 1-to-1).
  • Local checks: emit::lower::tests 33/33, emit::waterfall_tests 5/5, cargo clippy --locked -p victory-shader --all-targets -- -D warnings 0 warnings, cargo xtask policy (190 files ok).
  • Two notes:
    1. crates/victory-shader/src/emit/lower.rs is at 522,192 bytes (2,096 bytes below the 512 KiB xtask policy cap), so combining this with another lower.rs PR can easily cross the limit.
    2. None of the existing 33 lower::tests exceed INDEXED = 16; adding a small unit test exercising done.len() >= 16 would directly cover the HashSet index path.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 23:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#issuecomment-7177040207) Reviewed and verified `5e5cd11f` on Windows 11 (RTX 5090 + WARP + `dxil.dll`) against `main` (`842b0cb`): - The `Known::set()` + `subsets()` subset lookup once a phi reaches `INDEXED = 16` sets is mathematically equivalent to the original linear subset scan (`Known::and` caps length at `MAX_KNOWN = 4`, so `O(2^4) = 16` lookups match canonical sorted deduped subsets 1-to-1). - Local checks: `emit::lower::tests` 33/33, `emit::waterfall_tests` 5/5, `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` 0 warnings, `cargo xtask policy` (`190 files ok`). - Two notes: 1. `crates/victory-shader/src/emit/lower.rs` is at `522,192` bytes (`2,096` bytes below the 512 KiB `xtask policy` cap), so combining this with another `lower.rs` PR can easily cross the limit. 2. None of the existing 33 `lower::tests` exceed `INDEXED = 16`; adding a small unit test exercising `done.len() >= 16` would directly cover the `HashSet` index path.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-25 23:00 UTC · original

Local verification on Windows / rustc 1.100.0 / MSVC, no game data, no GPU, no clippy/rustup.

  • cargo check --locked -p victory-shader clean.
  • cargo test --locked -p victory-shader --lib emit::lower::tests --quiet -> 33 passed, 0 failed.
  • Diff vs merge-base f3578e3: 1 file, +44/-10; git diff --check clean.
  • No new test was added in this PR; the changed walk is covered by the existing lower tests, and the author reports identical output across 25,889 containers.
  • Full victory-shader lib was not run: emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index crashes on unmodified base 13f91ca on this machine (pre-existing).

AI-assisted (Hy4 flash).

**@⁠cloph-dsp** on GitHub · 2026-11-25 23:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#issuecomment-7177043590) Local verification on Windows / rustc 1.100.0 / MSVC, no game data, no GPU, no clippy/rustup. - `cargo check --locked -p victory-shader` clean. - `cargo test --locked -p victory-shader --lib emit::lower::tests --quiet` -> 33 passed, 0 failed. - Diff vs merge-base f3578e3: 1 file, +44/-10; `git diff --check` clean. - No new test was added in this PR; the changed walk is covered by the existing lower tests, and the author reports identical output across 25,889 containers. - Full victory-shader lib was not run: `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` crashes on unmodified base 13f91ca on this machine (pre-existing). AI-assisted (Hy4 flash).
Author
Owner

@⁠Anzymanz on GitHub · 2026-11-25 23:08 UTC · original

Thanks both. Following @⁠fuzeofficlal's two notes, 20d1878 adds:

  • A test of the index path. Known and the per-phi bookkeeping (Reached: the scan, then the index from 16 sets on) move out of live_edges into emit/lower/known.rs. reached_sets_match_a_scan_past_the_index adds 4,000 paths of two to four of twelve conditions (repeats and any order) and checks every answer against a scan of all earlier kept sets; it keeps well over 64 sets, so most answers come from the index. A second test checks a set's sorting, repeats and subsets. Tests need distinct Bools, so structure.rs gets a #[cfg(test)] Bool::test(n).
  • lower.rs size. With Known moved out it is 519,410 bytes, about 1 KB under main (520,563), so this no longer eats the margin under the 512 KiB cap.

Checked again: the whole pack's 25,889 containers translate to the same output as main (0 differences); native cargo test --release -p victory-shader 174 passed (both new tests included); cargo clippy -p victory-shader --locked -- -D warnings clean; cargo xtask policy 192 files ok.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠Anzymanz** on GitHub · 2026-11-25 23:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#issuecomment-7177184747) Thanks both. Following @⁠fuzeofficlal's two notes, `20d1878` adds: - **A test of the index path.** `Known` and the per-phi bookkeeping (`Reached`: the scan, then the index from 16 sets on) move out of `live_edges` into `emit/lower/known.rs`. `reached_sets_match_a_scan_past_the_index` adds 4,000 paths of two to four of twelve conditions (repeats and any order) and checks every answer against a scan of all earlier kept sets; it keeps well over 64 sets, so most answers come from the index. A second test checks a set's sorting, repeats and subsets. Tests need distinct `Bool`s, so `structure.rs` gets a `#[cfg(test)] Bool::test(n)`. - **`lower.rs` size.** With `Known` moved out it is 519,410 bytes, about 1 KB under `main` (520,563), so this no longer eats the margin under the 512 KiB cap. Checked again: the whole pack's 25,889 containers translate to the same output as `main` (0 differences); native `cargo test --release -p victory-shader` 174 passed (both new tests included); `cargo clippy -p victory-shader --locked -- -D warnings` clean; `cargo xtask policy` 192 files ok. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠pawrenity on GitHub · 2026-11-25 23:49 UTC · original

Re-checked the new head 20d18785 (delta since 5e5cd11f) on Windows 11, NVIDIA GeForce RTX 4070 + WARP.

Delta review (git diff 5e5cd11f 20d18785). The move into emit/lower/known.rs is faithful: Known (get, and, set, subsets, NONE) is the same code, and Reached::add is the old covered-check / push / index-extend block unchanged (scan below INDEXED = 16 sets, subset lookups from then on, the index filled with all sets at 16 and one per push after). live_edges calls seen.entry(v).or_default().add(known) and skips on false, as before. The only additions are #[derive(Debug)] on Known and a #[cfg(test)] Bool::test constructor in structure.rs. No behaviour change found.

New tests. Both pass. They are unit tests of the new Known/Reached types rather than a regression for a bug on main (those types don't exist there), so there is no base-fails check to run. As a mutation check, dropping the per-push self.index.extend(...) makes reached_sets_match_a_scan_past_the_index fail, so the test does exercise the indexed path.

Results on 20d18785 (--test-threads=1):

  • cargo test -p victory-shader --lib --locked -- emit::lower structure::: 48 passed, 0 failed, 1 ignored (includes both emit::lower::known::tests).
  • cargo test -p victory-shader --lib --locked -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_index: 300 passed, 3 failed, 3 ignored. main 63bcca4 with the same command: 298 passed, the same 3 failed (stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware). The skipped test crashes the process (STATUS_ACCESS_VIOLATION) on main too on this machine, so it is unrelated to this PR.
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean.
  • rustfmt --check on known.rs: clean.
  • Merges cleanly into main 63bcca4.

AI-assisted (Claude Code).

**@⁠pawrenity** on GitHub · 2026-11-25 23:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#issuecomment-7178110846) Re-checked the new head `20d18785` (delta since `5e5cd11f`) on Windows 11, NVIDIA GeForce RTX 4070 + WARP. **Delta review (`git diff 5e5cd11f 20d18785`).** The move into `emit/lower/known.rs` is faithful: `Known` (`get`, `and`, `set`, `subsets`, `NONE`) is the same code, and `Reached::add` is the old covered-check / push / index-extend block unchanged (scan below `INDEXED = 16` sets, subset lookups from then on, the index filled with all sets at 16 and one per push after). `live_edges` calls `seen.entry(v).or_default().add(known)` and skips on `false`, as before. The only additions are `#[derive(Debug)]` on `Known` and a `#[cfg(test)]` `Bool::test` constructor in `structure.rs`. No behaviour change found. **New tests.** Both pass. They are unit tests of the new `Known`/`Reached` types rather than a regression for a bug on `main` (those types don't exist there), so there is no base-fails check to run. As a mutation check, dropping the per-push `self.index.extend(...)` makes `reached_sets_match_a_scan_past_the_index` fail, so the test does exercise the indexed path. **Results on `20d18785`** (`--test-threads=1`): - `cargo test -p victory-shader --lib --locked -- emit::lower structure::`: 48 passed, 0 failed, 1 ignored (includes both `emit::lower::known::tests`). - `cargo test -p victory-shader --lib --locked -- --test-threads=1 --skip heap_direct_texture_reads_mark_their_heap_index`: 300 passed, 3 failed, 3 ignored. `main` `63bcca4` with the same command: 298 passed, the same 3 failed (`stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`). The skipped test crashes the process (`STATUS_ACCESS_VIOLATION`) on `main` too on this machine, so it is unrelated to this PR. - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: clean. - `rustfmt --check` on `known.rs`: clean. - Merges cleanly into `main` `63bcca4`. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 04:24 UTC · original

Automated triage for the maintainers.

Merge candidate. This replaces the linear subset scan in Lower::live_edges with a per-phi index once a phi has 16 earlier condition sets, moving Known and the new Reached into emit/lower/known.rs. The two agree: a Known holds at most MAX_KNOWN = 4 conditions, so an earlier set is a subset exactly when one of the at most 16 subsets of known.set() is indexed, and unused slots stay zeroed so the derived Hash/Eq hold. reached_sets_match_a_scan_past_the_index checks the index against an independent scan, and the whole-pack hash comparison in the description shows no output change.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 04:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#issuecomment-7182567617) <!-- victory-triage v1 head=20d187853206a7a303b07e5c1232a28ede791c13 verdict=merge-candidate at=2026-11-26T04:24:23Z --> Automated triage for the maintainers. **Merge candidate.** This replaces the linear subset scan in `Lower::live_edges` with a per-phi index once a phi has 16 earlier condition sets, moving `Known` and the new `Reached` into `emit/lower/known.rs`. The two agree: a `Known` holds at most `MAX_KNOWN` = 4 conditions, so an earlier set is a subset exactly when one of the at most 16 subsets of `known.set()` is indexed, and unused slots stay zeroed so the derived `Hash`/`Eq` hold. `reached_sets_match_a_scan_past_the_index` checks the index against an independent scan, and the whole-pack hash comparison in the description shows no output change. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 22:50 UTC · original · reviewed

Sound optimization: 'some earlier set is a subset' is exactly enumerable via the new set's subsets (2^len each) — once |done| exceeds 1<<MAX_KNOWN that's bounded work instead of a linear scan over tens of thousands of entries. The sorted-set canonicalization in set() makes HashSet indexing well-defined, and the <=MAX_KNOWN bound means the subset enumeration can't blow up. LGTM.

**@⁠kotekompotek** on GitHub · 2026-11-25 22:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#pullrequestreview-6066063170) · **reviewed** Sound optimization: 'some earlier set is a subset' is exactly enumerable via the new set's subsets (2^len each) — once |done| exceeds 1<<MAX_KNOWN that's bounded work instead of a linear scan over tens of thousands of entries. The sorted-set canonicalization in set() makes HashSet indexing well-defined, and the <=MAX_KNOWN bound means the subset enumeration can't blow up. LGTM.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 09:50 UTC · original · approved these changes

Verified against origin/main (63bcca4):

  • cargo test -p victory-shader --lib known:: -- --test-threads=1: passed.
  • cargo test -p victory-shader --lib structure:: -- --test-threads=1: 13/13 passed (1 ignored bench).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.

Cleanly indexes earlier condition sets for live phi edge lookups.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 09:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#pullrequestreview-6071869366) · **approved these changes** Verified against `origin/main` (`63bcca4`): - `cargo test -p victory-shader --lib known:: -- --test-threads=1`: passed. - `cargo test -p victory-shader --lib structure:: -- --test-threads=1`: 13/13 passed (1 ignored bench). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 192 files ok. Cleanly indexes earlier condition sets for live phi edge lookups. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 11:39 UTC · original · approved these changes

Reviewed 20d18785 (git merge-tree against main 63bcca43 is clean):

  • The indexed subset lookup in crates/victory-shader/src/emit/lower/known.rs preserves the exact original subset test: sorting and deduplicating stored predicates leaves membership unchanged, the empty set is handled cleanly both below and above the 16-entry index threshold, and emit/lower.rs traversal still preserves the ordered 4-condition history.
  • Merging onto 63bcca43 shrinks crates/victory-shader/src/emit/lower.rs from 520,563 bytes to 519,410 bytes (4,878 bytes below the 524,288-byte policy limit).

Verified locally on Windows 11 with RTX 5090 and WARP (VICTORY_WARP=1):

  • xtask policy (191 files ok) and cargo clippy -p victory-shader --all-targets -- -D warnings (default and --all-features): clean.
  • known::tests 2/2, structure::tests 13/13 (1 ignored), emit::lower::tests 33/33, and waterfall_tests 5/5 (both RTX 5090 and WARP) all pass, plus an independent exhaustive differential model check over 2,418,025 ordered predicate pairs (length 0..=4).
**@⁠fuzeofficlal** on GitHub · 2026-11-26 11:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2864#pullrequestreview-6073506907) · **approved these changes** Reviewed `20d18785` (`git merge-tree` against `main` `63bcca43` is clean): - The indexed subset lookup in `crates/victory-shader/src/emit/lower/known.rs` preserves the exact original subset test: sorting and deduplicating stored predicates leaves membership unchanged, the empty set is handled cleanly both below and above the 16-entry index threshold, and `emit/lower.rs` traversal still preserves the ordered 4-condition history. - Merging onto `63bcca43` shrinks `crates/victory-shader/src/emit/lower.rs` from 520,563 bytes to 519,410 bytes (4,878 bytes below the 524,288-byte policy limit). Verified locally on Windows 11 with RTX 5090 and WARP (`VICTORY_WARP=1`): - `xtask policy` (`191 files ok`) and `cargo clippy -p victory-shader --all-targets -- -D warnings` (default and `--all-features`): clean. - `known::tests` 2/2, `structure::tests` 13/13 (1 ignored), `emit::lower::tests` 33/33, and `waterfall_tests` 5/5 (both RTX 5090 and WARP) all pass, plus an independent exhaustive differential model check over 2,418,025 ordered predicate pairs (length 0..=4).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2864/head:github-bot/gh-2864'
git switch 'github-bot/gh-2864'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2864'
git switch 'github-bot/gh-2864'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2864'
git switch 'github-bot/gh-2864'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2864'
git switch 'main'
git merge --squash 'github-bot/gh-2864'
git switch 'main'
git merge --ff-only 'github-bot/gh-2864'
git switch 'main'
git merge 'github-bot/gh-2864'
git push origin 'main'
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!2864
No description provided.