Shaders: a record's zero stride is refused apart from an unknown one #3090

Open
github-bot wants to merge 5 commits from github-bot/gh-3090 into main AGit
Owner

@⁠borosf on GitHub · 2026-11-26 07:27 UTC · original
borosf:vibe/stride-record-split-842ca5 → main · +307 −15 · 3 files · 5 commits · open

Summary

  • The three places an element-indexed buffer access takes its stride (emit/lower.rs: load, store, atomic) refused every record stride under 4 or not a multiple of 4 with one error — the "structured buffer of unknown stride" class, 27 world-window failures in #1481 and 41 in the earlier count. #1482 (Rule 3, Project Leonida) measured on RDNA2 that a stride of exactly 0 is a separate population — a zero SRD stride field is a raw buffer — and asked that the split be made visible before any routing decision is costed on it.
  • A record stride of zero is now refused as what it is — the element size is the host view's, known only at runtime (the run-time table the heap-indexed path already reads) — while a nonzero but unusable record keeps the old "unknown stride" error. World refusal counts will now show the two classes apart, which is the measurement Rule 3 wanted. No previously-translating shader changes its outcome.
  • Also pins, with CPU tests that had none, the semantics 1482 describes for descriptors built in code: their index multiplies the stride field their own dword 1 names (bits 16–29, zero = raw), for loads, stores and atomics — main's existing pre-conversion — and its record-limit/swizzle refusal stays.

Details

  • index_stride in emit/lower.rs names the record's three cases: zero (the host view's, runtime), a dword element (taken), other (unknown). The three call sites are the load, store and atomic index arms.
  • The census (emit::census_tests) is unchanged: 546 translated, 686 refused, 0 panicked.
  • First commit (83ccfc2): four lower.rs tests use the windows-gated validator module without a #[cfg], so pristine main's cargo test -p victory-shader --lib does not build on Linux (or any non-Windows host). Gated #[cfg(all(test, windows))] like the neighbouring test modules; Windows runs are unchanged.

Verification

  • cargo test -p victory-shader --lib on Linux: 174 passed, 0 failed, 2 benchmarks ignored (pristine main does not build there; this branch makes the whole suite run).
  • cargo check --locked --all-targets --target x86_64-pc-windows-msvc -p victory-shader: passes.
  • Clippy on the crate: no new warnings.
  • No game data used; all tests synthetic.

claiming: a record's zero stride is refused apart from an unknown one (#1482 rule 3's measurement)

**@⁠borosf** on GitHub · 2026-11-26 07:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090) `borosf:vibe/stride-record-split-842ca5` → `main` · +307 −15 · 3 files · 5 commits · open ## Summary - The three places an element-indexed buffer access takes its stride (`emit/lower.rs`: load, store, atomic) refused every record stride under 4 or not a multiple of 4 with one error — the "structured buffer of unknown stride" class, 27 world-window failures in [#1481](https://git.gtahub.st/github/Marvisak--VIctory/issues/1481) and 41 in the earlier count. [_#1482_](https://git.gtahub.st/github/Marvisak--VIctory/issues/1482) (Rule 3, Project Leonida) measured on RDNA2 that a stride of **exactly 0** is a separate population — a zero SRD stride field is a raw buffer — and asked that the split be made visible before any routing decision is costed on it. - A record stride of zero is now refused as what it is — the element size is the host view's, known only at runtime (the run-time table the heap-indexed path already reads) — while a nonzero but unusable record keeps the old "unknown stride" error. World refusal counts will now show the two classes apart, which is the measurement Rule 3 wanted. No previously-translating shader changes its outcome. - Also pins, with CPU tests that had none, the semantics 1482 describes for descriptors **built in code**: their index multiplies the stride field their own dword 1 names (bits 16–29, zero = raw), for loads, stores and atomics — main's existing pre-conversion — and its record-limit/swizzle refusal stays. ## Details - `index_stride` in `emit/lower.rs` names the record's three cases: zero (the host view's, runtime), a dword element (taken), other (unknown). The three call sites are the load, store and atomic index arms. - The census (`emit::census_tests`) is unchanged: 546 translated, 686 refused, 0 panicked. - First commit (`83ccfc2`): four `lower.rs` tests use the windows-gated `validator` module without a `#[cfg]`, so pristine main's `cargo test -p victory-shader --lib` does not build on Linux (or any non-Windows host). Gated `#[cfg(all(test, windows))]` like the neighbouring test modules; Windows runs are unchanged. ## Verification - `cargo test -p victory-shader --lib` on Linux: 174 passed, 0 failed, 2 benchmarks ignored (pristine main does not build there; this branch makes the whole suite run). - `cargo check --locked --all-targets --target x86_64-pc-windows-msvc -p victory-shader`: passes. - Clippy on the crate: no new warnings. - No game data used; all tests synthetic. claiming: a record's zero stride is refused apart from an unknown one (#1482 rule 3's measurement)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:37:07 +00:00
Author
Owner

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

Tested locally merged onto origin/main (63bcca4) on Windows 11 x64:

  • cargo test -p victory-shader emit::lower::tests: all tests passed.
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

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

**@⁠Dukestar69** on GitHub · 2026-11-26 07:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#pullrequestreview-6070270866) · **approved these changes** Tested locally merged onto `origin/main` (`63bcca4`) on Windows 11 x64: - `cargo test -p victory-shader emit::lower::tests`: all tests passed. - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠oni-swr on GitHub · 2026-11-26 07:53 UTC · original

Independent WARP verification of this PR at 806965b5 against its pre-series base 63bcca43 (the claim is #1633). No source changes and no PR from me.

Setup: Windows 11, x86_64-pc-windows-msvc, Rust 1.98.1, --locked. The binaries were built separately per tree. victory-shader GPU tests ran with VICTORY_WARP=1. I confirmed the adapter first with a throwaway probe test: it reports Microsoft Basic Render Driver, software flag set, 0 bytes of dedicated video memory. The physical GPU was not used. The validator loaded the Windows SDK dxil.dll; no test printed "no dxil.dll" or a device skip. Synthetic inputs only, no game data.

Classification probe (not part of the PR). One record-stride sweep through lower, same program shape, UsedResource.stride varied, for the three buffer instructions on the table-root path:

record stride base (all three) head (all three)
0 unknown stride stride is only the host view's
4, 8 translated translated
2, 3, 6 unknown stride unknown stride

"All three" is buffer_load_dword, buffer_store_dword and buffer_atomic_add, element-indexed. Only the stride-0 row changes, and only in its message. Translated and refused outcomes are identical on every row, which matches the "no previously-translating shader changes its outcome" claim. The PR's own tests cover 0 and 4 on this path but not an unusable nonzero stride, so that row is new evidence.

Suite. cargo test -p victory-shader --lib on WARP: base 298 passed, 4 failed. Head 304 passed, 4 failed. The six extra passes are the new lower::stride_record tests, which pass when run alone. The four failures are the same on both: a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches and permutes_read_the_lane_named_and_zero_from_lanes_left_out. They are hardware-lane checks that WARP does not satisfy, and they fail before this PR too. The existing stride_tests (8) pass.

Limits: WARP only, so this says nothing about an AMD or NVIDIA host. I did not run the non-Windows build the first commit is about, or clippy.

AI use: Claude Code (Claude Sonnet 5.5) ran the verification, coordinated by Codex (gpt-6.2-sol).

**@⁠oni-swr** on GitHub · 2026-11-26 07:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7185954770) Independent WARP verification of this PR at `806965b5` against its pre-series base `63bcca43` (the claim is https://git.gtahub.st/github/Marvisak--VIctory/issues/1633). No source changes and no PR from me. **Setup:** Windows 11, `x86_64-pc-windows-msvc`, Rust 1.98.1, `--locked`. The binaries were built separately per tree. `victory-shader` GPU tests ran with `VICTORY_WARP=1`. I confirmed the adapter first with a throwaway probe test: it reports `Microsoft Basic Render Driver`, software flag set, 0 bytes of dedicated video memory. The physical GPU was not used. The validator loaded the Windows SDK `dxil.dll`; no test printed "no dxil.dll" or a device skip. Synthetic inputs only, no game data. **Classification probe (not part of the PR).** One record-stride sweep through `lower`, same program shape, `UsedResource.stride` varied, for the three buffer instructions on the table-root path: | record stride | base (all three) | head (all three) | |---|---|---| | 0 | `unknown stride` | `stride is only the host view's` | | 4, 8 | translated | translated | | 2, 3, 6 | `unknown stride` | `unknown stride` | "All three" is `buffer_load_dword`, `buffer_store_dword` and `buffer_atomic_add`, element-indexed. Only the stride-0 row changes, and only in its message. Translated and refused outcomes are identical on every row, which matches the "no previously-translating shader changes its outcome" claim. The PR's own tests cover 0 and 4 on this path but not an unusable nonzero stride, so that row is new evidence. **Suite.** `cargo test -p victory-shader --lib` on WARP: base 298 passed, 4 failed. Head 304 passed, 4 failed. The six extra passes are the new `lower::stride_record` tests, which pass when run alone. The four failures are the same on both: `a_mask_joined_with_data_at_a_uniform_loop_is_its_number`, `gathers_at_a_level_match_the_hardware`, `permutes_mask_high_address_bits_and_divergent_branches` and `permutes_read_the_lane_named_and_zero_from_lanes_left_out`. They are hardware-lane checks that WARP does not satisfy, and they fail before this PR too. The existing `stride_tests` (8) pass. **Limits:** WARP only, so this says nothing about an AMD or NVIDIA host. I did not run the non-Windows build the first commit is about, or clippy. AI use: Claude Code (Claude Sonnet 5.5) ran the verification, coordinated by Codex (gpt-6.2-sol).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 08:03 UTC · original · requested changes

Tested locally on Windows 11 x64 (rustc 1.98.1):

  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean.
  • cargo test -p victory-shader --locked stride_record: 6 passed, 0 failed.
  • cargo test -p victory-shader --locked emit::lower: 39 passed, 0 failed.
  • cargo xtask policy: 192 files ok.

Two items should be adjusted before merge:

  1. Lower::index_stride diagnostic accuracy (lower.rs:5338): used.map_or(0, |u| u.stride) conflates a missing entry with a matched entry whose stride is 0, and reports "a structured buffer whose stride is only the host view's". However, fspx_program (crates/victory-shader/src/native.rs:519-534) sets UsedResource::stride = 0 for every FSPX entry, so a matched entry with stride == 0 can simply reflect missing parser metadata rather than proving that only the host view knows the stride. Rewording the diagnostic to state that the matched entry provides no usable stride (or preserving the stride source) would match the available metadata.
  2. Over-broad #[cfg(all(test, windows))] gating on four existing tests (lower.rs:11510, 11552, 11601, 11655): waterfall_loops_over_descriptors_joined_per_lane_sample_with_each_lanes_own does not call Validator at all, and the other three run lowering assertions before their optional DXIL validation check. Please gate only the Windows DXIL validator blocks so non-Windows CI keeps running the lowering assertions.

Minor test suggestion: adding a nonzero-index byte-offset assertion for the built-stride cases, a swizzle-only case without record limit, and a nonzero invalid stride (e.g. 2/3/5) would further tighten stride_record.rs.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 08:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#pullrequestreview-6070406095) · **requested changes** Tested locally on Windows 11 x64 (`rustc 1.98.1`): - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: clean. - `cargo test -p victory-shader --locked stride_record`: 6 passed, 0 failed. - `cargo test -p victory-shader --locked emit::lower`: 39 passed, 0 failed. - `cargo xtask policy`: 192 files ok. Two items should be adjusted before merge: 1. **`Lower::index_stride` diagnostic accuracy (`lower.rs:5338`)**: `used.map_or(0, |u| u.stride)` conflates a missing entry with a matched entry whose `stride` is `0`, and reports `"a structured buffer whose stride is only the host view's"`. However, `fspx_program` (`crates/victory-shader/src/native.rs:519-534`) sets `UsedResource::stride = 0` for every FSPX entry, so a matched entry with `stride == 0` can simply reflect missing parser metadata rather than proving that only the host view knows the stride. Rewording the diagnostic to state that the matched entry provides no usable stride (or preserving the stride source) would match the available metadata. 2. **Over-broad `#[cfg(all(test, windows))]` gating on four existing tests (`lower.rs:11510, 11552, 11601, 11655`)**: `waterfall_loops_over_descriptors_joined_per_lane_sample_with_each_lanes_own` does not call `Validator` at all, and the other three run lowering assertions before their optional DXIL validation check. Please gate only the Windows DXIL validator blocks so non-Windows CI keeps running the lowering assertions. Minor test suggestion: adding a nonzero-index byte-offset assertion for the built-stride cases, a swizzle-only case without record limit, and a nonzero invalid stride (e.g. `2`/`3`/`5`) would further tighten `stride_record.rs`.
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-26 08:10 UTC · original

Offline validation on the retail corpus, with the current main as the baseline:

  • baseline: main 63bcca4 — 24 850 programs validated
  • this branch (pull/3090/head) — 24 850 programs validated

So no regression and no change in the count on this corpus. Environment: Wine 11.22 on CachyOS (kernel 7.3.5), retail 1.0.2.1 shaders.rpf (26,503 containers), built with --features diagnostics, victory translate <shaders.rpf> --validate --list, unchanged prefix and settings for both runs.

If the change is meant to move that number, it does not on this dump; if it is about correctness of the emitted DXIL for an instruction shape the corpus does not hit, then parity is the expected result and this says only that nothing else moved.

Numbers only, no game files or dumps.

**@⁠YaBulochka** on GitHub · 2026-11-26 08:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7186271828) Offline validation on the retail corpus, with the current main as the baseline: - baseline: `main` `63bcca4` — **24 850** programs validated - this branch (`pull/3090/head`) — **24 850** programs validated So no regression and no change in the count on this corpus. Environment: Wine 11.22 on CachyOS (kernel 7.3.5), retail 1.0.2.1 `shaders.rpf` (26,503 containers), built with `--features diagnostics`, `victory translate <shaders.rpf> --validate --list`, unchanged prefix and settings for both runs. If the change is meant to move that number, it does not on this dump; if it is about correctness of the emitted DXIL for an instruction shape the corpus does not hit, then parity is the expected result and this says only that nothing else moved. Numbers only, no game files or dumps.
Author
Owner

@⁠borosf on GitHub · 2026-11-26 08:13 UTC · original

Offline validation on the retail corpus, with the current main as the baseline:

* baseline: `main` `63bcca4` — **24 850** programs validated

* this branch (`pull/3090/head`) — **24 850** programs validated

So no regression and no change in the count on this corpus. Environment: Wine 11.22 on CachyOS (kernel 7.3.5), retail 1.0.2.1 shaders.rpf (26,503 containers), built with --features diagnostics, victory translate <shaders.rpf> --validate --list, unchanged prefix and settings for both runs.

If the change is meant to move that number, it does not on this dump; if it is about correctness of the emitted DXIL for an instruction shape the corpus does not hit, then parity is the expected result and this says only that nothing else moved.

Numbers only, no game files or dumps.

Right — parity is what this PR is designed to produce on the offline corpus. The change touches no translation decision: the three sites' routing is byte-identical for every record stride ≥ 4 and dword-multiple, and refuses exactly the accesses main refuses for strides 0/1/2/3 — only the error string splits for the stride-0 class (24,850 identical validated programs confirms the outcome side). What the split is for is the world-run diagnostics: the "structured buffer of unknown stride" bucket that #1481 counted at 27 per three-minute window will now report its stride-0 and other-unknown members separately in translate --list / the drop summaries, which is the measurement #1482 rule 3 asked for before anyone designs runtime-stride routing on it. If you ran --list differences by refusal reason rather than validated counts, the delta should be only inside that one bucket's message — if you still have both listings handy, the stride-0 share of that bucket on your dump would be the exact number the rule wanted.

And agreed on the scope note: the test-side additions pin an instruction/descriptor shape (a built root descriptor's own stride field, and its limit/swizzle refusals) that this corpus apparently doesn't hit — kept as regression coverage for future main, with the census unchanged (546/686/0) confirming nothing else shifted.

**@⁠borosf** on GitHub · 2026-11-26 08:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7186344903) > Offline validation on the retail corpus, with the current main as the baseline: > > * baseline: `main` `63bcca4` — **24 850** programs validated > > * this branch (`pull/3090/head`) — **24 850** programs validated > > > So no regression and no change in the count on this corpus. Environment: Wine 11.22 on CachyOS (kernel 7.3.5), retail 1.0.2.1 `shaders.rpf` (26,503 containers), built with `--features diagnostics`, `victory translate <shaders.rpf> --validate --list`, unchanged prefix and settings for both runs. > > If the change is meant to move that number, it does not on this dump; if it is about correctness of the emitted DXIL for an instruction shape the corpus does not hit, then parity is the expected result and this says only that nothing else moved. > > Numbers only, no game files or dumps. Right — parity is what this PR is designed to produce on the offline corpus. The change touches no translation decision: the three sites' routing is byte-identical for every record stride ≥ 4 and dword-multiple, and refuses exactly the accesses main refuses for strides 0/1/2/3 — only the error string splits for the stride-0 class (24,850 identical validated programs confirms the outcome side). What the split is for is the world-run diagnostics: the "structured buffer of unknown stride" bucket that [ #1481](https://git.gtahub.st/github/Marvisak--VIctory/issues/1481) counted at 27 per three-minute window will now report its stride-0 and other-unknown members separately in translate --list / the drop summaries, which is the measurement [ #1482](https://git.gtahub.st/github/Marvisak--VIctory/issues/1482) rule 3 asked for before anyone designs runtime-stride routing on it. If you ran --list differences by refusal reason rather than validated counts, the delta should be only inside that one bucket's message — if you still have both listings handy, the stride-0 share of that bucket on your dump would be the exact number the rule wanted. And agreed on the scope note: the test-side additions pin an instruction/descriptor shape (a built root descriptor's own stride field, and its limit/swizzle refusals) that this corpus apparently doesn't hit — kept as regression coverage for future main, with the census unchanged (546/686/0) confirming nothing else shifted.
Author
Owner

@⁠borosf on GitHub · 2026-11-26 08:14 UTC · original

Both adjustments are in at 8b965b4:
@⁠fuzeofficlal
index_stride now reports "a structured buffer whose record names no stride" — the wording no longer conflates a missing entry with a matched zero, and notes the FSPX parser leaves unread strides at zero, so neither case is described as the host view knowing the stride; only as the record's metadata not naming one.
The four #[cfg(all(test, windows))] gates are gone; the three validator if let blocks carry the module-level #[cfg(windows)] instead (the existing pattern at lower.rs:12196), and the waterfall test lost its gate entirely — it never loads the validator. The lowering assertions all run on non-Windows now: the Linux lib suite went from 174 to 179 passing.
Also took the test suggestions: record strides 2/3/5/6 each refuse with the unchanged "unknown stride" (pinning the table row from the independent WARP sweep), and a swizzle-only built case (swizzle bits set, record count still -1) refuses by "swizzling or a record limit" alongside the record-limit one.

**@⁠borosf** on GitHub · 2026-11-26 08:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7186350203) Both adjustments are in at 8b965b4: @⁠fuzeofficlal index_stride now reports "a structured buffer whose record names no stride" — the wording no longer conflates a missing entry with a matched zero, and notes the FSPX parser leaves unread strides at zero, so neither case is described as the host view knowing the stride; only as the record's metadata not naming one. The four #[cfg(all(test, windows))] gates are gone; the three validator if let blocks carry the module-level #[cfg(windows)] instead (the existing pattern at lower.rs:12196), and the waterfall test lost its gate entirely — it never loads the validator. The lowering assertions all run on non-Windows now: the Linux lib suite went from 174 to 179 passing. Also took the test suggestions: record strides 2/3/5/6 each refuse with the unchanged "unknown stride" (pinning the table row from the independent WARP sweep), and a swizzle-only built case (swizzle bits set, record count still -1) refuses by "swizzling or a record limit" alongside the record-limit one.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 08:21 UTC · original

Automated triage for the maintainers.

Merge candidate (diagnostics only). Lower::index_stride in emit/lower.rs replaces the three identical stride checks in the element-indexed load, store and atomic arms. A missing record or a zero stride now refuses with its own message ("a structured buffer whose record names no stride"). Strides of 1-3 and other non-multiples of 4 keep "a structured buffer of unknown stride", and strides that are multiples of 4 translate as before. No translation outcome changes, which matches the census and the corpus parity reported in the thread. The validator calls in three lower.rs tests get #[cfg(windows)] like the module itself. lower/stride_record.rs holds the new tests. Most of them pin main's existing built-descriptor behaviour, and two cover the new split. Maintainers should know the value here is the split refusal count, not a functional fix. lower.rs is now 521,018 bytes against the 524,288-byte policy limit.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 08:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7186491763) <!-- victory-triage v1 head=8b965b4fb7e4e89c20f33f5b8e70fef0fa52147c verdict=merge-candidate at=2026-11-26T08:17:59Z --> Automated triage for the maintainers. **Merge candidate (diagnostics only).** `Lower::index_stride` in `emit/lower.rs` replaces the three identical stride checks in the element-indexed load, store and atomic arms. A missing record or a zero stride now refuses with its own message ("a structured buffer whose record names no stride"). Strides of 1-3 and other non-multiples of 4 keep "a structured buffer of unknown stride", and strides that are multiples of 4 translate as before. No translation outcome changes, which matches the census and the corpus parity reported in the thread. The validator calls in three `lower.rs` tests get `#[cfg(windows)]` like the module itself. `lower/stride_record.rs` holds the new tests. Most of them pin main's existing built-descriptor behaviour, and two cover the new split. Maintainers should know the value here is the split refusal count, not a functional fix. `lower.rs` is now 521,018 bytes against the 524,288-byte policy limit. CI: passing (check). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠borosf on GitHub · 2026-11-26 08:25 UTC · original

Thanks all — with the triage verdict and three independent verifications (WARP sweep, retail-corpus parity on 24,850 programs, and hardware runs) consistent on no outcome change, I'll leave this as-is for review. The lower.rs size note is also covered: the new tests live in the separate lower/stride_record.rs module, keeping lower.rs at 521,018 bytes under the 512 KiB policy limit.

**@⁠borosf** on GitHub · 2026-11-26 08:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7186577088) Thanks all — with the triage verdict and three independent verifications (WARP sweep, retail-corpus parity on 24,850 programs, and hardware runs) consistent on no outcome change, I'll leave this as-is for review. The lower.rs size note is also covered: the new tests live in the separate lower/stride_record.rs module, keeping lower.rs at 521,018 bytes under the 512 KiB policy limit.
Author
Owner

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

Both previous review points are resolved in 8b965b4f: Lower::index_stride (emit/lower.rs:5339-5344) now reports "a structured buffer whose record names no stride" across all three element-indexed paths, the three Validator::load blocks carry narrow #[cfg(windows)] gates while keeping lowering assertions enabled on non-Windows targets (and un-gating the waterfall test), and stride_record.rs adds tests for nonzero invalid strides (2, 3, 5, 6) and swizzle bits without a record limit. emit/lower.rs is 521,018 bytes (under the 512 KiB limit).

Verified locally on Windows 11 x64 (8b965b4f):

  • cargo run --locked -p xtask -- policy: passed (192 files ok)
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings (default and --all-features): clean
  • emit::lower::stride_record: 7 passed, 0 failed
  • emit::lower::tests: 33 passed, 0 failed

Minor nits: rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower/stride_record.rs flags extra 4-space indentation on the tests starting at line 62, and a couple of comments in lower.rs / stride_record.rs still use the older host-view phrasing.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 10:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#pullrequestreview-6072266076) · **approved these changes** Both previous review points are resolved in `8b965b4f`: `Lower::index_stride` (`emit/lower.rs:5339-5344`) now reports `"a structured buffer whose record names no stride"` across all three element-indexed paths, the three `Validator::load` blocks carry narrow `#[cfg(windows)]` gates while keeping lowering assertions enabled on non-Windows targets (and un-gating the waterfall test), and `stride_record.rs` adds tests for nonzero invalid strides (`2, 3, 5, 6`) and swizzle bits without a record limit. `emit/lower.rs` is `521,018` bytes (under the 512 KiB limit). Verified locally on Windows 11 x64 (`8b965b4f`): - `cargo run --locked -p xtask -- policy`: passed (`192 files ok`) - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` (default and `--all-features`): clean - `emit::lower::stride_record`: 7 passed, 0 failed - `emit::lower::tests`: 33 passed, 0 failed Minor nits: `rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower/stride_record.rs` flags extra 4-space indentation on the tests starting at line 62, and a couple of comments in `lower.rs` / `stride_record.rs` still use the older host-view phrasing.
Review cosmetics, no behaviour change:

- `stride_record.rs`'s tests were left indented as if still inside the
  module they were split out of; `rustfmt --edition 2024 --check` flags
  the block from line 62, so they are dedented to the file's own level.
- Five comments still said "host view" where the rest of the crate says
  "the host's view" (`lower.rs`, `stride_record.rs`, `resource.rs`); the
  older form is gone from the crate, 0 left.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>
Author
Owner

@⁠borosf on GitHub · 2026-11-26 13:53 UTC · original

Both post-approval cosmetics are done at 933ecc5:

  • rustfmt indentation at stride_record.rs:62 — the tests had been left indented as if still inside the module they were split out of. Dedented to the file's own level; rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower/stride_record.rs is now clean (no hunks).
  • "host view" phrasing — five comments still used the older form; they now read "the host's view", matching the rest of the crate. grep -rc "host view" crates/victory-shader/src → 0 left. Files: lower.rs (three), stride_record.rs (two), resource.rs (one — a fourth comment there I found with the same phrasing).

No behaviour change: comments and indentation only.

Verification on an Intel Arc B580, Windows 11:

  • cargo test -p victory-shader --lib --locked -- --test-threads=1 → 307 passed, 2 failed, 3 ignored. The two are the known B580 failures pristine main also has (emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products); the seven stride_record tests pass.
  • cargo clippy -p victory-shader --all-targets -- -D warnings clean.
  • Formatting checked per file against a stashed baseline, as this tree is deliberately not cargo fmt clean: lower.rs 33 pre-existing hunks (was 37 before these comment edits — the longer lines merged four of them), resource.rs 4 (unchanged), stride_record.rs 0 (was 1).
**@⁠borosf** on GitHub · 2026-11-26 13:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#issuecomment-7193988494) Both post-approval cosmetics are done at `933ecc5`: - **`rustfmt` indentation at `stride_record.rs:62`** — the tests had been left indented as if still inside the module they were split out of. Dedented to the file's own level; `rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower/stride_record.rs` is now **clean** (no hunks). - **"host view" phrasing** — five comments still used the older form; they now read "the host's view", matching the rest of the crate. `grep -rc "host view" crates/victory-shader/src` → **0** left. Files: `lower.rs` (three), `stride_record.rs` (two), `resource.rs` (one — a fourth comment there I found with the same phrasing). No behaviour change: comments and indentation only. Verification on an Intel Arc B580, Windows 11: - `cargo test -p victory-shader --lib --locked -- --test-threads=1` → **307 passed, 2 failed, 3 ignored**. The two are the known B580 failures pristine `main` also has (`emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `emit::valu_tests::fspx_programs_run_with_the_hardwares_dot_products`); the seven `stride_record` tests pass. - `cargo clippy -p victory-shader --all-targets -- -D warnings` clean. - Formatting checked per file against a stashed baseline, as this tree is deliberately not `cargo fmt` clean: `lower.rs` 33 pre-existing hunks (was 37 before these comment edits — the longer lines merged four of them), `resource.rs` 4 (unchanged), `stride_record.rs` 0 (was 1).
Author
Owner

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

Verified the follow-up commit 933ecc5f555d30d3e66b102a7b631b7b2e261d8d on Windows 11 x64 (63bcca43 base) — confirmed comment- and formatting-only updates with zero behavior change:

  • rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower/stride_record.rs: clean (exit 0).
  • crates/victory-shader/src/emit/lower.rs size: 521,024 B (under the 524,288 B cap); cargo test -p xtask --locked policy::tests::repository_passes_policy: 1 passed (asset policy: 192 files ok).
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings (default and --all-features): clean.
  • stride_record (7 passed, 0 failed) and emit::lower (40 passed, 0 failed) pass on both RTX 5090 (VICTORY_WARP=0) and WARP (VICTORY_WARP=1); full --lib on RTX 5090 (skipping the pre-existing heap_direct_texture_reads_mark_their_heap_index crash): 305 passed; 3 failed; 3 ignored; 1 filtered out (same 3 pre-existing failures as main).

Both post-approval nits are cleanly resolved — ready to merge.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 18:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/3090#pullrequestreview-6078968777) · **approved these changes** Verified the follow-up commit `933ecc5f555d30d3e66b102a7b631b7b2e261d8d` on Windows 11 x64 (`63bcca43` base) — confirmed comment- and formatting-only updates with zero behavior change: - `rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower/stride_record.rs`: clean (exit 0). - `crates/victory-shader/src/emit/lower.rs` size: **521,024 B** (under the 524,288 B cap); `cargo test -p xtask --locked policy::tests::repository_passes_policy`: `1 passed` (`asset policy: 192 files ok`). - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` (default and `--all-features`): clean. - `stride_record` (`7 passed, 0 failed`) and `emit::lower` (`40 passed, 0 failed`) pass on both RTX 5090 (`VICTORY_WARP=0`) and WARP (`VICTORY_WARP=1`); full `--lib` on RTX 5090 (skipping the pre-existing `heap_direct_texture_reads_mark_their_heap_index` crash): `305 passed; 3 failed; 3 ignored; 1 filtered out` (same 3 pre-existing failures as `main`). Both post-approval nits are cleanly resolved — ready to merge.
This pull request can be merged automatically.
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/3090/head:github-bot/gh-3090'
git switch 'github-bot/gh-3090'

Merge

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