Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb341a29c6 |
No files matched your search
@@ -58,6 +58,17 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
export gains a `# quality_mode:` line. `legal/ACCURACY.md`'s *Quality mode* bullet says so, in the words approved
|
||||
with the plan; **the Disclaimer is 2.11** and the Legal Gate shows it once.
|
||||
|
||||
- **Which DLSS a session ran** (owner request 2026-10-19, decision D64). The summary's DLSS line gives each DLSS
|
||||
library's version and whether it was loaded from the game or from the graphics driver (the NVIDIA App's override
|
||||
loads the driver's own copy), the model preset the NVIDIA driver reports, and *DLSS 4* or *DLSS 4.5* only where the
|
||||
session shows it — the preset (L or M: 4.5; J or K: 4) or a measured multi-frame factor (×5–×6: 4.5; ×3–×4: 4) —;
|
||||
DLSS 2 and 3 from their libraries; *DLSS 5 runtime loaded* when its library is. The game page repeats the label and
|
||||
the CSV export gains `# dlss:`. The module snapshot now records every library under the NVIDIA override folder,
|
||||
whatever its name, and each module's folder class (schema 0021, `sessions.runtime_module_sources` — never the path),
|
||||
plus five more libraries by name (`sl.dlss_d.dll`, `sl.common.dll`, `sl.reflex.dll`, `amd_fidelityfx_loader_dx12.dll`,
|
||||
`nvngx_dlssnr.dll`). **Privacy Policy 2.12** says so, in the words approved with the plan; `legal/ACCURACY.md` gains
|
||||
the *DLSS version* bullet.
|
||||
|
||||
### Changed
|
||||
|
||||
- **SonarCloud analyses only FrameLedger's own code** (developers only; owner request 2026-10-19, decision D67). A
|
||||
|
||||
@@ -93,6 +93,11 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
|
||||
readable for DLSS without Streamline, and is not inferred from the render scale. How the driver numbers DLAA in
|
||||
its report is NVIDIA's documented value, not yet seen on a real game. The render resolution is N/A where the
|
||||
game's own calls do not carry it (DLSS without Streamline, for one). ([Metrics](docs/03_METRICS.md))
|
||||
- **Which DLSS ran** (since 0.1.0-beta.24) is named only from what the session showed: the model preset the NVIDIA
|
||||
driver reports (L or M: DLSS 4.5; J or K: DLSS 4), a measured multi-frame factor (×5 or ×6: DLSS 4.5; ×3 or ×4:
|
||||
DLSS 4), or a library whose major version names one (2.x, 3.x). A 310 library with no such evidence shows its
|
||||
version only. DLSS 5 is shown only as *runtime loaded*, by a library name not yet seen on a real game. Where each
|
||||
library was loaded from is read from its folder, for sessions recorded since 0.1.0-beta.24.
|
||||
- **Ray tracing** is *Yes*, *No* or *N/A* — measured from the game's ray-tracing calls on Direct3D 12, and
|
||||
N/A where FrameLedger could not look. **Path tracing is never stated as a fact**: there is no API signal
|
||||
for it. You can correct any of these by hand, and your correction is labelled as yours.
|
||||
|
||||
@@ -41,6 +41,9 @@ pages.
|
||||
> shown and marked as the NVIDIA App's. Otherwise the mode the game itself passed: the DLSS options a
|
||||
> Streamline title passes with its per-frame call (not yet seen on a real title). In every other case no
|
||||
> mode is shown.
|
||||
> - **DLSS version:** the version of each DLSS library the game loaded and whether it came from the game or from
|
||||
> the NVIDIA driver; "DLSS 4" or "DLSS 4.5" only when the session shows it (the model preset the driver reports,
|
||||
> or a measured multi-frame factor); DLSS 5 only as "runtime loaded".
|
||||
> - **Render → output resolution:** measured where the vendor's own per-frame call carries the render
|
||||
> size (AMD FidelityFX dispatches, and Streamline titles whose resource tags state it); `N/A` where it
|
||||
> does not: DLSS titles that bypass Streamline, Streamline titles whose tags carry no size, and Vulkan
|
||||
|
||||
+34
-4
@@ -440,10 +440,40 @@ detection (`DetectionWrite`, `games.exe_machine` / `exe_file_version` / `exe_pro
|
||||
"FSR 2.2" number: the DLL's version is the SDK's, and no table of that mapping has been measured.
|
||||
|
||||
**Shipped is not loaded.** `library_versions` is what the game folder holds. What the process loaded is
|
||||
`sessions.runtime_modules` (Tier 1), and the two differ exactly when something else supplied the DLL — the NVIDIA
|
||||
App's DLSS override loads the driver's `nvngx_dlss.dll` from the driver store under the same name. The session
|
||||
summary prints the loaded list and names such a difference ("the game ships 3.7.10.0: another copy was loaded");
|
||||
it does not claim who loaded it.
|
||||
`sessions.runtime_modules` (Tier 1), and the two differ exactly when something else supplied the DLL. ~~— the NVIDIA
|
||||
App's DLSS override loads the driver's `nvngx_dlss.dll` from the driver store under the same name.~~ *(Struck
|
||||
2026-10-19: unmeasured, and the one measurement says otherwise — the owner's Silent Hill 2 session ran ×6 frame
|
||||
generation through the NVIDIA App's override and no module with a census name was loaded. Since beta.24 every module
|
||||
under `%ProgramData%\NVIDIA\NGX` is recorded whatever its name, with its folder class — §DLSS generation below —, and
|
||||
owner-only item 20(c) records what the override loads.)* The session summary prints the loaded list and names such a
|
||||
difference ("the game ships 3.7.10.0: another copy was loaded"); since beta.24 the DLSS line says where each DLSS
|
||||
library was loaded from (the game, the graphics driver, Windows) — by folder, never who put it there.
|
||||
|
||||
## DLSS generation — evidence-bound (beta.24, owner decision D64)
|
||||
|
||||
**What a session can say about which DLSS ran, and nothing more.** `Domain.Detection.DlssGeneration` names a
|
||||
generation only from something the session observed, strongest first; `App.Services.DlssText` prints it with what it
|
||||
rests on, every DLSS library's version and folder class (`sessions.runtime_module_sources`, schema 0021 — the class,
|
||||
never the path), and the super-resolution preset the driver reports applied:
|
||||
|
||||
| Evidence (strongest first) | Label | Where it comes from |
|
||||
|---|---|---|
|
||||
| Super-resolution render preset **L or M** that the NVIDIA driver reports applied, in a session where super resolution ran | DLSS 4.5 (2nd-gen transformer) | `ngx_driver_words` — the SR word's `PRESET` bit and `renderPreset`; presets L/M arrived with DLL 310.5.0 (NVIDIA's DLSS 4.5 release, driver 591.74) |
|
||||
| A DLSS Frame Generation state measured at **×5 or more** | DLSS 4.5 (Dynamic / 6× multi-frame generation) | `fg_mix` / `fg_factor` with `fg_mode = dlssg` |
|
||||
| Preset **J or K** reported applied | DLSS 4 (transformer) | as above |
|
||||
| A DLSS Frame Generation state at **×3 or ×4** | DLSS 4 (multi-frame generation) | as above |
|
||||
| `nvngx_dlss.dll` **2.x** | DLSS 2 | `runtime_modules` |
|
||||
| `nvngx_dlss.dll` **3.x**, or `nvngx_dlssg.dll` **1.x–3.x** | DLSS 3 | `runtime_modules` |
|
||||
| A **310.x** library alone, a CNN preset (A–F), ×2 | *no label* — the versions are shown | DLSS 4 and 4.5 ship the same major number; the preset is what names the model |
|
||||
| `nvngx_dlssnr.dll` loaded | "DLSS 5 runtime loaded" — never a generation of these features | the module name is community-sourced until owner-only item 20(d) sees it load |
|
||||
|
||||
Never a default preset inferred from a version: what a DLL "would" run by default is the game's and the driver's to
|
||||
decide. A preset the driver applied to a super resolution it never saw created and evaluated names the model of
|
||||
nothing and is not used (the owner's Silent Hill 2 session: preset L applied, no SR feature created — its label is
|
||||
the ×6.0 state's). **Sources:** NVAPI's `NV_NGX_DLSS_OVERRIDE_GET_STATE_PARAMS_V1` (the vendored
|
||||
`src/native/third_party/nvapi/nvapi.h`); presets L/M with DLL 310.5.0 — PCGH's DLSS 4.5 test and NVIDIA's driver
|
||||
591.74 release notes; DLSS 4.5's Dynamic MFG and 6× — NVIDIA's announcement (driver 595, RTX 50); DLSS 5 — NVIDIA's
|
||||
GTC 2026 announcement and its 2026-09-03 launch; `nvngx_dlssnr.dll` — community reports only.
|
||||
|
||||
## Anti-cheat pre-scan (static)
|
||||
|
||||
|
||||
@@ -315,6 +315,9 @@ CREATE TABLE sessions (
|
||||
power_limit_pct REAL, thermal_limit_pct REAL, -- shares of the ticks that carried reasons: NVIDIA (L3) only
|
||||
app_frames_per_joule REAL, -- application FPS / average GPU board power; never displayed frames (rule 6)
|
||||
|
||||
-- schema 0021 (2026-10-19, beta.24, D64): each loaded runtime module's folder class — 05_DETECTION §DLSS generation
|
||||
runtime_module_sources TEXT, -- {"nvngx_dlss.dll":"graphics_driver", …}: game | graphics_driver | windows; never a path
|
||||
|
||||
-- schema 0020 (2026-10-19, beta.24, D62): every frame-generation state the session held — 03_METRICS §The mix
|
||||
fg_mix TEXT, -- {"Rows":[{"Kind":"generated","Factor":4.0,"NativeFps":…,"DisplayedFps":…,
|
||||
-- "Seconds":…,"Share":…,"Windows":…}, …]}: states by rising factor, then
|
||||
@@ -687,6 +690,15 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
|
||||
> like any other. `LatestVersion` is 20; `LedgerDatabaseTests.ScriptTwentyAddsTheFgMixColumnAndAnEarlierSessionHasNone`,
|
||||
> `SqliteSessionRepositoryTests.ASessionRoundTripsColumnForColumn`. **A beta.23 cannot open a ledger beta.24 migrated.**
|
||||
|
||||
> **`0021_runtime_module_sources.sql` (beta.24, 2026-10-19, owner decision D64) — where each loaded module lived.** One
|
||||
> TEXT column, ADD COLUMN only: `runtime_module_sources`, `{file: class}` beside `runtime_modules` — `game`,
|
||||
> `graphics_driver` (Windows' driver store or `%ProgramData%\NVIDIA`) or `windows`, from the path the module snapshot
|
||||
> read (`Application.Capture.RuntimeModuleSources`). The class is stored; **the path never is** (Privacy Policy 2.12).
|
||||
> Since the same release the snapshot also records every module under `%ProgramData%\NVIDIA\NGX` whatever its name.
|
||||
> Written by the recorder's aggregation (`SessionAggregator.ApplyWitnesses`); NULL before, and on a session recovered
|
||||
> from its crash file (which carries no module list). `LatestVersion` is 21;
|
||||
> `LedgerDatabaseTests.ScriptTwentyOneAddsTheModuleSourcesColumnAndAnEarlierSessionHasNone`, the repository round trip.
|
||||
|
||||
> **Every open used to migrate, and one that should not have did — 2026-09-16.** The Agent's `--console sessions`,
|
||||
> a verb that prints, was run against the owner's ledger while the file on disk was at schema 2 and applied 0003 and
|
||||
> 0004 to it. `LedgerDatabase.OpenReadOnlyAsync` exists since that day: an existing file, `PRAGMA query_only`, no
|
||||
|
||||
@@ -561,6 +561,13 @@ All screens are `Page`s registered with the navigation page provider and navigat
|
||||
### Session summary (secondary `FluentWindow`, also the post-session toast target)
|
||||
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers; **VRAM (this game)** and **RAM (this game)** — beta.12: the median with the peak beneath, both tiers), **Statistics per series** (beta.12: every stored series' mean / median / minimum / peak), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
|
||||
|
||||
> **beta.24 (D64): the DLSS line.** Under the header's library line, the summary says which DLSS ran (`DlssText.Line`): a
|
||||
> generation only where the session shows one, with what it rests on — *DLSS 4.5 (preset L)*, *DLSS 4.5 (a ×6.0
|
||||
> frame-generation state)*, *DLSS 3 (library 3.7.10)* — else *DLSS*; then each DLSS library with its version and where
|
||||
> it was loaded from (*Super Resolution 310.5.0, from the graphics driver, preset L (2nd-gen transformer model)*), then
|
||||
> *DLSS 5 runtime loaded* when it was. The game page's *Last session measured* repeats the label; the CSV export gains
|
||||
> `# dlss:`. `DlssTextTests`.
|
||||
|
||||
> **beta.24 (D63): the quality mode, on every surface alike.** The summary's header line, a Sessions-tab row, the game
|
||||
> page's *Last session measured* and the live card name the upscaler through one entry point (`Formats.UpscalerOf`):
|
||||
> the NVIDIA App's override where the driver reports it applied — *DLSS (driver-reported) Quality · NVIDIA App*, or
|
||||
|
||||
@@ -16,6 +16,10 @@ A value FrameLedger could not measure reads **N/A** — never 0, and never an es
|
||||
- **The upscaler's quality mode** — Quality, Balanced, Performance, Ultra Performance, DLAA — is shown only when it is
|
||||
known. *· NVIDIA App* after it means the NVIDIA App overrode DLSS for this game and the NVIDIA driver reported that
|
||||
the override applied; *· NVIDIA App override* alone means it applied and its mode could not be settled.
|
||||
- **The DLSS line** names the DLSS the game ran: *DLSS 4.5* or *DLSS 4* only when the session showed it (the model
|
||||
preset the NVIDIA driver reports, or a frame-generation multiplier of ×3 and above), each DLSS library's version and
|
||||
whether it came from the game or from the graphics driver (the NVIDIA App can swap in the driver's copy), and *DLSS 5
|
||||
runtime loaded* when it was.
|
||||
- **Frame generation in this session** (sessions recorded with 0.1.0-beta.24 or later) lists every frame-generation
|
||||
state the session held — `×2.0`, `×4.0`… — each with its own frame rates and its share of the time, then the time
|
||||
without frame generation, and *Not classified* for time in no state that lasted at least 10 seconds: switching,
|
||||
|
||||
@@ -15,6 +15,8 @@ What the words on FrameLedger's screens mean, in alphabetical order. How each fi
|
||||
- **Disable all hooking** — the switch that stops every game from being hooked at once, whatever each game's own switch
|
||||
says. Sessions are still recorded.
|
||||
- **Displayed FPS** — the frames you saw, generated frames included.
|
||||
- **DLSS 4, DLSS 4.5** — NVIDIA's DLSS generations. FrameLedger names one only when the session shows it: the model
|
||||
preset the NVIDIA driver reports, or a frame-generation multiplier of ×3 and above.
|
||||
- **FG factor** — Displayed FPS divided by Native FPS, shown as `×1.9 FG`.
|
||||
- **FPS** — frames per second over the time measured.
|
||||
- **Frame generation** — the technology (DLSS Frame Generation, FSR Frame Generation) that inserts frames the game did
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
> shown and marked as the NVIDIA App's. Otherwise the mode the game itself passed: the DLSS options a
|
||||
> Streamline title passes with its per-frame call (not yet seen on a real title). In every other case no
|
||||
> mode is shown.
|
||||
> - **DLSS version:** the version of each DLSS library the game loaded and whether it came from the game or from
|
||||
> the NVIDIA driver; "DLSS 4" or "DLSS 4.5" only when the session shows it (the model preset the driver reports,
|
||||
> or a measured multi-frame factor); DLSS 5 only as "runtime loaded".
|
||||
> - **Render → output resolution:** measured where the vendor's own per-frame call carries the render
|
||||
> size (AMD FidelityFX dispatches, and Streamline titles whose resource tags state it); `N/A` where it
|
||||
> does not: DLSS titles that bypass Streamline, Streamline titles whose tags carry no size, and Vulkan
|
||||
|
||||
@@ -143,6 +143,9 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
> shown and marked as the NVIDIA App's. Otherwise the mode the game itself passed: the DLSS options a
|
||||
> Streamline title passes with its per-frame call (not yet seen on a real title). In every other case no
|
||||
> mode is shown.
|
||||
> - **DLSS version:** the version of each DLSS library the game loaded and whether it came from the game or from
|
||||
> the NVIDIA driver; "DLSS 4" or "DLSS 4.5" only when the session shows it (the model preset the driver reports,
|
||||
> or a measured multi-frame factor); DLSS 5 only as "runtime loaded".
|
||||
> - **Render → output resolution:** measured where the vendor's own per-frame call carries the render
|
||||
> size (AMD FidelityFX dispatches, and Streamline titles whose resource tags state it); `N/A` where it
|
||||
> does not: DLSS titles that bypass Streamline, Streamline titles whose tags carry no size, and Vulkan
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# FrameLedger — Privacy Policy
|
||||
|
||||
**Version:** 2.11 · **Effective:** {{RELEASE_DATE}}
|
||||
**Version:** 2.12 · **Effective:** {{RELEASE_DATE}}
|
||||
|
||||
**Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.**
|
||||
|
||||
@@ -42,7 +42,7 @@ An exported session (CSV or JSON) and a bug report can contain your games' names
|
||||
|
||||
## 4. What the app can technically observe
|
||||
|
||||
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised.
|
||||
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling and frame-generation libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised.
|
||||
|
||||
It does **not** read game memory outside those API parameters, and does not read game saves, chat, input content, network traffic, or anything unrelated to performance measurement. It records only for programs you added to your library and did not switch recording off for — a program whose recording is off is not watched at all — and injects only into games you individually enabled.
|
||||
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using FrameLedger.Application.Capture;
|
||||
using FrameLedger.Application.Persistence;
|
||||
using FrameLedger.Application.Recording;
|
||||
using FrameLedger.Domain.Detection;
|
||||
using FrameLedger.Domain.Metrics;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// The DLSS a session ran, in words (beta.24, owner decision D64; <c>05_DETECTION</c> §DLSS generation): each DLSS
|
||||
/// library's version and where it was loaded from, the model preset the NVIDIA driver reports, and a generation only
|
||||
/// where the session shows one (<see cref="DlssGeneration"/>, strongest evidence first). DLSS 5 only as "runtime loaded".
|
||||
/// </summary>
|
||||
/// <remarks>Read from what the row stores; nothing here infers a generation from a version that does not name one.</remarks>
|
||||
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
|
||||
public static class DlssText
|
||||
{
|
||||
private const string _superResolutionFile = "nvngx_dlss.dll";
|
||||
private const string _rayReconstructionFile = "nvngx_dlssd.dll";
|
||||
private const string _frameGenerationFile = "nvngx_dlssg.dll";
|
||||
private const string _neuralRenderingFile = "nvngx_dlssnr.dll";
|
||||
private static readonly CultureInfo _inv = CultureInfo.InvariantCulture;
|
||||
|
||||
/// <summary>What the row observed about DLSS.</summary>
|
||||
public static DlssEvidence Evidence(SessionRow row)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(row);
|
||||
Dictionary<string, string?> modules = Modules(row.RuntimeModulesJson);
|
||||
return new DlssEvidence(VersionOf(modules, _superResolutionFile), VersionOf(modules, _frameGenerationFile), ReportedPreset(row), LargestFrameGenerationFactor(row));
|
||||
}
|
||||
|
||||
/// <summary>The generation the row establishes, as a label with what it rests on (<c>DLSS 4.5 (preset L)</c>), or null.</summary>
|
||||
public static string? Label(SessionRow row)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(row);
|
||||
DlssEvidence evidence = Evidence(row);
|
||||
return DlssGeneration.Of(evidence) is { } generation ? LabelOf(generation, evidence) : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The summary's DLSS line: the label first when one is established, then each library with its version, where it was
|
||||
/// loaded from and — for super resolution — the preset the driver reports, then DLSS 5's runtime when it was loaded.
|
||||
/// Null for a session with no DLSS library, no DLSS upscaler and no DLSS Frame Generation.
|
||||
/// </summary>
|
||||
public static string? Line(SessionRow row)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(row);
|
||||
Dictionary<string, string?> modules = Modules(row.RuntimeModulesJson);
|
||||
Dictionary<string, string?> sources = Modules(row.RuntimeModuleSourcesJson);
|
||||
bool any = modules.Keys.Any(static k => k.StartsWith("nvngx_dlss", StringComparison.OrdinalIgnoreCase))
|
||||
|| Is(row.Upscaler, "dlss") || Is(row.UpscalerDriverReported, "dlss") || Is(row.FgMode, "dlssg");
|
||||
if (!any)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
DlssEvidence evidence = Evidence(row);
|
||||
var parts = new List<string> { DlssGeneration.Of(evidence) is { } generation ? LabelOf(generation, evidence) : "DLSS" };
|
||||
AddLibrary(parts, modules, sources, _superResolutionFile, Strings.Dlss_Feature_SuperResolution, PresetText(evidence.Preset));
|
||||
AddLibrary(parts, modules, sources, _rayReconstructionFile, Strings.Dlss_Feature_RayReconstruction, detail: null);
|
||||
AddLibrary(parts, modules, sources, _frameGenerationFile, Strings.Dlss_Feature_FrameGeneration, detail: null);
|
||||
if (!modules.ContainsKey(_superResolutionFile) && PresetText(evidence.Preset) is { } preset)
|
||||
{
|
||||
parts.Add(preset);
|
||||
}
|
||||
|
||||
if (modules.ContainsKey(_neuralRenderingFile))
|
||||
{
|
||||
parts.Add(Strings.Dlss_NeuralRendering_Loaded);
|
||||
}
|
||||
|
||||
return string.Join(" · ", parts);
|
||||
}
|
||||
|
||||
/// <summary>The CSV header's line, InvariantCulture: the generation and its basis, each DLSS library with its version and source, the preset.</summary>
|
||||
public static string ExportLine(SessionRow row)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(row);
|
||||
Dictionary<string, string?> modules = Modules(row.RuntimeModulesJson);
|
||||
Dictionary<string, string?> sources = Modules(row.RuntimeModuleSourcesJson);
|
||||
DlssEvidence evidence = Evidence(row);
|
||||
var parts = new List<string>();
|
||||
if (DlssGeneration.Of(evidence) is { } generation)
|
||||
{
|
||||
parts.Add("generation=" + KindText(generation.Kind) + " basis=" + BasisToken(generation.Basis));
|
||||
}
|
||||
|
||||
foreach (string file in new[] { _superResolutionFile, _rayReconstructionFile, _frameGenerationFile, _neuralRenderingFile })
|
||||
{
|
||||
if (modules.TryGetValue(file, out string? version))
|
||||
{
|
||||
parts.Add(file + "=" + (version ?? "N/A") + (sources.TryGetValue(file, out string? source) && source is not null ? " " + source : string.Empty));
|
||||
}
|
||||
}
|
||||
|
||||
if (DlssGeneration.PresetLetter(evidence.Preset) is char letter)
|
||||
{
|
||||
parts.Add("preset=" + letter.ToString(_inv));
|
||||
}
|
||||
|
||||
return parts.Count == 0 ? "N/A" : string.Join("; ", parts);
|
||||
}
|
||||
|
||||
private static string LabelOf(DlssGeneration generation, DlssEvidence evidence) =>
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Label_Format, KindText(generation.Kind), generation.Basis switch
|
||||
{
|
||||
DlssBasis.Preset => string.Format(CultureInfo.CurrentCulture, Strings.Nv_Preset_Format, DlssGeneration.PresetLetter(evidence.Preset)),
|
||||
DlssBasis.FrameGenerationFactor => string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Basis_Factor_Format, evidence.LargestFrameGenerationFactor),
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Basis_Library_Format, Short(evidence.SuperResolution is { Major: 2 or 3 } ? evidence.SuperResolution : evidence.FrameGeneration)),
|
||||
});
|
||||
|
||||
private static string BasisToken(DlssBasis basis) => basis switch
|
||||
{
|
||||
DlssBasis.Preset => "preset",
|
||||
DlssBasis.FrameGenerationFactor => "frame_generation_factor",
|
||||
_ => "library_version",
|
||||
};
|
||||
|
||||
private static string KindText(DlssGenerationKind kind) => kind switch
|
||||
{
|
||||
DlssGenerationKind.Dlss2 => "DLSS 2",
|
||||
DlssGenerationKind.Dlss3 => "DLSS 3",
|
||||
DlssGenerationKind.Dlss4 => "DLSS 4",
|
||||
DlssGenerationKind.Dlss45 => "DLSS 4.5",
|
||||
_ => "DLSS",
|
||||
};
|
||||
|
||||
private static string? PresetText(uint? preset) =>
|
||||
DlssGeneration.PresetLetter(preset) is char letter
|
||||
? string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Preset_Format, letter, ModelText(DlssGeneration.ModelOf(preset)))
|
||||
: null;
|
||||
|
||||
private static string ModelText(DlssModel? model) => model switch
|
||||
{
|
||||
DlssModel.Cnn => Strings.Dlss_Model_Cnn,
|
||||
DlssModel.Transformer => Strings.Dlss_Model_Transformer,
|
||||
DlssModel.SecondGenerationTransformer => Strings.Dlss_Model_SecondGenerationTransformer,
|
||||
_ => Strings.Dlss_Model_Unknown,
|
||||
};
|
||||
|
||||
private static void AddLibrary(List<string> parts, Dictionary<string, string?> modules, Dictionary<string, string?> sources, string file, string feature, string? detail)
|
||||
{
|
||||
if (!modules.TryGetValue(file, out string? stated))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string version = Short(Parse(stated)) ?? Strings.Common_NotAvailable;
|
||||
string text = string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Library_Format, feature, version);
|
||||
string? from = sources.TryGetValue(file, out string? token) ? SourceText(RuntimeModuleSources.FromToken(token)) : null;
|
||||
parts.Add(string.Join(", ", new[] { text, from, detail }.Where(static p => p is not null)));
|
||||
}
|
||||
|
||||
private static string? SourceText(RuntimeModuleSource source) => source switch
|
||||
{
|
||||
RuntimeModuleSource.Game => Strings.Dlss_From_Game,
|
||||
RuntimeModuleSource.GraphicsDriver => Strings.Dlss_From_GraphicsDriver,
|
||||
RuntimeModuleSource.Windows => Strings.Dlss_From_Windows,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The super-resolution preset the driver reports applied, where super resolution ran in the session (a hook named
|
||||
/// DLSS, or the driver saw it created and evaluated): the word's PRESET bit set. Null otherwise — a preset the driver
|
||||
/// applied to a feature nobody saw run names the model of nothing.
|
||||
/// </summary>
|
||||
private static uint? ReportedPreset(SessionRow row)
|
||||
{
|
||||
bool ran = row.Upscaler is { Length: > 0 } and not "unknown" ? Is(row.Upscaler, "dlss") : Is(row.UpscalerDriverReported, "dlss");
|
||||
return ran && NgxDriverWords.Parse(row.NgxDriverWordsJson) is { Outcome: nameof(NgxProbeOutcome.Answered) } words
|
||||
&& (Mask(words.Sr) & NgxOverrideFlags.Preset) != 0 && words.Preset is > 0
|
||||
? words.Preset
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>The largest DLSS Frame Generation state the session measured: the mix's states, else its one factor.</summary>
|
||||
private static double? LargestFrameGenerationFactor(SessionRow row)
|
||||
{
|
||||
if (!Is(row.FgMode, "dlssg"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
FgMixRecord? mix = FgMixRecord.Parse(row.FgMixJson);
|
||||
double? largest = mix?.Rows.Where(static r => FgMixRecordRow.KindOf(r.Kind) == FgMixKind.Generated).Max(static r => r.Factor);
|
||||
return largest ?? row.FgFactor;
|
||||
}
|
||||
|
||||
private static Dictionary<string, string?> Modules(string? json)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(json))
|
||||
{
|
||||
return new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Dictionary<string, string>? parsed = JsonSerializer.Deserialize(json, AppJsonContext.Default.DictionaryStringString);
|
||||
return parsed is null
|
||||
? new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase)
|
||||
: parsed.ToDictionary(static p => p.Key, static p => (string?)p.Value, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
return new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
private static Version? VersionOf(Dictionary<string, string?> modules, string file) =>
|
||||
modules.TryGetValue(file, out string? stated) ? Parse(stated) : null;
|
||||
|
||||
/// <summary>A stated file version — <c>310,9,1,0</c> as some vendors stamp it, or <c>3.7.10.0</c> — as numbers.</summary>
|
||||
internal static Version? Parse(string? stated)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(stated))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string[] numbers = stated.Replace(',', '.').Split('.', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||
int[] parts = [.. numbers.Take(4).Select(static n => int.TryParse(n, NumberStyles.None, _inv, out int v) ? v : -1)];
|
||||
return parts.Length >= 2 && parts.All(static p => p >= 0)
|
||||
? parts.Length switch
|
||||
{
|
||||
2 => new Version(parts[0], parts[1]),
|
||||
3 => new Version(parts[0], parts[1], parts[2]),
|
||||
_ => new Version(parts[0], parts[1], parts[2], parts[3]),
|
||||
}
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>A version without a trailing <c>.0</c> revision: <c>310.9.1</c>.</summary>
|
||||
private static string? Short(Version? version) => version is null ? null
|
||||
: version.Revision is 0 or -1 ? version.ToString(version.Build < 0 ? 2 : 3) : version.ToString();
|
||||
|
||||
private static bool Is(string? token, string value) => string.Equals(token, value, StringComparison.Ordinal);
|
||||
|
||||
private static ulong Mask(string? hex) =>
|
||||
hex is { Length: > 2 } && ulong.TryParse(hex.AsSpan(2), NumberStyles.HexNumber, _inv, out ulong value) ? value : 0;
|
||||
}
|
||||
@@ -123,6 +123,8 @@ public sealed class SessionExporter
|
||||
// beta.24 (D63): the session's quality mode and whose it is: the NVIDIA App's override the driver reported applied
|
||||
// ("nvidia_app"), or the game's own call ("game"); the per-frame upscaler_quality column stays the hooked byte.
|
||||
w.WriteLine("# quality_mode: " + QualityExport(row));
|
||||
// beta.24 (D64): the DLSS generation where the session established one, each DLSS library's version and folder class.
|
||||
w.WriteLine("# dlss: " + DlssText.ExportLine(row));
|
||||
w.WriteLine("# fg_mode: " + row.FgMode + "; fg_source: " + (row.FgSource ?? "n/a") + "; presented_qualifier: " + (row.PresentedQualifier ?? "n/a"));
|
||||
// beta.24 (D62): every frame-generation state the session held, each with its share and its own rates: the session's, not a frame's.
|
||||
w.WriteLine("# fg_mix: " + FgMixPresentation.ExportLine(row));
|
||||
|
||||
Generated
+48
@@ -264,6 +264,22 @@ public static class Strings
|
||||
nameof(Display_Window_Format),
|
||||
nameof(Display_WindowOnMonitor_Format),
|
||||
nameof(Display_WindowOnMonitorHz_Format),
|
||||
nameof(Dlss_Basis_Factor_Format),
|
||||
nameof(Dlss_Basis_Library_Format),
|
||||
nameof(Dlss_Feature_FrameGeneration),
|
||||
nameof(Dlss_Feature_RayReconstruction),
|
||||
nameof(Dlss_Feature_SuperResolution),
|
||||
nameof(Dlss_From_Game),
|
||||
nameof(Dlss_From_GraphicsDriver),
|
||||
nameof(Dlss_From_Windows),
|
||||
nameof(Dlss_Label_Format),
|
||||
nameof(Dlss_Library_Format),
|
||||
nameof(Dlss_Model_Cnn),
|
||||
nameof(Dlss_Model_SecondGenerationTransformer),
|
||||
nameof(Dlss_Model_Transformer),
|
||||
nameof(Dlss_Model_Unknown),
|
||||
nameof(Dlss_NeuralRendering_Loaded),
|
||||
nameof(Dlss_Preset_Format),
|
||||
nameof(Document_OnGitHub),
|
||||
nameof(Document_Pages),
|
||||
nameof(EditGame_ChooseImage),
|
||||
@@ -1620,6 +1636,38 @@ public static class Strings
|
||||
|
||||
public static string Display_WindowOnMonitorHz_Format => ResourceManager.GetString(nameof(Display_WindowOnMonitorHz_Format), Culture) ?? nameof(Display_WindowOnMonitorHz_Format);
|
||||
|
||||
public static string Dlss_Basis_Factor_Format => ResourceManager.GetString(nameof(Dlss_Basis_Factor_Format), Culture) ?? nameof(Dlss_Basis_Factor_Format);
|
||||
|
||||
public static string Dlss_Basis_Library_Format => ResourceManager.GetString(nameof(Dlss_Basis_Library_Format), Culture) ?? nameof(Dlss_Basis_Library_Format);
|
||||
|
||||
public static string Dlss_Feature_FrameGeneration => ResourceManager.GetString(nameof(Dlss_Feature_FrameGeneration), Culture) ?? nameof(Dlss_Feature_FrameGeneration);
|
||||
|
||||
public static string Dlss_Feature_RayReconstruction => ResourceManager.GetString(nameof(Dlss_Feature_RayReconstruction), Culture) ?? nameof(Dlss_Feature_RayReconstruction);
|
||||
|
||||
public static string Dlss_Feature_SuperResolution => ResourceManager.GetString(nameof(Dlss_Feature_SuperResolution), Culture) ?? nameof(Dlss_Feature_SuperResolution);
|
||||
|
||||
public static string Dlss_From_Game => ResourceManager.GetString(nameof(Dlss_From_Game), Culture) ?? nameof(Dlss_From_Game);
|
||||
|
||||
public static string Dlss_From_GraphicsDriver => ResourceManager.GetString(nameof(Dlss_From_GraphicsDriver), Culture) ?? nameof(Dlss_From_GraphicsDriver);
|
||||
|
||||
public static string Dlss_From_Windows => ResourceManager.GetString(nameof(Dlss_From_Windows), Culture) ?? nameof(Dlss_From_Windows);
|
||||
|
||||
public static string Dlss_Label_Format => ResourceManager.GetString(nameof(Dlss_Label_Format), Culture) ?? nameof(Dlss_Label_Format);
|
||||
|
||||
public static string Dlss_Library_Format => ResourceManager.GetString(nameof(Dlss_Library_Format), Culture) ?? nameof(Dlss_Library_Format);
|
||||
|
||||
public static string Dlss_Model_Cnn => ResourceManager.GetString(nameof(Dlss_Model_Cnn), Culture) ?? nameof(Dlss_Model_Cnn);
|
||||
|
||||
public static string Dlss_Model_SecondGenerationTransformer => ResourceManager.GetString(nameof(Dlss_Model_SecondGenerationTransformer), Culture) ?? nameof(Dlss_Model_SecondGenerationTransformer);
|
||||
|
||||
public static string Dlss_Model_Transformer => ResourceManager.GetString(nameof(Dlss_Model_Transformer), Culture) ?? nameof(Dlss_Model_Transformer);
|
||||
|
||||
public static string Dlss_Model_Unknown => ResourceManager.GetString(nameof(Dlss_Model_Unknown), Culture) ?? nameof(Dlss_Model_Unknown);
|
||||
|
||||
public static string Dlss_NeuralRendering_Loaded => ResourceManager.GetString(nameof(Dlss_NeuralRendering_Loaded), Culture) ?? nameof(Dlss_NeuralRendering_Loaded);
|
||||
|
||||
public static string Dlss_Preset_Format => ResourceManager.GetString(nameof(Dlss_Preset_Format), Culture) ?? nameof(Dlss_Preset_Format);
|
||||
|
||||
public static string Document_OnGitHub => ResourceManager.GetString(nameof(Document_OnGitHub), Culture) ?? nameof(Document_OnGitHub);
|
||||
|
||||
public static string Document_Pages => ResourceManager.GetString(nameof(Document_Pages), Culture) ?? nameof(Document_Pages);
|
||||
|
||||
@@ -4509,4 +4509,68 @@
|
||||
<value>ウルトラ クオリティ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Label_Format" xml:space="preserve">
|
||||
<value>{0}({1})</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Basis_Factor_Format" xml:space="preserve">
|
||||
<value>フレーム生成 ×{0:0.0} の状態</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Basis_Library_Format" xml:space="preserve">
|
||||
<value>ライブラリ {0}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Feature_SuperResolution" xml:space="preserve">
|
||||
<value>Super Resolution</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Feature_RayReconstruction" xml:space="preserve">
|
||||
<value>Ray Reconstruction</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Feature_FrameGeneration" xml:space="preserve">
|
||||
<value>Frame Generation</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Library_Format" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_From_Game" xml:space="preserve">
|
||||
<value>ゲームから</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_From_GraphicsDriver" xml:space="preserve">
|
||||
<value>グラフィックス ドライバーから</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_From_Windows" xml:space="preserve">
|
||||
<value>Windows から</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Preset_Format" xml:space="preserve">
|
||||
<value>プリセット {0}({1})</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Model_Cnn" xml:space="preserve">
|
||||
<value>CNN モデル</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Model_Transformer" xml:space="preserve">
|
||||
<value>Transformer モデル</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Model_SecondGenerationTransformer" xml:space="preserve">
|
||||
<value>第 2 世代 Transformer モデル</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_Model_Unknown" xml:space="preserve">
|
||||
<value>モデル不明</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Dlss_NeuralRendering_Loaded" xml:space="preserve">
|
||||
<value>DLSS 5 ランタイムを読み込み済み</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -3392,4 +3392,52 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<data name="Nv_Mode_UltraQuality" xml:space="preserve">
|
||||
<value>Ultra Quality</value>
|
||||
</data>
|
||||
<data name="Dlss_Label_Format" xml:space="preserve">
|
||||
<value>{0} ({1})</value>
|
||||
</data>
|
||||
<data name="Dlss_Basis_Factor_Format" xml:space="preserve">
|
||||
<value>a ×{0:0.0} frame-generation state</value>
|
||||
</data>
|
||||
<data name="Dlss_Basis_Library_Format" xml:space="preserve">
|
||||
<value>library {0}</value>
|
||||
</data>
|
||||
<data name="Dlss_Feature_SuperResolution" xml:space="preserve">
|
||||
<value>Super Resolution</value>
|
||||
</data>
|
||||
<data name="Dlss_Feature_RayReconstruction" xml:space="preserve">
|
||||
<value>Ray Reconstruction</value>
|
||||
</data>
|
||||
<data name="Dlss_Feature_FrameGeneration" xml:space="preserve">
|
||||
<value>Frame Generation</value>
|
||||
</data>
|
||||
<data name="Dlss_Library_Format" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
</data>
|
||||
<data name="Dlss_From_Game" xml:space="preserve">
|
||||
<value>from the game</value>
|
||||
</data>
|
||||
<data name="Dlss_From_GraphicsDriver" xml:space="preserve">
|
||||
<value>from the graphics driver</value>
|
||||
</data>
|
||||
<data name="Dlss_From_Windows" xml:space="preserve">
|
||||
<value>from Windows</value>
|
||||
</data>
|
||||
<data name="Dlss_Preset_Format" xml:space="preserve">
|
||||
<value>preset {0} ({1})</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_Cnn" xml:space="preserve">
|
||||
<value>CNN model</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_Transformer" xml:space="preserve">
|
||||
<value>transformer model</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_SecondGenerationTransformer" xml:space="preserve">
|
||||
<value>2nd-gen transformer model</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_Unknown" xml:space="preserve">
|
||||
<value>model not placed</value>
|
||||
</data>
|
||||
<data name="Dlss_NeuralRendering_Loaded" xml:space="preserve">
|
||||
<value>DLSS 5 runtime loaded</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -3387,4 +3387,52 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<data name="Nv_Mode_UltraQuality" xml:space="preserve">
|
||||
<value>Ultra Quality</value>
|
||||
</data>
|
||||
<data name="Dlss_Label_Format" xml:space="preserve">
|
||||
<value>{0} ({1})</value>
|
||||
</data>
|
||||
<data name="Dlss_Basis_Factor_Format" xml:space="preserve">
|
||||
<value>trạng thái tạo khung hình ×{0:0.0}</value>
|
||||
</data>
|
||||
<data name="Dlss_Basis_Library_Format" xml:space="preserve">
|
||||
<value>thư viện {0}</value>
|
||||
</data>
|
||||
<data name="Dlss_Feature_SuperResolution" xml:space="preserve">
|
||||
<value>Super Resolution</value>
|
||||
</data>
|
||||
<data name="Dlss_Feature_RayReconstruction" xml:space="preserve">
|
||||
<value>Ray Reconstruction</value>
|
||||
</data>
|
||||
<data name="Dlss_Feature_FrameGeneration" xml:space="preserve">
|
||||
<value>Frame Generation</value>
|
||||
</data>
|
||||
<data name="Dlss_Library_Format" xml:space="preserve">
|
||||
<value>{0} {1}</value>
|
||||
</data>
|
||||
<data name="Dlss_From_Game" xml:space="preserve">
|
||||
<value>từ game</value>
|
||||
</data>
|
||||
<data name="Dlss_From_GraphicsDriver" xml:space="preserve">
|
||||
<value>từ driver đồ họa</value>
|
||||
</data>
|
||||
<data name="Dlss_From_Windows" xml:space="preserve">
|
||||
<value>từ Windows</value>
|
||||
</data>
|
||||
<data name="Dlss_Preset_Format" xml:space="preserve">
|
||||
<value>preset {0} ({1})</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_Cnn" xml:space="preserve">
|
||||
<value>mô hình CNN</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_Transformer" xml:space="preserve">
|
||||
<value>mô hình transformer</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_SecondGenerationTransformer" xml:space="preserve">
|
||||
<value>mô hình transformer thế hệ 2</value>
|
||||
</data>
|
||||
<data name="Dlss_Model_Unknown" xml:space="preserve">
|
||||
<value>mô hình chưa xác định</value>
|
||||
</data>
|
||||
<data name="Dlss_NeuralRendering_Loaded" xml:space="preserve">
|
||||
<value>đã nạp runtime DLSS 5</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1254,6 +1254,12 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
MeasuredEmptyText = string.Empty;
|
||||
string upscaler = Formats.UpscalerOf(lastHooked);
|
||||
Measured.Add(upscaler + " · " + Formats.Resolution(lastHooked.RenderW, lastHooked.RenderH, lastHooked.OutputW, lastHooked.OutputH));
|
||||
if (DlssText.Label(lastHooked) is { } dlss)
|
||||
{
|
||||
// beta.24 (D64): a DLSS generation only where the session showed one, with what it rests on.
|
||||
Measured.Add(dlss);
|
||||
}
|
||||
|
||||
Measured.Add(FpsPresentation.FrameGenerationLabel(FpsPresentation.FromRow(lastHooked), lastHooked.FgMode));
|
||||
foreach (TriStateChipModel chip in Chips.Where(static c => !c.IsNotApplicable))
|
||||
{
|
||||
|
||||
@@ -55,6 +55,13 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
private string? _librariesLine;
|
||||
|
||||
/// <summary>
|
||||
/// beta.24 (D64): the DLSS the session ran — a generation only where the session shows one, each DLSS library's version
|
||||
/// and where it was loaded from, the preset the driver reports, DLSS 5's runtime when loaded; null with no DLSS at all.
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private string? _dlssLine;
|
||||
|
||||
/// <summary>
|
||||
/// The NVIDIA driver profile the game ran under and what it overrides (<c>sessions.driver_profile</c>, beta.8) — the
|
||||
/// NVIDIA App's DLSS and frame-generation overrides; null where no NVIDIA driver was there to ask.
|
||||
@@ -416,6 +423,7 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
|
||||
? string.Empty
|
||||
: string.Join(" · ", SystemInfoViewModel.Describe(_snapshot).Where(static l => !string.Equals(l.Value, Strings.Common_NotAvailable, StringComparison.Ordinal)).Select(static l => l.Value));
|
||||
LibrariesLine = LoadedLibraries(row.RuntimeModulesJson, Game.Libraries);
|
||||
DlssLine = IsHooked ? DlssText.Line(row) : null;
|
||||
DriverProfileLine = NvidiaOverrides.ProfileLine(row.DriverProfileJson);
|
||||
DriverStateLine = NvidiaOverrides.DriverLine(row.NgxDriverWordsJson);
|
||||
DisplayLine = DisplayText.Line(DisplayText.Of(row));
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DisplayLine}"
|
||||
Visibility="{Binding ViewModel.DisplayLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.HardwareLine}" />
|
||||
<!-- beta.24 (D64): the DLSS the session ran, each library with its version and where it was loaded from -->
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DlssLine}"
|
||||
Visibility="{Binding ViewModel.DlssLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.LibrariesLine}"
|
||||
Visibility="{Binding ViewModel.LibrariesLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DriverProfileLine}"
|
||||
|
||||
@@ -40,11 +40,19 @@ public static class CensusNames
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Every module FILE name the census can answer for — the <c>a / b</c> pairs above split into
|
||||
/// their members — so a module snapshot asks about exactly the set the census names.
|
||||
/// Modules the snapshot records though the in-process census has no bit for them (beta.24, D64): DLSS's Ray
|
||||
/// Reconstruction and DLSS 5's runtime, Streamline's other plugins, and AMD's FidelityFX loader. The name of DLSS 5's
|
||||
/// runtime, <c>nvngx_dlssnr.dll</c>, is from community sources until owner-only item 20(d) sees it load.
|
||||
/// </summary>
|
||||
private static readonly string[] _snapshotOnly =
|
||||
["sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll", "nvngx_dlssnr.dll"];
|
||||
|
||||
/// <summary>
|
||||
/// Every module FILE name a snapshot answers for — the census's, the <c>a / b</c> pairs above split into their
|
||||
/// members, then the names only the snapshot records.
|
||||
/// </summary>
|
||||
public static IReadOnlyList<string> ModuleFileNames { get; } =
|
||||
_names.SelectMany(n => n.Name.Split(" / ", StringSplitOptions.RemoveEmptyEntries)).ToArray();
|
||||
[.. _names.SelectMany(n => n.Name.Split(" / ", StringSplitOptions.RemoveEmptyEntries)), .. _snapshotOnly];
|
||||
|
||||
/// <summary>Comma-separated module names for the set family bits; <c>-</c> when none.</summary>
|
||||
public static string Describe(FlRuntimeCensus bits)
|
||||
|
||||
@@ -10,4 +10,11 @@ namespace FrameLedger.Application.Capture;
|
||||
/// performs on every target before injecting — and the path it names is then opened as a file.
|
||||
/// CLAUDE.md rule 4 is untouched: no game memory, no vendor object, no hook.
|
||||
/// </remarks>
|
||||
public sealed record RuntimeModuleInfo(string FileName, string Path, string? FileVersion, Version? Parsed);
|
||||
public sealed record RuntimeModuleInfo(string FileName, string Path, string? FileVersion, Version? Parsed)
|
||||
{
|
||||
/// <summary>
|
||||
/// Where the file lives, by folder class (beta.24, D64): the game's, the graphics driver's own copy, or Windows'. The
|
||||
/// class is stored with the session; <see cref="Path"/> never is.
|
||||
/// </summary>
|
||||
public RuntimeModuleSource Source { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Capture;
|
||||
|
||||
/// <summary>
|
||||
/// Where a loaded runtime module's file lives, by its folder (beta.24, owner decision D64) — the class is stored, the
|
||||
/// path never is (<c>sessions.runtime_module_sources</c>).
|
||||
/// </summary>
|
||||
public enum RuntimeModuleSource
|
||||
{
|
||||
/// <summary>Not classified: a set read before beta.24, or a module whose path could not be read.</summary>
|
||||
Unknown = 0,
|
||||
|
||||
/// <summary>Anywhere outside Windows' folder and the graphics driver's: the game's own copy, or one beside it.</summary>
|
||||
Game = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The graphics driver's own copy: Windows' driver store, or <c>%ProgramData%\NVIDIA</c> — where the NVIDIA App's
|
||||
/// DLSS override keeps the libraries it substitutes.
|
||||
/// </summary>
|
||||
GraphicsDriver = 2,
|
||||
|
||||
/// <summary>Windows' folder outside the driver store.</summary>
|
||||
Windows = 3,
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Capture;
|
||||
|
||||
/// <summary>
|
||||
/// A module path's folder class (beta.24, D64), and the NVIDIA override folder a snapshot reads by path rather than by
|
||||
/// name. Pure: the two system folders are handed in, so the rules are tested without the machine's.
|
||||
/// </summary>
|
||||
public static class RuntimeModuleSources
|
||||
{
|
||||
/// <summary>The class of <paramref name="path"/>: the driver store and <c>%ProgramData%\NVIDIA</c> first, then Windows, else the game.</summary>
|
||||
public static RuntimeModuleSource Classify(string? path, string windowsDirectory, string programDataDirectory)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(windowsDirectory);
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(programDataDirectory);
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
return RuntimeModuleSource.Unknown;
|
||||
}
|
||||
|
||||
if (Under(path, Path.Combine(windowsDirectory, "System32", "DriverStore")) || Under(path, Path.Combine(programDataDirectory, "NVIDIA")))
|
||||
{
|
||||
return RuntimeModuleSource.GraphicsDriver;
|
||||
}
|
||||
|
||||
return Under(path, windowsDirectory) ? RuntimeModuleSource.Windows : RuntimeModuleSource.Game;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether <paramref name="path"/> is under <c>%ProgramData%\NVIDIA\NGX</c>, where the NVIDIA App's override keeps its
|
||||
/// DLSS libraries under names no census lists — so a snapshot records every module there, whatever its name.
|
||||
/// </summary>
|
||||
public static bool IsNgxOverrideFolder(string? path, string programDataDirectory)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(programDataDirectory);
|
||||
return !string.IsNullOrWhiteSpace(path) && Under(path, Path.Combine(programDataDirectory, "NVIDIA", "NGX"));
|
||||
}
|
||||
|
||||
/// <summary>The stored token for a class; null for <see cref="RuntimeModuleSource.Unknown"/>.</summary>
|
||||
public static string? Token(RuntimeModuleSource source) => source switch
|
||||
{
|
||||
RuntimeModuleSource.Game => "game",
|
||||
RuntimeModuleSource.GraphicsDriver => "graphics_driver",
|
||||
RuntimeModuleSource.Windows => "windows",
|
||||
_ => null,
|
||||
};
|
||||
|
||||
/// <summary>A stored token back; an unknown token is <see cref="RuntimeModuleSource.Unknown"/>.</summary>
|
||||
public static RuntimeModuleSource FromToken(string? token) => token switch
|
||||
{
|
||||
"game" => RuntimeModuleSource.Game,
|
||||
"graphics_driver" => RuntimeModuleSource.GraphicsDriver,
|
||||
"windows" => RuntimeModuleSource.Windows,
|
||||
_ => RuntimeModuleSource.Unknown,
|
||||
};
|
||||
|
||||
private static bool Under(string path, string folder)
|
||||
{
|
||||
string full = Normalize(path);
|
||||
string root = Normalize(folder);
|
||||
return full.Length > root.Length
|
||||
&& full.StartsWith(root, StringComparison.OrdinalIgnoreCase)
|
||||
&& full[root.Length] == Path.DirectorySeparatorChar;
|
||||
}
|
||||
|
||||
private static string Normalize(string path) =>
|
||||
Path.TrimEndingDirectorySeparator(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
|
||||
}
|
||||
@@ -147,6 +147,12 @@ public sealed record SessionRow
|
||||
/// </summary>
|
||||
public string? FgMixJson { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// <c>runtime_module_sources</c> (schema 0021, beta.24, D64): each loaded runtime module's folder class —
|
||||
/// <c>game</c>, <c>graphics_driver</c> or <c>windows</c> — as <c>{file: class}</c>; never a path. Null before.
|
||||
/// </summary>
|
||||
public string? RuntimeModuleSourcesJson { get; init; }
|
||||
|
||||
public double? PresentedFps { get; init; }
|
||||
|
||||
public string? PresentedQualifier { get; init; }
|
||||
|
||||
@@ -360,6 +360,11 @@ public static class SessionAggregator
|
||||
RuntimeModulesJson = c.Input.Modules.Snapshots == 0 ? null : JsonSerializer.Serialize(
|
||||
c.Input.Modules.Modules.ToDictionary(static m => m.FileName, static m => m.FileVersion, StringComparer.OrdinalIgnoreCase),
|
||||
RecordingJsonContext.Default.DictionaryStringString),
|
||||
// beta.24 (D64): where each module's file lived, by class — never the path.
|
||||
RuntimeModuleSourcesJson = c.Input.Modules.Snapshots == 0 ? null : JsonSerializer.Serialize(
|
||||
c.Input.Modules.Modules.Where(static m => RuntimeModuleSources.Token(m.Source) is not null)
|
||||
.ToDictionary(static m => m.FileName, static m => RuntimeModuleSources.Token(m.Source)!, StringComparer.OrdinalIgnoreCase),
|
||||
RecordingJsonContext.Default.DictionaryStringString),
|
||||
ExecutableMarkersJson = !c.Input.Markers.Scanned ? null : JsonSerializer.Serialize(
|
||||
c.Input.Markers.Markers.ToDictionary(static m => m.Name, static m => m.Hits, StringComparer.Ordinal),
|
||||
RecordingJsonContext.Default.DictionaryStringInt32),
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>What established a <see cref="DlssGeneration"/>.</summary>
|
||||
public enum DlssBasis
|
||||
{
|
||||
/// <summary>Nothing. The zero value, so a default is not a claim.</summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>The render preset the NVIDIA driver reported applied.</summary>
|
||||
Preset = 1,
|
||||
|
||||
/// <summary>A measured DLSS Frame Generation state's factor.</summary>
|
||||
FrameGenerationFactor = 2,
|
||||
|
||||
/// <summary>A loaded library's major version.</summary>
|
||||
LibraryVersion = 3,
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>What a session observed about DLSS, for <see cref="DlssGeneration.Of"/> (beta.24, D64).</summary>
|
||||
/// <param name="SuperResolution">The loaded <c>nvngx_dlss.dll</c>'s file version.</param>
|
||||
/// <param name="FrameGeneration">The loaded <c>nvngx_dlssg.dll</c>'s file version.</param>
|
||||
/// <param name="Preset">The super-resolution render preset the NVIDIA driver reports applied in a session where it ran (1 = A …).</param>
|
||||
/// <param name="LargestFrameGenerationFactor">The largest DLSS Frame Generation state the session measured.</param>
|
||||
public sealed record DlssEvidence(Version? SuperResolution, Version? FrameGeneration, uint? Preset, double? LargestFrameGenerationFactor);
|
||||
@@ -0,0 +1,74 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Which DLSS generation a session's evidence establishes (beta.24, owner decision D64; <c>05_DETECTION</c> §DLSS
|
||||
/// generation) — and on what — or nothing. Evidence-bound: a label is given only from something the session observed,
|
||||
/// strongest first; a library version is shown as a version and names a generation only where its major number does.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// <b>The table, and where each row comes from.</b> A render preset the NVIDIA driver reports applied to super
|
||||
/// resolution: L or M are DLSS 4.5's second-generation transformer (added with DLL 310.5.0), J or K DLSS 4's transformer;
|
||||
/// A–F are the CNN model and name no generation. A DLSS Frame Generation state measured at ×5 or more is DLSS 4.5's
|
||||
/// multi-frame generation, ×3 or ×4 DLSS 4's. A super-resolution library 2.x is DLSS 2; 3.x, or a frame-generation
|
||||
/// library 1.x–3.x, is DLSS 3. A 310.x library alone names nothing: DLSS 4 and 4.5 ship the same major number, and the
|
||||
/// model it runs is the preset's to say. Never a default preset inferred from a version.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// DLSS 5's neural rendering is not a generation of these features and is not in this table: a session states only that
|
||||
/// its runtime was loaded.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <param name="Kind">The generation established.</param>
|
||||
/// <param name="Basis">What established it.</param>
|
||||
public sealed record DlssGeneration(DlssGenerationKind Kind, DlssBasis Basis)
|
||||
{
|
||||
/// <summary>The generation the evidence establishes, or null when it establishes none.</summary>
|
||||
public static DlssGeneration? Of(DlssEvidence evidence)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(evidence);
|
||||
if (evidence.Preset is 12 or 13)
|
||||
{
|
||||
return new DlssGeneration(DlssGenerationKind.Dlss45, DlssBasis.Preset);
|
||||
}
|
||||
|
||||
if (evidence.LargestFrameGenerationFactor is >= 4.5)
|
||||
{
|
||||
return new DlssGeneration(DlssGenerationKind.Dlss45, DlssBasis.FrameGenerationFactor);
|
||||
}
|
||||
|
||||
if (evidence.Preset is 10 or 11)
|
||||
{
|
||||
return new DlssGeneration(DlssGenerationKind.Dlss4, DlssBasis.Preset);
|
||||
}
|
||||
|
||||
if (evidence.LargestFrameGenerationFactor is >= 2.5)
|
||||
{
|
||||
return new DlssGeneration(DlssGenerationKind.Dlss4, DlssBasis.FrameGenerationFactor);
|
||||
}
|
||||
|
||||
if (evidence.SuperResolution is { Major: 2 })
|
||||
{
|
||||
return new DlssGeneration(DlssGenerationKind.Dlss2, DlssBasis.LibraryVersion);
|
||||
}
|
||||
|
||||
return evidence.SuperResolution is { Major: 3 } || evidence.FrameGeneration is { Major: >= 1 and <= 3 }
|
||||
? new DlssGeneration(DlssGenerationKind.Dlss3, DlssBasis.LibraryVersion)
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>A render preset as its letter (1 = A … 26 = Z), or null.</summary>
|
||||
public static char? PresetLetter(uint? preset) => preset is >= 1 and <= 26 ? (char)('A' + (int)preset.Value - 1) : null;
|
||||
|
||||
/// <summary>The model a render preset selects, or null for one this table does not place.</summary>
|
||||
public static DlssModel? ModelOf(uint? preset) => preset switch
|
||||
{
|
||||
>= 1 and <= 6 => DlssModel.Cnn,
|
||||
10 or 11 => DlssModel.Transformer,
|
||||
12 or 13 => DlssModel.SecondGenerationTransformer,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>A DLSS generation, as <see cref="DlssGeneration"/> names one.</summary>
|
||||
public enum DlssGenerationKind
|
||||
{
|
||||
/// <summary>None established. The zero value, so a default is not a claim.</summary>
|
||||
None = 0,
|
||||
Dlss2 = 2,
|
||||
Dlss3 = 3,
|
||||
Dlss4 = 4,
|
||||
|
||||
/// <summary>DLSS 4.5.</summary>
|
||||
Dlss45 = 45,
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>The super-resolution model a render preset selects (beta.24, D64).</summary>
|
||||
public enum DlssModel
|
||||
{
|
||||
/// <summary>Not placed. The zero value, so a default is not a claim.</summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>Presets A–F: the convolutional model.</summary>
|
||||
Cnn = 1,
|
||||
|
||||
/// <summary>Presets J and K: DLSS 4's transformer.</summary>
|
||||
Transformer = 2,
|
||||
|
||||
/// <summary>Presets L and M: DLSS 4.5's second-generation transformer.</summary>
|
||||
SecondGenerationTransformer = 3,
|
||||
}
|
||||
@@ -20,6 +20,12 @@ namespace FrameLedger.Infrastructure.Capture;
|
||||
/// list through documented PSAPI, plus <see cref="FileVersionInfo"/> on the path it names.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>And, since beta.24 (D64), where each file lives</b> — the game's folder, the graphics driver's own copy, or
|
||||
/// Windows' (<see cref="RuntimeModuleSources"/>) — and every module under <c>%ProgramData%\NVIDIA\NGX</c>, whatever its
|
||||
/// name: the NVIDIA App's DLSS override loads its libraries from there, and on the owner's Silent Hill 2 session (×6
|
||||
/// frame generation through the override, 2026-10-13) none of them carried a census name.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Never throws.</b> A target that is protected, elevated, or already gone yields an
|
||||
/// unreadable snapshot with whatever was collected before the failure; the loop records that
|
||||
/// rather than ending the session over a diagnostic.
|
||||
@@ -36,10 +42,17 @@ public sealed class RuntimeModuleSnapshot : IRuntimeModuleSnapshot
|
||||
/// <inheritdoc />
|
||||
RuntimeModuleSet IRuntimeModuleSnapshot.Take(int pid) => Take(pid, _fileNames);
|
||||
|
||||
public static RuntimeModuleSet Take(int pid, IReadOnlyCollection<string> fileNames)
|
||||
public static RuntimeModuleSet Take(int pid, IReadOnlyCollection<string> fileNames) =>
|
||||
Take(pid, fileNames, Environment.GetFolderPath(Environment.SpecialFolder.Windows), Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData));
|
||||
|
||||
/// <summary>The same with the two system folders handed in (tests).</summary>
|
||||
public static RuntimeModuleSet Take(int pid, IReadOnlyCollection<string> fileNames, string windowsDirectory, string programDataDirectory)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(fileNames);
|
||||
var found = new List<RuntimeModuleInfo>();
|
||||
|
||||
// A folder Windows did not name classifies nothing and catches nothing by path; the names are still answered.
|
||||
bool folders = !string.IsNullOrWhiteSpace(windowsDirectory) && !string.IsNullOrWhiteSpace(programDataDirectory);
|
||||
try
|
||||
{
|
||||
using Process target = Process.GetProcessById(pid);
|
||||
@@ -52,12 +65,15 @@ public sealed class RuntimeModuleSnapshot : IRuntimeModuleSnapshot
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!fileNames.Contains(name, StringComparer.OrdinalIgnoreCase))
|
||||
if (!fileNames.Contains(name, StringComparer.OrdinalIgnoreCase) && !(folders && RuntimeModuleSources.IsNgxOverrideFolder(path, programDataDirectory)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
found.Add(Describe(name, path));
|
||||
found.Add(Describe(name, path) with
|
||||
{
|
||||
Source = folders ? RuntimeModuleSources.Classify(path, windowsDirectory, programDataDirectory) : RuntimeModuleSource.Unknown,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
-- 0021 (2026-10-19, beta.24, owner decision D64): where each loaded runtime module's file lived, by class.
|
||||
--
|
||||
-- One JSON column beside runtime_modules ({file: version}, P2): {file: "game" | "graphics_driver" | "windows"}, from the
|
||||
-- path the module snapshot read through the loader's list (Application.Capture.RuntimeModuleSources) - the class is
|
||||
-- stored, the path never is (a path names a user folder; the Privacy Policy says the folder is not kept). It is what
|
||||
-- tells the NVIDIA App's DLSS override, which loads the driver's own copy from %ProgramData%\NVIDIA, from the library the
|
||||
-- game ships (05_DETECTION section DLSS generation). Written by the Agent only (06_DATA_MODEL section Writer ownership);
|
||||
-- ADD COLUMN only. A session written before has none; a session recovered from its crash file has neither column.
|
||||
|
||||
ALTER TABLE sessions ADD COLUMN runtime_module_sources TEXT;
|
||||
@@ -19,10 +19,10 @@ namespace FrameLedger.Infrastructure.Persistence;
|
||||
internal static class SessionRowColumns
|
||||
{
|
||||
public const string Insert =
|
||||
"INSERT INTO sessions (session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix) "
|
||||
+ "VALUES (@session_guid, @game_id, @snapshot_id, @started_at, @ended_at, @duration_s, @qpc_epoch, @qpc_frequency, @capture_tier, @capture_mode, @capture_notes, @ac_exception_family, @late_attach, @telemetry_source, @overlay_build_id, @exit_status, @drain_ticks, @foreground_ticks, @records_before_attach, @dxgi_presents_before_hook, @gap_count, @guard_ticks_published, @launch_wait_ms, @api, @present_mode, @swap_effect, @hdr_flag, @hdr_source, @sync_interval_mode, @upscaler, @upscaler_quality, @upscaler_sharpness, @upscaler_driver_reported, @render_w, @render_h, @output_w, @output_h, @upscale_ratio, @settings_changed_midsession, @fg_mode, @fg_source, @fg_factor, @fg_driver_reported, @fg_runtime_census, @fg_none_withheld_reason, @fg_refusal, @fg_refusal_detail, @fg_factor_scope, @fg_steady_share, @presented_fps, @presented_qualifier, @dxgi_unseen_total, @dxgi_present_samples, @displayed_counted_by, @sl_tag_census, @sl_interposer_version, @runtime_modules, @driver_profile, @executable_markers, @ngx_driver_words, @rt_flag, @rt_source, @pt_flag, @pt_source, @pt_confidence, @rr_flag, @rr_source, @rt_frame_pct, @rays_per_pixel, @rt_pso_count, @rt_tier, @hooks_installed_mask, @raster_pso_count, @frame_count, @app_frame_count, @displayed_frame_count, @dropped_frames, @native_fps, @displayed_fps, @median_fps, @p1_low_fps, @p01_low_fps, @displayed_p1_low_fps, @min_fps, @max_fps, @frametime_stddev_ms, @stutter_count, @stutter_time_pct, @pso_stutter_pct, @reflex_active, @latency_avg_us, @latency_p95_us, @dropped_records, @fault_count, @data_quality_warnings, @writer_status_at_end, @early_stop_family, @loader_signals, @vram_proc_avg_mb, @vram_proc_max_mb, @vram_budget_exceeded_pct, @vram_adapter_max_mb, @avg_cpu_temp, @max_cpu_temp, @avg_gpu_temp, @max_gpu_temp, @max_gpu_hotspot, @avg_gpu_load, @avg_cpu_load, @avg_ram_mb, @avg_gpu_power_w, @throttle_pct, @display_exclusive_ms, @display_borderless_ms, @display_windowed_ms, @display_covers_ms, @display_minimized_ms, @display_nowindow_ms, @display_changes, @display_source, @display_window_w, @display_window_h, @display_buffer_w, @display_buffer_h, @display_monitor_w, @display_monitor_h, @display_monitor_hz, @game_vram_dedicated_avg_mb, @game_vram_dedicated_median_mb, @game_vram_dedicated_max_mb, @game_vram_shared_max_mb, @game_ram_private_avg_mb, @game_ram_private_median_mb, @game_ram_private_max_mb, @game_ram_ws_max_mb, @game_commit_max_mb, @game_memory_processes, @game_memory_source, @sensor_stats_json, @time_below_30_pct, @time_below_60_pct, @time_below_refresh_pct, @frametime_delta_mean_ms, @vsync_present_pct, @tearing_allowed_pct, @avg_gpu_core_clock_mhz, @avg_gpu_mem_clock_mhz, @avg_gpu_fan_rpm, @max_gpu_mem_temp, @power_limit_pct, @thermal_limit_pct, @app_frames_per_joule, @fg_mix) RETURNING id";
|
||||
"INSERT INTO sessions (session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix, runtime_module_sources) "
|
||||
+ "VALUES (@session_guid, @game_id, @snapshot_id, @started_at, @ended_at, @duration_s, @qpc_epoch, @qpc_frequency, @capture_tier, @capture_mode, @capture_notes, @ac_exception_family, @late_attach, @telemetry_source, @overlay_build_id, @exit_status, @drain_ticks, @foreground_ticks, @records_before_attach, @dxgi_presents_before_hook, @gap_count, @guard_ticks_published, @launch_wait_ms, @api, @present_mode, @swap_effect, @hdr_flag, @hdr_source, @sync_interval_mode, @upscaler, @upscaler_quality, @upscaler_sharpness, @upscaler_driver_reported, @render_w, @render_h, @output_w, @output_h, @upscale_ratio, @settings_changed_midsession, @fg_mode, @fg_source, @fg_factor, @fg_driver_reported, @fg_runtime_census, @fg_none_withheld_reason, @fg_refusal, @fg_refusal_detail, @fg_factor_scope, @fg_steady_share, @presented_fps, @presented_qualifier, @dxgi_unseen_total, @dxgi_present_samples, @displayed_counted_by, @sl_tag_census, @sl_interposer_version, @runtime_modules, @driver_profile, @executable_markers, @ngx_driver_words, @rt_flag, @rt_source, @pt_flag, @pt_source, @pt_confidence, @rr_flag, @rr_source, @rt_frame_pct, @rays_per_pixel, @rt_pso_count, @rt_tier, @hooks_installed_mask, @raster_pso_count, @frame_count, @app_frame_count, @displayed_frame_count, @dropped_frames, @native_fps, @displayed_fps, @median_fps, @p1_low_fps, @p01_low_fps, @displayed_p1_low_fps, @min_fps, @max_fps, @frametime_stddev_ms, @stutter_count, @stutter_time_pct, @pso_stutter_pct, @reflex_active, @latency_avg_us, @latency_p95_us, @dropped_records, @fault_count, @data_quality_warnings, @writer_status_at_end, @early_stop_family, @loader_signals, @vram_proc_avg_mb, @vram_proc_max_mb, @vram_budget_exceeded_pct, @vram_adapter_max_mb, @avg_cpu_temp, @max_cpu_temp, @avg_gpu_temp, @max_gpu_temp, @max_gpu_hotspot, @avg_gpu_load, @avg_cpu_load, @avg_ram_mb, @avg_gpu_power_w, @throttle_pct, @display_exclusive_ms, @display_borderless_ms, @display_windowed_ms, @display_covers_ms, @display_minimized_ms, @display_nowindow_ms, @display_changes, @display_source, @display_window_w, @display_window_h, @display_buffer_w, @display_buffer_h, @display_monitor_w, @display_monitor_h, @display_monitor_hz, @game_vram_dedicated_avg_mb, @game_vram_dedicated_median_mb, @game_vram_dedicated_max_mb, @game_vram_shared_max_mb, @game_ram_private_avg_mb, @game_ram_private_median_mb, @game_ram_private_max_mb, @game_ram_ws_max_mb, @game_commit_max_mb, @game_memory_processes, @game_memory_source, @sensor_stats_json, @time_below_30_pct, @time_below_60_pct, @time_below_refresh_pct, @frametime_delta_mean_ms, @vsync_present_pct, @tearing_allowed_pct, @avg_gpu_core_clock_mhz, @avg_gpu_mem_clock_mhz, @avg_gpu_fan_rpm, @max_gpu_mem_temp, @power_limit_pct, @thermal_limit_pct, @app_frames_per_joule, @fg_mix, @runtime_module_sources) RETURNING id";
|
||||
|
||||
public const string Select = "SELECT id, session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix FROM sessions";
|
||||
public const string Select = "SELECT id, session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix, runtime_module_sources FROM sessions";
|
||||
|
||||
public static Dictionary<string, object?> Parameters(SessionRow s)
|
||||
{
|
||||
@@ -407,9 +407,19 @@ internal static class SessionRowColumns
|
||||
};
|
||||
|
||||
// Schema 0020 (beta.24, D62): every frame-generation state the session held, with its share (FgMixRecord's JSON).
|
||||
private static void Parameters7(Dictionary<string, object?> d, SessionRow s) => d["fg_mix"] = s.FgMixJson;
|
||||
private static void Parameters7(Dictionary<string, object?> d, SessionRow s)
|
||||
{
|
||||
d["fg_mix"] = s.FgMixJson;
|
||||
|
||||
private static SessionRow Read7(SessionRow row, DbDataReader r) => row with { FgMixJson = S(r, "fg_mix") };
|
||||
// Schema 0021 (beta.24, D64): each runtime module's folder class.
|
||||
d["runtime_module_sources"] = s.RuntimeModuleSourcesJson;
|
||||
}
|
||||
|
||||
private static SessionRow Read7(SessionRow row, DbDataReader r) => row with
|
||||
{
|
||||
FgMixJson = S(r, "fg_mix"),
|
||||
RuntimeModuleSourcesJson = S(r, "runtime_module_sources"),
|
||||
};
|
||||
|
||||
public static string ExitStatusText(ExitStatus status) => Vocabulary.ExitStatusText(status);
|
||||
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Services;
|
||||
using FrameLedger.Application.Persistence;
|
||||
using FrameLedger.Domain.Sessions;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// D64 (beta.24): the DLSS a session ran, in words — each library's version and where it was loaded from, the preset the
|
||||
/// driver reports, a generation only where the session shows one, DLSS 5 only as "runtime loaded". The rows are shaped
|
||||
/// like the owner's ledger: Witcher 3 (310.9.1 libraries, ×2) and Silent Hill 2 (×6 through the NVIDIA App).
|
||||
/// </summary>
|
||||
[Collection(StringsCultureCollection.Name)]
|
||||
public sealed class DlssTextTests
|
||||
{
|
||||
private const string _witcherModules = "{\"nvngx_dlss.dll\":\"310,9,1,0\",\"nvngx_dlssd.dll\":\"310,9,1,0\",\"nvngx_dlssg.dll\":\"310,9,1,0\",\"sl.dlss_g.dll\":\"2,14,1,0\"}";
|
||||
|
||||
private static T InEnglish<T>(Func<T> f)
|
||||
{
|
||||
CultureInfo? previous = Strings.Culture;
|
||||
CultureInfo previousCulture = CultureInfo.CurrentCulture;
|
||||
try
|
||||
{
|
||||
Strings.Culture = CultureInfo.GetCultureInfo("en");
|
||||
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en");
|
||||
return f();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Strings.Culture = previous;
|
||||
CultureInfo.CurrentCulture = previousCulture;
|
||||
}
|
||||
}
|
||||
|
||||
private static SessionRow Row(string? modules = null, string? sources = null, string? upscaler = null, string? driverReported = null, string? words = null,
|
||||
string fgMode = "na", double? factor = null, string? mix = null) => new()
|
||||
{
|
||||
SessionGuid = Guid.NewGuid(),
|
||||
GameId = 1,
|
||||
SnapshotId = 1,
|
||||
StartedAt = DateTimeOffset.UnixEpoch,
|
||||
EndedAt = DateTimeOffset.UnixEpoch.AddMinutes(10),
|
||||
QpcEpoch = 0,
|
||||
QpcFrequency = 1,
|
||||
Tier = CaptureTier.Hooked,
|
||||
Mode = CaptureMode.Launch,
|
||||
ExitStatus = ExitStatus.Normal,
|
||||
FrameCount = 1000,
|
||||
RuntimeModulesJson = modules,
|
||||
RuntimeModuleSourcesJson = sources,
|
||||
Upscaler = upscaler,
|
||||
UpscalerDriverReported = driverReported,
|
||||
NgxDriverWordsJson = words,
|
||||
FgMode = fgMode,
|
||||
FgFactor = factor,
|
||||
FgMixJson = mix,
|
||||
};
|
||||
|
||||
[Fact]
|
||||
public void WitchersLibrariesAreVersionsAndNameNoGenerationAtTimesTwo() => InEnglish(() =>
|
||||
{
|
||||
SessionRow witcher = Row(_witcherModules, "{\"nvngx_dlss.dll\":\"game\",\"nvngx_dlssg.dll\":\"graphics_driver\"}", upscaler: "dlss", fgMode: "dlssg", factor: 1.98);
|
||||
|
||||
DlssText.Line(witcher).Should().Be("DLSS · Super Resolution 310.9.1, from the game · Ray Reconstruction 310.9.1 · Frame Generation 310.9.1, from the graphics driver");
|
||||
DlssText.Label(witcher).Should().BeNull("310.x is DLSS 4's and 4.5's alike, and ×2 is any generation's");
|
||||
DlssText.ExportLine(witcher).Should().Be("nvngx_dlss.dll=310,9,1,0 game; nvngx_dlssd.dll=310,9,1,0; nvngx_dlssg.dll=310,9,1,0 graphics_driver");
|
||||
return 0;
|
||||
});
|
||||
|
||||
[Fact]
|
||||
public void SilentHill2sTimesSixStateIsDlss45() => InEnglish(() =>
|
||||
{
|
||||
// As stored: no DLSS library under a census name, the hook named nothing, x6.0 counted for DLSS-G.
|
||||
SessionRow silentHill2 = Row("{\"sl.interposer.dll\":\"2,4,0,0\"}", upscaler: "unknown", fgMode: "dlssg", factor: 6.0023,
|
||||
words: "{\"Outcome\":\"Answered\",\"Sr\":\"0x8007F\",\"Mode\":3,\"Preset\":12,\"Readings\":3,\"Answered\":3}");
|
||||
|
||||
DlssText.Label(silentHill2).Should().Be("DLSS 4.5 (a ×6.0 frame-generation state)");
|
||||
DlssText.Line(silentHill2).Should().Be("DLSS 4.5 (a ×6.0 frame-generation state)", "preset L was applied to a super resolution the driver never saw run");
|
||||
DlssText.ExportLine(silentHill2).Should().Be("generation=DLSS 4.5 basis=frame_generation_factor");
|
||||
return 0;
|
||||
});
|
||||
|
||||
[Fact]
|
||||
public void ThePresetTheDriverReportsAppliedNamesTheModelAndTheGeneration() => InEnglish(() =>
|
||||
{
|
||||
const string presetL = "{\"Outcome\":\"Answered\",\"Sr\":\"0x8067F\",\"Mode\":2,\"Preset\":12,\"Readings\":3,\"Answered\":3}";
|
||||
SessionRow overridden = Row("{\"nvngx_dlss.dll\":\"310.5.0.0\"}", "{\"nvngx_dlss.dll\":\"graphics_driver\"}", upscaler: "unknown", driverReported: "dlss", words: presetL);
|
||||
|
||||
DlssText.Line(overridden).Should().Be("DLSS 4.5 (preset L) · Super Resolution 310.5.0, from the graphics driver, preset L (2nd-gen transformer model)");
|
||||
DlssText.Label(overridden).Should().Be("DLSS 4.5 (preset L)");
|
||||
DlssText.ExportLine(overridden).Should().Be("generation=DLSS 4.5 basis=preset; nvngx_dlss.dll=310.5.0.0 graphics_driver; preset=L");
|
||||
|
||||
SessionRow noLibrary = Row(upscaler: "unknown", driverReported: "dlss", words: presetL.Replace("\"Preset\":12", "\"Preset\":11", StringComparison.Ordinal));
|
||||
DlssText.Line(noLibrary).Should().Be("DLSS 4 (preset K) · preset K (transformer model)", "the preset stands even where no library was recorded");
|
||||
return 0;
|
||||
});
|
||||
|
||||
[Fact]
|
||||
public void OlderLibrariesNameTheirGenerationAndDlss5IsOnlyLoaded() => InEnglish(() =>
|
||||
{
|
||||
DlssText.Label(Row("{\"nvngx_dlss.dll\":\"3.7.10.0\"}", upscaler: "dlss")).Should().Be("DLSS 3 (library 3.7.10)");
|
||||
DlssText.Label(Row("{\"nvngx_dlss.dll\":\"2.5.1.0\"}", upscaler: "dlss")).Should().Be("DLSS 2 (library 2.5.1)");
|
||||
DlssText.Line(Row("{\"nvngx_dlss.dll\":\"310.9.1.0\",\"nvngx_dlssnr.dll\":\"1.0.0.0\"}", upscaler: "dlss"))
|
||||
.Should().Be("DLSS · Super Resolution 310.9.1 · DLSS 5 runtime loaded");
|
||||
DlssText.Line(Row("{\"sl.interposer.dll\":\"2,8,0,0\"}", upscaler: "fsr3")).Should().BeNull("no DLSS at all");
|
||||
DlssText.Line(Row("{broken", upscaler: "dlss")).Should().Be("DLSS", "an unreadable module list still says DLSS ran");
|
||||
DlssText.ExportLine(Row()).Should().Be("N/A");
|
||||
DlssText.Parse("310,9,1,0").Should().Be(new Version(310, 9, 1, 0));
|
||||
DlssText.Parse("3.7").Should().Be(new Version(3, 7));
|
||||
DlssText.Parse("1.0.3").Should().Be(new Version(1, 0, 3));
|
||||
DlssText.Parse("v3").Should().BeNull();
|
||||
DlssText.Parse(null).Should().BeNull();
|
||||
return 0;
|
||||
});
|
||||
|
||||
[Fact]
|
||||
public void TheLargestStateOfTheMixIsTheEvidence() => InEnglish(() =>
|
||||
{
|
||||
string mix = Application.Recording.FgMixRecord.ToJson(new Domain.Metrics.FgMix(
|
||||
[
|
||||
new Domain.Metrics.FgMixRow(Domain.Metrics.FgMixKind.Generated, 2.0, 60, 120, 60, 0.5, 12),
|
||||
new Domain.Metrics.FgMixRow(Domain.Metrics.FgMixKind.Generated, 4.0, 50, 200, 60, 0.5, 12),
|
||||
]))!;
|
||||
DlssText.Label(Row(upscaler: "dlss", fgMode: "dlssg", factor: 2.0, mix: mix)).Should().Be("DLSS 4 (a ×4.0 frame-generation state)",
|
||||
"the steady state was ×2, and the session also held ×4");
|
||||
DlssText.Label(Row(upscaler: "dlss", fgMode: "fsrfg", factor: 4.0)).Should().BeNull("only DLSS Frame Generation names a DLSS generation");
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// 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");
|
||||
}
|
||||
}
|
||||
@@ -360,6 +360,13 @@ public sealed class SessionAggregatorTests
|
||||
SessionRow row = SessionAggregator.Aggregate(SessionFixtures.Skeleton(), input).Row;
|
||||
|
||||
row.RuntimeModulesJson.Should().Be("{\"sl.interposer.dll\":\"2,8,0,0\"}");
|
||||
row.RuntimeModuleSourcesJson.Should().Be("{}", "beta.24 (D64): a module read before its folder was classified stores no class");
|
||||
RuntimeModuleSet classified = new([
|
||||
new RuntimeModuleInfo("nvngx_dlss.dll", @"C:\g\nvngx_dlss.dll", "310,9,1,0", new Version(310, 9, 1, 0)) { Source = RuntimeModuleSource.Game },
|
||||
new RuntimeModuleInfo("160_e658700.bin", @"C:\ProgramData\NVIDIA\NGX\models\160_e658700.bin", null, null) { Source = RuntimeModuleSource.GraphicsDriver },
|
||||
], 1, 0);
|
||||
SessionAggregator.Aggregate(SessionFixtures.Skeleton(), input with { Modules = classified }).Row.RuntimeModuleSourcesJson
|
||||
.Should().Be("{\"nvngx_dlss.dll\":\"game\",\"160_e658700.bin\":\"graphics_driver\"}", "the class is stored, never the path");
|
||||
row.SlInterposerVersion.Should().Be("2.8.0.0");
|
||||
row.ExecutableMarkersJson.Should().Be("{\"ffxFsr3\":12}");
|
||||
row.NgxDriverWordsJson.Should().Contain("\"Outcome\":\"Answered\"").And.Contain("\"Sr\":\"0x600\"").And.Contain("\"Driver\":61664");
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FluentAssertions;
|
||||
using FrameLedger.Domain.Detection;
|
||||
|
||||
namespace FrameLedger.Domain.Tests.Detection;
|
||||
|
||||
/// <summary>D64 (beta.24): a DLSS generation only from what the session observed, strongest evidence first.</summary>
|
||||
public sealed class DlssGenerationTests
|
||||
{
|
||||
private static readonly Version _dlss4Library = new(310, 9, 1, 0);
|
||||
|
||||
[Theory]
|
||||
[InlineData(12u, DlssGenerationKind.Dlss45)]
|
||||
[InlineData(13u, DlssGenerationKind.Dlss45)]
|
||||
[InlineData(10u, DlssGenerationKind.Dlss4)]
|
||||
[InlineData(11u, DlssGenerationKind.Dlss4)]
|
||||
public void ThePresetTheDriverReportsNamesTheModelsGeneration(uint preset, DlssGenerationKind kind) =>
|
||||
DlssGeneration.Of(new DlssEvidence(_dlss4Library, null, preset, null)).Should().Be(new DlssGeneration(kind, DlssBasis.Preset));
|
||||
|
||||
[Theory]
|
||||
[InlineData(6.0, DlssGenerationKind.Dlss45)]
|
||||
[InlineData(5.0, DlssGenerationKind.Dlss45)]
|
||||
[InlineData(4.0, DlssGenerationKind.Dlss4)]
|
||||
[InlineData(3.0, DlssGenerationKind.Dlss4)]
|
||||
public void AMeasuredMultiFrameStateNamesItsGeneration(double factor, DlssGenerationKind kind) =>
|
||||
DlssGeneration.Of(new DlssEvidence(null, _dlss4Library, null, factor)).Should().Be(new DlssGeneration(kind, DlssBasis.FrameGenerationFactor));
|
||||
|
||||
[Fact]
|
||||
public void TheStrongerEvidenceWins()
|
||||
{
|
||||
DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, 11, 6.0)).Should().Be(new DlssGeneration(DlssGenerationKind.Dlss45, DlssBasis.FrameGenerationFactor),
|
||||
"a ×6 state is DLSS 4.5's even under a DLSS 4 preset");
|
||||
DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, 12, 4.0)).Should().Be(new DlssGeneration(DlssGenerationKind.Dlss45, DlssBasis.Preset));
|
||||
DlssGeneration.Of(new DlssEvidence(new Version(3, 7, 10, 0), null, 10, null)).Should().Be(new DlssGeneration(DlssGenerationKind.Dlss4, DlssBasis.Preset),
|
||||
"the driver's override can run a newer model than the game's library");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ALibraryVersionNamesAGenerationOnlyWhereItsMajorNumberDoes()
|
||||
{
|
||||
DlssGeneration.Of(new DlssEvidence(new Version(2, 5, 1, 0), null, null, null)).Should().Be(new DlssGeneration(DlssGenerationKind.Dlss2, DlssBasis.LibraryVersion));
|
||||
DlssGeneration.Of(new DlssEvidence(new Version(3, 7, 10, 0), null, null, 2.0)).Should().Be(new DlssGeneration(DlssGenerationKind.Dlss3, DlssBasis.LibraryVersion));
|
||||
DlssGeneration.Of(new DlssEvidence(null, new Version(1, 0, 3, 0), null, 2.0)).Should().Be(new DlssGeneration(DlssGenerationKind.Dlss3, DlssBasis.LibraryVersion));
|
||||
DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, null, 2.0)).Should().BeNull("310.x is DLSS 4's and 4.5's alike, and ×2 is any generation's");
|
||||
DlssGeneration.Of(new DlssEvidence(_dlss4Library, null, 5, null)).Should().BeNull("a CNN preset names no generation");
|
||||
DlssGeneration.Of(new DlssEvidence(null, null, null, null)).Should().BeNull();
|
||||
FluentActions.Invoking(static () => DlssGeneration.Of(null!)).Should().Throw<ArgumentNullException>();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void APresetIsALetterAndAModel()
|
||||
{
|
||||
DlssGeneration.PresetLetter(1).Should().Be('A');
|
||||
DlssGeneration.PresetLetter(12).Should().Be('L');
|
||||
DlssGeneration.PresetLetter(0).Should().BeNull();
|
||||
DlssGeneration.PresetLetter(27).Should().BeNull();
|
||||
DlssGeneration.PresetLetter(null).Should().BeNull();
|
||||
DlssGeneration.ModelOf(5).Should().Be(DlssModel.Cnn);
|
||||
DlssGeneration.ModelOf(11).Should().Be(DlssModel.Transformer);
|
||||
DlssGeneration.ModelOf(12).Should().Be(DlssModel.SecondGenerationTransformer);
|
||||
DlssGeneration.ModelOf(8).Should().BeNull("G–I are not placed");
|
||||
DlssGeneration.ModelOf(null).Should().BeNull();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.Application.Capture;
|
||||
using FrameLedger.Infrastructure.Capture;
|
||||
|
||||
namespace FrameLedger.Infrastructure.Tests.Capture;
|
||||
|
||||
/// <summary>
|
||||
/// D64 (beta.24), on this test's own process: every module under the NVIDIA override folder is recorded whatever its name
|
||||
/// — on the owner's Silent Hill 2 session none of the override's libraries carried a census name — and every recorded
|
||||
/// module carries its folder class.
|
||||
/// </summary>
|
||||
public sealed class RuntimeModuleSnapshotSourceTests
|
||||
{
|
||||
[Fact]
|
||||
public void AModuleUnderTheOverrideFolderIsRecordedWhateverItsNameAndEachCarriesItsClass()
|
||||
{
|
||||
string programData = Path.Combine(Path.GetTempPath(), "fl-ngx-" + Guid.NewGuid().ToString("N"));
|
||||
string folder = Path.Combine(programData, "NVIDIA", "NGX", "models", "dlss");
|
||||
Directory.CreateDirectory(folder);
|
||||
string copy = Path.Combine(folder, "fl_override_probe.dll");
|
||||
File.Copy(Path.Combine(AppContext.BaseDirectory, "FrameLedger.ProcessStats.dll"), copy);
|
||||
IntPtr handle = NativeLibrary.Load(copy);
|
||||
try
|
||||
{
|
||||
RuntimeModuleSet set = RuntimeModuleSnapshot.Take(Environment.ProcessId, ["kernel32.dll"], Environment.GetFolderPath(Environment.SpecialFolder.Windows), programData);
|
||||
|
||||
set.Unreadable.Should().Be(0);
|
||||
set.Find("fl_override_probe.dll")!.Source.Should().Be(RuntimeModuleSource.GraphicsDriver, "a name no list carries, caught by its folder");
|
||||
set.Find("kernel32.dll")!.Source.Should().Be(RuntimeModuleSource.Windows);
|
||||
set.Find("FrameLedger.ProcessStats.dll").Should().BeNull("outside the override folder, a name no list carries is not recorded");
|
||||
|
||||
RuntimeModuleSet noFolders = RuntimeModuleSnapshot.Take(Environment.ProcessId, ["kernel32.dll"], string.Empty, " ");
|
||||
noFolders.Unreadable.Should().Be(0, "a folder Windows did not name is not a failure");
|
||||
noFolders.Find("kernel32.dll")!.Source.Should().Be(RuntimeModuleSource.Unknown);
|
||||
noFolders.Find("fl_override_probe.dll").Should().BeNull("nothing is caught by a folder nobody named");
|
||||
}
|
||||
finally
|
||||
{
|
||||
NativeLibrary.Free(handle);
|
||||
try
|
||||
{
|
||||
Directory.Delete(programData, recursive: true);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
// A mapped image can outlive the free for a moment; the temporary folder is the system's to clear.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -265,6 +265,45 @@ public sealed class LedgerDatabaseTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Schema 0021 (2026-10-19, beta.24, D64): <c>sessions.runtime_module_sources</c>, each loaded module's folder class — ADD
|
||||
/// COLUMN only; a session written before has none.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task ScriptTwentyOneAddsTheModuleSourcesColumnAndAnEarlierSessionHasNone()
|
||||
{
|
||||
await using LedgerFixture f = await LedgerFixture.OpenAsync();
|
||||
MigrationRunner.LatestVersion.Should().BeGreaterThanOrEqualTo(21);
|
||||
long gameId = (await new SqliteGameRepository(f.Db).EnsureAsync(
|
||||
new() { ExePath = @"C:\Games\N\n.exe", SizeBytes = 1, MtimeUnixMs = 2 }, "N", Ct).ConfigureAwait(true)).Id;
|
||||
long snapshotId = await new SqliteHardwareSnapshotRepository(f.Db).EnsureAsync(new HardwareSnapshot { GpuName = "g" }, DateTimeOffset.UnixEpoch, Ct)
|
||||
.ConfigureAwait(true);
|
||||
string path = f.Path;
|
||||
await f.Db.DisposeAsync().ConfigureAwait(true);
|
||||
var c20 = new SqliteConnection(new SqliteConnectionStringBuilder { DataSource = path, Pooling = false }.ToString());
|
||||
await using (c20.ConfigureAwait(true))
|
||||
{
|
||||
await c20.OpenAsync(Ct).ConfigureAwait(true);
|
||||
await RewindToAsync(c20, 20).ConfigureAwait(true);
|
||||
await c20.ExecuteAsync(new CommandDefinition(
|
||||
"INSERT INTO sessions (session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, exit_status, frame_count, app_frame_count, displayed_frame_count, dropped_frames, runtime_modules) "
|
||||
+ "VALUES ('00000000-0000-0000-0000-000000000021', @gameId, @snapshotId, 0, 60000, 60, 0, 10000000, 1, 'attach', 'normal', 6000, 6000, 6000, 0, '{\"nvngx_dlss.dll\":\"310,9,1,0\"}')",
|
||||
new { gameId, snapshotId }, cancellationToken: Ct)).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
LedgerDatabase migrated = await LedgerDatabase.OpenAsync(path, ct: Ct).ConfigureAwait(true);
|
||||
await using (migrated.ConfigureAwait(true))
|
||||
{
|
||||
migrated.SchemaVersion.Should().Be(MigrationRunner.LatestVersion);
|
||||
IReadOnlyList<string> added = await migrated.ReadAsync(async (c, ct) => (IReadOnlyList<string>)[.. await c.QueryAsync<string>(new CommandDefinition(
|
||||
"SELECT name FROM pragma_table_info('sessions') WHERE name = 'runtime_module_sources' AND type = 'TEXT'", cancellationToken: ct)).ConfigureAwait(false)], Ct).ConfigureAwait(true);
|
||||
added.Should().ContainSingle();
|
||||
SessionRow before = (await new SqliteSessionRepository(migrated).FindAsync(Guid.Parse("00000000-0000-0000-0000-000000000021"), Ct).ConfigureAwait(true))!;
|
||||
before.RuntimeModulesJson.Should().Be("{\"nvngx_dlss.dll\":\"310,9,1,0\"}", "the row keeps everything it had");
|
||||
before.RuntimeModuleSourcesJson.Should().BeNull("a session recorded before beta.24 has no folder classes");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Schema 0017 (2026-10-03, beta.11, D38): <c>games.ac_exception_trial_failed_at</c>, NULL on every row written before — a
|
||||
/// grant made under D33 keeps everything it had and carries no failed trial.
|
||||
|
||||
@@ -107,6 +107,7 @@ public sealed class SqliteSessionRepositoryTests
|
||||
PowerLimitPct = 33.25,
|
||||
ThermalLimitPct = 2.5,
|
||||
AppFramesPerJoule = 0.3125,
|
||||
RuntimeModuleSourcesJson = "{\"nvngx_dlss.dll\":\"graphics_driver\"}",
|
||||
FgMixJson = "{\"Rows\":[{\"Kind\":\"generated\",\"Factor\":3.99,\"NativeFps\":70.5,\"DisplayedFps\":281.3,\"Seconds\":120,\"Share\":0.75,\"Windows\":24}]}",
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user