Shader tests: the descriptor-join tests build off Windows #2766

Open
github-bot wants to merge 1 commit from github-bot/gh-2766 into main AGit
Owner

@⁠lcg007xd-c on GitHub · 2026-11-25 20:05 UTC · original
lcg007xd-c:fix/shader-tests-build-off-windows → main · +3 −0 · 1 files · 1 commits · open

What this fixes

Since 54ab406 ("Shaders: descriptors joined by nested control flow, again"), cargo test -p victory-shader does not build on a host that is not Windows:

error[E0433]: cannot find `validator` in `super`
    --> crates/victory-shader/src/emit/lower.rs:11196:42
...
error: could not compile `victory-shader` (lib test) due to 6 previous errors

emit::validator is #[cfg(windows)], and three tests added there call it unguarded:

  • descriptors_joined_by_nested_control_flow_lower_to_one_uniform_handle
  • a_descriptor_skipped_only_by_lanes_that_never_run_needs_no_source
  • descriptors_reloaded_from_a_root_table_share_one_handle

The change

Each test's optional dxil.dll validation block is now under #[cfg(windows)], so on Windows nothing changes. On other hosts, the lowering and the handle-count assertions still run.

Tested

  • Linux (Arch, Rust 1.98.1): cargo test -p victory-shader --lib went from 6 build errors to 158 passed, 0 failed, 2 ignored.
  • rustfmt --check on lower.rs shows the same output before and after.
  • Not run on Windows, but the code there is the same as before.

🤖 Generated with Claude Code

**@⁠lcg007xd-c** on GitHub · 2026-11-25 20:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766) `lcg007xd-c:fix/shader-tests-build-off-windows` → `main` · +3 −0 · 1 files · 1 commits · open ## What this fixes Since 54ab406 (\"Shaders: descriptors joined by nested control flow, again\"), `cargo test -p victory-shader` does not build on a host that is not Windows: ``` error[E0433]: cannot find `validator` in `super` --> crates/victory-shader/src/emit/lower.rs:11196:42 ... error: could not compile `victory-shader` (lib test) due to 6 previous errors ``` `emit::validator` is `#[cfg(windows)]`, and three tests added there call it unguarded: - `descriptors_joined_by_nested_control_flow_lower_to_one_uniform_handle` - `a_descriptor_skipped_only_by_lanes_that_never_run_needs_no_source` - `descriptors_reloaded_from_a_root_table_share_one_handle` ## The change Each test's optional `dxil.dll` validation block is now under `#[cfg(windows)]`, so on Windows nothing changes. On other hosts, the lowering and the handle-count assertions still run. ## Tested - Linux (Arch, Rust 1.98.1): `cargo test -p victory-shader --lib` went from 6 build errors to **158 passed, 0 failed, 2 ignored**. - `rustfmt --check` on `lower.rs` shows the same output before and after. - Not run on Windows, but the code there is the same as before. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
54ab406 added three tests whose DXIL validation calls `validator`, a module
that exists on Windows only, so `cargo test -p victory-shader` no longer
built anywhere else (6 errors E0433). The validation is now inside
`#[cfg(windows)]`; the lowering and handle-count assertions still run on
every host.

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

@⁠cloph-dsp on GitHub · 2026-11-25 20:32 UTC · original

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

  • \cargo test --locked -p victory-shader --lib descriptors --quiet\ -> 14 passed, 0 failed (259 filtered out), with CARGO_BUILD_JOBS=2.
  • \git diff --check origin/main..HEAD\ clean; the three #[cfg(windows)]\ gates are new here (0 occurrences on origin/main, 3 on the PR head).
  • On Windows this is a no-op in behaviour: the three descriptor-join tests still run and still use the validator when it loads; the gates only keep those blocks from compiling the validator path on non-Windows hosts.
  • 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 20:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766#issuecomment-7173823044) Local verification on Windows / rustc 1.100.0 / MSVC, no game data, no GPU needed, no clippy/rustup. - \cargo test --locked -p victory-shader --lib descriptors --quiet\ -> 14 passed, 0 failed (259 filtered out), with CARGO_BUILD_JOBS=2. - \git diff --check origin/main..HEAD\ clean; the three \#[cfg(windows)]\ gates are new here (0 occurrences on origin/main, 3 on the PR head). - On Windows this is a no-op in behaviour: the three descriptor-join tests still run and still use the validator when it loads; the gates only keep those blocks from compiling the validator path on non-Windows hosts. - 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

