WIP: Add self-contained Linux build/Proton toolchain, Wine fixes, and Sony HID/speaker/copy-back ports #23

Closed
github-bot wants to merge 63 commits from github-bot/gh-23 into main AGit
Owner

@⁠Bad3r on GitHub · 2026-12-05 15:34 UTC · original
Bad3r:linux-support → main · +8525 −135 · 76 files · 63 commits · closed without merging

Work in progress: Core Linux cross-compilation, guided Proton setup, isolated launcher scripts, Wine runtime fixes, and ported larp-linux features compile cleanly and pass automated checks on NixOS + NVIDIA + Proton Experimental. Extended live --execute gameplay testing after merging v2026.12.05-enhanced-v5 and verification on AMD GPUs (RADV) / non-Nix distributions remain in progress.

Test hardware

Component Spec
CPU Intel Core Ultra 9 285K (24 cores, up to 5.7 GHz)
GPU NVIDIA GeForce RTX 5080 (16 GB), driver 620.73.04, Vulkan 1.4
RAM 46 GiB
Runtime Proton Experimental

Automated Releases

gh workflow builds on push and makes a release: https://github.com/Bad3r/larp/releases/

Summary

Adds self-contained Linux cross-compilation (cargo-xwin) and Proton (umu-launcher / vkd3d-proton) setup/launch tooling alongside Wine runtime fixes and native Linux feature ports from Radicle larp-linux (GPL-3.0-or-later).

No copyrighted game files, Windows binaries/SDKs, or GPU vendor binaries are committed to the repository:

  • cargo-xwin caches Windows/MSVC cross-compilation headers locally during build.
  • linux/setup.sh offers opt-in SHA-256-pinned downloads (after explicit user license prompt or ACCEPT_LICENSE=1 opt-in) for x64 d3dcompiler_47.dll (Microsoft.Windows.SDK.CPP 10.0.26100.7705 via NuGet, no winetricks needed) and x64 nvngx_dlss.dll (NVIDIA/DLSS v310.9.16), or accepts local user-provided DLLs.

Testing

