Commit Graph
3701 Commits
Author SHA1 Message Date
FakeMichau ec9707e73a Change active fg in/out mode when an incompatible one is selected
This does also make the warning silent which might not be ideal. This needs to be moved out of menu code
2026-03-22 01:22:11 +01:00
FakeMichau fe68e62b0f Remove an unnecessary winevulkan workaround 2026-03-22 01:11:19 +01:00
FakeMichau d3fb0c3e92 Prevent a loop where getPrimaryGpuVulkan calls itself 2026-03-21 20:34:32 +01:00
FakeMichau 500369e23d Fixes around DXVK on Windows + general clean up 2026-03-21 20:20:26 +01:00
FakeMichau faa0b7b34b Read OverlayMenu's default value
as per #905
2026-03-21 01:11:57 +01:00
FakeMichau 95ae2f2942 Go back to using nvapi's presence to check for Nvidia early 2026-03-21 01:04:20 +01:00
FakeMichau 92d7e79ede Correct a few more function signatures 2026-03-20 19:19:59 +01:00
FakeMichau 786b28da67 Correct display name for FSR 3 on Vulkan 2026-03-20 17:14:27 +01:00
FakeMichau bd9f396e17 Enforce more function signatures
On the vulkan side I took the easy route and used Gemini, in case of issues please visit https://support.gemini.com/
2026-03-20 17:12:00 +01:00
FakeMichau 758c3e3683 Add hooking helpers for catching function signature mismatches
Only used in d3d12 hooks for now
2026-03-20 01:20:08 +01:00
FakeMichau 68278bcf73 Convert internal string code into enums 2026-03-19 19:53:57 +01:00
FakeMichau aa9923bc33 Enable FSR4 on capable GPUs by default 2026-03-19 17:02:47 +01:00
FakeMichau 7a85a5ef2d When enabled, prioritize internal fakenvapi over other nvapi64 dlls 2026-03-19 15:02:43 +01:00
FakeMichau a500ef1b90 Improve DXVK compatibility 2026-03-19 14:44:09 +01:00
FakeMichau ca8b4bb690 Fix early vulkan calls on Linux 2026-03-19 01:49:44 +01:00
FakeMichau 0c43f74ce0 Merge branch 'notifications' into HEAD 2026-03-19 00:59:04 +01:00
FakeMichau 1a76902a7b Remove done TODO 2026-03-18 13:52:37 +01:00
FakeMichau 0d1f8df0f0 Merge branch 'identify-gpu' into HEAD 2026-03-18 13:48:05 +01:00
Zach Hembree 8d00d9e581 Fix NGX Lifetime Management and Manual FSR FOV Conversion (#875)
* Clean up DLSS DX12 inputs

- Refactored CreateFeature() and EvaluateFeature() into smaller functions with shared utilities and distinct code paths for internal OptiScaler and passthrough features.

- Added documentation to clarify internal implementation details and behavior required by the NGX API.

- Added more descriptive error messages.

- Fixed a potential memory leak in GetParameters(). Per the DLSS Programming Guide (310.5.0), this deprecated API requires the SDK to manage the lifetime of the returned parameter table, as legacy applications do not free this memory.

- Identified a memory management issue: NVNGX_Parameter tables are incorrectly handled in Allocate/Destroy and FeatureProvider. C-style free() is being used on tables allocated with 'new' and on native NGX tables, leading to memory leaks and undefined behavior. Using free() here is actually worse than just willfully leaking memory. This needs fixing.

* Fix: Correct NGX Parameter table lifetime and deallocation

Problem:

The previous implementation incorrectly used C-style free() on NVSDK_NGX_Parameter objects within the DLSS feature providers. This was unsafe for several reasons:

- Non-trivial types: These structs often contain internal data/tables that free() does not account for, bypassing necessary destructors.
- Ambiguous ownership: Tables were inconsistently sourced from internal allocations (OptiScaler), external NGX API calls, or legacy persistent pointers.
- Heap/Stack corruption: Using free() on memory managed by the NGX API or on stack-allocated memory from legacy GetParameters() calls. This risked immediate crashes or heap instability.

Solution:

Introduced a tagging system to explicitly track memory ownership and determine the correct deallocation strategy. When a destruction request is made, the system now checks the table's tag and acts accordingly:

1. InternPersistent: Internal OptiScaler tables for legacy APIs. Lifetime is managed by the SDK; these persist until process exit.
2. InternDynamic: Internal tables explicitly created/destroyed by the client. Now correctly freed using delete with a static_cast to the implementation type.
3. NVPersistent: Native NGX legacy tables. These are ignored as the native SDK manages their lifetime.
4. NVDynamic: Native NGX modern tables. These are now properly forwarded to the native NGX DestroyParameters() function.

* Start gathering unique string literals in header

- Started organizing string literals being used as unique identifiers for things like feature selection and parameter lookup into a dedicated header. Less error prone and actually works with intellisense.
- The actual usages of these strings have yet to be replaced, but I am using them for new code.

* Fix incorrect configurable FOV conversion in FSR

- The conversions for manually configured horizontal FOV to vertical FOV used in upscaling have been corrected to use the following formula: vFov = 2 * arctan( tan( hFov / 2 ) * ( h / w ) )
- Added convenience variables for global singletons to Eval functions to help readability
- Streamlined ffxResolveTypelessFormat usages. More readable.

* Update ffxResolveTypelessFormat usage

* Run clang formatting

* Fix potential NGX handle memory leak if device couldn't be acquired

Fixed a preexisting edge case that could cause the NGX handle to be leaked if the D3D12 device could not be acquired.

* Fix Vulkan upscaler typo and DX11 init error

- Vulkan: Correct default upscaler key from FSR 2.1 to FSR 2.2.
- DX11: Removed redundant table initialization in DLSS inputs caused by copy-paste error.

* Add NGX table reset check and remove old DLSSD check

- Added extra check in NGX table to preserve usage keys for custom tables.
- Fixed incorrect feature release log error
- Reran clang-format
- Removed old DLSSD check for root signature restore
- Removed GetIsDlssModuleInited() helper utility
2026-03-18 15:11:05 +03:00
FakeMichau ec46e0ea9c Merge branch 'fakenvapi-merge' into HEAD 2026-03-18 13:08:33 +01:00
FakeMichau 0d4e14378f Make use of enums for fakenvapi + expend enum support in the config 2026-03-18 12:51:06 +01:00
FakeMichau bac7700473 Expose XeFGWithoutXeLL in the menu
Mainly for people that hate themselves
2026-03-18 12:23:45 +01:00
FakeMichau 1c9a7dbc18 Remove the fakenvapi-specific calls from the query interface 2026-03-18 11:41:17 +01:00
FakeMichau def8b868b2 Wait for sleep to finish before deiniting low latency tech 2026-03-18 11:36:51 +01:00
FakeMichau f872159235 Allow for Reflex -> XeLL conversion to be skipped when using XeFG 2026-03-18 02:04:55 +01:00
TheRazerMD f6d2e0c0e6 Added DEATH STRANDING 2: ON THE BEACH quirk
* DisableDxgiSpoofing
2026-03-18 02:02:25 +01:00
FakeMichau c2b3840346 Fix FG present reporting to fakenvapi 2026-03-18 00:33:53 +01:00
FakeMichau 4b53b2f378 Clean up logging inside fakenvapi 2026-03-18 00:24:54 +01:00
FakeMichau 7ef284fffb Tighten up fakenvapi's integration 2026-03-17 23:59:06 +01:00
FakeMichau c9266d3e7d Move fakenvapi configs together 2026-03-17 18:35:08 +01:00
FakeMichau b5737b094d Get internal fakenvapi running 2026-03-17 18:15:55 +01:00
FakeMichau 4873020d3b WIP: Formatting of fakenvapi 2026-03-17 16:01:32 +01:00
FakeMichau 0eb9c87ce7 WIP: Get things compiling 2026-03-17 16:00:46 +01:00
FakeMichau 52d2f5b779 Merge remote-tracking branch 'fakenvapi/master' into fakenvapi-merge 2026-03-17 12:56:30 +01:00
FakeMichau 7f52423638 HACK: Allow XeSS/XeFG to run on newer AMD drivers
SetResidencyPriority fails when xess/xefg calls them on newer Windows AMD drivers, xess/xefg treat this as a full error and quits. Ignore the return value as a workaround.
2026-03-16 18:34:18 +01:00
cdozdil f1c2e9d54b Added optional release ref limit code 2026-03-16 14:59:11 +03:00
cdozdil 7a167879b2 Move backbuffer release code just before resize to prevent crashes 2026-03-16 14:51:40 +03:00
cdozdil 1431f80c77 Add backbuffer release logic to FG swapchain release too 2026-03-16 09:25:43 +03:00
TheRazerMD a3e85a0585 Added Monster Hunter Stories 3 quirks
* Gave the Crapcom treatment
2026-03-16 01:39:32 +01:00
TheRazerMD a73cc594fb Updated UI Composition tooltip
* Some other touch-ups
2026-03-16 00:43:24 +01:00
cdozdil d32b23ec23 Added DontUseFakenvapiForXeLLOnNvidia 2026-03-15 22:49:34 +03:00
cdozdil 4f9b4121b9 Make frame id info a seperate line 2026-03-15 22:38:28 +03:00
cdozdil bbe716ac36 ResizeBuffers fix was crashing FSR-FG, so disabled it for FSR-FG 2026-03-15 22:38:06 +03:00
cdozdil 5b77682a7f OverrideNvapiDll=false now disables fakenvapi for XeLL 2026-03-15 20:33:18 +03:00
cdozdil 3c977b7bee A bit re-organised Frame Generation section of menu 2026-03-15 19:33:36 +03:00
cdozdil 5e4e8ded97 Added help marker for FT input 2026-03-15 19:10:59 +03:00
cdozdil 7f1f97e9db To prevent resize crashes release referances of backbuffers before resize 2026-03-15 19:00:14 +03:00
cdozdil 0886242e98 Fixed and issue about Opti's frametime calculation 2026-03-15 18:59:44 +03:00
cdozdil 08f51b9173 Added FrameId info to overlay 2026-03-15 18:58:23 +03:00
cdozdil 4d02df05c8 Added FrameTime input selection
Moved some options from XeFG to FrameGen
2026-03-15 18:57:48 +03:00