Build and test the workspace off Windows (and check it in CI) #3687
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3687
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3687"
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?
@davemathews12 on GitHub · 2026-11-30 03:54 UTC · original
davemathews12:build/victory-gpu-non-windows→main· +363 −11 · 28 files · 15 commits · closed without mergingAGENTS.md said nothing fails to compile off Windows; in fact
victory-gpufailed with 91 errors on Linux, and behind itvictory-hle(33) and thevictoryapp, so no test of those crates, nor of the app, had ever run off Windows. Modules added since were not given the#[cfg(windows)]the others carry.What changes, by the crate's own patterns (
cfg(windows)for Windows code and its tests,cfg(any(windows, test))for the pure logic that Windows code calls, acfg(not(windows))stand-in where a portable caller needs one):ambientandmesh_rest(D3D12) are Windows-only;memguardandcompilemembuild for tests, without their memory queries and the compile gate's runtime;save_sharekeeps building everywhere with a UTC clock off Windows (civil, tested against Python's datetime).room_lineandroom_percentbuild for tests, so the first-upload decision tests run everywhere. Stand-ins:log_defrag_counters,set_range_lock,ValueWait::holds. The four examples print that they need Windows instead of failing to build.image_watchreads and writes nothing off Windows.translateruns off Windows, with--validateand the pipeline checks saying they need Windows (empty-enum stand-ins: no value can be made, so nothing is faked);build.rswrites the D3D12 exports for Windows targets only (a Linux linker refused the .def). Theload_mods()gate is the same line as open PR #2581.#[cfg(windows)], as #1108 did for the loader's PE-fixture tests.linuxjob runscargo check --workspace --all-targetsandcargo test --workspace. AGENTS.md says what holds now.Checked:
cargo test --workspace: 903 passed, 4 failed, 13 ignored. The 4 fail on Windows too and are main's: the three bcpack oracle_parity tests (open PRs #3263 and others) and repository_passes_policy on frame_users.rs.Fixes #
What it changes
How it was tested
cargo testpassed for the crates it touches: yes / noChecked for overlap
@davemathews12 on GitHub · 2026-11-30 03:59 UTC · original
What it changes
AGENTS.mdsaid nothing fails to compile off Windows. That was not true. On Linux,victory-gpufailed with 91 errors, and behind itvictory-hle(33 errors) and thevictoryapp also failed. So none of the tests of those crates, or of the app, had ever run off Windows. Modules added recently (ambient,mesh_rest,memguard,compilemem,save_share, …) never got the#[cfg(windows)]gate the others carry.This PR fixes that using the crate's existing patterns:
cfg(windows)for Windows code and its tests.cfg(any(windows, test))for pure logic that Windows code calls, so its tests run everywhere.cfg(not(windows))stand-in where a portable caller needs one.victory-gpu
ambientandmesh_rest(D3D12) are now Windows-only.memguardandcompilememare built for tests, without their memory queries and without the compile gate's runtime.save_sharestill builds everywhere. Off Windows it uses a UTC clock (civil), tested against dates from Python'sdatetime.room_lineandroom_percentare built for tests, so the first-upload decision tests now run on every platform.log_defrag_counters,set_range_lockandValueWait::holds.victory-hle
image_watchreads and writes nothing.victory (app)
victory translatenow runs off Windows.--validateand the pipeline checks report that they need Windows. Their stand-ins are empty enums, so no value can exist and nothing is faked.build.rswrites the D3D12 exports only for Windows targets. A Linux linker refused the.deffile.play::load_mods()gate is the same line as open PR #2581.Tests and CI
#[cfg(windows)], as #1108 did for the loader's PE-fixture tests.linuxCI job runscargo check --workspace --all-targetsandcargo test --workspace.AGENTS.mdnow describes what actually holds.This does not claim the title runs on Linux.
cfg(not(windows))paths are stubs, as before.How it was tested
x86_64-unknown-linux-gnu, Rust 1.98.1 fromrust-toolchain.toml):cargo check --workspace --all-targets --lockedis clean.cargo test --workspace --locked: 903 passed, 4 failed, 13 ignored. Before this PR, no test ofvictory-gpu,victory-hleorvictorycould build on Linux.mainon every platform, not caused by this PR:bcpack::tests::oracle_parity_*tests, afterf9de61c5left the in-test oracle on the old BC7 dictionary layout. Fixed in open #3263 and others.xtask::policy::tests::repository_passes_policy, which trips on the hook-offset list inheap_sites/frame_users.rs.x86_64-pc-windows-msvc,cargo clippy --workspace --all-targets, default and--all-features, cross-checked from Linux): the diagnostics are line for line the same asmain(35 and 40). Every change is either acfgthat is true on Windows or code compiled only elsewhere.apps/victory/src/translate.rsgained the off-Windows stand-ins.cargo testpassed for the crates it touches: yes, except the 4 failures onmainlisted above.Checked for overlap
play::load_mods()line; either can merge first). #1108 (merged) gated the loader's PE-fixture tests the same way. No open PR makesvictory-gpu/victory-hle/victorybuild off Windows or adds a Linux CI job (searched: linux, non-windows, "cfg(windows)", ubuntu, portable, cross-platform, ambient, mesh_rest).🤖 Generated with clause (I'm ready to burn tokens into this amazing project)
a0c86ebadeto5a32381ef0watchkeepsset_range_lock's re-export as on main 2f302d2274@edge2labs on GitHub · 2026-11-30 04:59 UTC · original
Hi @davemathews12,
Thank you for referencing my BC7 fix in PR #3263.
I noticed that you haven’t been able to build and test your portability changes on Windows. I have a Windows machine with an i9-14900K, RTX 4080 Super and 64 GB of RAM, and I’d be happy to help validate your PR.
I’m also working on performance optimizations in PRs #3561 and #3694.
Your Linux portability improvements could be very useful for our future research. If there are specific Windows tests you would like me to run, please let me know.
— Edge2Labs
@davemathews12 on GitHub · 2026-11-30 05:07 UTC · original
Hi!. Thanks @edge2labs, that would really help. Windows is the one thing I couldn't check: I only cross-checked clippy for the msvc target from Linux. Its warnings matched
mainline for line, but nothing was built, linked or run on Windows.If you have time, three checks on the PR branch (PowerShell, in your clone):
main: the threebcpack::tests::oracle_parity_*(your #3263 fixes those) andrepository_passes_policy. Anything else failing would be my bug.target\release\victory.exeshould build and link. The PR touchesapps/victory/build.rs; on Windows it should still exportD3D12SDKVersion/D3D12SDKPathas before.main. On Windows every change in the PR should compile to the same code as before, so nothing should look different.If any of it fails, the output is all I need. Thanks, and good luck with #3561 and #3694!
@davemathews12 on GitHub · 2026-11-30 05:56 UTC · original
@dyshay since you're testing PRs on a 4090 in
janus-prs: could #3687 go in too? It's the one change here I couldn't build or run on Windows. It gates Windows-only code withcfg(windows)so the workspace builds and tests on Linux. On the msvc target its clippy diagnostics matchmainline for line, so on Windows it should compile to the same code. A Windows build plus a short start of the game would confirm that. It merges cleanly with #3530 and #3501. Thanks!@trustno1-coder on GitHub · 2026-12-01 18:49 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed