Shaders: find the PC test compiler independently of the validator #684
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/684"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-24T06:48:20Z.
The Windows differential tests look for a PC compiler next to the validator selected by
VICTORY_DXIL. A validator-only directory can therefore make the tests skip even when the Windows SDK providesdxc.exe.Look for
VICTORY_PC_DXCfirst, then a Windows SDK containingdxc.exe. If the SDK has no compiler, keep supporting standalone DXC next toVICTORY_DXIL. With both installations present, setVICTORY_PC_DXCto select the standalone compiler explicitly. The production validator keeps its existing lookup order.The regression uses empty files in a temporary directory. It checks SDK preference, explicit overrides (including a missing path), and standalone fallback. Reintroducing the original validator lookup fails the SDK assertion. Removing the fallback fails the standalone assertion.
On Windows, the workspace suite reported 265 passed and 4 ignored. The new regression ran. The optional console-compiler comparisons skipped on this host. Strict Clippy for
victory-shader, package formatting, and the asset-policy check passed.Developed with Codex and independently reviewed with Claude Code.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:53:09Z.
Review: COMMENTED
cargo test -p victory-shader --lockedon macOS 26 arm64, rustc 1.98.1: compiles clean, 56 passed / 0 failed (no regressions). The new diff_tests coverage is#[cfg(all(test, windows))], so it needs the Windows host backend I don't have here. The validator/compiler-path change compiles everywhere; behavior needs a Windows run.Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T07:01:18Z.
Review: APPROVED
LGTM! Tested on Windows 11 with MSVC Rust 1.98.1. All 70 unit tests in ictory-shader passed cleanly, including pc_compiler_prefers_sdk_and_supports_standalone_dxc. Discovering dxc.exe independently from the SDK and VICTORY_PC_DXC prevents skipped differential tests when VICTORY_DXIL points to a validator-only directory.
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T10:33:43Z.
Review: APPROVED
Tested
9c2a364on Windows 11, RTX 5070, MSVC:cargo test -p victory-shader -- --test-threads=170 passed, includingpc_compiler_prefers_sdk_and_supports_standalone_dxc.cargo clippy -p victory-shader --all-targetsis clean.VICTORY_CONSOLE_DXCisn't set on this host, so the differential tests themselves are skipped here, as designed.sdk_toolkeepsValidator::default_pathbehaving as before (VICTORY_DXIL, then the newest SDKx64\dxil.dll), so the production validator lookup is unchanged.VICTORY_PC_DXCpointing at a missing file now makes the tests skip instead of falling back (themissing.exeassertion). That's the right call, since the user asked for that compiler..max()over paths picks the newest version folder by lexical order, same as the oldsort+pop. It works for the10.0.N.0names, though not for a hypothetical 5-digit-to-6-digit build number jump. Pre-existing, so not a blocker.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by ErRusso on 2026-11-24T11:19:18Z.
Audit: ✅ Looks good — verified & tested
Reviewed this PR as part of an audit of mergeable PRs.
crates/victory-shader/src/emit/validator.rs+diff_tests.rs(+61/-20, plus atempfiledev-dependency). Extractssdk_tool()fromValidator::default_path()so PCdxc.exediscovery is independent of thedxil.dllvalidator, with an additional fallback to the DXC sibling ofVICTORY_DXIL. The.max()on SDK versions preserves the "newest SDK wins" behavior.main.cargo test -p victory-shader -- emit→ 10/10 passed, including the new tempfile-basedpc_compiler_prefers_sdk_and_supports_standalone_dxcwhich covers SDK precedence, explicitVICTORY_PC_DXC, and standalone-DXC fallback.One tiny nit:
sdk_toolcomparesPathBufwith.max(), which relies on lexical ordering of version dir names — fine for Windows Kits (10.0.26100.0etc.), worth a comment if versions ever go non-lexical. Not blocking.No functional issues found.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:24:59Z.
Automated triage for the maintainers.
Merge candidate. The new head
08aff6ddrops thetempfiledev-dependency: the test now makes its own fresh directory under the temp dir, andCargo.toml/Cargo.lockare no longer touched. That was the only reason it needed the maintainer's decision. The rest reads as before:validator::sdk_tooltakes over the newest-SDK search, andValidator::default_pathkeeps its order (VICTORY_DXIL, then the newest SDK'sdxil.dll).diff_tests::tools_infinds the PCdxc.exefromVICTORY_PC_DXC, then the newest SDK that has one, then the file next toVICTORY_DXIL.pc_compiler_prefers_sdk_and_supports_standalone_dxccovers each case with empty files.Only test tooling changes; nothing changes at run time. It merges cleanly.
CI: passing.
Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 03:03:15 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T21:59:15Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because it reverses the precedence the README documents. When the SDK's validator is too old for SM 6.6, the README says to point
VICTORY_DXILat a current standalone DXC, and onmainthe PC compiler then comes from that same release. With this change the newest SDK's olderdxc.exewould win, and the differential tests would compile their PC HLSL with it. The case fixed here (a directory that holds onlydxil.dll) is already served byVICTORY_PC_DXC. It also changes onlydiff_tests::tools, so the three PC-compiler lookups would disagree.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed