[pr-fix][frame-generation][dlss][NVIDIA] GPU scheduling is asked of Windows' graphics kernel, not read from the registry alone #117
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/fix/gpu-scheduling-detect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it changes
darner rig, the F1 auto-detect andscripts/play-rig.ps1took hardware-accelerated GPU scheduling as on only when the registry'sHwSchModeis 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.rsread the same value the same way, so by its code the picks leave DLSS frame generation off on such a PC.rig.rsnow asks the graphics kernel for the card the game runs on (D3DKMTQueryAdapterInfo,KMTQAITYPE_WDDM_2_7_CAPS, theHwSchEnabledbit) and reads the registry only where that cannot be asked. It is not asked under Wine: its gdi32 has noD3DKMTQueryAdapterInfobefore Wine 9.play-rig.ps1takes a missing value on Windows 11 as on, the ruleplay-nvidia-framegen.ps1already 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-gpugains theWdk_Graphics_Direct3Dfeature ofwindows-sys.Cargo.lockis unchanged.How it was tested
1bcc1342onmainfc3642e0. The clippy gates and the tests ran on the same tree before it was committed.mainis nowb2cbf8c6: none of the three files changed in between, and a trial merge is clean. Nothing was run again on the merged tree.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 newscheduling_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 ofmainon this PC. Their cause was not looked into.HwSchModevalue. Before (main): the play-rig check prints "GPU scheduling off" with the FIX line;darner rigwas not run before the change. After:darner rigprints "GPU sched. on" and picks DLSS frame generation 2x; the play-rig check prints "GPU scheduling on" with an OK line.cargo test --workspace --lockedwas 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 newplay-rig.ps1rule.Checklist
main.docs/asset-policy.md.Checked for overlap
rig.rs,play-rig.ps1orcrates/darner-gpu/Cargo.toml, and none mentions GPU scheduling in its commits or adds a line about it.🤖 Generated with Claude Code
Tested on a PC with no
HwSchModevalue: 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.darner rig57dea7fGPU sched. offDARNER_MENU_FRAMEGEN=0(off: DLSS frame generation needs it)1bcc134GPU sched. onDARNER_MENU_FRAMEGEN=2(2x)The kernel answer matches Windows' own setting here, and the picks follow it.
darner rigonly, not run in the game.Drafted with AI assistance (OpenCode).
darner.exe playto start, scripts as thin wrappers #167