[BUNDLE] Eight more fixes carried from contributors' forks: #745 #776 #787 #805 #845 #852 #915 #918 #1609

Closed
MamaLeVrai wants to merge 20 commits from upstream-pr/1610 into main
MamaLeVrai commented 2026-11-24 19:45:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T19:45:13Z.


Eight fixes from contributors' forks, in one PR. Each was reported as an issue that points to a fork branch and a commit (written when pull requests were still limited to collaborators), and none of their authors has a pull request. The branches are merged here as they are, with their commits and their authors, onto main (ffe310e); nothing is changed. Same idea as #1603, which carries four fixes of one contributor.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below.

What is inside

Issue Author Fork branch Commit What it fixes
#745 raphael-riesner shader/med3-nan-bits c796377 v_med3 with a NaN operand gives the median on NVIDIA (fcmp uno folded)
#776 schmiticle; follow-up lucaseddd gpu/write-watch-once-per-submission; gpu/write-watch-preserve-partial-results c326bfa; 32ec0f4 write-watch queries repeat over nested buffers (120-180 ms of a world frame); the follow-up keeps the pages a sweep already reported when a later query of the same asking fails (a write could be lost, reproduced on c326bfa by DrDarkDK and lucaseddd)
#787 Pablo-Barros cli/translate-compare 31953ea victory compare: an A/B of two translate --list outputs, program by program
#805 davutsimsekk fix/loadlibrary-datafile-host 343aa42 LOAD_LIBRARY_AS_DATAFILE loads outside HostPolicy fail with ERROR_MOD_NOT_FOUND
#845 Numbers-iwnl fix/idle-receiver-keyboard a6884a3 a receiver answering for a switched-off pad hides the keyboard stand-in (3 commits)
#852 NicolaiVdS shader/atomic-handle-type ae7e0be an image atomic after a size query reuses an f32 handle: invalid SPIR-V, NVIDIA driver crash
#915 talakasse gpu/partial-detile af4fef4 detile only the subresources a texture's changed pages hold
#918 cybx shadow-batched-copy-back 4c0d57d put a run of GPU-written pieces back with one kernel call

The reasoning, the repro and the measurements of each are in its issue; each branch has its own tests where it adds behaviour.

Left out

  • #729 (keyboard input with an XInput pad, from fix/keyboard-beside-xinput-pad): conflicts with #845 in gameinput.rs, both being about the keyboard stand-in next to a pad; they need to be reconciled by their authors.
  • #951 (21 commits, 131 behind main), #728 and #815 (large patch collections), #966 (a 64 MB stack for the pipeline workers, which #1129 already does) are not carried.

Notes

  • #776 has a second commit. 32ec0f4 is lucaseddd's follow-up on top of c326bfa, from the thread of #776 (their branch gpu/write-watch-preserve-partial-results; GitHub denies them a pull request, they say there). It is merged as it is, with its author and its test. EduAzevedo's 3284f19 (one query for a whole allocation) is not included: its author says the frame is not faster with it and leaves it for whoever takes the sweep in.
  • Authorship. The commits are not rewritten. Any author who would rather open their fix as their own pull request can say so and it comes out of this one.
  • Overlap with the other bundles. These branches are built on main; #776, #915 and #918 touch the same files as some GPU bundles (#1418, #1426, #1439, #1542), so after one of them lands the other may need a rebase.

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 361 passed, 0 failed, 6 ignored (main: 342 passed, 6 ignored), two runs

