Shaders: find the PC test compiler independently of the validator #684
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!684
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/684/head"
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?
@Dathinel on GitHub · 2026-11-24 06:48 UTC · original
Dathinel:fix/independent-sdk-tool-discovery→main· +69 −20 · 2 files · 3 commits · closed without mergingThe 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.
@ErRusso on GitHub · 2026-11-24 11:19 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 01:24 UTC · original · edited 2026-11-25 07:25 UTC
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
@Marvisak on GitHub · 2026-11-25 21:59 UTC · original
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