- Domain: Detection/DlssGeneration, evidence-bound and strongest first: preset L/M reported applied -> DLSS 4.5, a DLSS-G state at x5 or more -> 4.5, preset J/K -> 4, x3/x4 -> 4, library 2.x -> 2, library 3.x or frame generation 1.x-3.x -> 3; a 310 library alone, a CNN preset or x2 names nothing. Never a default preset inferred from a version. - Application: RuntimeModuleSource / RuntimeModuleSources - a module's folder class (game, graphics driver: the driver store or %ProgramData%\NVIDIA, Windows); RuntimeModuleInfo.Source; CensusNames gains five snapshot-only names (sl.dlss_d, sl.common, sl.reflex, amd_fidelityfx_loader_dx12, nvngx_dlssnr); the aggregator stores sessions.runtime_module_sources (schema 0021) - the class, never the path. - Infrastructure: the module snapshot records every module under %ProgramData%\NVIDIA\NGX whatever its name (the owner's Silent Hill 2 ran x6 through the NVIDIA App override with no census-named DLSS library loaded) and classifies each module's folder. - App: DlssText - the summary's DLSS line, the game page's label, the CSV "# dlss:" line. - Strings: 16 new keys en/vi/ja (ja marked review). - Tests: DlssGenerationTests, RuntimeModuleSourcesTests, RuntimeModuleSnapshotSourceTests (this test process's own modules, a copied native DLL under a temporary NVIDIA\NGX folder), SessionAggregatorTests, LedgerDatabaseTests (script 0021), the repository round trip, DlssTextTests (rows shaped like the owner's Witcher 3 and Silent Hill 2 sessions). - Docs: 05_DETECTION DLSS generation (the table with its sources; "the override loads nvngx_dlss.dll under the same name" struck as unmeasured), 06_DATA_MODEL 0021, 08_UI, LIMITATIONS, guide 03/10, CHANGELOG; legal/ACCURACY.md's DLSS version bullet and Privacy Policy 2.12 in the words approved with the plan. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
3.0 KiB
C#
47 lines
3.0 KiB
C#
// SPDX-License-Identifier: GPL-3.0-only
|
|
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
|
|
|
using FluentAssertions;
|
|
using FrameLedger.Application.Capture;
|
|
|
|
namespace FrameLedger.Application.Tests.Capture;
|
|
|
|
/// <summary>D64 (beta.24): a loaded module's folder class — the class is stored, the path never is.</summary>
|
|
public sealed class RuntimeModuleSourcesTests
|
|
{
|
|
private const string _windows = @"C:\Windows";
|
|
private const string _programData = @"C:\ProgramData";
|
|
|
|
[Theory]
|
|
[InlineData(@"C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1\nvngx_dlssg.dll", RuntimeModuleSource.GraphicsDriver)]
|
|
[InlineData(@"C:\ProgramData\NVIDIA\NGX\models\dlss\versions\20316673\files\160_e658700.bin", RuntimeModuleSource.GraphicsDriver)]
|
|
[InlineData(@"c:/programdata/nvidia/ngx/models/x.dll", RuntimeModuleSource.GraphicsDriver)]
|
|
[InlineData(@"C:\Windows\System32\_nvngx.dll", RuntimeModuleSource.Windows)]
|
|
[InlineData(@"D:\SteamLibrary\steamapps\common\Game\Engine\Plugins\nvngx_dlss.dll", RuntimeModuleSource.Game)]
|
|
[InlineData(@"C:\WindowsApps\Game\nvngx_dlss.dll", RuntimeModuleSource.Game)]
|
|
[InlineData(@"C:\ProgramData\NVIDIAx\nvngx_dlss.dll", RuntimeModuleSource.Game)]
|
|
public void AModulesFolderIsItsClass(string path, RuntimeModuleSource source) =>
|
|
RuntimeModuleSources.Classify(path, _windows, _programData).Should().Be(source);
|
|
|
|
[Fact]
|
|
public void ThePathlessAndTheTokensAreHandled()
|
|
{
|
|
RuntimeModuleSources.Classify(null, _windows, _programData).Should().Be(RuntimeModuleSource.Unknown);
|
|
RuntimeModuleSources.Classify(_windows, _windows, _programData).Should().Be(RuntimeModuleSource.Game, "the folder itself is not under itself");
|
|
FluentActions.Invoking(static () => RuntimeModuleSources.Classify("x", " ", _programData)).Should().Throw<ArgumentException>();
|
|
FluentActions.Invoking(static () => RuntimeModuleSources.IsNgxOverrideFolder("x", "")).Should().Throw<ArgumentException>();
|
|
RuntimeModuleSources.IsNgxOverrideFolder(@"C:\ProgramData\NVIDIA\NGX\models\x.bin", _programData).Should().BeTrue();
|
|
RuntimeModuleSources.IsNgxOverrideFolder(@"C:\ProgramData\NVIDIA\Other\x.dll", _programData).Should().BeFalse();
|
|
RuntimeModuleSources.IsNgxOverrideFolder(null, _programData).Should().BeFalse();
|
|
foreach (RuntimeModuleSource source in new[] { RuntimeModuleSource.Game, RuntimeModuleSource.GraphicsDriver, RuntimeModuleSource.Windows })
|
|
{
|
|
RuntimeModuleSources.FromToken(RuntimeModuleSources.Token(source)).Should().Be(source);
|
|
}
|
|
|
|
RuntimeModuleSources.Token(RuntimeModuleSource.Unknown).Should().BeNull();
|
|
RuntimeModuleSources.FromToken("cloud").Should().Be(RuntimeModuleSource.Unknown);
|
|
CensusNames.ModuleFileNames.Should().Contain(["nvngx_dlssnr.dll", "sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll"],
|
|
"the snapshot records them though the census has no bit");
|
|
}
|
|
}
|