The title was not run. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/carried-forks-2
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6590008171 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1610). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T19:45:13Z. --- **Eight fixes from contributors' forks, in one PR.** Each was reported as an issue that points to a fork branch and a commit (written when pull requests were still limited to collaborators), and none of their authors has a pull request. The branches are merged here as they are, with their commits and their authors, onto `main` (`ffe310e`); nothing is changed. Same idea as #1603, which carries four fixes of one contributor. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR. The re-verification commands are below. ## What is inside | Issue | Author | Fork branch | Commit | What it fixes | |---|---|---|---|---| | #745 | raphael-riesner | `shader/med3-nan-bits` | `c796377` | `v_med3` with a NaN operand gives the median on NVIDIA (`fcmp uno` folded) | | #776 | schmiticle; follow-up lucaseddd | `gpu/write-watch-once-per-submission`; `gpu/write-watch-preserve-partial-results` | `c326bfa`; `32ec0f4` | write-watch queries repeat over nested buffers (120-180 ms of a world frame); the follow-up keeps the pages a sweep already reported when a later query of the same asking fails (a write could be lost, reproduced on `c326bfa` by DrDarkDK and lucaseddd) | | #787 | Pablo-Barros | `cli/translate-compare` | `31953ea` | `victory compare`: an A/B of two `translate --list` outputs, program by program | | #805 | davutsimsekk | `fix/loadlibrary-datafile-host` | `343aa42` | `LOAD_LIBRARY_AS_DATAFILE` loads outside `HostPolicy` fail with `ERROR_MOD_NOT_FOUND` | | #845 | Numbers-iwnl | `fix/idle-receiver-keyboard` | `a6884a3` | a receiver answering for a switched-off pad hides the keyboard stand-in (3 commits) | | #852 | NicolaiVdS | `shader/atomic-handle-type` | `ae7e0be` | an image atomic after a size query reuses an f32 handle: invalid SPIR-V, NVIDIA driver crash | | #915 | talakasse | `gpu/partial-detile` | `af4fef4` | detile only the subresources a texture's changed pages hold | | #918 | cybx | `shadow-batched-copy-back` | `4c0d57d` | put a run of GPU-written pieces back with one kernel call | The reasoning, the repro and the measurements of each are in its issue; each branch has its own tests where it adds behaviour. ## Left out - **#729** (keyboard input with an XInput pad, from `fix/keyboard-beside-xinput-pad`): conflicts with #845 in `gameinput.rs`, both being about the keyboard stand-in next to a pad; they need to be reconciled by their authors. - **#951** (21 commits, 131 behind `main`), **#728** and **#815** (large patch collections), **#966** (a 64 MB stack for the pipeline workers, which #1129 already does) are not carried. ## Notes - **#776 has a second commit.** `32ec0f4` is lucaseddd's follow-up on top of `c326bfa`, from the thread of #776 (their branch `gpu/write-watch-preserve-partial-results`; GitHub denies them a pull request, they say there). It is merged as it is, with its author and its test. EduAzevedo's `3284f19` (one query for a whole allocation) is not included: its author says the frame is not faster with it and leaves it for whoever takes the sweep in. - **Authorship.** The commits are not rewritten. Any author who would rather open their fix as their own pull request can say so and it comes out of this one. - **Overlap with the other bundles.** These branches are built on `main`; #776, #915 and #918 touch the same files as some GPU bundles (#1418, #1426, #1439, #1542), so after one of them lands the other may need a rebase. ## Verification Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 361 passed, 0 failed, 6 ignored (`main`: 342 passed, 6 ignored), two runs | The title was not run. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/carried-forks-2 git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot commented 2026-11-24 20:02:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T19:45:21Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:Marvisak/VIctory:review:6046186008 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1610#pullrequestreview-6046186008). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-24T19:45:21Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
pfhandler commented 2026-11-24 21:03:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pfhandler on 2026-11-24T20:54:17Z.


Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB):

  • VICTORY_NO_HOST_PAD=1 — a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad lets VICTORY_KEYS drive the title again.
  • VICTORY_MODE=1920x1080 — the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here).

Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above.

diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs
index c7f7c45..2535b68 100644
--- a/crates/victory-gpu/src/dxgi.rs
+++ b/crates/victory-gpu/src/dxgi.rs
@@ -219,6 +219,19 @@ struct Mode {
 }
 const _: () = assert!(size_of::<Mode>() == 32);
 
+/// The console's fixed output mode, overridable for hosts smaller than the
+/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead.
+fn mode_size() -> (u32, u32) {
+    const DEFAULT: (u32, u32) = (3840, 2160);
+    let Some(text) = std::env::var_os("VICTORY_MODE") else {
+        return DEFAULT;
+    };
+    let text = text.to_string_lossy();
+    text.split_once('x')
+        .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?)))
+        .unwrap_or(DEFAULT)
+}
+
 /// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks
 /// for a 120 Hz one to allow 120 Hz frame intervals).
 /// shortcut: fixed mode, not the host display's; report the host's rates if
@@ -242,9 +255,10 @@ extern "system" fn modes(
         return MORE_DATA;
     }
     *count = 1;
+    let (width, height) = mode_size();
     let mode = Mode {
-        width: 3840,
-        height: 2160,
+        width,
+        height,
         refresh: [60, 1],
         format: 0,
         scanlines: 1, // progressive
diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs
index a411bd0..da8d66c 100644
--- a/crates/victory-hle/src/modules/gameinput.rs
+++ b/crates/victory-hle/src/modules/gameinput.rs
@@ -1134,6 +1134,11 @@ mod host {
 
     impl Source for Host {
         fn pad(&mut self, slot: usize) -> Option<PadState> {
+            // The keyboard stand-in pad only exists while no host pad is
+            // connected; this hides a host pad the title mis-handles.
+            if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() {
+                return None;
+            }
             if self.empty_until[slot].is_some_and(|until| Instant::now() < until) {
                 return None;
             }
<!-- greyfinch-sync:Marvisak/VIctory:comment:7144211515 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1610#issuecomment-7144211515). Originally posted by [pfhandler](https://github.com/pfhandler) on 2026-11-24T20:54:17Z. --- Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB): - `VICTORY_NO_HOST_PAD=1` — a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad lets `VICTORY_KEYS` drive the title again. - `VICTORY_MODE=1920x1080` — the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here). Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above. ```diff diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs index c7f7c45..2535b68 100644 --- a/crates/victory-gpu/src/dxgi.rs +++ b/crates/victory-gpu/src/dxgi.rs @@ -219,6 +219,19 @@ struct Mode { } const _: () = assert!(size_of::<Mode>() == 32); +/// The console's fixed output mode, overridable for hosts smaller than the +/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead. +fn mode_size() -> (u32, u32) { + const DEFAULT: (u32, u32) = (3840, 2160); + let Some(text) = std::env::var_os("VICTORY_MODE") else { + return DEFAULT; + }; + let text = text.to_string_lossy(); + text.split_once('x') + .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?))) + .unwrap_or(DEFAULT) +} + /// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks /// for a 120 Hz one to allow 120 Hz frame intervals). /// shortcut: fixed mode, not the host display's; report the host's rates if @@ -242,9 +255,10 @@ extern "system" fn modes( return MORE_DATA; } *count = 1; + let (width, height) = mode_size(); let mode = Mode { - width: 3840, - height: 2160, + width, + height, refresh: [60, 1], format: 0, scanlines: 1, // progressive diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs index a411bd0..da8d66c 100644 --- a/crates/victory-hle/src/modules/gameinput.rs +++ b/crates/victory-hle/src/modules/gameinput.rs @@ -1134,6 +1134,11 @@ mod host { impl Source for Host { fn pad(&mut self, slot: usize) -> Option<PadState> { + // The keyboard stand-in pad only exists while no host pad is + // connected; this hides a host pad the title mis-handles. + if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() { + return None; + } if self.empty_until[slot].is_some_and(|until| Instant::now() < until) { return None; } ```
upstream-sync closed this pull request 2026-11-25 02:04:37 +00:00
Marvisak commented 2026-11-25 02:05:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:21:42Z.


Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149467393 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1610#issuecomment-7149467393). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:21:42Z. --- Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Marvisak commented 2026-11-25 02:06:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:32:14Z.


Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: README.md, crates/victory-gpu/src/host.rs, crates/victory-gpu/src/shadow.rs, crates/victory-gpu/src/texture.rs, crates/victory-gpu/src/watch.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149659395 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1610#issuecomment-7149659395). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:32:14Z. --- <!-- victory-triage v1 head=47a43871e56265014e44a7a21ba0647a044b6b00 verdict=needs-rebase at=2026-11-25T01:32:13Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `README.md`, `crates/victory-gpu/src/host.rs`, `crates/victory-gpu/src/shadow.rs`, `crates/victory-gpu/src/texture.rs`, `crates/victory-gpu/src/watch.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1609
No description provided.