Repository navigation
Port upstream Linux/Proton chain (PRs #994, #1218, #1011, #232, #217, #178, #523, #1017) - #1
Merged
Merged
Conversation
…piler refuses it Wine's d3dcompiler_47 (vkd3d-shader HLSL) rejects RWByteAddressBuffer.Load (E5005), so under Wine every indirect execution was dropped. The same source now goes to dxcompiler.dll (cs_6_0, root signature inside) instead.
Since the world bring-up, main no longer builds on Linux: victory-gpu names host_resource outside its cfg(windows), and victory-hle reaches Windows-only modules (xmem, files, lifecycle, the text entry dialog). This gates those uses only, as the smallest base for a native Linux runtime: - view_format and the D3D12 allocator hookup are Windows-only, like what they call. - XLaunchNewGame ends the title only on Windows; the text entry dialog answers "dismissed" elsewhere. - translate --validate / --pipelines refuse to start off Windows (no host DXIL validator or D3D12 there); translation itself runs. - Tests that parse the test binary as a PE image, or use Windows title paths, are ignored off Windows with the reason. Tested: Linux (CachyOS, rustc 1.98.1): cargo test --workspace passes (162 passed, 13 ignored). cargo check --target x86_64-pc-windows-msvc --all-targets gives the same diagnostics as before (none). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wine's ws2_32 lacks WSAConnectByList and GetAddrInfoExA, and its winhttp WinHttpGetProxySettingsEx. Forwarding to the first two panicked (the host lacks ...). WSAConnectByList now tries each vetted candidate with connect (blocking, the timeout not kept) where the host has none, and GetAddrInfoExA answers WSAHOST_NOT_FOUND, as for a blocked name. WinHttpGetProxySettingsEx never reaches the host. The export test exempts the three; a new test covers the connect fallback. view_format is Windows-only like host_resource, its only callee, so victory-gpu builds on non-Windows hosts 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>
Review on #178: load DXC from VICTORY_DXC, beside the dxil.dll that shader validation finds, then only the executable's folder and System32 (no bare LoadLibraryW search path). When DXC refuses the clamp, its error text is logged. README notes the Wine/Proton requirement.
The test builds its fixture by running the cargo that built it. A test exe cross-built on Linux and run by Wine or Proton cannot start that host program (Invalid handle), so the test failed for a reason that has nothing to do with the loader. Under Wine it now skips with a message, unless VICTORY_HLE_PROBE_DLL names a prebuilt hle_probe.dll, which it loads instead (on Windows too).
Lint victory-core, -pe, -formats, -pipeline, -game, -loader and xtask with clippy -D warnings on all targets, and victory-shader's library. Run the tests of all of them plus victory-shader, skipping only the seven pe/loader tests that parse their own test binary as a PE image (an ELF on Linux). Those skips become no-ops once the tests are cfg(windows). Use --locked, cancel superseded runs and cap the job at 30 minutes.
…uilt-DLL error Adds a windows-target-check job: cargo check of the whole workspace (all targets) for x86_64-pc-windows-msvc, and clippy -D warnings for the crates that are clean on that target. No MSVC or linking; blake3 is told to use its pure-Rust path. load_probe now ignores an empty VICTORY_HLE_PROBE_DLL and, when the path is not a file, says so and points at the Z: form Wine needs.
A CARGO_BUILD_TARGET or build.target from the environment or a user config moved the nested build's output under a triple directory, and the test then failed reading a path that did not exist. Name the target explicitly, build --locked like CI, and say which file is missing if the build succeeds without producing it.
Its non-test targets are clippy-clean on that target; one test in host.rs is not yet, so lint lib/bins/examples rather than --all-targets.
Both tests copied a hard-coded C:\Windows\System32\version.dll as their stand-in title DLL, so they failed with a bare unwrap on a Windows install not on C:. Build the path from SystemRoot (falling back to C:\Windows) and name both paths if the copy fails.
…report all test failures
victory-hle and apps/victory are type-checked for Windows but no clippy step covers them yet, so rustc warnings there (unused imports, dead code) went unnoticed. RUSTFLAGS=-D warnings for the whole job makes every step fail on them; one job-wide value keeps a single shared build.
Only main saves the rust-cache, so cancelling a superseded main run left PRs restoring a stale cache; cancel only superseded PR runs. The hle-probe fixture is outside the workspace and rustfmt-clean today; check it so it stays that way.
victory-core, victory-pe, victory-pipeline, victory-game, victory-shader, victory and xtask are rustfmt-clean on main, as is load_probe.rs; check them so they stay that way. victory-formats, victory-loader, victory-gpu and victory-hle are not clean yet and are left out until they are.
The fixture went to <workspace>/target/fixtures regardless of CARGO_TARGET_DIR or build.target-dir, so a build with a relocated target dir still wrote into the source tree. CARGO_TARGET_TMPDIR (set by cargo for integration tests) lives under the configured target dir. Also fix the example path in the prebuilt-DLL error: the documented `cargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.toml` writes to the fixture's own target dir, not target/fixtures.
actionlint catches context and expression typos, unknown keys and, via the runner's shellcheck, mistakes in run: scripts, none of which a YAML parse finds. SC2086 is ignored: the *_CRATES lists are split on purpose.
The Linux rustdoc step never documents cfg(windows) items, so broken or private intra-doc links in victory-hle, apps/victory's host and the hle-probe fixture went unchecked. Document them for x86_64-pc-windows-msvc with RUSTDOCFLAGS=-D warnings in windows-target-check (no linking). victory-shader is doc-clean on Linux but not for Windows (a Windows-only module links a private item), so it is left out here for now.
…back on its step The rustdoc steps now pass --document-private-items, so broken intra-doc links in private items' doc comments fail CI as well; private_intra_doc_links still fires. All crates in RUSTDOC_CRATES and WINDOWS_RUSTDOC_CRATES, and the hle-probe fixture, are already clean this way. The Windows rustdoc step had been inserted between the hle-probe rustfmt step and its comment; move the comment back.
…targets Their module docs linked private items (container::hash, the draw module, shader_cache's encode/decode), which rustdoc rejects in public docs; name them as code instead.
…P test's unsafe query
…s unsafe calls The fixture is outside the workspace, so it never inherited [workspace.lints] (undocumented_unsafe_blocks, unsafe_op_in_unsafe_fn, unused_must_use) and CI's fixture clippy step ran with defaults only. Repeat the lints in its Cargo.toml and document its seven FFI calls.
The helper only the Windows tests use (and its two imports) are now cfg(windows), so victory-shader's test target has no dead code on Linux. It joins LINUX_CRATES, replacing the lib-only clippy step.
Both are clean but for the one field_reassign_with_default in xmem.rs that open PRs #355/#405 fix; allow only that lint until one lands.
Grand Theft Auto VI places its descriptor heaps in its own memory and
copies whole slots there itself; no create or copy call reports those
writes, so the host slot kept what it was mirrored from before. Slots a
shader reads directly by index (not through a table) are only made from
what was mirrored: in the world a mesh shader read a slot as a constant
buffer while the host slot still held a texture view, whose upper half
it took for a buffer at address 0 (a GPU page fault and a lost device;
likely the "world's low-address page faults" noted at null_view).
Before each submission, the 64 KiB blocks of every shader-visible heap
written since the last one (watch::writes) are mirrored again; mirror()
skips slots whose record did not change.
Found with umr wave dumps under Proton (RX 9070 XT): the faulting waves
held s[8:11] = {0, 0x00400000, 0x00248000, 0}, the second half of an image
descriptor, loaded from heap slot ~1,061,522. Before, the world lost the
device after 5-90 s; with this, 90 s, then a different fault (next commit).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A root SRV is a raw address the GPU reads without bounds. The console's reads past the title buffer land in other title memory; ours past its host copy land in unmapped memory: in the world a compute shader read 32 MB past a root SRV's copy (umr: TCP fault at s[10:11] + 0x1f0e000) and the device was lost. Root SRVs (ByteAddressBuffer t<slot> in ROOT_CBV_SPACE) are now a table of one raw view sized to the rest of the host copy, in a dynamic slot of the bound view heap, reused within a list for the same address. Reads past the copy return zeros. The shaders' bindings do not change. With this and the previous commit, the world runs without a device loss for as long as tested (8 minutes, twice, under Proton). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wine emulates write watching page by page under one lock (about 1 ms an asking), and the world's copies ask about the same big buffers dozens of times per submission: 3,500 askings and 17 GB checked per frame, 3 s of a frame. Under Wine, a range the kernel already answered for in this submission is now answered from the journal; a write in between keeps its dirty bit and shows in the next submission. Windows is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VIctory builds on Linux with cargo-xwin and runs under Proton Experimental, getting as far as on Windows (tested: CachyOS, RX 9070 XT, Mesa 26.3.1). docs/linux-proton.md covers building, running, tests and the known differences; scripts/proton-run.sh runs victory.exe (and serves as cargo's test runner) with Proton's Wine, vkd3d-proton and DXVK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ission Under Wine each GetWriteWatch takes about 1 ms in the world (contention on Wine's virtual-memory lock with the title's write faults), not the size of the range: 70 us for 256 MB in isolation, 180 us per asking in the world, 190,000 askings in 3 minutes. VirtualQuery takes the same lock. Under Wine now: - the first asking in a submission asks about the whole title allocation (up to 4 GiB), so the other buffers in it are answered from the journal; - allocations are found from a cache by address, VirtualQuery only on a miss (a long region walk is capped and remembered as far as it went); - views of physical pages go straight to their guards (no failed GetWriteWatch first, no second VirtualQuery in guard()). Profiled on an RX 9070 XT: kernel time in watch::writes went from 34 s to about 8 s over the same 4-minute run. Windows is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VICTORY_SHOW_TARGET=<w>x<h>-f<format>[-<n>] presents, each frame, the n-th texture of that size and format the frame renders to or writes (first-use order, names as in VICTORY_DUMP_TARGETS files) instead of the title's frame. While the world's final image is still dark, its G-buffer shows the geometry: 2560x1440-f28-3 on a Series X profile showed the first mission's street (poles, wires, bollards, roofs) and let a player walk it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
victory_shader::emit::debug_ps(n) is a DXIL pixel shader of our own: it reads SV_Position only, colours each pixel by its surface's slope (from the screen-space derivatives of depth) and writes n colour targets. It needs nothing of the title's, so a draw's geometry shows whether or not its pixel shader translates. - VICTORY_DEBUG_PS=1 (diagnostics view): pipelines that draw depth-tested geometry use it instead of the title's pixel shader; flat layers (interface, full-screen passes) keep theirs, so menus stay usable. - Fallback: a geometry pipeline whose pixel shader does not translate, or that the host refuses, is made with the debug shader instead of having its draws dropped; in the debug view, one the host refuses with ours is made with the title's. VICTORY_PS_FALLBACK=0 turns the fallback off. With the debug view on, the world drew 3,600-4,100 draws per frame instead of about 1,700. A test makes a pipeline from the debug shader and a stand-in vertex shader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The title's threads wait up to 500 ms per frame for pipelines being made before draws are dropped. VICTORY_PIPELINE_WAIT_MS changes that budget (0: never wait; pipelines then appear a few frames later and one-off passes may be lost). The default is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From RDNA2/RDNA3/RDNA 3.5 reports on #844: what a system Wine needs instead of Proton (vkd3d-proton 3.2+, DXVK's dxgi.dll, no Microsoft d3dcompiler_47 any more), and VICTORY_SHOW_TARGET, VICTORY_DEBUG_PS, VICTORY_PS_FALLBACK and VICTORY_PIPELINE_WAIT_MS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the non-Windows build to compile and pass clippy with -D warnings: - victory-gpu: gate Windows-only items (view_format, samplers, index, forget, view, rtv_record, dsv_record, tagged_record, pc_format, family, SRGB, DEPTH_FORMATS, PlacedFootprint::bytes, texture_memory, take_indirect, UAV_BARRIER, presented) with #[cfg(windows)]; some also used by tests, so they are gated #[cfg(any(windows, test))]. - victory-gpu: silence unused params in close/barrier/execute_indirect (this/count/barriers/counter/count_offset/ran) on the non-Windows path, matching the existing let _ = pattern in reset(). - victory-gpu: remove the unused OnceLock import in pipeline.rs. - victory-hle: gate `function` in host.rs (uses the Windows-only System32 module loader) and the cfg(windows)-only modules' imports in modules/mod.rs, so the crate builds on Linux. - victory-hle: fix title-path handling on non-Windows hosts: keep already-absolute and Windows-style absolute paths (drive-rooted and UNC), and resolve the file name across both separators. - victory-hle: gate the drive-over-folder mount test to Windows. - victory-shader: gate the Windows-only imports in the emit test module. - victory-loader/victory-pe: gate tests that read current_exe as PE. - apps/victory: gate anyhow::Context import (Windows-only run()). - apps/victory translate: validator/host pipelines skipped with a note on hosts without the Windows DLL; no error. cargo test --workspace --locked --all-features: 23 suites, all pass. cargo clippy --workspace --all-targets --locked --all-features -- -D warnings: clean.
The guest queue started a new watch submission and refreshed heap slots the title wrote before `Host::execute` took the submission mutex. A second queue caller could then rewrite a host heap while the first caller's GPU work, already submitted and being waited on, still read it. `Host::execute_title` now takes the lock first, then starts the watch submission and refreshes the heaps, then prepares and runs the lists. Internal submissions (indirect clamp, captures, copy-backs) keep using `execute`, which doesn't refresh. Reported by MichaelSmithAI in Marvisak/VIctory#994. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cross-builds the test binaries with clang-cl, lld-link and an xwin splat and runs them in a Wine prefix under target/. --vkd3d-proton puts that folder's D3D12 in the prefix instead of Wine's own. The loader's end-to-end test cannot start cargo inside Wine, so its fixture is built beforehand and named by VICTORY_HLE_PROBE.
Library paths go through CARGO_ENCODED_RUSTFLAGS and include paths are shell-quoted for cc (CC_SHELL_ESCAPED_FLAGS), so a path with spaces is no longer split.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # README.md
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # crates/victory-hle/src/modules/net.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # crates/victory-gpu/src/indirect.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # crates/victory-loader/tests/load_probe.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # apps/victory/src/translate.rs # crates/victory-hle/src/modules/d3d12x.rs # crates/victory-hle/src/modules/storage.rs # crates/victory-hle/src/modules/xgame.rs # crates/victory-hle/src/modules/xgameui.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the upstream (Marvisak/VIctory) Linux-enablement chain into the fork — the shortest path to "GTA VI runs on Linux": the Windows build runs unchanged under Proton/Wine (vkd3d-proton + DXVK dxgi), verified upstream by testers on RDNA2/RDNA3/RDNA3.5/RTX 4090.
Merged upstream PRs
VICTORY_SHOW_TARGET, debug pixel shader (VICTORY_DEBUG_PS,VICTORY_PS_FALLBACK),VICTORY_PIPELINE_WAIT_MS, Wine-aware write-watch batching (kernel time 34 s → 8 s; Windows unchanged),docs/linux-proton.md,scripts/proton-run.sh.cargo xtask wine-test— runs the Windows test binaries on a Linux host under Wine (clang-cl/lld-link + xwin SDK).scripts/run-ge-proton.sh,shell.nix,docs/linux-wine.md)..github/workflows/linux-subset.yml) + the fixture gets a realVICTORY_HLE_PROBE_DLLprebuilt path with Wine-skip logic.WSAConnectByListfallback (connect_eachcandidate loop) where Wine's ws2_32 lacks the export.Conflict resolutions (non-trivial)
net.rsWSAConnectByList: kept #217'sconnect_eachfallback (better than #994's fail-closed); test now uses the unifiedOPTIONALexport list.indirect.rsclamp: combined #994'sroot_signature(device)helper path (system compiler) with #178's DXC fallback (root sig embedded in blob).load_probe.rs: kept #232'sprobe_dll()+VICTORY_HLE_PROBE_DLL; updatedxtask/src/wine.rsto set that var name.translate.rs,d3d12x.rs,storage.rs,xgame.rs,xgameui.rs: kept our side — #994 already ships theunsupportedstub module and the richer gating.Own fix
xtask/src/policy.rs:.nixadded to the asset-policy allowlist —shell.nixfrom #1011 otherwise failsrepository_passes_policy.Verification
cargo check --workspace --all-targets: cleancargo clippy --workspace --all-targets --locked -- -D warnings(both feature sets): cleancargo test --workspace --locked --target x86_64-pc-windows-msvc: all pass except 15victory-shaderemit tests that hard-require an SM 6.6 GPU/WARP device — verified identical on cleanmain(no GPU on this box), so no regression.Not in this PR
Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed