Conversation
queryNvapi() calls NvAPI_Initialize, which (via dxvk-nvapi) internally creates a DXGI factory and enumerates adapters. That enumeration hits OptiScaler's hooked EnumAdapters/EnumAdapters1, which calls getAllGpus() again while is_fetching is already set and returns an empty list. dxvk-nvapi then sees zero adapters, NvAPI_Initialize fails, and dlssCapable is never set - hiding DLSS in games like Death Stranding 2. Wrap queryNvapi in ScopedSkipDxgiLoadChecks so nvapi's internal DXGI enumeration passes through to the real adapters.
…ursion Fix dxvk-nvapi recursion in IdentifyGpu::queryNvapi (fixes optiscaler#1101)
Disabled HID mouse hooks
…ring # Conflicts: # OptiScaler/menu/input/input_system_internal.h # OptiScaler/menu/input/input_system_messages.cpp # OptiScaler/menu/input/input_system_raw.cpp
Author
|
TLDR: i couldn't use it properly on linux without the GPU recursion bug fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges the current
optiscaler/OptiScalermaster intodlss-neural-rendering. The branch was 9 commits behind and 127 ahead; this brings it back onto current upstream without disturbing any DLSS-NR work.What upstream brings
65a5f6f9Better HDR managementf740a763Fix for possible nullptrb4924e30Fix for D3D11 Debug Layers8030eccaFix a small mistake at input hooks82eb45fbInput system fixes, disabled HID mouse hooksc4c57a91More Dx11 resource management improvementsd7a4ecfaFix GPU probe recursion with dxvk-nvapi (issue DLSS hidden + falls back to FSR2 on Linux/Proton (dxvk-nvapi recursion in getAllGpus) optiscaler/OptiScaler#1101)7dbc379dAvoid a potential use after free with some shadersThe dxvk-nvapi recursion fix and the D3D11 resource-management work matter most here, since DLSS-NR exercises both paths.
Conflicts and how they were resolved
Three files conflicted, all under
OptiScaler/menu/input/:input_system_internal.hinput_system_messages.cppinput_system_raw.cppAll three conflicted over the same underlying bug: a key held while the menu opens stays stuck down. The branch carried a fix for it, and upstream landed its own fix for the same bug in
82eb45fb/8030ecca.Both fixes make the same two changes.
SetKeyDownrecordsBlockedDowninside the down-transition rather than on every message, so auto-repeat arriving after the menu opens cannot mark a press the game already saw.GetRawKeyboardSanitizeActionLockedguards the same flag with!_state.Keys[vk].Downfor the raw-input path. AndHandleRawInputLockedreturnsboolsoWM_INPUTcarrying an owed release still reaches the game.Upstream's version goes further:
HRAWINPUT, so theGetRawInputDatahook reuses the same verdict instead of recomputing a possibly different one.SanitizeMouseKeepAllowedButtonUpslets owed button-ups through while movement and new presses are still withheld.WM_INPUTmessages getDefWindowProccleanup, in bothOptiInputWndProcandProcessRemovedMessage.Remove*functions now returnbool.The branch's version was a strict subset of upstream's, so upstream's version was taken for all three files. No DLSS-NR behaviour was dropped — the stuck-key fix is still present, in a broader form.
Verification
Built clean with MSBuild via the repo's own
Build (No Signing)workflow onwindows-latest, Release x64. BothOptiScaler.dllandnvngx.dll_dlssnr.dlllink and are valid PE32+ x86-64.Not runtime-tested in a game.
Note on clang-format
The
clang-format Checkworkflow fails on this branch, and did so before this merge. It flags roughly 100 spots in branch code that predate it —Config.cpplines 1189-1248, several lines inConfig.h, and files underdlssnr/. Mostly braced-init spacing and line-length wrapping against upstream's.clang-format. Untouched here to keep this merge reviewable; worth a separate formatting pass.