[pr-fix] Xbox pads with mouse and keyboard on, no pipeline library under Wine on NVIDIA, copies at their place back to common #485

Manually merged
github merged 4 commits from github-bot/gh-485 into gh-pr/485/base 2026-11-30 23:43:09 +00:00 AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-30 23:32 UTC · original
TaynanGT:issue-fixes-20261130 → main · +285 −18 · 5 files · 4 commits · merged 2026-11-30 23:42 UTC

Refs #115, #472, #153 (each of those has more in it than this, so none is closed from here)

Three bugs from the tracker, one commit each.

What it changes

Xbox pads did nothing with MOUSE AND KEYBOARD on (#115). play turns MNK on by default, and with it on pad() handed XInput nothing, CONTROLS set to GAMEPAD included. PlayStation and generic HID pads kept working, so it looked random. The title sees one pad by default and that pad already merges every host pad, the keys' stand-in pad and the mouse, so XInput can just play: always under GAMEPAD, and under AUTO whenever there's one pad. With VICE_TAY_ONE_PAD=0 a pad would take the keys' stand-in away, so there it stays as before (the pad only drives F1).

Pipelines compiled again at every launch on Linux with NVIDIA (#472). Pipelines made through vkd3d-proton's pipeline library miss NVIDIA's disk cache there. @⁠zmelumian972 measured it: 44 of 52 slow loads came back in the next launch, 0.4-5 fps for the first ~45 s, while the same pipelines made without the library came back from the driver's cache (25.3 s of compiles, then 0.7 s). Under Wine on an NVIDIA card no host library is kept now. VICE_TAY_LIBRARY=0 turns it off anywhere, =1 keeps it under Wine. Windows is unchanged.

Copies at their place left their buffers in COPY_DEST (#153). place_copy wrote the host copy and only added a global wait after it. COPY_DEST is a write promotion, so it holds to the end of the ExecuteCommandLists call, and a root view later in the list or the card compare list sent with the runs couldn't promote it again. One run with the debug layer logged 369,094 of these (id 538). The destination goes back to COMMON after the copy now, and inside one host copy the source side goes back to COMMON before it's copied into. Ported from upstream Belobug#425 by MamaLeVrai, with its debug-layer test. It's about 29 copies a frame on the 4090, each one already behind a full wait, so the cost is one more transition per copy.

How it was tested

  • RTX 4090, Ryzen 9 9950X3D, Windows 11.
  • cargo test passed for what it touches: yes. That's gameinput (85), pipeline library and indirect (48) and host::place (5), plus new tests for the first two.
  • The debug-layer test, VICE_TAY_D3D12_DEBUG=1 cargo test -p vice-tay-gpu --features diagnostics --lib copies_in_place_leave -- --ignored, fails without the change: 7 of 8 cases are flagged, 9 messages in all, including the exact "ExecuteCommandLists ... COPY_DEST (promoted from COMMON state)" line from #153. With the change it passes with no messages.
  • cargo clippy --all-targets on vice-tay-gpu and vice-tay-hle is clean, with and without diagnostics.
  • Before/after for the Linux and pad changes: not run here. There's no Linux machine and no Xbox pad on this PC, so those rest on the reporters' measurements and the unit tests. No frame rate is claimed for any of the three. The 4K boat run is checked after the merge, as usual.

Has this been tried here before?

  • #153: the same fix is in c77a119e6 (upstream Belobug#425) and 50347f8f2 on research branches, and neither ever reached main. No record of it being rejected.

  • #115: the XInput drop came in with the upstream merge in 3109d3871. Neither parent had it.

  • #472: new. VICE_TAY_LIBRARY_LOADS=never was there already, but it still stores through the library, and that doesn't help (#472).

  • I searched the open pull requests for the same issue and for the files this touches.

**@⁠TaynanGT** on GitHub · 2026-11-30 23:32 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/485) `TaynanGT:issue-fixes-20261130` → `main` · +285 −18 · 5 files · 4 commits · merged 2026-11-30 23:42 UTC Refs #115, #472, #153 (each of those has more in it than this, so none is closed from here) Three bugs from the tracker, one commit each. ## What it changes **Xbox pads did nothing with MOUSE AND KEYBOARD on (#115).** `play` turns MNK on by default, and with it on `pad()` handed XInput nothing, CONTROLS set to GAMEPAD included. PlayStation and generic HID pads kept working, so it looked random. The title sees one pad by default and that pad already merges every host pad, the keys' stand-in pad and the mouse, so XInput can just play: always under GAMEPAD, and under AUTO whenever there's one pad. With `VICE_TAY_ONE_PAD=0` a pad would take the keys' stand-in away, so there it stays as before (the pad only drives F1). **Pipelines compiled again at every launch on Linux with NVIDIA (#472).** Pipelines made through vkd3d-proton's pipeline library miss NVIDIA's disk cache there. @⁠zmelumian972 measured it: 44 of 52 slow loads came back in the next launch, 0.4-5 fps for the first ~45 s, while the same pipelines made without the library came back from the driver's cache (25.3 s of compiles, then 0.7 s). Under Wine on an NVIDIA card no host library is kept now. `VICE_TAY_LIBRARY=0` turns it off anywhere, `=1` keeps it under Wine. Windows is unchanged. **Copies at their place left their buffers in COPY_DEST (#153).** `place_copy` wrote the host copy and only added a global wait after it. COPY_DEST is a write promotion, so it holds to the end of the ExecuteCommandLists call, and a root view later in the list or the card compare list sent with the runs couldn't promote it again. One run with the debug layer logged 369,094 of these (id 538). The destination goes back to COMMON after the copy now, and inside one host copy the source side goes back to COMMON before it's copied into. Ported from upstream Belobug#425 by MamaLeVrai, with its debug-layer test. It's about 29 copies a frame on the 4090, each one already behind a full wait, so the cost is one more transition per copy. ## How it was tested - RTX 4090, Ryzen 9 9950X3D, Windows 11. - `cargo test` passed for what it touches: yes. That's gameinput (85), pipeline library and indirect (48) and host::place (5), plus new tests for the first two. - The debug-layer test, `VICE_TAY_D3D12_DEBUG=1 cargo test -p vice-tay-gpu --features diagnostics --lib copies_in_place_leave -- --ignored`, fails without the change: 7 of 8 cases are flagged, 9 messages in all, including the exact "ExecuteCommandLists ... COPY_DEST (promoted from COMMON state)" line from #153. With the change it passes with no messages. - `cargo clippy --all-targets` on vice-tay-gpu and vice-tay-hle is clean, with and without `diagnostics`. - Before/after for the Linux and pad changes: not run here. There's no Linux machine and no Xbox pad on this PC, so those rest on the reporters' measurements and the unit tests. No frame rate is claimed for any of the three. The 4K boat run is checked after the merge, as usual. ## Has this been tried here before? - #153: the same fix is in c77a119e6 (upstream Belobug#425) and 50347f8f2 on research branches, and neither ever reached main. No record of it being rejected. - #115: the XInput drop came in with the upstream merge in 3109d3871. Neither parent had it. - #472: new. `VICE_TAY_LIBRARY_LOADS=never` was there already, but it still stores through the library, and that doesn't help (#472). - [x] I searched the open pull requests for the same issue and for the files this touches.
With MOUSE AND KEYBOARD on (play's default) every XInput pad was dropped
before it reached the title, CONTROLS set to GAMEPAD included, so an Xbox
controller did nothing until MNK was turned off by hand (#115). PlayStation
and generic HID pads still worked, which made it look random.

The title sees one pad by default, and that one already merges every host
pad, the keys' stand-in pad and the mouse, so there's nothing for the pad to
fight with. XInput now plays under GAMEPAD always and under AUTO whenever
there's one pad. With a device per pad (VICE_TAY_ONE_PAD=0) a pad would take
the keys' stand-in away, so there mouse and keyboard keep the game as before
and the pad only drives F1.

Co-Authored-By: Claude <[email protected]>
On Linux with NVIDIA, pipelines made through vkd3d-proton's pipeline
library miss the driver's disk cache, so they were compiled again at every
launch: 0.4-5 fps for the first ~45 s and freezes in new areas, with the
compiler taking ~75% of the CPU (#472). Made without the library, the same
pipelines came back from that cache (25.3 s of compiles, then 0.7 s).

So under Wine on an NVIDIA card no host library is kept and the driver's
cache does the job. VICE_TAY_LIBRARY=0 turns it off anywhere, =1 keeps it
under Wine too. Windows is unchanged.

Co-Authored-By: Claude <[email protected]>
HostList::place_copy left the host copy it wrote promoted to COPY_DEST.
That's a write promotion, so it holds to the end of the ExecuteCommandLists
call: a root view later in the same list (the indirect clamp, the batch) and
the card compare list sent with the runs couldn't promote it again. The
debug layer flagged it 369,094 times in one run on an RTX 5070 (#153, id
538, "COPY_DEST (promoted from COMMON state) ... invalid for use as a root
shader resource").

The destination now goes back to COMMON after the copy, and within one host
copy the source side goes back to COMMON before it's copied into. ~29 copies
a frame here, each already behind a full wait, so one more transition each.

Ported from upstream Belobug#425, with its debug-layer test (ignored: needs
a diagnostics build and VICE_TAY_D3D12_DEBUG=1).

Co-authored-by: MamaLeVrai <[email protected]>
Co-Authored-By: Claude <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 23:32:36 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-30 23:32 UTC · original

Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-30T23:32:27.177835Z
We couldn’t complete this review. Comment @codex review to try again.
6ca29bc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-30 23:32 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/485#issuecomment-7295238925) <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"6ca29bc1b8013c0d2dd3bfe368680b3c7035757a","has_any_findings":true,"has_unresolved_findings":true,"status":"failed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ❌ Failed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ❌ **Failed** <relative-time datetime="2026-11-30T23:32:27.177835Z">2026-11-30T23:32:27.177835Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `6ca29bc` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-30 23:32 UTC · original

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-30 23:32 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/485#issuecomment-7295239627) You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
On the earlier line, ray tracing made the title crash while loading on an
Arc B580 within two minutes, every run (#457). RT is on by default now, so
an Arc owner would hit it first thing. Say so under known problems, and how
to turn it off.

Co-Authored-By: Claude <[email protected]>
github-bot changed target branch from main to gh-pr/485/base 2026-11-30 23:43:07 +00:00
github manually merged commit 8190bdfe3a into gh-pr/485/base 2026-11-30 23:43:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.