@⁠kotekompotek on GitHub · 2026-11-25 20:37 UTC · original

Correct: Validator::load wraps dxil.dll which only exists on Windows - gating the probe keeps the descriptor-join assertions running on other hosts instead of failing to compile.

**@⁠kotekompotek** on GitHub · 2026-11-25 20:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766#issuecomment-7173950503) Correct: Validator::load wraps dxil.dll which only exists on Windows - gating the probe keeps the descriptor-join assertions running on other hosts instead of failing to compile.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 20:38 UTC · original

Reviewed and verified 25bd5a85 on Windows 11 against main (13f91ca).

  • Gating the 3 optional Validator blocks in lower.rs tests with #[cfg(windows)] cleanly fixes non-Windows test builds with zero change to Windows behavior.
  • Targeted lower/resource tests pass (6/6) both default and with --features host + dxil.dll; cargo clippy (default & --features host) 0 warnings; cargo xtask policy 184 files ok; clean git merge-tree vs 13f91ca, #2768, and #2774.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 20:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766#issuecomment-7173962709) Reviewed and verified `25bd5a85` on Windows 11 against `main` (`13f91ca`). - Gating the 3 optional `Validator` blocks in `lower.rs` tests with `#[cfg(windows)]` cleanly fixes non-Windows test builds with zero change to Windows behavior. - Targeted `lower`/`resource` tests pass (**6/6**) both default and with `--features host` + `dxil.dll`; `cargo clippy` (default & `--features host`) **0 warnings**; `cargo xtask policy` **184 files ok**; clean `git merge-tree` vs `13f91ca`, `#2768`, and `#2774`.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 23:20 UTC · original

Automated triage for the maintainers.

This puts #[cfg(windows)] on the optional dxil.dll validation blocks of three descriptor-join tests in crates/victory-shader/src/emit/lower.rs (descriptors_joined_by_nested_control_flow_lower_to_one_uniform_handle, a_descriptor_skipped_only_by_lanes_that_never_run_needs_no_source, descriptors_reloaded_from_a_root_table_share_one_handle). emit::validator is declared #[cfg(windows)] in emit/mod.rs and the other test uses of Validator::load in lower.rs are already gated the same way, so these three were the odd ones out; on Windows nothing changes, and the lowering assertions still run elsewhere. The three blocks are still unguarded on current main, and the PR merges cleanly. CI (check) passes.

This is a recommendation for a maintainer to look, not an approval.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 23:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766#issuecomment-7177437409) <!-- victory-triage v1 head=aa952d6e51cbb24da10545501300595e9859eb19 verdict=merge-candidate at=2026-11-25T23:20:43Z --> Automated triage for the maintainers. This puts `#[cfg(windows)]` on the optional `dxil.dll` validation blocks of three descriptor-join tests in `crates/victory-shader/src/emit/lower.rs` (`descriptors_joined_by_nested_control_flow_lower_to_one_uniform_handle`, `a_descriptor_skipped_only_by_lanes_that_never_run_needs_no_source`, `descriptors_reloaded_from_a_root_table_share_one_handle`). `emit::validator` is declared `#[cfg(windows)]` in `emit/mod.rs` and the other test uses of `Validator::load` in `lower.rs` are already gated the same way, so these three were the odd ones out; on Windows nothing changes, and the lowering assertions still run elsewhere. The three blocks are still unguarded on current `main`, and the PR merges cleanly. CI (`check`) passes. This is a recommendation for a maintainer to look, not an approval. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

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

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

  • cargo test -p victory-shader --lib emit::lower::tests: 33 passed, 0 failed.
  • 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 03:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766#pullrequestreview-6068283580) · **approved these changes** Tested merged onto `origin/main` (`63bcca4`) on Windows 11 x64: - `cargo test -p victory-shader --lib emit::lower::tests`: **33 passed, 0 failed**. - `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

@⁠futurepro62 on GitHub · 2026-11-26 09:37 UTC · original

NVIDIA full-suite run, to go with the reports above by Dukestar69, cloph-dsp, since none of them names a GPU run. Tested exact head aa952d6 (on its base 13f91ca).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 773 passed, 0 failed, 9 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 09:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2766#issuecomment-7188242619) NVIDIA full-suite run, to go with the reports above by Dukestar69, cloph-dsp, since none of them names a GPU run. Tested exact head `aa952d6` (on its base `13f91ca`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **773 passed, 0 failed, 9 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
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/2766/head:github-bot/gh-2766'
git switch 'github-bot/gh-2766'

Merge

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