Verified

  • bash -n linux/*.sh and shellcheck -s bash linux/*.sh pass with zero warnings; nix flake check --no-build and devenv --offline --no-tui shell -- larp-check succeed.
  • ./linux/build.sh -- --offline cross-compiles merged v5 + Linux ports (release profile) and 85 .dxil shaders cleanly.
  • Compiled and executed Windows unit tests under Proton Experimental (umu-run in an isolated prefix):
    • larp-loader: 19 passed; 0 failed; 0 ignored (includes sony_pad, pad_effects, haptics, pad_audio).
    • larp-hle: 54 passed; 0 failed; 2 ignored (includes upstream CPU FFT dsp, ps5_icons, and hotplug; 2 ignored require physical hardware).
  • Verified non-interactive live DLSS_ACCEPT_LICENSE=1 ./linux/setup.sh --skip-d3dcompiler --non-interactive (v310.9.16 SHA-256 + PE32+ x86-64 check + driver dlssg/dlssd symlinks) and full interactive walkthrough via a pseudo-TTY harness (writing linux.env, testing [y/N] license acceptance and decline).
  • Verified LARP_* allowlist filtering, unshare --user --map-current-user --net netns isolation, timestamped log creation, and failure error digest via --print-env and isolated --dry-run.

Remaining / WIP

  • Live --execute gameplay validation of the merged v5 + ported build (LARP_DISPLAY_MODE=borderless, phone-camera copy-back, DualSense hidraw haptics/speaker).
  • Verification on AMD GPUs (Mesa RADV + patches/ + optional FSR DLLs) and non-Nix Linux distributions (Arch, Fedora, Ubuntu/Debian, SteamOS).
**@⁠Bad3r** on GitHub · 2026-12-05 15:34 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23) `Bad3r:linux-support` → `main` · +8525 −135 · 76 files · 63 commits · closed without merging > **Work in progress:** Core Linux cross-compilation, guided Proton setup, isolated launcher scripts, Wine runtime fixes, and ported `larp-linux` features compile cleanly and pass automated checks on NixOS + NVIDIA + Proton Experimental. Extended live `--execute` gameplay testing after merging `v2026.12.05-enhanced-v5` and verification on AMD GPUs (RADV) / non-Nix distributions remain in progress. ## Test hardware | Component | Spec | | --- | --- | | CPU | Intel Core Ultra 9 285K (24 cores, up to 5.7 GHz) | | GPU | NVIDIA GeForce RTX 5080 (16 GB), driver 620.73.04, Vulkan 1.4 | | RAM | 46 GiB | | Runtime | Proton Experimental | ## Automated Releases [gh workflow](https://github.com/Bad3r/larp/blob/linux-support/.github/workflows/release.yml) builds on push and makes a release: https://github.com/Bad3r/larp/releases/ ## Summary Adds self-contained Linux cross-compilation (`cargo-xwin`) and Proton (`umu-launcher` / `vkd3d-proton`) setup/launch tooling alongside Wine runtime fixes and native Linux feature ports from Radicle `larp-linux` (`GPL-3.0-or-later`). No copyrighted game files, Windows binaries/SDKs, or GPU vendor binaries are committed to the repository: - `cargo-xwin` caches Windows/MSVC cross-compilation headers locally during build. - `linux/setup.sh` offers opt-in SHA-256-pinned downloads (after explicit user license prompt or `ACCEPT_LICENSE=1` opt-in) for x64 `d3dcompiler_47.dll` (`Microsoft.Windows.SDK.CPP` `10.0.26100.7705` via NuGet, no `winetricks` needed) and x64 `nvngx_dlss.dll` (`NVIDIA/DLSS` `v310.9.16`), or accepts local user-provided DLLs. ## Testing ### Verified - `bash -n linux/*.sh` and `shellcheck -s bash linux/*.sh` pass with zero warnings; `nix flake check --no-build` and `devenv --offline --no-tui shell -- larp-check` succeed. - `./linux/build.sh -- --offline` cross-compiles merged `v5` + Linux ports (`release` profile) and `85` `.dxil` shaders cleanly. - Compiled and executed Windows unit tests under Proton Experimental (`umu-run` in an isolated prefix): - `larp-loader`: `19 passed; 0 failed; 0 ignored` (includes `sony_pad`, `pad_effects`, `haptics`, `pad_audio`). - `larp-hle`: `54 passed; 0 failed; 2 ignored` (includes upstream CPU FFT `dsp`, `ps5_icons`, and `hotplug`; `2 ignored` require physical hardware). - Verified non-interactive live `DLSS_ACCEPT_LICENSE=1 ./linux/setup.sh --skip-d3dcompiler --non-interactive` (`v310.9.16` SHA-256 + PE32+ x86-64 check + driver `dlssg`/`dlssd` symlinks) and full interactive walkthrough via a pseudo-TTY harness (writing `linux.env`, testing `[y/N]` license acceptance and decline). - Verified `LARP_*` allowlist filtering, `unshare --user --map-current-user --net` netns isolation, timestamped log creation, and failure error digest via `--print-env` and isolated `--dry-run`. ### Remaining / WIP - [ ] Live `--execute` gameplay validation of the merged `v5` + ported build (`LARP_DISPLAY_MODE=borderless`, phone-camera copy-back, DualSense `hidraw` haptics/speaker). - [ ] Verification on AMD GPUs (Mesa RADV + `patches/` + optional FSR DLLs) and non-Nix Linux distributions (Arch, Fedora, Ubuntu/Debian, SteamOS).
# Conflicts:
#	crates/larp-game/src/settings.rs
#	crates/larp-hle/src/modules/dsp.rs
#	crates/larp-hle/src/settings.rs
# Conflicts:
#	crates/larp-gpu/src/host.rs
The controller-speaker patch moved route-6 voices (phone, GPS, cop radio)
into the Pad mix group, which only the DualSense USB audio player drains.
It was installed whenever the title hash was known. Players on keyboard,
Xbox pads, a DualShock 4 or a Bluetooth DualSense lost those sounds.

Probe the hidraw nodes at install and leave the mixer stock when no
DualSense is on USB. speaker_status() now also reports when the pad's
USB audio is not playing. A pad removed mid-session still silences the
sounds until it returns; the docs say so.

Validation: cargo xwin check -p larp; cargo xwin test -p larp-loader
under Wine (19 passed). Not exercised on a controller.
The speaker sites share pages. When a later VirtualProtect failed, the
rollback restored the earlier sites first to last. The second restore on
a shared page put back the RWX protection the first call had recorded,
so a failed install could leave title code pages writable and executable.

Validation: cargo xwin check -p larp-loader.
The player discarded every error from play() (Activate, Initialize,
GetBufferSize, GetService, Start) and retried every 3 s. Haptics and the
speaker then failed with nothing in the log. Warn on the first failure
and log later retries at debug level.

Validation: cargo xwin check -p larp-loader.
The display-mode block logged "borderless fullscreen queued" even when
PostMessageW failed and the pending flag was cleared. Log the queued line
on success and warn with the error on failure.

Validation: cargo xwin check -p larp-gpu.
note_phone_photo runs on every GPU write of every texture. Its shape test
built the texture layout to check linearity before the by_resource lookup.
A phone-photo target already tracked recomputed that layout on each write.
Look the resource up first and check linearity only for a new candidate.

A candidate that build_title_land refuses is still not remembered, so a
linear 960x536 target whose landing fails repeats the work.

Validation: cargo xwin check -p larp-gpu.
Both files in LARP_DUALSENSE_ICONS_PATH are optional. A directory with
only platform.ttpf still warned that the GFX movie was missing. A missing
platform.ttpf was never logged. Warn only when neither file is there, and
log a missing single file at info level with what stays Xbox.

Validation: cargo xwin check -p larp-hle.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:21:57 +00:00
Author
Owner

@⁠Kassadd on GitHub · 2026-12-05 15:40 UTC · original · edited 2026-12-05 16:53 UTC

Editing with the results, as promised.

It works, and it is the only combination on this machine that gets host ray tracing up at all. CachyOS, RTX 4080 SUPER, NVIDIA 620.85.02, Proton Experimental 11.0 / vkd3d-proton 3.2.0.

linux/build.sh as written: 48 s, larp.exe plus all 85 replacement shaders. What I had to add, in order of how much time they cost me:

  1. WINEDLLOVERRIDES="dxgi=n,b". Without DXVK's dxgi the run dies at libvkd3d-1.dll+0x3ffd0 before anything is drawn. The backtrace blames vkd3d but the frame above it is dxgi.dll. Darner needs the same override here, so it is probably Proton-wide rather than larp-specific — but it is not in the docs.
  2. d3dcompiler_47 native (winetricks -q d3dcompiler_47). Before: E5005: Method 'Load4' is not defined, host ray queries dropped. After: tier=1.2, tiled resources on the host device, ray-tracing structure builder: the title's calls into it are hooked. That is the first ray tracing I have seen working on this card under Wine.
  3. LARP_CONTROLS=mnk. My Keychron V6 announces itself as a 19-button HID gamepad, so with auto the keyboard and mouse never reach the title and the game is controller-only (F9 dead too, same path). With mnk the log shows mouse: Raw Input and keyboard, mouse and gamepad all work at once.
  4. LARP_SHADER_REPLACE has to be the .dxil folder build.sh writes, not the .hlsl sources. Since your build now produces exactly that, this is only a docs gap.

Numbers, about 10 minutes in the world, 59 frames over 1,000 draws, warm cache:

median 35.4 ms (28 fps)
p90 42.3 ms
p95 43.1 ms
worst 95.0 ms

Panel shows GPU BUSY 93% and ray tracing 220 MB: the card is the limit here, not the submission thread, and that is with RT on. Only the 95 ms worst frame would I look at again.

Cache: the first start built ~44,000 pipelines (hours); the second with the same prefix took seconds and 0 being made, so the blobs do persist. Anything that changes d3dcompiler_47, the driver or vkd3d-proton's build invalidates them.

Re-ran on b6250aa (your branch merged with upstream) and all of it holds, including the two you fixed after my first pass:

  • dxgi=n,b is there now (ensure_dll_override dxgi n,b), and the hint you added for libvkd3d-1.dll crashes is the exact diagnosis I was missing. Nothing to add.
  • LARP_CONTROLS=mnk survives HOST_PAD_USED, so the Keychron-as-HID-gamepad case works without a local patch.
  • d3dcompiler_47 from the Windows SDK on NuGet, licence accepted — better than the winetricks route I used, and tier=1.2 still comes up.

LARP_DISPLAY_MODE=borderless works at start-up on this setup, which is the WIP item you flagged. On a 3440x1440 monitor the window ends up 3440x1440 at 0,0 with _NET_WM_STATE_FULLSCREEN — native resolution, not the 1920x1080 I got from the earlier revision. Hyprland/Wayland, no compositor tricks.

LARP_LANGUAGE=es with #53 applied: the F1 panel, the title's own prompts and the overlay all come up in Spanish.

Believe the Linux path is now validated end to end on CachyOS + NVIDIA from a second distro: build.sh → setup.sh → run.sh, no local patches. If this is what you were waiting on to leave Draft, it is done from my side.

Not tested: AMD, LARP_DISPLAY_MODE=borderless at start-up (your WIP), DLSS/FSR, frame generation.

**@⁠Kassadd** on GitHub · 2026-12-05 15:40 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7440631283) · edited 2026-12-05 16:53 UTC Editing with the results, as promised. **It works, and it is the only combination on this machine that gets host ray tracing up at all.** CachyOS, RTX 4080 SUPER, NVIDIA 620.85.02, Proton Experimental 11.0 / vkd3d-proton 3.2.0. `linux/build.sh` as written: 48 s, `larp.exe` plus all 85 replacement shaders. What I had to add, in order of how much time they cost me: 1. **`WINEDLLOVERRIDES="dxgi=n,b"`.** Without DXVK's `dxgi` the run dies at `libvkd3d-1.dll+0x3ffd0` before anything is drawn. The backtrace blames vkd3d but the frame above it is `dxgi.dll`. Darner needs the same override here, so it is probably Proton-wide rather than larp-specific — but it is not in the docs. 2. **`d3dcompiler_47` native** (`winetricks -q d3dcompiler_47`). Before: `E5005: Method 'Load4' is not defined`, host ray queries dropped. After: `tier=1.2`, `tiled resources on the host device`, `ray-tracing structure builder: the title's calls into it are hooked`. That is the first ray tracing I have seen working on this card under Wine. 3. **`LARP_CONTROLS=mnk`.** My Keychron V6 announces itself as a 19-button HID gamepad, so with `auto` the keyboard and mouse never reach the title and the game is controller-only (`F9` dead too, same path). With `mnk` the log shows `mouse: Raw Input` and keyboard, mouse **and** gamepad all work at once. 4. `LARP_SHADER_REPLACE` has to be the `.dxil` folder `build.sh` writes, not the `.hlsl` sources. Since your build now produces exactly that, this is only a docs gap. **Numbers**, about 10 minutes in the world, 59 frames over 1,000 draws, warm cache: | | | |---|---| | median | **35.4 ms** (28 fps) | | p90 | 42.3 ms | | p95 | 43.1 ms | | worst | 95.0 ms | Panel shows `GPU BUSY 93%` and `ray tracing 220 MB`: the card is the limit here, not the submission thread, and that is with RT on. Only the 95 ms worst frame would I look at again. **Cache**: the first start built ~44,000 pipelines (hours); the second with the same prefix took seconds and `0 being made`, so the blobs do persist. Anything that changes `d3dcompiler_47`, the driver or vkd3d-proton's build invalidates them. **Re-ran on `b6250aa`** (your branch merged with upstream) and all of it holds, including the two you fixed after my first pass: - **`dxgi=n,b` is there now** (`ensure_dll_override dxgi n,b`), and the hint you added for `libvkd3d-1.dll` crashes is the exact diagnosis I was missing. Nothing to add. - **`LARP_CONTROLS=mnk` survives `HOST_PAD_USED`**, so the Keychron-as-HID-gamepad case works without a local patch. - **`d3dcompiler_47` from the Windows SDK on NuGet**, licence accepted — better than the winetricks route I used, and `tier=1.2` still comes up. **`LARP_DISPLAY_MODE=borderless` works at start-up on this setup**, which is the WIP item you flagged. On a 3440x1440 monitor the window ends up `3440x1440` at `0,0` with `_NET_WM_STATE_FULLSCREEN` — native resolution, not the 1920x1080 I got from the earlier revision. Hyprland/Wayland, no compositor tricks. **`LARP_LANGUAGE=es`** with #53 applied: the F1 panel, the title's own prompts and the overlay all come up in Spanish. Believe the Linux path is now validated end to end on CachyOS + NVIDIA from a second distro: `build.sh` → `setup.sh` → `run.sh`, no local patches. If this is what you were waiting on to leave Draft, it is done from my side. **Not tested**: AMD, `LARP_DISPLAY_MODE=borderless` at start-up (your WIP), DLSS/FSR, frame generation.
Author
Owner

@⁠gamingwithhomie on GitHub · 2026-12-05 15:47 UTC · original

Awesome work @Bad3r! To help Linux/Proton users test this right away without disturbing the Windows/NVIDIA stable release, we published a dedicated pre-release build from your branch (156e79e) with both larp.exe and linux-tooling.zip:

https://github.com/gamingwithhomie/larp/releases/tag/v1.0.7-linux-test.1

Once you mark this PR ready from Draft (and any remaining WIP checks look good), we'll merge it into main!

**@⁠gamingwithhomie** on GitHub · 2026-12-05 15:47 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7440745344) Awesome work `@Bad3r`! To help Linux/Proton users test this right away without disturbing the Windows/NVIDIA stable release, we published a dedicated pre-release build from your branch (`156e79e`) with both `larp.exe` and `linux-tooling.zip`: https://github.com/gamingwithhomie/larp/releases/tag/v1.0.7-linux-test.1 Once you mark this PR ready from Draft (and any remaining WIP checks look good), we'll merge it into `main`!
Author
Owner

@⁠Kassadd on GitHub · 2026-12-05 16:37 UTC · original

Read through the diff before running it. Nothing here is a remote code execution hole and the scripts are careful (set -euo, no sudo, no rm -rf, no curl | sh, and they refuse paths inside the repo). Five things worth deciding on before this lands, in the order I would worry about them.

1. .envrc makes the checkout run code on cd. eval "$(devenv direnvrc)" executes whatever the devenv binary on PATH prints. That is the normal direnv pattern and it needs direnv allow, but it turns the repo into a thing that runs by itself for anyone who has direnv on. Fine as an optional path; worth keeping out of the default README flow.

2. linux/common.sh runs exec nix develop "path:$repo_root" when a tool is missing, without asking. Someone running run.sh in a checkout they did not write then evaluates flake.nix and pulls from the network. That is a surprise, not something the user can reason about beforehand.

3. linux/run.sh writes the arguments into a .cmd and only quotes the ones containing spaces, so a path or argument with &, |, ^ or % injects into cmd.exe. Low likelihood, easy to close by quoting every argument.

4. linux/setup.sh installs mozilla/fxc2's d3dcompiler_47, while docs/linux.md says it is Microsoft's. The hash comes from winetricks' own verb so it is not an unverified download, but the doc describes something the script does not do, and it puts a third-party binary in the prefix.

5. The deferred borderless toggle. Moving switch_borderless to PostMessageW(WM_APP+0xCC50) means that if the title's message loop is busy at startup the first frames keep the framed window, and alt_enter consumes any message with that id on the shown window — a collision with the title's own WM_APP+n range is possible. Worth a comment on why that id range is safe.

Not security, but I would keep them out of main: flake.nix, flake.lock, devenv.nix, devenv.yaml, devenv.lock and .envrc. They are one person's environment, the package lists have already drifted from each other (no shellcheck, no stdenv.cc in flake.nix), and the toolchain version is pinned in three places. A separate repo or a docs/ page carries the same value without making every checkout evaluate a Nix flake.

Two smaller ones: build.sh forces RUSTFLAGS=-C target-cpu=x86-64-v3, which makes Linux artefacts incomparable with the CI/Windows builds and is not really tooling. And README.md has a duplicated ## License heading just above a ---.

Good: settings.rs keeps the numeric LARP_UPSCALER_SCALE values as a fallback, the advisor early return under Wine leaves nothing used later, and the repo rules hold — no game files, .gitignore covers *.dll/*.exe/*.dxil.

**@⁠Kassadd** on GitHub · 2026-12-05 16:37 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7441459474) Read through the diff before running it. Nothing here is a remote code execution hole and the scripts are careful (`set -euo`, no `sudo`, no `rm -rf`, no `curl | sh`, and they refuse paths inside the repo). Five things worth deciding on before this lands, in the order I would worry about them. **1. `.envrc` makes the checkout run code on `cd`.** `eval "$(devenv direnvrc)"` executes whatever the `devenv` binary on `PATH` prints. That is the normal direnv pattern and it needs `direnv allow`, but it turns the repo into a thing that runs by itself for anyone who has direnv on. Fine as an optional path; worth keeping out of the default README flow. **2. `linux/common.sh` runs `exec nix develop "path:$repo_root"`** when a tool is missing, without asking. Someone running `run.sh` in a checkout they did not write then evaluates `flake.nix` and pulls from the network. That is a surprise, not something the user can reason about beforehand. **3. `linux/run.sh` writes the arguments into a `.cmd` and only quotes the ones containing spaces**, so a path or argument with `&`, `|`, `^` or `%` injects into `cmd.exe`. Low likelihood, easy to close by quoting every argument. **4. `linux/setup.sh` installs `mozilla/fxc2`'s `d3dcompiler_47`**, while `docs/linux.md` says it is Microsoft's. The hash comes from winetricks' own verb so it is not an unverified download, but the doc describes something the script does not do, and it puts a third-party binary in the prefix. **5. The deferred borderless toggle.** Moving `switch_borderless` to `PostMessageW(WM_APP+0xCC50)` means that if the title's message loop is busy at startup the first frames keep the framed window, and `alt_enter` consumes **any** message with that id on the shown window — a collision with the title's own `WM_APP+n` range is possible. Worth a comment on why that id range is safe. **Not security, but I would keep them out of `main`:** `flake.nix`, `flake.lock`, `devenv.nix`, `devenv.yaml`, `devenv.lock` and `.envrc`. They are one person's environment, the package lists have already drifted from each other (no `shellcheck`, no `stdenv.cc` in `flake.nix`), and the toolchain version is pinned in three places. A separate repo or a `docs/` page carries the same value without making every checkout evaluate a Nix flake. **Two smaller ones:** `build.sh` forces `RUSTFLAGS=-C target-cpu=x86-64-v3`, which makes Linux artefacts incomparable with the CI/Windows builds and is not really tooling. And `README.md` has a duplicated `## License` heading just above a `---`. **Good**: `settings.rs` keeps the numeric `LARP_UPSCALER_SCALE` values as a fallback, the `advisor` early return under Wine leaves nothing used later, and the repo rules hold — no game files, `.gitignore` covers `*.dll`/`*.exe`/`*.dxil`.
Author
Owner

@⁠Bad3r on GitHub · 2026-12-05 16:42 UTC · original · edited 2026-12-05 16:43 UTC

Not security, but I would keep them out of main: flake.nix, flake.lock, devenv.nix, devenv.yaml, devenv.lock and .envrc. They are one person's environment, the package lists have already drifted from each other (no shellcheck, no stdenv.cc in flake.nix), and the toolchain version is pinned in three places. A separate repo or a docs/ page carries the same value without making every checkout evaluate a Nix flake.

@⁠Kassadd saying that a devenv is a 1 person env is antithetical to what devenv is and nix flakes. shellcheck is not needed in the flake because its a dev dep. Pinning hashes wherever needed is a good practice but yes it can be better.

I will go through the rest of the feedback and address what I find valid. THank you

still looking into your first feedback, should be done in a bit.

**@⁠Bad3r** on GitHub · 2026-12-05 16:42 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7441527483) · edited 2026-12-05 16:43 UTC > **Not security, but I would keep them out of `main`:** `flake.nix`, `flake.lock`, `devenv.nix`, `devenv.yaml`, `devenv.lock` and `.envrc`. They are one person's environment, the package lists have already drifted from each other (no `shellcheck`, no `stdenv.cc` in `flake.nix`), and the toolchain version is pinned in three places. A separate repo or a `docs/` page carries the same value without making every checkout evaluate a Nix flake. @⁠Kassadd saying that a devenv is a 1 person env is antithetical to what devenv is and nix flakes. shellcheck is not needed in the flake because its a dev dep. Pinning hashes wherever needed is a good practice but yes it can be better. I will go through the rest of the feedback and address what I find valid. THank you still looking into your first feedback, should be done in a bit.
Author
Owner

@⁠Kassadd on GitHub · 2026-12-05 16:50 UTC · original

You are right about the flake and I was wrong to file it that way. "One person's environment" was the wrong framing: a devenv/flake exists to be shared, and a dev-only tool like shellcheck does not belong in the flake's packages. Withdraw that point — the locks are pinned with real hashes and that is the right way to do it. Same for the pin in three places: that is a tidiness point, not a reason to keep it out.

Everything else I raised stands as an observation, not as a blocker — and I see you have already done the two that mattered:

  • ad0fb51 adds ensure_dll_override dxgi n,b by default. That is the one that decided whether the game started at all on this machine, and the hint you added pointing at libvkd3d-1.dll is exactly the diagnosis I would have needed two hours earlier.
  • 3c29b3d keeps LARP_CONTROLS=mnk when HOST_PAD_USED is set. That fixes the other half: my Keychron V6 announces as a HID gamepad, and with auto the keyboard and mouse simply never arrived.

Re-running your branch (b6250aa, merged with upstream) on CachyOS now, borderless and LANG=es, to confirm both. I will edit this if anything changed for the worse, otherwise consider the Linux path validated on NVIDIA from a second distro: build.sh → setup.sh → run.sh, no local patches.

**@⁠Kassadd** on GitHub · 2026-12-05 16:50 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7441644155) You are right about the flake and I was wrong to file it that way. "One person's environment" was the wrong framing: a devenv/flake exists to be shared, and a dev-only tool like `shellcheck` does not belong in the flake's packages. Withdraw that point — the locks are pinned with real hashes and that is the right way to do it. Same for the pin in three places: that is a tidiness point, not a reason to keep it out. Everything else I raised stands as an observation, not as a blocker — and I see you have already done the two that mattered: - `ad0fb51` adds `ensure_dll_override dxgi n,b` by default. That is the one that decided whether the game started at all on this machine, and the hint you added pointing at `libvkd3d-1.dll` is exactly the diagnosis I would have needed two hours earlier. - `3c29b3d` keeps `LARP_CONTROLS=mnk` when `HOST_PAD_USED` is set. That fixes the other half: my Keychron V6 announces as a HID gamepad, and with `auto` the keyboard and mouse simply never arrived. Re-running your branch (`b6250aa`, merged with upstream) on CachyOS now, borderless and `LANG=es`, to confirm both. I will edit this if anything changed for the worse, otherwise consider the Linux path validated on NVIDIA from a second distro: `build.sh` → `setup.sh` → `run.sh`, no local patches.
Author
Owner

@⁠Bad3r on GitHub · 2026-12-05 16:55 UTC · original · edited 2026-12-05 17:13 UTC

OCR review (delegation mode): linux-support vs main

Reviewed commit: b6250aa (the current PR head). Line numbers refer to that commit.
Method: ocr delegate with the default rules, reviewed by the host agent in seven slices (shell/nix, app/core/settings/i18n, GPU, XMA/shader, HLE audio, loader/Sony pad, HLE input/storage). The review was static: nothing was built or run, and nothing was tested on hardware.
Coverage: 79 of 79 reviewable files reviewed, 0 skipped (coverage_rate 100%). 12 files were excluded by OCR as non-code (Cargo.lock, devenv.lock, README.md and docs/*.md).
Findings: 1 high, 9 medium, 30 low. Findings that depend on unverified hardware or console behavior are marked as conditional.

High

  1. crates/larp-loader/src/haptics.rs:501-545 — the controller-speaker patch is installed without checking for a DualSense, so route-6 sounds go silent for everyone else.
    install runs under Wine whenever the title hash is known (apps/larp/src/run.rs:212-213). It then calls install_speaker and sets SPEAKER_ON and set_speaker_routing(true) without checking for a DualSense on USB. Nothing later clears SPEAKER_ON or ROUTE_RESULT. The player thread only exists to find a 4-channel DualSense endpoint.
    Before: route-6 voices (phone, GPS, cop radio) were rewritten to route 2 and played on the TV.
    After: the remap is patched out and the voices go to the Pad group, which only the player drains. With a keyboard, an Xbox pad, a DualShock 4, a DualSense over Bluetooth, or a DualSense unplugged mid-session, those sounds are silent.
    speaker_status() (lines 539-545) only reports "not played on" when SPEAKER_ON is false, so it never reflects a missing pad.
    Fix: enable the path only when a DualSense USB endpoint exists at install time, or add a runtime fallback that restores route 2 when no player is active.

Medium

  1. crates/larp-hle/src/settings.rs:229-237 — --lang loses to LARP_LANGUAGE and settings.ini. i18n::initialize ranks --lang first, but settings::load runs later for larp run --execute, re-reads LARP_LANGUAGE and the settings.ini entry (line 419), and calls set_language. LARP_LANGUAGE=fr larp --lang de run --execute ends in French. Fix: skip set_language in load when --lang was given.
  2. crates/larp-hle/src/modules/gameinput.rs:212-216 — the default (Auto) keyboard stand-in pad changed. fallback() now calls mouse::mnk_enabled() (controls_mode() != Pad). The old condition was controls_mode() == Mnk || mouse_captured(). In Auto mode the keyboard therefore uses the controls.ini bindings from the first poll. For example, Tab was View and is now LB, and X was the X button and is now the right trigger. FALLBACK_BUTTONS is only used in Pad mode, and mouse_captured() has no callers left. If this is intended, remove the dead code and document it. If not, restore the old condition.
  3. crates/larp-gpu/src/host.rs:12551-12568 — LARP_DISPLAY_MODE=fullscreen|exclusive and LARP_DISPLAY_REFRESH lost their behavior. On main, these modes called SetFullscreenState(true) and applied the 24-500 Hz refresh rate. Now every mode posts one borderless message and LARP_DISPLAY_REFRESH is never read. README.md, docs/environment-variables.md:49 and linux/run.sh:394 still advertise both. The log line says "queued" even when PostMessageW failed, because the result is discarded. Fix: restore the exclusive path or deprecate the variable in docs and log a warning when it is set.
  4. crates/larp-shader/src/emit/lower.rs:6508 — first_thread_init bounds-checks against the wrong size. It checks cs.lds_bytes() / 4, but the emitted LDS array has s.lds_dwords entries, which line 2454 narrows with .min(own) for own_barriers programs. A constant index in [own, lds_bytes/4) passes the check and stores out of bounds. Fix: bound by self.s.lds_dwords.
  5. crates/larp-shader/src/emit/lower.rs:6433-6522 — first_thread_init is not gated to the water shader. It applies to every compute ds_write that follows a v_cmpx_eq_u32 0, <thread ids> and writes constants, and it replaces the EXEC-masked store with flat_thread == 0. A shader that uses that slot as a flag set only when thread 0 was active changes behavior. The Darner port justifies it only for CS_TransmissionVolumetrics_Tiled. Fix: gate it by shader hash like the other by_hash fixes.
  6. crates/larp-shader/src/ir.rs:998-1174 — the new skip analysis has no tests. About 180 lines (stalls, decided_cycle, any_cycle) change which skips without_skips removes for every compute shader. The 20k-step budget fails in opposite directions: decided_cycle returns false and any_cycle returns true. A small fixture (skipped infinite loop, skipped terminating loop, readfirstlane loop) would pin the behavior.
  7. crates/larp-hle/src/modules/dsp.rs:198-237 — convolution output may drop the head of the response (conditional). process zero-pads each 1024-sample block to 2048, multiplies by the partition spectra, and outputs only the second half. Nothing is overlap-added from the previous block. With an IR stored as h[0] at index 0, a unit-impulse IR returns silence. The result is correct only if the console's IR partitions are stored shifted by one block, which nothing in the repo establishes. All four tests derive expected values from the same formula, so none can catch a wrong choice. Check against a reference convolution or captured hardware output.
  8. crates/larp-hle/src/modules/audio.rs:455-483 — save_carry writes 522 (mono) or 1034 (stereo) bytes into the title's overlap buffer without knowing its size (conditional). heap_bytes only checks the enclosing heap block. If the title's buffer is smaller, adjacent title data is overwritten, or the carry is truncated. The tests use a 0x800 buffer. Verify the real size or write only when it is known.
  9. devenv.nix:3-16, flake.nix:15-26 — the dev shells do not provide rustup, but linux/build.sh:95-96 exits without it. On a Nix host without a host-level rustup, nix develop or devenv shell followed by larp-build fails. Fix: add pkgs.rustup to both shells or document it as a prerequisite.

Low

  • crates/larp-loader/src/haptics.rs:696-697: let _ = unsafe { play(..) } discards every error from Activate, Initialize, GetBufferSize, GetService and Start. Haptics and speaker fail silently and retry every 3 s.
  • crates/larp-loader/src/haptics.rs:618-625: the install_speaker rollback restores page protections first to last, while the success path goes last to first because sites share pages. A failed install can leave code pages RWX. Iterate in reverse.
  • crates/larp-loader/src/sony_pad.rs:1064-1066: nothing clears SPEAKER_ROUTING on shutdown, and the final stopping report still carries the speaker routing. The DualSense may stay routed to its speaker at volume 0x64 after exit (not verified on hardware).
  • crates/larp-hle/src/modules/apu.rs:435-445: DECODE_CONVERT_OPUS does not reject input_length == 0, unlike the Opus-only path at line 607. An empty packet is decoded as packet-loss concealment and injects up to 120 ms of audio.
  • crates/larp-hle/src/modules/apu.rs:456-469: Converter.input and Converter.output grow without bound when the title submits faster than it drains. Cap the backlog.
  • crates/larp-gpu/src/host.rs:13212-13232: WM_APP_BORDERLESS is a fixed id (0x8000+0x4C) in the title's WM_APP range, and alt_enter swallows it. Use RegisterWindowMessageW. (Local commit b10659f, not pushed, already guards this.)
  • crates/larp-gpu/src/overlay/perf.rs:390-396: the localized "compiling" row overflows the 30-column panel in de (31 columns with 12 active and 120 queued), pl (33) and fr (35, and already 22 for 4 and 20 against an 11-column label). Shorten the strings.
  • crates/larp-gpu/src/copyback/buffers.rs:132-165: note_phone_photo runs on every GPU write use of every texture and builds the layout before the cheap by_resource.contains_key check. A failed build_title_land is not remembered, so the work repeats.
  • crates/larp-gpu/src/copyback/buffers.rs:105-165: phone-photo detection is by shape only (960x536 RGBA8 render target) and is on by default. Another render target with that shape gets a CPU write into title memory on every GPU write. Consider default-off or a narrower match.
  • crates/larp-gpu/src/copyback/buffers.rs:105-810: the new title-memory landing path (block pool, alive/writing handshake with forget, row-pitch repack) has no tests.
  • crates/larp-gpu/src/planes.rs:290-299: the new aspect_viewport_for doc block sits between record's doc comment and record.
  • crates/larp-gpu/src/pipeline/make.rs:1056-1066: the wait doc comment now sits above run_with_frame_budget.
  • crates/larp-hle/src/settings.rs:329-334: requested_resolution was inserted between load's doc comment and load.
  • crates/larp-hle/src/settings.rs:269-276: LANG_TAGS duplicates the index-to-tag mapping in crates/larp-game/src/settings.rs and the i18n catalogs. The doc at crates/larp-game/src/settings.rs:57 points to a LANGUAGE_TAGS that does not exist. Add a test that the three agree.
  • apps/larp/src/main.rs:215-217: advisor::check() runs before settings::load, so advisor messages never use the settings.ini language.
  • crates/larp-hle/src/settings/menu.rs:227-276: the rewritten wrap (display-width and CJK breaking) has no tests, nor do the Language branch of env(), requested_resolution or the UI-pool patch application.
  • locales/*.json: no locale defines setting.speaker_gain.{label,about} or setting.volumetrics_quality.{label,about}. They fall back to English in every language. All 7 locales are otherwise in parity (288 keys, matching placeholders).
  • crates/larp-hle/src/modules/gameinput/mouse.rs:256-269: key_for() silently drops binding values parse_vk cannot parse. A typo such as a = Shfit keeps the default key with no warning.
  • crates/larp-hle/src/modules/ps5_icons.rs:111-131: a directory with only one of the two optional files still logs a warning that the other is missing, and a missing platform.ttpf is never logged.
  • crates/larp-hle/src/modules/files.rs:266-304: is_read_only_open and create_file2_flags decide whether an open is redirected to the host file. A wrong answer redirects a write open. Neither has a unit test.
  • crates/larp-shader/src/ir.rs:1166-1173: the reads_lanes && any_cycle retention rule is coarse (the lane read and the cycle need not be related) and is not described in the without_skips doc comment.
  • crates/larp-formats/src/xma.rs:843-859: Decoder::resume resets the decoder and then validates block_len per channel, so an invalid channel 1 leaves a half-resumed decoder. Validate both channels first. The overlap is also quantised to 16 bits through to_i16.
  • devenv.nix:35: bash -n "$DEVENV_ROOT"/linux/*.sh checks only the first file, because the other paths become positional arguments. Loop over the files.
  • devenv.nix:43, flake.nix:30: the shells hardcode RUSTUP_TOOLCHAIN default 1.98.1 while linux/common.sh reads rust-toolchain.toml. A channel bump leaves the shells stale.
  • linux/common.sh:148-155: Proton discovery uses sort -r, which lists "Proton Hotfix" before "Proton 9.0" and "Proton 9.0" before "Proton 10.0". Use sort -rV.
  • linux/setup.sh:193-216: upsert_env_var escapes only \ and ", and the file is later sourced. A path containing $HOME is expanded on load, and one containing $(cmd) would run cmd on every launch. Escape $ and backticks or use printf %q.
  • linux/setup.sh:238: CLEANUP+= registered inside functions called through $(...) runs in a subshell, so the parent's EXIT trap never sees the paths. An interrupted download leaves *.part.$PID files (the nupkg is about 160 MB).
  • linux/run.sh:616-635: arguments are quoted for cmd.exe only when they contain whitespace. A path or an argument after -- containing & | < > ^ ( ) or % is parsed by cmd.exe. (Local commit e3a3e22, not pushed, rewrites this.)
  • docs/controls.example.ini:1-3: the header says to copy the file next to options.ini in the Larp folder (the Windows layout). On Linux, LARP_CONTROLS_INI is needed, and neither this example nor linux/config.example.env mentions it.
  • linux/common.sh: no automated tests cover larp_collect_pv_paths, larp_is_pe64, larp_load_config precedence or upsert_env_var.

Behavior changes to be aware of

  • Mouse look: the stick is now velocity-filtered and about 7 times more sensitive at the same sens (about 800 counts/s gives full deflection, against about 5500 before). The minimum sensitivity drops from 0.05 to 0.01 (mouse.rs:540-583).
  • controls.ini: the search order is now LARP_CONTROLS_INI, <root>/controls.ini, <root>/data/7952987A/controls.ini, <exe dir>/controls.ini, then the cwd. Comma-separated binds and Darner button names are accepted.
  • LARP_CONTROLS=mnk with a host pad: keyboard and mouse now stay active alongside the pad (gameinput.rs:237-242).
  • Window aspect ratio: windows whose aspect differs by 1% or more from the buffer are letterboxed instead of stretched. LARP_STRETCH=1 restores the old behavior (planes.rs).
  • Phone photos: a 960x536 linear RGBA8 render target is read back into title memory on each submission that writes it. LARP_PHONE_PHOTO_BACK=0 disables it.
  • Sony pad: under Wine, DualSense and DualShock 4 are read straight from Z:\dev\hidrawN, and rumble, light bar and triggers are written back over HID. The pad is reset on exit. LARP_SONY_PAD=0 disables it.
  • Default network isolation: linux/run.sh launches inside unshare --user --net (opt out with --no-netns or LARP_NO_NETNS=1). Outbound traffic, including crash uploads, is blocked by default.
  • LARP_* allowlist: linux/run.sh unsets any LARP_* variable not on its 145-entry allowlist. A new Rust env var must also be added there, or it is dropped on Linux.
  • Prefix writes: linux/setup.sh installs a native d3dcompiler_47.dll into the Proton prefix and moves the existing one aside as .larp-saved. Both pinned SHA-256 values match the upstream files.
  • XMA / audio / DSP: XMA decoding output should be bit-identical. XApuConnect now accepts DECODE_CONVERT_OPUS and CONVERT_PCM (previously E_NOTIMPL), and mono 1024-frame convolution streams now produce output instead of silence.
  • DualSense speaker: the controller-speaker reroute is on by default under Wine (LARP_SPEAKER=0 disables it). See finding 1.

Notes

  • The branch moved during the review. Local commits 4d58202, e3a3e22, 74d376f and b10659f sit on top of b6250aa and are not pushed. Findings above were checked against b6250aa. Two of them (run.sh quoting, WM_APP_BORDERLESS) are already addressed by those local commits.
  • One reviewer's finding about the nix develop re-exec was dropped, because 4d58202 makes it opt-in.
  • cargo check could not complete on this host (a third-party windows-future build error before reaching larp code), so the Rust findings come from reading the code.

Review run with ocr delegate (open-code-review, delegation mode).

**@⁠Bad3r** on GitHub · 2026-12-05 16:55 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7441710757) · edited 2026-12-05 17:13 UTC ## OCR review (delegation mode): `linux-support` vs `main` **Reviewed commit:** `b6250aa` (the current PR head). Line numbers refer to that commit. **Method:** `ocr delegate` with the default rules, reviewed by the host agent in seven slices (shell/nix, app/core/settings/i18n, GPU, XMA/shader, HLE audio, loader/Sony pad, HLE input/storage). The review was static: nothing was built or run, and nothing was tested on hardware. **Coverage:** 79 of 79 reviewable files reviewed, 0 skipped (`coverage_rate` 100%). 12 files were excluded by OCR as non-code (`Cargo.lock`, `devenv.lock`, `README.md` and `docs/*.md`). **Findings:** 1 high, 9 medium, 30 low. Findings that depend on unverified hardware or console behavior are marked as conditional. ### High 1. **`crates/larp-loader/src/haptics.rs:501-545` — the controller-speaker patch is installed without checking for a DualSense, so route-6 sounds go silent for everyone else.** `install` runs under Wine whenever the title hash is known (`apps/larp/src/run.rs:212-213`). It then calls `install_speaker` and sets `SPEAKER_ON` and `set_speaker_routing(true)` without checking for a DualSense on USB. Nothing later clears `SPEAKER_ON` or `ROUTE_RESULT`. The player thread only exists to find a 4-channel DualSense endpoint. *Before:* route-6 voices (phone, GPS, cop radio) were rewritten to route 2 and played on the TV. *After:* the remap is patched out and the voices go to the `Pad` group, which only the player drains. With a keyboard, an Xbox pad, a DualShock 4, a DualSense over Bluetooth, or a DualSense unplugged mid-session, those sounds are silent. `speaker_status()` (lines 539-545) only reports "not played on" when `SPEAKER_ON` is false, so it never reflects a missing pad. *Fix:* enable the path only when a DualSense USB endpoint exists at install time, or add a runtime fallback that restores route 2 when no player is active. ### Medium 2. **`crates/larp-hle/src/settings.rs:229-237` — `--lang` loses to `LARP_LANGUAGE` and `settings.ini`.** `i18n::initialize` ranks `--lang` first, but `settings::load` runs later for `larp run --execute`, re-reads `LARP_LANGUAGE` and the `settings.ini` entry (line 419), and calls `set_language`. `LARP_LANGUAGE=fr larp --lang de run --execute` ends in French. *Fix:* skip `set_language` in `load` when `--lang` was given. 3. **`crates/larp-hle/src/modules/gameinput.rs:212-216` — the default (Auto) keyboard stand-in pad changed.** `fallback()` now calls `mouse::mnk_enabled()` (`controls_mode() != Pad`). The old condition was `controls_mode() == Mnk || mouse_captured()`. In Auto mode the keyboard therefore uses the `controls.ini` bindings from the first poll. For example, Tab was View and is now LB, and X was the X button and is now the right trigger. `FALLBACK_BUTTONS` is only used in Pad mode, and `mouse_captured()` has no callers left. If this is intended, remove the dead code and document it. If not, restore the old condition. 4. **`crates/larp-gpu/src/host.rs:12551-12568` — `LARP_DISPLAY_MODE=fullscreen|exclusive` and `LARP_DISPLAY_REFRESH` lost their behavior.** On main, these modes called `SetFullscreenState(true)` and applied the 24-500 Hz refresh rate. Now every mode posts one borderless message and `LARP_DISPLAY_REFRESH` is never read. `README.md`, `docs/environment-variables.md:49` and `linux/run.sh:394` still advertise both. The log line says "queued" even when `PostMessageW` failed, because the result is discarded. *Fix:* restore the exclusive path or deprecate the variable in docs and log a warning when it is set. 5. **`crates/larp-shader/src/emit/lower.rs:6508` — `first_thread_init` bounds-checks against the wrong size.** It checks `cs.lds_bytes() / 4`, but the emitted LDS array has `s.lds_dwords` entries, which line 2454 narrows with `.min(own)` for `own_barriers` programs. A constant index in `[own, lds_bytes/4)` passes the check and stores out of bounds. *Fix:* bound by `self.s.lds_dwords`. 6. **`crates/larp-shader/src/emit/lower.rs:6433-6522` — `first_thread_init` is not gated to the water shader.** It applies to every compute `ds_write` that follows a `v_cmpx_eq_u32 0, <thread ids>` and writes constants, and it replaces the EXEC-masked store with `flat_thread == 0`. A shader that uses that slot as a flag set only when thread 0 was active changes behavior. The Darner port justifies it only for `CS_TransmissionVolumetrics_Tiled`. *Fix:* gate it by shader hash like the other `by_hash` fixes. 7. **`crates/larp-shader/src/ir.rs:998-1174` — the new skip analysis has no tests.** About 180 lines (`stalls`, `decided_cycle`, `any_cycle`) change which skips `without_skips` removes for every compute shader. The 20k-step budget fails in opposite directions: `decided_cycle` returns false and `any_cycle` returns true. A small fixture (skipped infinite loop, skipped terminating loop, readfirstlane loop) would pin the behavior. 8. **`crates/larp-hle/src/modules/dsp.rs:198-237` — convolution output may drop the head of the response (conditional).** `process` zero-pads each 1024-sample block to 2048, multiplies by the partition spectra, and outputs only the second half. Nothing is overlap-added from the previous block. With an IR stored as `h[0]` at index 0, a unit-impulse IR returns silence. The result is correct only if the console's IR partitions are stored shifted by one block, which nothing in the repo establishes. All four tests derive expected values from the same formula, so none can catch a wrong choice. Check against a reference convolution or captured hardware output. 9. **`crates/larp-hle/src/modules/audio.rs:455-483` — `save_carry` writes 522 (mono) or 1034 (stereo) bytes into the title's overlap buffer without knowing its size (conditional).** `heap_bytes` only checks the enclosing heap block. If the title's buffer is smaller, adjacent title data is overwritten, or the carry is truncated. The tests use a 0x800 buffer. Verify the real size or write only when it is known. 10. **`devenv.nix:3-16`, `flake.nix:15-26` — the dev shells do not provide `rustup`, but `linux/build.sh:95-96` exits without it.** On a Nix host without a host-level rustup, `nix develop` or `devenv shell` followed by `larp-build` fails. *Fix:* add `pkgs.rustup` to both shells or document it as a prerequisite. ### Low - `crates/larp-loader/src/haptics.rs:696-697`: `let _ = unsafe { play(..) }` discards every error from `Activate`, `Initialize`, `GetBufferSize`, `GetService` and `Start`. Haptics and speaker fail silently and retry every 3 s. - `crates/larp-loader/src/haptics.rs:618-625`: the `install_speaker` rollback restores page protections first to last, while the success path goes last to first because sites share pages. A failed install can leave code pages RWX. Iterate in reverse. - `crates/larp-loader/src/sony_pad.rs:1064-1066`: nothing clears `SPEAKER_ROUTING` on shutdown, and the final stopping report still carries the speaker routing. The DualSense may stay routed to its speaker at volume 0x64 after exit (not verified on hardware). - `crates/larp-hle/src/modules/apu.rs:435-445`: `DECODE_CONVERT_OPUS` does not reject `input_length == 0`, unlike the Opus-only path at line 607. An empty packet is decoded as packet-loss concealment and injects up to 120 ms of audio. - `crates/larp-hle/src/modules/apu.rs:456-469`: `Converter.input` and `Converter.output` grow without bound when the title submits faster than it drains. Cap the backlog. - `crates/larp-gpu/src/host.rs:13212-13232`: `WM_APP_BORDERLESS` is a fixed id (`0x8000+0x4C`) in the title's WM_APP range, and `alt_enter` swallows it. Use `RegisterWindowMessageW`. (Local commit `b10659f`, not pushed, already guards this.) - `crates/larp-gpu/src/overlay/perf.rs:390-396`: the localized "compiling" row overflows the 30-column panel in de (31 columns with 12 active and 120 queued), pl (33) and fr (35, and already 22 for 4 and 20 against an 11-column label). Shorten the strings. - `crates/larp-gpu/src/copyback/buffers.rs:132-165`: `note_phone_photo` runs on every GPU write use of every texture and builds the layout before the cheap `by_resource.contains_key` check. A failed `build_title_land` is not remembered, so the work repeats. - `crates/larp-gpu/src/copyback/buffers.rs:105-165`: phone-photo detection is by shape only (960x536 RGBA8 render target) and is on by default. Another render target with that shape gets a CPU write into title memory on every GPU write. Consider default-off or a narrower match. - `crates/larp-gpu/src/copyback/buffers.rs:105-810`: the new title-memory landing path (block pool, `alive`/`writing` handshake with `forget`, row-pitch repack) has no tests. - `crates/larp-gpu/src/planes.rs:290-299`: the new `aspect_viewport_for` doc block sits between `record`'s doc comment and `record`. - `crates/larp-gpu/src/pipeline/make.rs:1056-1066`: the `wait` doc comment now sits above `run_with_frame_budget`. - `crates/larp-hle/src/settings.rs:329-334`: `requested_resolution` was inserted between `load`'s doc comment and `load`. - `crates/larp-hle/src/settings.rs:269-276`: `LANG_TAGS` duplicates the index-to-tag mapping in `crates/larp-game/src/settings.rs` and the i18n catalogs. The doc at `crates/larp-game/src/settings.rs:57` points to a `LANGUAGE_TAGS` that does not exist. Add a test that the three agree. - `apps/larp/src/main.rs:215-217`: `advisor::check()` runs before `settings::load`, so advisor messages never use the `settings.ini` language. - `crates/larp-hle/src/settings/menu.rs:227-276`: the rewritten `wrap` (display-width and CJK breaking) has no tests, nor do the `Language` branch of `env()`, `requested_resolution` or the UI-pool patch application. - `locales/*.json`: no locale defines `setting.speaker_gain.{label,about}` or `setting.volumetrics_quality.{label,about}`. They fall back to English in every language. All 7 locales are otherwise in parity (288 keys, matching placeholders). - `crates/larp-hle/src/modules/gameinput/mouse.rs:256-269`: `key_for()` silently drops binding values `parse_vk` cannot parse. A typo such as `a = Shfit` keeps the default key with no warning. - `crates/larp-hle/src/modules/ps5_icons.rs:111-131`: a directory with only one of the two optional files still logs a warning that the other is missing, and a missing `platform.ttpf` is never logged. - `crates/larp-hle/src/modules/files.rs:266-304`: `is_read_only_open` and `create_file2_flags` decide whether an open is redirected to the host file. A wrong answer redirects a write open. Neither has a unit test. - `crates/larp-shader/src/ir.rs:1166-1173`: the `reads_lanes && any_cycle` retention rule is coarse (the lane read and the cycle need not be related) and is not described in the `without_skips` doc comment. - `crates/larp-formats/src/xma.rs:843-859`: `Decoder::resume` resets the decoder and then validates `block_len` per channel, so an invalid channel 1 leaves a half-resumed decoder. Validate both channels first. The overlap is also quantised to 16 bits through `to_i16`. - `devenv.nix:35`: `bash -n "$DEVENV_ROOT"/linux/*.sh` checks only the first file, because the other paths become positional arguments. Loop over the files. - `devenv.nix:43`, `flake.nix:30`: the shells hardcode `RUSTUP_TOOLCHAIN` default `1.98.1` while `linux/common.sh` reads `rust-toolchain.toml`. A channel bump leaves the shells stale. - `linux/common.sh:148-155`: Proton discovery uses `sort -r`, which lists "Proton Hotfix" before "Proton 9.0" and "Proton 9.0" before "Proton 10.0". Use `sort -rV`. - `linux/setup.sh:193-216`: `upsert_env_var` escapes only `\` and `"`, and the file is later sourced. A path containing `$HOME` is expanded on load, and one containing `$(cmd)` would run `cmd` on every launch. Escape `$` and backticks or use `printf %q`. - `linux/setup.sh:238`: `CLEANUP+=` registered inside functions called through `$(...)` runs in a subshell, so the parent's EXIT trap never sees the paths. An interrupted download leaves `*.part.$PID` files (the nupkg is about 160 MB). - `linux/run.sh:616-635`: arguments are quoted for `cmd.exe` only when they contain whitespace. A path or an argument after `--` containing `& | < > ^ ( )` or `%` is parsed by `cmd.exe`. (Local commit `e3a3e22`, not pushed, rewrites this.) - `docs/controls.example.ini:1-3`: the header says to copy the file next to `options.ini` in the `Larp` folder (the Windows layout). On Linux, `LARP_CONTROLS_INI` is needed, and neither this example nor `linux/config.example.env` mentions it. - `linux/common.sh`: no automated tests cover `larp_collect_pv_paths`, `larp_is_pe64`, `larp_load_config` precedence or `upsert_env_var`. ### Behavior changes to be aware of - **Mouse look:** the stick is now velocity-filtered and about 7 times more sensitive at the same `sens` (about 800 counts/s gives full deflection, against about 5500 before). The minimum sensitivity drops from 0.05 to 0.01 (`mouse.rs:540-583`). - **`controls.ini`:** the search order is now `LARP_CONTROLS_INI`, `<root>/controls.ini`, `<root>/data/7952987A/controls.ini`, `<exe dir>/controls.ini`, then the cwd. Comma-separated binds and Darner button names are accepted. - **`LARP_CONTROLS=mnk` with a host pad:** keyboard and mouse now stay active alongside the pad (`gameinput.rs:237-242`). - **Window aspect ratio:** windows whose aspect differs by 1% or more from the buffer are letterboxed instead of stretched. `LARP_STRETCH=1` restores the old behavior (`planes.rs`). - **Phone photos:** a 960x536 linear RGBA8 render target is read back into title memory on each submission that writes it. `LARP_PHONE_PHOTO_BACK=0` disables it. - **Sony pad:** under Wine, DualSense and DualShock 4 are read straight from `Z:\dev\hidrawN`, and rumble, light bar and triggers are written back over HID. The pad is reset on exit. `LARP_SONY_PAD=0` disables it. - **Default network isolation:** `linux/run.sh` launches inside `unshare --user --net` (opt out with `--no-netns` or `LARP_NO_NETNS=1`). Outbound traffic, including crash uploads, is blocked by default. - **`LARP_*` allowlist:** `linux/run.sh` unsets any `LARP_*` variable not on its 145-entry allowlist. A new Rust env var must also be added there, or it is dropped on Linux. - **Prefix writes:** `linux/setup.sh` installs a native `d3dcompiler_47.dll` into the Proton prefix and moves the existing one aside as `.larp-saved`. Both pinned SHA-256 values match the upstream files. - **XMA / audio / DSP:** XMA decoding output should be bit-identical. `XApuConnect` now accepts `DECODE_CONVERT_OPUS` and `CONVERT_PCM` (previously `E_NOTIMPL`), and mono 1024-frame convolution streams now produce output instead of silence. - **DualSense speaker:** the controller-speaker reroute is on by default under Wine (`LARP_SPEAKER=0` disables it). See finding 1. ### Notes - The branch moved during the review. Local commits `4d58202`, `e3a3e22`, `74d376f` and `b10659f` sit on top of `b6250aa` and are not pushed. Findings above were checked against `b6250aa`. Two of them (`run.sh` quoting, `WM_APP_BORDERLESS`) are already addressed by those local commits. - One reviewer's finding about the `nix develop` re-exec was dropped, because `4d58202` makes it opt-in. - `cargo check` could not complete on this host (a third-party `windows-future` build error before reaching `larp` code), so the Rust findings come from reading the code. Review run with `ocr delegate` (open-code-review, delegation mode).
Author
Owner

@⁠Bad3r on GitHub · 2026-12-05 17:14 UTC · original

Awesome work @Bad3r! To help Linux/Proton users test this right away without disturbing the Windows/NVIDIA stable release, we published a dedicated pre-release build from your branch (156e79e) with both larp.exe and linux-tooling.zip:

https://github.com/gamingwithhomie/larp/releases/tag/v1.0.7-linux-test.1

Once you mark this PR ready from Draft (and any remaining WIP checks look good), we'll merge it into main!

just setup a gh build workflow: https://github.com/Bad3r/larp/actions/

**@⁠Bad3r** on GitHub · 2026-12-05 17:14 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7441970888) > Awesome work `@Bad3r`! To help Linux/Proton users test this right away without disturbing the Windows/NVIDIA stable release, we published a dedicated pre-release build from your branch (`156e79e`) with both `larp.exe` and `linux-tooling.zip`: > > https://github.com/gamingwithhomie/larp/releases/tag/v1.0.7-linux-test.1 > > Once you mark this PR ready from Draft (and any remaining WIP checks look good), we'll merge it into `main`! just setup a gh build workflow: https://github.com/Bad3r/larp/actions/
is_read_only_open and create_file2_flags decide whether an open of a
title file may go to the host copy. A wrong answer redirects a write
open. Pin both with the Win32 constants from windows-sys: read rights on
OPEN_EXISTING pass; any write right, a creating or truncating
disposition, or FILE_FLAG_DELETE_ON_CLOSE does not; dwFileFlags is read
only when dwSize covers it.

Validation: cargo xwin test -p larp-hle -- files:: under Wine (4 passed).
The speaker_gain setting had no setting.speaker_gain.{label,about} entries
in any catalog. The F10 menu therefore showed it in English in every
language. Add both keys to all seven catalogs, in key order.

The non-English strings are machine-authored and have not been reviewed
by native speakers.

Validation: every catalog parses as JSON with 290 sorted keys;
cargo xwin test -p larp-core under Wine (7 passed).
`bash -n a.sh b.sh` parses only a.sh and passes the rest to it as
arguments. larp-check therefore skipped the syntax check of every script
after the first. Run bash -n once per script and stop on the first error.

Validation: the loop fails on a fixture whose second script has a syntax
error, where `bash -n a.sh b.sh` exits 0; nix-instantiate --parse
devenv.nix succeeds.
larp_find_proton sorted Steam's Proton directories with sort -r. That
ranks "Proton 9.0" above "Proton 10.0" and "Proton Hotfix" above both.
Sort numbered releases with sort -rV and try named builds after them.
GE-Proton directories also sort with -rV, so GE-Proton10-3 beats
GE-Proton9-27.

Validation: on a fixture HOME with Proton 9.0, 10.0 and Hotfix,
larp_find_proton returns Proton 10.0; with only GE-Proton9-27 and
GE-Proton10-3 it returns GE-Proton10-3. shellcheck -s bash passes.
upsert_env_var escaped only \ and " and wrote KEY="value". linux.env is
sourced on every launch. A value with $HOME expanded on load, and one
with $(cmd) or backticks ran cmd each time. Write KEY='value' and turn an
embedded ' into '\''.

Validation: a fixture writes nine values ($HOME, $(touch ...), backticks,
", \, spaces, ', empty, and ' around $(...)), sources the file and gets
every value back unchanged with no command run. The previous version
fails the same fixture and runs all three touch commands. shellcheck -s
bash passes.
fetch_nuget_d3dcompiler and fetch_github_dlss run inside $(...). The
paths they and download_pinned add to CLEANUP went to the subshell's copy
of the array, and the subshell had no EXIT trap. A Ctrl-C during a
download left *.part.$PID files behind (the nupkg is about 160 MB). Give
such a subshell its own CLEANUP list and EXIT trap.

SIGTERM still skips the EXIT trap, as it did before, in the parent too.

Validation: the real fetch_github_dlss and download_pinned run with a
stub curl and receive SIGINT mid-download. The old version leaves the
.part file; this one removes it. shellcheck -s bash passes.
On Linux the only dependable way to load controls.ini is
LARP_CONTROLS_INI. The controls.example.ini header gives the Windows
layout (next to options.ini), and linux.env and docs/linux.md did not
mention the variable. run.sh also passed a Linux path through unchanged,
unlike LARP_DUALSENSE_ICONS_PATH; Wine resolves a rooted path against the
current drive, which need not be Z:.

Convert a Linux LARP_CONTROLS_INI to its Z:\ path, add its directory to
the pressure-vessel paths, and warn and drop it when the file is missing,
as for LARP_DUALSENSE_ICONS_PATH. Document it in config.example.env and
docs/linux.md.

Validation: the run.sh block on fixtures converts an existing file and
adds its directory, warns and unsets a missing file, and leaves a Z:\ path
and an unset variable alone. shellcheck -s bash passes. Not run under
Proton.
The transposed matmul programs that feed the face network fold a wave sum
of 16-bit floats inside a per-lane branch. The lowering refused them on a
64-lane host, so their dispatches were dropped. A partner block outside the
running lanes is now read from its first lane that runs, or as +0.

Ported from larp-linux 58d61c9 (Spel0) and f704fb9.
While a DualSense is the active pad, R2 gets the PS5 build's notch at 70%
of the pull in vehicles, and a single rumble strength is split between the
motors with the PS5 build's curve. LARP_RUMBLE_GAIN (short alias
RUMBLE_GAIN) scales the Sony pad motors from 0.5 to 8, and
LARP_PAD_EFFECTS_LOG=1 also logs each change of a trigger's effect.

Ported from larp-linux 8b34c00 (k-qno1) and 6be2bd2.
Any run that failed within 10 seconds suggested turning network isolation
off, also when the title crashed on its own. The hint now shows only when
larp.exe never printed its "build" line.

Ported from larp-linux 14f14a4.
larp.exe records the commit it was built from, with -dirty when the source
differed, and shows it in the window title, on its first output line and
in --version. linux/run.sh reads the stamp from the file and warns when
larp.exe is not the build of the checkout; --rebuild runs linux/build.sh
for the selected profile first. The netns hint also counts the new "larp"
first line as a started larp.exe.

Ported from larp-linux d6b1541, with the launcher part rewritten for
linux/run.sh, which always runs target/<profile>/larp.exe.

Validation: the stamp check run on stamped, dirty, older and unstamped
files against this checkout; bash -n on linux/run.sh.
Without a patched build in LARP_VKD3D_PROTON_DIR, Proton's own vkd3d-proton
runs and VKD3D_FORCE_WAVE32 does nothing, but the log did not say so. The
log now records the build and marks wave32 as having no effect without the
patched build, and an AMD run without it warns on the terminal and in the
log.

Ported from larp-linux f24a7ed.

Validation: bash -n; linux/run.sh --print-env with --gpu amd and
--gpu nvidia.
A checkout held only the two patches, so an AMD run used Proton's own
vkd3d-proton unless the user built it: the Wave32 cap and the typed-buffer
coherence fix were missing. linux/vkd3d-proton/ now holds d3d12.dll and
d3d12core.dll, vkd3d-proton 71cae091b065 with the two patches in patches/,
and the LGPL text. linux/run.sh installs them on AMD unless
LARP_VKD3D_PROTON_DIR or $LARP_LINUX_DATA/vkd3d-proton holds a build of
the user's own.

Ported from larp-linux bf1743b; the DLLs are byte-identical to its blobs
and were not rebuilt here.

Validation: bash -n; linux/run.sh --print-env --gpu amd no longer warns
about a missing patched build.
Proton's setup_prefix copies its own d3d12.dll and d3d12core.dll into
system32 on every run and waitforexitandrun, after linux/run.sh installed
the patched build, so the "patched" label could describe a run that used
Proton's build. After the run the launcher now compares the prefix copies
with the patched DLLs, logs which build the run had and warns when Proton
replaced it.

Validation: bash -n and shellcheck on linux/run.sh. Proton's behaviour was
read from its proton script (setup_prefix, try_copy). No AMD run.
The read-back buffer is sized by GetCopyableFootprints and ends with the
last row's texels, not a full row pitch, so the slice handed to the saver
ran past the mapping.

Ported from the non-HDR part of larp-linux 8791d69.
Author
Owner

@⁠gamingwithhomie on GitHub · 2026-12-05 18:50 UTC · original

Reviewed in detail - keeping this on the separate Linux track (not merging to main yet), for these reasons:

  1. Committed binaries linux/vkd3d-proton/d3d12.dll / d3d12core.dll have an LGPL LICENSE beside them but no provenance (upstream commit/version or hash) tying them to patches/vkd3d-proton-wave32.patch, while the release workflow bundles linux/ and claims zero proprietary binaries.
  2. Not everything is Wine-gated: phone-photo copyback is default-on and hooks texture writes on native Windows too, and apps/larp/build.rs stamp() runs on every Windows build (spawns git, rerun-if-changed over whole trees, /INCLUDE:LARP_BUILD_STAMP).
  3. The bundled .github/workflows/release.yml auto-publishes a release on every push (guarded to the fork repo, but should not land on main as-is).

The Linux tooling itself stays published and tested via our v1.0.11 larp-linux-proton.zip / linux-test track. Path to main: split into (1) linux scripts+docs+Nix, (2) Sony pad/haptics, (3) phone-photo copyback, (4) shader fix, (5) workflow, and drop or provenance-pin the vkd3d DLLs. Thank you for the huge amount of work here!

**@⁠gamingwithhomie** on GitHub · 2026-12-05 18:50 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7443484282) Reviewed in detail - **keeping this on the separate Linux track (not merging to `main` yet)**, for these reasons: 1. Committed binaries `linux/vkd3d-proton/d3d12.dll` / `d3d12core.dll` have an LGPL LICENSE beside them but no provenance (upstream commit/version or hash) tying them to `patches/vkd3d-proton-wave32.patch`, while the release workflow bundles `linux/` and claims zero proprietary binaries. 2. Not everything is Wine-gated: phone-photo copyback is default-on and hooks texture writes on native Windows too, and `apps/larp/build.rs` `stamp()` runs on every Windows build (spawns git, rerun-if-changed over whole trees, `/INCLUDE:LARP_BUILD_STAMP`). 3. The bundled `.github/workflows/release.yml` auto-publishes a release on every push (guarded to the fork repo, but should not land on main as-is). The Linux tooling itself stays published and tested via our `v1.0.11` `larp-linux-proton.zip` / linux-test track. Path to main: split into (1) linux scripts+docs+Nix, (2) Sony pad/haptics, (3) phone-photo copyback, (4) shader fix, (5) workflow, and drop or provenance-pin the vkd3d DLLs. Thank you for the huge amount of work here!
Author
Owner

@⁠Bad3r on GitHub · 2026-12-05 18:57 UTC · original

Reviewed in detail - keeping this on the separate Linux track (not merging to main yet), for these reasons:

1. Committed binaries `linux/vkd3d-proton/d3d12.dll` / `d3d12core.dll` have an LGPL LICENSE beside them but no provenance (upstream commit/version or hash) tying them to `patches/vkd3d-proton-wave32.patch`, while the release workflow bundles `linux/` and claims zero proprietary binaries.

2. Not everything is Wine-gated: phone-photo copyback is default-on and hooks texture writes on native Windows too, and `apps/larp/build.rs` `stamp()` runs on every Windows build (spawns git, rerun-if-changed over whole trees, `/INCLUDE:LARP_BUILD_STAMP`).

3. The bundled `.github/workflows/release.yml` auto-publishes a release on every push (guarded to the fork repo, but should not land on main as-is).

The Linux tooling itself stays published and tested via our v1.0.11 larp-linux-proton.zip / linux-test track. Path to main: split into (1) linux scripts+docs+Nix, (2) Sony pad/haptics, (3) phone-photo copyback, (4) shader fix, (5) workflow, and drop or provenance-pin the vkd3d DLLs. Thank you for the huge amount of work here!

regarding number 1, thats from upstream larps, i added it for temporary amd people to test. I do not like its there either, will just remove it.

for number 2, these come also from upstream, once/if you rebase it will not be new in this tree.

for number 3, yeah its just for the fork unless you decide later to make auto builds via the CI and gate main.

**@⁠Bad3r** on GitHub · 2026-12-05 18:57 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7443588653) > Reviewed in detail - **keeping this on the separate Linux track (not merging to `main` yet)**, for these reasons: > > 1. Committed binaries `linux/vkd3d-proton/d3d12.dll` / `d3d12core.dll` have an LGPL LICENSE beside them but no provenance (upstream commit/version or hash) tying them to `patches/vkd3d-proton-wave32.patch`, while the release workflow bundles `linux/` and claims zero proprietary binaries. > > 2. Not everything is Wine-gated: phone-photo copyback is default-on and hooks texture writes on native Windows too, and `apps/larp/build.rs` `stamp()` runs on every Windows build (spawns git, rerun-if-changed over whole trees, `/INCLUDE:LARP_BUILD_STAMP`). > > 3. The bundled `.github/workflows/release.yml` auto-publishes a release on every push (guarded to the fork repo, but should not land on main as-is). > > > The Linux tooling itself stays published and tested via our `v1.0.11` `larp-linux-proton.zip` / linux-test track. Path to main: split into (1) linux scripts+docs+Nix, (2) Sony pad/haptics, (3) phone-photo copyback, (4) shader fix, (5) workflow, and drop or provenance-pin the vkd3d DLLs. Thank you for the huge amount of work here! regarding number 1, thats from upstream larps, i added it for temporary amd people to test. I do not like its there either, will just remove it. for number 2, these come also from upstream, once/if you rebase it will not be new in this tree. for number 3, yeah its just for the fork unless you decide later to make auto builds via the CI and gate main.
Author
Owner

@⁠Kassadd on GitHub · 2026-12-05 18:59 UTC · original

Tested the bundled vkd3d-proton on two different Protons — Experimental 11.0-20261128 and CachyOS 11.0-20261015 — and it behaves identically on both, because the bundled pair is what gets used either way:

vkd3d-proton - applicationVersion: 3.2.0
vkd3d-proton - build: 71cae091b06571e
tiled resources on the host device
ray tracing tier=1.2

That supports pinning the provenance rather than dropping the DLLs: the build matters, and 71cae091b is the right one — it is the same commit Darner's own docs/linux-proton.md names as the one that made all seven shaders and the picture correct.

One thing to add to the list, since it decides whether a Linux user gets a running game: WINEDLLOVERRIDES="dxgi=n,b" is still required. With the bundled d3d12.dll/d3d12core.dll in place but no override, the game still dies on the first frame with 0xc0000005 at libvkd3d-1.dll+0x3ffd0, because vkd3d-proton ships no dxgi and Wine's own delegates to libvkd3d 2.2. run.sh sets it since ad0fb51; launching larp.exe directly does not.

Everything else on the branch is running well here: RT, DLSS balanced + frame generation at 60 fps, LARP_CONTROLS=mnk, and the Spanish locale from #53.

**@⁠Kassadd** on GitHub · 2026-12-05 18:59 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7443612936) Tested the bundled vkd3d-proton on two different Protons — Experimental 11.0-20261128 and CachyOS 11.0-20261015 — and it behaves identically on both, because the bundled pair is what gets used either way: ``` vkd3d-proton - applicationVersion: 3.2.0 vkd3d-proton - build: 71cae091b06571e tiled resources on the host device ray tracing tier=1.2 ``` That supports **pinning the provenance rather than dropping the DLLs**: the build matters, and `71cae091b` is the right one — it is the same commit Darner's own `docs/linux-proton.md` names as the one that made all seven shaders and the picture correct. One thing to add to the list, since it decides whether a Linux user gets a running game: **`WINEDLLOVERRIDES="dxgi=n,b"` is still required**. With the bundled `d3d12.dll`/`d3d12core.dll` in place but no override, the game still dies on the first frame with `0xc0000005 at libvkd3d-1.dll+0x3ffd0`, because vkd3d-proton ships no `dxgi` and Wine's own delegates to `libvkd3d 2.2`. `run.sh` sets it since `ad0fb51`; launching `larp.exe` directly does not. Everything else on the branch is running well here: RT, DLSS balanced + frame generation at 60 fps, `LARP_CONTROLS=mnk`, and the Spanish locale from #53.
github-bot force-pushed github-bot/gh-23 from 759bad460e to 64a8646afb 2026-12-05 19:20:28 +00:00 Compare
run.sh drops every LARP_* variable outside its allowlist. The rebase onto
upstream f209756 added eleven runtime variables that the list lacked, so
Linux runs ignored them. Among them is LARP_FG_HUDLESS=0, upstream's off
switch for the frame-generation interface capture, which is needed to
test whether that capture causes the stall on the first in-world frame.

LARP_LIST_BENCH_DIR stays out: it is a benchmark path, not a player
setting.

Validation: bash -n; shellcheck printed no findings; --print-env with
LARP_FG_HUDLESS=0 no longer warns "ignoring unrecognized", and an unknown
LARP_BOGUS_TEST still does. Not run in-game.
stalls() in without_skips previously rejected any skipped region with a
cycle and any v_readfirstlane or v_readlane instruction, blocking Wave32
lowering for eae3498e6553afa8 (CS_CalcRasterClassificationListCounts),
67353810417f6c19 (CS_CalcRTClassificationListCounts), and 4e9b58cc637d9272
(CS_WriteRTClassificationResults).

Propagate SSA dependencies from v_readfirstlane/v_readlane writes across
phis and instructions inside the skipped region so any_cycle only guards
regions where a lane-read value reaches an Exit::Branch terminator.

Validated with linux/build.sh --diag, linux/build.sh, and larp.exe
translate --pipelines with LARP_HOST_MAX_WAVE=32 (3 of 3 compute
pipelines created, 0 refused; live run reported 0 dropped dispatches).
Add dxr11,no_descriptor_heap to NVIDIA's default VKD3D_CONFIG to use the
VK_EXT_descriptor_buffer path instead of VK_EXT_descriptor_heap on
vkd3d-proton 3.2 + NVIDIA 620.x.

Add larp_prepare_wine_path_var to map both host paths and Z:\... Wine
paths for LARP_SDL_PATH, LARP_DUALSENSE_ICONS_PATH, and LARP_CONTROLS_INI
into PRESSURE_VESSEL_FILESYSTEMS_RW, and print LARP_SDL_PATH in --print-env.

Validated with bash -n, shellcheck, linux/run.sh --print-env, and a live
run confirming SDL 3.4.22 loaded and VK_EXT_descriptor_buffer active.
Call super::host::null_view in Staged::drop and Ended::drop before
pushing slots back to heap.free so retired host resources are no longer
referenced by unused staging descriptors when D3D12 destroys them.

Validated with linux/build.sh --diag and linux/build.sh.
Return early in State::trace once !logged and FRAME reaches 256 entries
to avoid formatting draw targets and reads on every subsequent draw in
diag builds, and skip host::read_into in describe() when
regions::touches_taken is true.

Validated with linux/build.sh --diag and linux/build.sh.
Conflict resolutions:
- run.rs: LARP_PROMPTS=auto now goes through upstream's
  auto_prompt_style(). A LARP_DUALSENSE_ICONS_PATH movie still turns its
  PlayStation pick into the stock prompts, which that movie draws. Both
  the Sony effect/haptics hooks and upstream's vehicle hooks install.
- gameinput.rs: take upstream's maps_keys() hand-off. Its Mnk arm keeps
  the keyboard mapped with a pad in use, which supersedes
  suppress_keyboard_pad; that helper and its test are dropped.
- ir.rs: keep the lane-reads-reach-a-branch narrowing and add upstream's
  stall_guard_off() switch.
- larp-gpu lib.rs: export both name_build/on_wine and set_present_size.
- environment-variables.md: merge the two LARP_SHADER_REPLACE rows and
  keep the Linux section after upstream's new rows.

Validation: cargo xwin check --workspace --all-targets passes with only
warnings both parents already had; cargo xwin test -p larp -p larp-hle
-p larp-shader under wine passes (83 passed, 3 ignored).
run.sh drops every LARP_* variable outside its allowlist. The merge of
upstream 1ccd55e added fourteen runtime variables the list lacked, among
them LARP_FG_BACKEND, LARP_PRELOAD, LARP_WORKER_STACK_MB, LARP_GUARD_HOT
and LARP_WINE_NO_SPARSE. LARP_DITTOSR_PATH and LARP_STREAMLINE_DIR name
folders larp.exe opens, so they go through larp_prepare_wine_path_var
like LARP_SDL_PATH.

Validation: bash -n; shellcheck printed no findings; --print-env with
LARP_FG_BACKEND and LARP_WORKER_STACK_MB set no longer warns, and
LARP_BOGUS_TEST still does; bash -x shows a host LARP_DITTOSR_PATH
exported as its Z: path. Not run in-game.
setup.sh linked nvngx_dlssg.dll and nvngx_dlssd.dll from the NVIDIA
driver's Wine directory. The driver's nvngx_dlssg.dll 310.2.1 (driver
620.73) failed every evaluation of larp's frame generation with
0xbad00005 ("cached size cannot be zero"); after it was replaced with
310.9.16 the feature was made without that failure.

With DLSS_ACCEPT_LICENSE=1, fetch both from the same pinned NVIDIA/DLSS
release as nvngx_dlss.dll (SHA-256 pinned), replacing a link into the
driver's directory; a user's own file is replaced only with
--force-dlss. Without the license the driver links stay, with a note.
Report "already <version>" instead of "Installed" when the file is
unchanged.

Validated with bash -n and shellcheck (setup.sh clean; common.sh's
pre-existing SC2148), and setup.sh --non-interactive against a scratch
LARP_LINUX_DLSS_DIR: driver links kept without the license, replaced
with the pinned files with it, a rerun changes nothing, --force-dlss
replaces a user file and reports identical ones as already v310.9.16.
github-bot force-pushed github-bot/gh-23 from c55c57c785 to dac6422c65 2026-12-05 22:06:45 +00:00 Compare
The title's back-buffer creation (0x14247ad10) allocates back buffers
through a fixed-size XMemAlloc bump pool (82 MiB on Series S, 64 MiB on
Series X) and hits int3 if either:
- the buffers exceed the pool (e.g., raising resolution on Series S
  alongside its 4K UI plane), or
- unused pool space exceeds 2 MiB - 1 (0x1fffff) at title+0x247af2d
  (e.g., lowering resolution below 3840x2160 on Series X).

Patch Capacities to NOP the unused-space break (title+0x247af2b) first
and raise both models' pool sizes (title+0x247ad45, title+0x247ad4a) to
192 MiB so all offered resolution settings work on Series X and Series S.

Ported from larp-linux 9a1a24e.
The title's slot_ensure (+0xBC0380) checks a slot's range sizes without
the range allocator's lock, then frees and allocates through functions
that each lock for themselves; the allocation overwrites the slot's node
in place. Two workers ensuring the same slot both allocate it, the free
lists get a cycle, a worker walks it forever and the watchdog ends the
title (write to 0 at +0x2215C35). It reproduced 1.5 to 7 minutes in from
a save at the toll booths at night, with every build back to the import.

slot_ensure is now detoured to run under the allocator's own recursive
lock. Ported from victory pull request 466 (issues 57 and 142).

Ported from larp-linux 94fe1ed.
The title's is_free_node (+0xAD52D0) refuses an index below the first free
slot or equal to either sentinel, so 0xFFFF, the link of a node off the
lists, passes as free, and a free that meets one merges with node 0xFFFF
past the node array. Its je at +0xAD52E2 becomes jbe, refusing every index
from the head sentinel up; no valid node lies there.

This hardens a list that is already broken; it does not repair one. Such a
free then faults where it reads the link instead of writing past the array
and going on. Ported from victory pull request 466.

Ported from larp-linux 38dc0ce.
The launcher turned the DualSense controller picture and button prompts
on whenever data/dualsense-icons/ existed, so Xbox pad and keyboard
players got PlayStation prompts too. DUALSENSE_ICONS now defaults to
auto: the icons are used only if a DualSense or DualShock 4 is connected
when the game first loads them. 1 forces them on and 0 keeps Xbox icons.

Ported from larp-linux 01dafa0. linux/run.sh maps DUALSENSE_ICONS to
LARP_DUALSENSE_ICONS and passes it to larp.exe; larp.exe reads an unset
value as auto.
github-bot closed this pull request 2026-12-05 23:51:27 +00:00
Author
Owner

@⁠Bad3r on GitHub · 2026-12-05 23:46 UTC · original

closing this, might continue on it in the fork, I don't have interest in maintaining a fork, this one works for me, if it works for someone else that's great feel free to use it.

https://github.com/Bad3r/larp/tree/linux-support

**@⁠Bad3r** on GitHub · 2026-12-05 23:46 UTC · [original](https://github.com/gamingwithhomie/larp/pull/23#issuecomment-7447823661) closing this, might continue on it in the fork, I don't have interest in maintaining a fork, this one works for me, if it works for someone else that's great feel free to use it. https://github.com/Bad3r/larp/tree/linux-support

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.