[pr-fix][frame-generation][dlss][NVIDIA] GPU scheduling is asked of Windows' graphics kernel, not read from the registry alone #117

Manually merged
TrustNo1 merged 1 commit from iboom72/fix/gpu-scheduling-detect into main 2026-12-04 02:13:32 +00:00 AGit
Contributor

What it changes

darner rig, the F1 auto-detect and scripts/play-rig.ps1 took hardware-accelerated GPU scheduling as on only when the registry's HwSchMode is 2, and as off when the value is missing. One Windows 11 PC (build 26300, RTX 4070 Ti, driver 621.01) has no such value and has scheduling on: the graphics kernel answers supported 1, enabled 1, enabled by default 0. There the play-rig check printed "GPU scheduling off" with a FIX line. rig.rs read the same value the same way, so by its code the picks leave DLSS frame generation off on such a PC.

  • rig.rs now asks the graphics kernel for the card the game runs on (D3DKMTQueryAdapterInfo, KMTQAITYPE_WDDM_2_7_CAPS, the HwSchEnabled bit) and reads the registry only where that cannot be asked. It is not asked under Wine: its gdi32 has no D3DKMTQueryAdapterInfo before Wine 9.
  • play-rig.ps1 takes a missing value on Windows 11 as on, the rule play-nvidia-framegen.ps1 already has. That is a guess, not a reading: a PC with scheduling turned off and no value would be called on by the script. The game asks Windows itself at its start.
  • darner-gpu gains the Wdk_Graphics_Direct3D feature of windows-sys. Cargo.lock is unchanged.

How it was tested

  • Tested revision: 1bcc1342 on main fc3642e0. The clippy gates and the tests ran on the same tree before it was committed. main is now b2cbf8c6: none of the three files changed in between, and a trial merge is clean. Nothing was run again on the merged tree.
  • Commands and results:
    • cargo clippy --workspace --all-targets --locked -- -D warnings: clean.
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.
    • cargo test --locked -p darner-gpu --lib rig::: 20 passed, including the new scheduling_is_the_enabled_bit_alone.
    • cargo test --locked -p darner: 132 passed, 1 ignored.
    • cargo xtask policy: 553 files ok.
    • scripts/tests/play-rig.Tests.ps1 (Pester): 13 passed, 4 failed, and the same four fail on an untouched copy of main on this PC. Their cause was not looked into.
  • Gameplay, when relevant: not run in the game.
  • Before and after, when relevant: on the PC above, with no HwSchMode value. Before (main): the play-rig check prints "GPU scheduling off" with the FIX line; darner rig was not run before the change. After: darner rig prints "GPU sched. on" and picks DLSS frame generation 2x; the play-rig check prints "GPU scheduling on" with an OK line.
  • Shader wave sizes tested, when relevant: not relevant.
  • Coverage gaps: cargo test --workspace --locked was not run in full. Only one PC was tried, where the kernel answers "on": the kernel's "off" answer and the registry fallback were not exercised. Nothing was run under Wine/Proton. An AMD or Intel card was not tried. No test covers the new play-rig.ps1 rule.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none found. No unmerged pull request touches rig.rs, play-rig.ps1 or crates/darner-gpu/Cargo.toml, and none mentions GPU scheduling in its commits or adds a line about it.

🤖 Generated with Claude Code

## What it changes `darner rig`, the F1 auto-detect and `scripts/play-rig.ps1` took hardware-accelerated GPU scheduling as on only when the registry's `HwSchMode` is 2, and as off when the value is missing. One Windows 11 PC (build 26300, RTX 4070 Ti, driver 621.01) has no such value and has scheduling on: the graphics kernel answers supported 1, enabled 1, enabled by default 0. There the play-rig check printed "GPU scheduling off" with a FIX line. `rig.rs` read the same value the same way, so by its code the picks leave DLSS frame generation off on such a PC. - `rig.rs` now asks the graphics kernel for the card the game runs on (`D3DKMTQueryAdapterInfo`, `KMTQAITYPE_WDDM_2_7_CAPS`, the `HwSchEnabled` bit) and reads the registry only where that cannot be asked. It is not asked under Wine: its gdi32 has no `D3DKMTQueryAdapterInfo` before Wine 9. - `play-rig.ps1` takes a missing value on Windows 11 as on, the rule `play-nvidia-framegen.ps1` already has. That is a guess, not a reading: a PC with scheduling turned off and no value would be called on by the script. The game asks Windows itself at its start. - `darner-gpu` gains the `Wdk_Graphics_Direct3D` feature of `windows-sys`. `Cargo.lock` is unchanged. ## How it was tested - Tested revision: 1bcc1342 on `main` fc3642e0. The clippy gates and the tests ran on the same tree before it was committed. `main` is now b2cbf8c6: none of the three files changed in between, and a trial merge is clean. Nothing was run again on the merged tree. - Commands and results: - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean. - `cargo test --locked -p darner-gpu --lib rig::`: 20 passed, including the new `scheduling_is_the_enabled_bit_alone`. - `cargo test --locked -p darner`: 132 passed, 1 ignored. - `cargo xtask policy`: 553 files ok. - `scripts/tests/play-rig.Tests.ps1` (Pester): 13 passed, 4 failed, and the same four fail on an untouched copy of `main` on this PC. Their cause was not looked into. - Gameplay, when relevant: not run in the game. - Before and after, when relevant: on the PC above, with no `HwSchMode` value. Before (`main`): the play-rig check prints "GPU scheduling off" with the FIX line; `darner rig` was not run before the change. After: `darner rig` prints "GPU sched. on" and picks DLSS frame generation 2x; the play-rig check prints "GPU scheduling on" with an OK line. - Shader wave sizes tested, when relevant: not relevant. - Coverage gaps: `cargo test --workspace --locked` was not run in full. Only one PC was tried, where the kernel answers "on": the kernel's "off" answer and the registry fallback were not exercised. Nothing was run under Wine/Proton. An AMD or Intel card was not tried. No test covers the new `play-rig.ps1` rule. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none found. No unmerged pull request touches `rig.rs`, `play-rig.ps1` or `crates/darner-gpu/Cargo.toml`, and none mentions GPU scheduling in its commits or adds a line about it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`darner rig`, the F1 auto-detect and play-rig.ps1 took hardware-accelerated
GPU scheduling as on only with the registry's HwSchMode = 2, and as off
without the value. A Windows 11 PC (build 26300, RTX 4070 Ti, driver 621.01)
has no such value and has scheduling on (the kernel: supported 1, enabled 1,
enabled by default 0): the check said "off", asked for a fix, and the picks
left DLSS frame generation off.

rig.rs now asks the kernel for the card the game runs on
(D3DKMT_WDDM_2_7_CAPS, HwSchEnabled), and reads the registry only where
that cannot be asked. Not under Wine: its gdi32 has no
D3DKMTQueryAdapterInfo before Wine 9.

play-rig.ps1 takes no value on Windows 11 as on, the rule
play-nvidia-framegen.ps1 has. That is a guess, not a reading: the game
asks Windows itself at its start.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
First-time contributor

Tested on a PC with no HwSchMode value: RTX 5080 (NVIDIA 621.40), Ryzen 7 9800X3D, 32 GB, Windows 11 build 26300. Windows Settings > Display > Graphics shows Hardware-accelerated GPU scheduling On on this PC.

Build darner rig frame generation pick
main 57dea7f GPU sched. off DARNER_MENU_FRAMEGEN=0 (off: DLSS frame generation needs it)
#117 1bcc134 GPU sched. on DARNER_MENU_FRAMEGEN=2 (2x)

The kernel answer matches Windows' own setting here, and the picks follow it. darner rig only, not run in the game.

Drafted with AI assistance (OpenCode).

Tested on a PC with no `HwSchMode` value: RTX 5080 (NVIDIA 621.40), Ryzen 7 9800X3D, 32 GB, Windows 11 build 26300. Windows Settings > Display > Graphics shows Hardware-accelerated GPU scheduling **On** on this PC. | Build | `darner rig` | frame generation pick | |---|---|---| | main `57dea7f` | `GPU sched. off` | `DARNER_MENU_FRAMEGEN=0` (off: DLSS frame generation needs it) | | #117 `1bcc134` | `GPU sched. on` | `DARNER_MENU_FRAMEGEN=2` (2x) | The kernel answer matches Windows' own setting here, and the picks follow it. `darner rig` only, not run in the game. Drafted with AI assistance (OpenCode).
TrustNo1 manually merged commit 8b4baa4487 into main 2026-12-04 02:13:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!117
No description provided.