Repository navigation
Conversation
VIctory stays a Windows program; on Linux it is cross-compiled for x86_64-pc-windows-msvc with cargo-xwin and run under Wine with VKD3D-Proton and DXVK. The README gains the steps; shell.nix gives Nix users the toolchain (rustup, cargo-xwin, clang-cl, lld-link, llvm-lib) and a Wine prefix of VIctory's own. The asset policy allows .nix files. Wine's ws2_32 lacks WSAConnectByList and GetAddrInfoExA, and its winhttp WinHttpGetProxySettingsEx. Forwarding to them panicked; now WSAConnectByList tries each vetted candidate with connect (blocking, the timeout not kept) and GetAddrInfoExA answers WSAHOST_NOT_FOUND, as for a blocked name. The export test exempts the three. view_format is Windows-only like host_resource, its only callee, so the workspace's host-side crates build natively again. The pre-commit hook is executable: git skipped it on Linux, where `cargo xtask install-hooks` said it was installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
duplicate of #191 |
|
Tested
No game data used. |
SkippySteve
left a comment
There was a problem hiding this comment.
I checked this out on a second Linux host (Arch, UMU-Proton 11.0-2e, whose prefix ships vkd3d-proton and DXVK) and re-ran the tests. I did not launch the title; this covers the crate tests and the docs only. I could not test on Windows.
Results
Cross-build: cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-run builds all 13 test binaries cleanly at 4b38ecf.
victory-hle under Proton's wine, at 4b38ecf compared with main (d2a4bae):
| main | this PR | |
|---|---|---|
| victory-hle unit tests | 85 passed, 1 failed (only_loopback_is_reachable: ws2_32.dll lacks WSAConnectByList) |
87 passed, 0 failed (including the new connect_by_list_falls_back_to_connect) |
| no_dll_planting | 1/1 | 1/1 |
So the missing-export panic happens on Proton's Wine too, not only on Wine Staging 11.21, and this PR fixes it.
Full workspace under wine with WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11=n,b": 259 passed and 6 failed. These are the same numbers and the same six tests as in the PR description:
- Caused by the environment:
load_probe(running cargo: Invalid handle),repository_passes_policy(running git) andstub_pipeline_is_created(digest [00 …] accepted). - Not yet explained, failing the same way here:
buffer_data_reaches_the_host_texture(row 0 reads back all zeros),argument_clamp_builds(clamp().is_some()fails) anda_rejected_blob_gives_an_empty_library. Those three also fail on a second vendor/driver stack, so the cause is probably in vkd3d-proton, not this PR.
For contrast, without the overrides (Wine's builtin d3d12) those four GPU tests pass. Instead, 7 valu_tests fail with neither hardware nor WARP SM 6.6 device available. That supports the README's point that Wine's own D3D12 is not enough.
Native Linux:
- The
#[cfg(windows)]onview_formatworks. Onmain,cargo test -p victory-gpustops atE0425 cannot find function host_resource. On this branch it builds and passes 23 tests. cargo xtask policypasses (152 files)..githooks/pre-commitis now100755in the index.
Notes (none of them blocking)
- The vkd3d cache can break the policy check, and not only for Nix users. I ran the tests from the repository root without
shell.nix, and vkd3d-proton left avkd3d-proton.cachethere. After that,cargo xtask policyfailed withbinary content (NUL bytes).shell.nixalready handles this. The README's plain-Wine steps could add the same two lines (export VKD3D_SHADER_CACHE_PATH=… DXVK_STATE_CACHE_PATH=…) so that people who don't use Nix don't hit it. - Wording of the "
cargo test --workspaceon non-Windows" claim. The gpu fix works. However, a nativecargo test --workspacestill stops invictory-hle(windows_sys,xmem,lifecycle,filesare not gated; that is #90/#112). Saying "victory-gpu now builds on non-Windows hosts" would be more accurate. connect_each(minor, and only reachable with loopback candidates). If the socket is non-blocking,connectreturnsWSAEWOULDBLOCK, and the code then treats that candidate as failed. The realWSAConnectByListblocks regardless of the socket's mode. The doc comment already says "Blocking; the timeout is not kept". It could also mention that a non-blocking socket will report failure here. Retryingconnecton the same socket afterWSAECONNREFUSEDis allowed by the Winsock docs, so trying the candidates in turn is fine.
Overlap with #149
#149 (docs/linux-proton.md plus a one-line README pointer) covers host tests, the umu-run/Proton flow, logging through cmd.exe /c, and the list of open Wine PRs. This PR covers the code fixes, shell.nix, and a plain-Wine section in the README. They mostly complement each other. My suggested merge order is #195 first. #149 would then be rebased on top of it to:
- drop its "main does not build on Linux:
host_resource" paragraph, which this PR fixes; - link to this README section for the plain-Wine and Nix setup instead of repeating it;
- keep only the Proton/umu specifics.
If it's useful, this section could later link to docs/linux-proton.md for Proton users, but that can be done in #149.
Approving: the code changes are small, are gated so that they only take effect when the host lacks the export, and I reproduced every test number in the description.
…ts 189-190, and volume overlap guard (port Belobug Marvisak#195/Marvisak#37/Marvisak#7/Marvisak#21)
What
VIctory can now be built on Linux and run under Wine. It is still a Windows program: it is cross-compiled for
x86_64-pc-windows-msvcwith cargo-xwin and run with VKD3D-Proton and DXVK.shell.nix: the toolchain for Nix users, plusWINEPREFIX, DLL overrides, the test runner, and the VKD3D-Proton/DXVK shader caches kept in the prefix..nixfiles.ws2_32.dlllacksWSAConnectByListandGetAddrInfoExA, and itswinhttp.dlllacksWinHttpGetProxySettingsEx. Forwarding to them panicked (the host lacks ...).WSAConnectByListnow tries each vetted candidate in turn withconnect. It blocks, and the timeout isn't honoured.GetAddrInfoExAanswersWSAHOST_NOT_FOUND, as it already does for a blocked name.WinHttpGetProxySettingsExnever calls the host's function. The export test exempts all three, and a new test covers theconnectfallback.view_formatis#[cfg(windows)], likehost_resource, its only callee. Before this,cargo test --workspacefailed on any non-Windows host withcannot find function host_resource..githooks/pre-commitis executable (100755). Git ignored it on Linux even aftercargo xtask install-hooksreported it as installed.Why
Wine's own D3D12 rejects the shader model 6.6 query (
E_INVALIDARG), so the title shows only a white window. VKD3D-Proton reports SM 6.6–6.8 and runs the translated shaders.Testing
Tested on NixOS with Wine 11.21 (Staging), VKD3D-Proton 3.0.1, DXVK 3.1.1 and an RTX 5060 Ti:
cargo xwin build --release --target x86_64-pc-windows-msvcbuilds.cargo xwin test -p victory-hleunder Wine passes all 87 tests, includingonly_loopback_is_reachable, which panicked before.load_probeandrepository_passes_policy(they startcargoandgitfrom inside Wine), andstub_pipeline_is_created(VKD3D-Proton doesn't check DXIL hashes).buffer_data_reaches_the_host_texture,argument_clamp_buildsanda_rejected_blob_gives_an_empty_libraryfail under VKD3D-Proton. The README lists them.cargo xtask policyand the xtask tests pass natively.Not tested on Windows. Every Rust change is a no-op there except the
WSAConnectByListandGetAddrInfoExAfallbacks, which only run when the host lacks those exports.🤖 Generated with Claude Code