Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 9e09d59369 release: 0.1.0-beta.24 - its changelog file, HANDOFF's beta.24 section with D62-D67 and owner-only item 20, the release lines, the analyzers Dependabot proposed in #314 (beta.24 PR-10)
- docs/changelog/0.1.0-beta.24.md: [Unreleased] moved under its heading, with the opening and how to
  update from beta.23 (Disclaimer 2.11 and Privacy Policy 2.12 shown once, schema 21); its row in
  CHANGELOG.md's Releases table.
- docs/HANDOFF.md: beta.23's START HERE moved verbatim to docs/handoff/history/0.1.0-beta.23.md (its row
  in the split table, D60/D61 pointed there); beta.24's START HERE - D62-D67 (D65, FSR's quality mode,
  deferred to the next beta), what the owner's ledger measured, the traps; owner-only item 20; the
  decisions index rows D62-D67.
- The release lines: README, the accuracy block (legal/ACCURACY.md and its copies), LIMITATIONS.
- Directory.Packages.props: Meziantou.Analyzer 3.0.307 and Microsoft.VisualStudio.Threading.Analyzers
  18.12.1 - Dependabot's #314, which it closed itself after a rebase request; applied by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:34:54 +07:00
poli0981andClaude Opus 5.5 3751348d5a feat: which DLSS a session ran - each library's version and where it was loaded from, the preset the driver reports, DLSS 4 / 4.5 only where the session shows it (D64, beta.24 PR-8) (#323)
- Domain: Detection/DlssGeneration, evidence-bound and strongest first: preset L/M reported applied ->
  DLSS 4.5, a DLSS-G state at x5 or more -> 4.5, preset J/K -> 4, x3/x4 -> 4, library 2.x -> 2, library
  3.x or frame generation 1.x-3.x -> 3; a 310 library alone, a CNN preset or x2 names nothing. Never a
  default preset inferred from a version.
- Application: RuntimeModuleSource / RuntimeModuleSources - a module's folder class (game, graphics
  driver: the driver store or %ProgramData%\NVIDIA, Windows); RuntimeModuleInfo.Source; CensusNames gains
  five snapshot-only names (sl.dlss_d, sl.common, sl.reflex, amd_fidelityfx_loader_dx12, nvngx_dlssnr);
  the aggregator stores sessions.runtime_module_sources (schema 0021) - the class, never the path.
- Infrastructure: the module snapshot records every module under %ProgramData%\NVIDIA\NGX whatever its
  name (the owner's Silent Hill 2 ran x6 through the NVIDIA App override with no census-named DLSS
  library loaded) and classifies each module's folder.
- App: DlssText - the summary's DLSS line, the game page's label, the CSV "# dlss:" line.
- Strings: 16 new keys en/vi/ja (ja marked review).
- Tests: DlssGenerationTests, RuntimeModuleSourcesTests, RuntimeModuleSnapshotSourceTests (this test
  process's own modules, a copied native DLL under a temporary NVIDIA\NGX folder), SessionAggregatorTests,
  LedgerDatabaseTests (script 0021), the repository round trip, DlssTextTests (rows shaped like the owner's
  Witcher 3 and Silent Hill 2 sessions).
- Docs: 05_DETECTION DLSS generation (the table with its sources; "the override loads nvngx_dlss.dll under
  the same name" struck as unmeasured), 06_DATA_MODEL 0021, 08_UI, LIMITATIONS, guide 03/10, CHANGELOG;
  legal/ACCURACY.md's DLSS version bullet and Privacy Policy 2.12 in the words approved with the plan.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:34:45 +07:00
45 changed files with 1461 additions and 145 deletions

No files matched your search

+1 -73
View File
@@ -35,85 +35,13 @@ numeric core and does not move; the heading is the full version — corrected 20
## [Unreleased]
### Added
- **Every frame-generation state a session held, in its summary** (owner request 2026-10-19, decision D62). Under the
figures, *Frame generation in this session* lists each state — `×2.0`, `×3.0`, `×4.0`, `×6.0`… — with its own
Native → Displayed and its share of the time to two decimals, then the time with no frame generation and the time no
state explains (*Not classified*: switching, loading, a multiplier that changed faster than five seconds), above a bar
of those shares. A line above them says how frame generation was set: in the NVIDIA App (*Dynamic, up to ×6, target:
max refresh rate*, *Fixed ×4*, from the driver profile stored with the session) or in the game. Each state is read
over the same five-second windows as the steady state and lasts at least 10 seconds; nothing is averaged across
states (rule 6). Stored with the session (schema 0020, `sessions.fg_mix`): a session recorded before has none, and
its summary says so in one line. The CSV export gains a `# fg_mix:` line; the JSON carries the column. The FG×
column's two formats are translated strings now, and the driver-profile line's automatic dynamic target reads as the
NVIDIA App says it: *max refresh rate*.
- **The quality mode the NVIDIA App set, on every page that names the upscaler** (owner request 2026-10-19, decision
D63). Where the NVIDIA App overrides DLSS Super Resolution for a game and the NVIDIA driver reports that the
override applied in the session, the summary, the Sessions tab, the game page and the live card say so:
*DLSS (driver-reported) Quality · NVIDIA App*. It is read from what every session already stores, so sessions
recorded before read the same; when the profile and the driver disagree, or the driver's report alone cannot settle
the mode, the session reads *· NVIDIA App override* with no mode — never the game's own value in its place. The CSV
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.
### Changed
- **SonarCloud analyses only FrameLedger's own code** (developers only; owner request 2026-10-19, decision D67). A
`.sonarcloud.properties` at the root keeps the vendored SDK headers, generated files, test fixtures, licence texts and
the SQLite migrations out of the analysis and reports the native code against C++20; `docs/13_CI_CD.md` §SonarCloud
records the triage of the 341 issues the last analysis left — the rules this project breaks by design and why, the
false positives, and the ones the next change fixes — with the steps to mark them in SonarCloud.
- **The long documents are split** (developers only; owner request 2026-10-19, decision D66). `CHANGELOG.md`
keeps `[Unreleased]` and a table of the releases; each release's section now lives in its own file,
`docs/changelog/<version>.md`, and the ledger kept before the first tag in five parts — moved verbatim: the notes
`tools/release-notes.ps1` takes for each of the 23 releases are byte for byte what they were, and it reads the
version's own file. `docs/HANDOFF.md` (2,844 lines, now 299) keeps what to do next, the open owner-only items and an
index of every owner decision; the history of each phase and train, the passed owner-only items and the traps
moved to `docs/handoff/`, and a table there resolves every section the code and the documents cite. A new gate,
`tools/docs-split-check.ps1`, keeps each index and its files naming each other.
- **The open questions and the measurement notes are split too** (developers only, D66). `docs/20_OPEN_QUESTIONS.md`
(4,467 lines, now 2,008) keeps its rules, §S24 and every entry not resolved; the 30 entries §S24 marks resolved
moved, with their reasoning and in their order, to `docs/open-questions/closed-s.md` and `closed-h.md`, and a table
at the end of each series lists them. `docs/spike-notes.md` (2,816 lines) is now the index of its 24 sections, each
in its own file under `docs/spike-notes/`; a new measurement gets the next number, its own file and a row. Both
rebuild their originals byte for byte, and the same gate holds their indexes to their files.
### Fixed
- **The NVIDIA driver line read the driver's mode in the wrong numbering.** The driver reports the mode an override
set in NGX's own numbering, not the driver profile's: the owner's Silent Hill 2 session ran under the NVIDIA App's
Ultra Performance (profile value 5) and the driver reported 3 — which the line printed as nothing, and a DLAA
override's 5 would have printed as "Ultra Performance". Five comments in the native code called a quality byte of
0 "NGX MaxPerf" — in the numbering that byte carries, 0 is "DLSS off" (comments only, no code changes).
- **Opening a folder in Explorer** — the logs, the data folder, the licences, a bug report's zip and the folder named
after a failed start — starts `explorer.exe` from the Windows folder by its full path, never a program of that name
found on the search path, and always hands it the path in quotes (three of the five places passed it bare).
- **What SonarCloud found that was real** (developers only): the one third-party GitHub Action is pinned to its
commit; two string reads in native code are bounded by their buffer (the guard's rules-file path handed to the Agent,
and the driver's branch name the NVAPI bridge copies); the pipe server's accept loop states that it ends only when
cancelled; a launch's own session names its absent stop token (`CancellationToken.None`, with the reason) where it
wrote `default` — the same value, now said on purpose; an unused overload of
the process launcher that hid the other is gone; the identifier `module` (a C++20 keyword in some positions) is
renamed in the hook layer — a rename only, no code changes; and a hook-overhead probe no longer uses a compound
assignment on a `volatile`, which C++20 deprecates. The analyzers Dependabot updates in #314 flag the first-start
window's own answer task and one test fake's synchronous wait; both are suppressed with their reasons, so that update
can merge.
- **The game-side log keeps every line a stop writes.** When hooking stopped on a game's own drawing thread — the
capture agent's safety stop takes effect within one frame there — the Overlay's last write of its log could happen
while that thread was still listing the hooks it removed, and the last of them never reached the file
(`overlay-*.log`, the file a bug report carries). The last write now waits, at most two seconds, for the stop to
finish and ends with a `STOP_FLUSHED` line; a line still being written is never printed half-done. Nothing changes
on the per-frame path. This was the native test that went red under load since beta.9 (`fl_guard`'s log case),
now run 20 times with every processor busy.
## Releases
Newest first. Each file holds that release's section exactly as it stood here.
| Version | Date | Notes |
|---|---|---|
| `0.1.0-beta.24` | 2026-10-19 | [`docs/changelog/0.1.0-beta.24.md`](docs/changelog/0.1.0-beta.24.md) |
| `0.1.0-beta.23` | 2026-10-14 | [`docs/changelog/0.1.0-beta.23.md`](docs/changelog/0.1.0-beta.23.md) |
| `0.1.0-beta.22` | 2026-10-13 | [`docs/changelog/0.1.0-beta.22.md`](docs/changelog/0.1.0-beta.22.md) |
| `0.1.0-beta.21` | 2026-10-13 | [`docs/changelog/0.1.0-beta.21.md`](docs/changelog/0.1.0-beta.21.md) |
+2 -2
View File
@@ -76,8 +76,8 @@
<ItemGroup Label="Analyzers (build-time only)">
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.1" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.299" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="18.7.23" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.307" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="18.12.1" />
</ItemGroup>
<ItemGroup Label="Testing">
+6 -1
View File
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
page lists them in plain words; each item links to the document that has the details.
*Beta software: this page describes version 0.1.0-beta.23.*
*Beta software: this page describes version 0.1.0-beta.24.*
## Games it will not measure
@@ -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.
+5 -2
View File
@@ -12,7 +12,7 @@ pages.
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.23`** (2026-10-14), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.24`** (2026-10-19), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -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
@@ -170,7 +173,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest pre-release is `v0.1.0-beta.23` (2026-10-14); before it `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
> **The latest pre-release is `v0.1.0-beta.24` (2026-10-19); before it `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
+34 -4
View File
@@ -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)
+12
View File
@@ -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
+7
View File
@@ -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
+90 -47
View File
@@ -62,6 +62,7 @@ owner-only items stay below; the history of every train, the passed owner-only i
| `§beta.20` | [`handoff/history/0.1.0-beta.20.md`](handoff/history/0.1.0-beta.20.md) |
| `§beta.21` | [`handoff/history/0.1.0-beta.21.md`](handoff/history/0.1.0-beta.21.md) |
| `§beta.22` | [`handoff/history/0.1.0-beta.22.md`](handoff/history/0.1.0-beta.22.md) |
| `§beta.23` | [`handoff/history/0.1.0-beta.23.md`](handoff/history/0.1.0-beta.23.md) |
| `§Owner-only`, an open item | [§Owner-only](#owner-only--no-pr-can-close-these) below |
| `§Owner-only`, a passed item (3, 12, 14–19) | [`handoff/owner-only-passed.md`](handoff/owner-only-passed.md) |
| `§Traps`, `§Two corrections carried forward` | [`handoff/traps.md`](handoff/traps.md) |
@@ -69,60 +70,73 @@ owner-only items stay below; the history of every train, the passed owner-only i
---
## **START HERE** — 2026-10-14, 0.1.0-beta.23: a game's artwork, pages that do not freeze, the documents that drifted
## **START HERE** — 2026-10-19, 0.1.0-beta.24: every frame-generation state, the NVIDIA App's quality mode, which DLSS ran, SonarCloud, the documents split
*Status is `CHANGELOG.md` `[0.1.0-beta.23]`; this is what no other file carries.* The owner, 2026-10-14: "Bạn phân tích
và lên plan cho phần tiếp theo gồm những nội dung sau: 1. Thêm ảnh bìa/hero/cover của game từ các nền tảng đó - Đặt trong
detail của game. (Nếu được); Tuỳ chọn: có thể sync màu cùa cover với màu của detail; 2. Cập nhật, sync docs; 3. Kiểm tra
hiệu suất khi chuyển giữa các tab (nếu có vấn đề hiệu năng)" — then the whole train to the release without asking again.
On top of #308 (PR-1): #309 (the pages, measured first), #310 (the artwork), #311 (the drift), then this release.
*Status is `docs/changelog/0.1.0-beta.24.md`; this is what no other file carries.* The owner, 2026-10-19: "Bạn xem xét,
đánh giá và lên plan cho bản beta mới với những nội dung như sau:" — six items: the mix of frame-generation modes inside
one session, shown in the App; the upscaler's quality mode (Ultra Performance … DLAA, FSR's too) only when captured, the
NVIDIA App's override as the standard where there is one; SonarCloud fixed and its false positives marked; a SonarCloud
configuration that keeps third-party headers out; which DLSS is in use (3, 4, 4.5, 5), if it can be found; the long
documents split — then, with the plan approved, the whole train to the release without asking again. Later the same
day: "Bạn có thể xét tới trường framegen chỉnh trong setting in-game nếu chưa có" (the frame generation chosen in the
game's own menu). Answers that set the decisions below, given before the plan: the mix as a share bar and a table; the
owner marks Sonar's false positives in its UI from a list we write; all four long documents split; the override is the
standard only where the driver confirms it applied; DLSS labels bound to evidence; FSR's mode through `ffxQuery` as a
separate PR that may slip; owner-only items 7–11 and 13 not yet run; Dependabot #314 rebased and merged in the train.
**Decisions:**
- **D60 — a game's artwork is what is already on the PC.** The image the user chose (*Edit… ▸ Choose image…*), else
what the Steam or GOG GALAXY app keeps for the game it installed — found through the stores' own records as Play finds
them (`StoreRecords.Owning`, never the row's platform alone). Nothing is downloaded: `privacy.online_metadata` stays
reserved. A chosen image is a PNG copy, `<data>\covers\game-<id>-<unix ms>.png`, named relative in `cover_path`; only
those names are followed — never a rooted, share or `..` path, never through a junction or a symbolic link, because a
viewer's copy of a ledger may come from anywhere (D52).
- **D61 — the band takes the artwork's colour as far as every text on it reads**: primary and secondary 4.5:1, tertiary
3:1, the pills' and the warning's text 4.5:1 on their own fills; at most 30 % on the dark theme, 22 % on the light. On
by default (the owner's choice); never in high contrast; it follows a theme switch by resource reference.
- **The pages' speed was judged by a bar written before the first measurement** (`spike-notes` §21): fix what keeps the
UI thread busy 50 ms or more, can block on I/O, or grows with each visit. Recorded, not fixed: page builds of 85–370 ms,
and **the library grid (275 ms at 48 games) — non-virtualizing by the beta.11 decision; a virtualizing one changes the
page's look, which is the owner's call** *(answered 2026-10-15: it stays as it is — §After the release below)*; no
`sessions.started_at` index (a schema version locks out every earlier
build, and nothing measured asked for it).
- `LIST_GAME_TESTED`: the Everhex Demo row and the corrected Vulkan sentence, approved by the owner under D35.
- **D62 — the mix.** Every frame-generation state a session held, each with its own factor, Native → Displayed and its
share of the presenting time, then *no frame generation* (only where a counted `none` is allowed) and *not
classified*; never an average across states (CLAUDE.md rule 6, amended). Computed at finalize over the steady state's
own five-second windows and stored (`sessions.fg_mix`, schema 0020); sessions recorded before have none and are not
rebuilt. Above the rows, how frame generation was set — the NVIDIA App's Dynamic / Fixed from the stored driver
profile, or the game — as configuration, never as a row. The multiplier chosen in a game's menu is not read (§2b's
refusal stands); the measured row is its evidence.
- **D63 — the NVIDIA App's override is the quality mode where the driver reports it applied** (`03_METRICS`
§Upscaling, amended; `QualityResolver`, read at display time, so sessions recorded before resolve alike). Otherwise
the mode the game passed to a hooked call; otherwise none; never the game's own value under an override.
- **D64 — DLSS labels are evidence-bound** (`05_DETECTION` §DLSS generation): each library's version and folder class
(`sessions.runtime_module_sources`, schema 0021 — never the path), the preset the driver reports applied, DLSS 4 /
4.5 only from a preset or a measured multi-frame factor, DLSS 5 only as "runtime loaded".
- **D65 — FSR's quality mode through `ffxQuery`: deferred to the next beta.** The plan allowed it to slip, and it was
kept out of this train — a new hook on four FidelityFX modules, a hook-family bit in the shared layout, a new byte
encoding, the stubs and the harness, on the hook path rule 5 guards — rather than written against the release.
ACCURACY's FSR clause did not ship with it. The design stands in the plan: query → the five (mode, size) pairs → the
mode whose size the game then dispatched. The owner asked for it as 0.1.0-beta.25 the same day.
- **D66 — the long documents are split**, every original path kept as the index of its parts, moved byte for byte
(`tools/docs-split-check.ps1`; `release-notes.ps1` reads `docs/changelog/<version>.md`).
- **D67 — SonarCloud stays on Automatic Analysis** with `.sonarcloud.properties`; the by-design rules and false
positives are listed in `13_CI_CD` §SonarCloud for the owner to mark in its UI.
**Measured on the owner's ledger** (a read-only SQLite backup copy — never the data folder): **the NVIDIA driver's
`performanceMode` is in NGX's own numbering, not the profile's** — Silent Hill 2 (2026-10-13) ran under the App's Ultra
Performance (profile value 5) and the driver reported 3; `NvidiaOverrides.DriverLine` had read it through the profile's
table since beta.8 and dropped the mode. The same session's SR word has no `CREATED | EVALUATE` (no mode is claimed),
its FG word applied ×6 and the session measured a ×6.0 steady state, and **none of the override's libraries carried a
census name** — the module snapshot now records everything under `%ProgramData%\NVIDIA\NGX`. Bit 19 is set on a working
override (Expedition 33's `0x8067F`) and bit 1 with no override at all (`0x60F`): only `PERF_MODE`, `SR_DLAA_MODE` and
`SCALING_RATIO` say an override applied. The App's global profile stores `NGX_DLSSG_DYNAMIC_MULTI_FRAME_COUNT_MAX = 5`.
**Traps met on the way:**
- **Microsoft.Data.Sqlite completes its "async" calls synchronously**: after a ledger read, `ConfigureAwait(false)` is
still on the UI thread — the session decode, the sorts and the stutter detection all ran there (`16_WPFUI_SYNTAX`
§Gotchas).
- **A transient view model that is `IDisposable` lives until the App exits** (the root container keeps it), and every
Dashboard ever opened stayed subscribed. FR-3.8's "Session saved" lived in that view model and reached every page only
through the leak — it is `Services.SessionNotices` now.
- **A `ui:Image` given a `Style` of its own that is not based on `DefaultImageStyle` has no template** and draws nothing
in the place it takes. Only a render showed it; `AccessibilityTests.NoStyleOfAWpfUiControlLeavesOutItsTemplate`
refuses it now.
- **A page just navigated to is mid-fade**: a `RenderTargetBitmap` of it reads every colour washed out unless the
presenter's `Transition` is `None`.
- **The Bash tool's heredocs halve backslashes**: `covers\game-` became an invalid C# escape, and `\r\n` in a Python
heredoc became real line breaks. Write such files with the editor tools.
- **`Directory.Delete(…, recursive: true)` over a junction throws without elevation** (it asks Windows to unmount a
volume, and the link is removed anyway): a test deletes its junction itself first.
- **`gh pr merge --squash --delete-branch` on a stacked PR closes the PR based on it** (#319), and a closed PR cannot be
reopened once its head was force-pushed. Recovery: push the base back, push the head back to the SHA it closed at,
reopen, retarget to `main`, push the rebased head, delete the base. Instead: retarget the next PR to `main` first,
merge without `--delete-branch`, rebase the rest (`git rebase --update-refs --onto origin/main <old tip>`, in a
temporary `git worktree` when the checkout is busy), then delete the merged branch.
- **Dependabot closed #314 itself** after `@dependabot rebase` ("updatable in another way") and did not answer
`@dependabot reopen`; the two analyzer versions it proposed went into the release PR by hand.
- **SonarCloud's PR gate fails on new `cpp:S8417`** (explicit memory orders, by design): not a required check; the
optional ignore row in `13_CI_CD` §SonarCloud stops it.
- **A Domain.Metrics enum must be listed in `MetricEnumMirrorTests`** (mirrored or explicitly local), **every enum needs
a zero member** (CA1008), **private consts in tests take the `_` prefix** (IDE1006 is `dotnet format`'s, not the
build's), and **`null` literals make overloads ambiguous** across a `string?` and a record parameter.
- **Python strings in the scratch scripts read `\N` as an escape** — a Windows path in a C# comment written through a
Python script needs its backslashes doubled, and a Bash heredoc halves them (the beta.23 trap again).
**Owner-only, added to the list below:** item 19 — **passed 2026-10-15**.
**Owner-only, added to the list below:** item 20.
**After the release (owner, 2026-10-15):** "Item 19 hiện đã đạt 100% yêu cầu. Phần chip sẽ đi kèm với phiên bản tiếp
theo. Bạn có thể cập nhật và đóng phiên, thư viện vẫn giữ như cũ." — item 19 passed; the chip the release tree's local
gate left goes with the next pre-release (`fl_guard`'s native-log test, red under load: after the stop, the last
`UNHOOK_RESTORED` lines were not in the file within its 10-second wait — known since beta.9, and no native code changed
in beta.23; green on the re-run); and **the library grid stays as it is**: the beta.11 decision
(`Controls/UniformWrapPanel`, non-virtualizing — cards an equal share of the width, each row as tall as its tallest
card) holds, at 275 ms for 48 games (`spike-notes` §21). Recorded with no release: nothing a user runs changed.
## Owner-only — no PR can close these
@@ -207,6 +221,29 @@ card) holds, at 275 ms for 48 games (`spike-notes` §21). Recorded with no relea
halves and a footer naming `v0.1.0-beta.17` — then tick *Restrict editing to collaborators only* (Settings ▸ General
▸ Features ▸ Wikis), or anyone can change a page until the next release overwrites it. (e) The `ja` strings marked
`review`.
20. **beta.24 on real hardware — decision tables written before the runs.** (a) **The mix (D62):** a DLSS 4 title
(Cyberpunk 2077 or Hell Is Us) with the NVIDIA App's *Frame Generation Mode* on *Use 3D app setting*, one session of
about two minutes each at ×2, ×3 and ×4 chosen in the game's menu, plus its menus → the summary's *Frame generation in
this session* lists ×2.0 / ×3.0 / ×4.0 with shares near the time spent, each with its own Native → Displayed, and the
line *Set in the game — no NVIDIA App frame-generation override*. Then the MFG title with the App's *Fixed ×6* → a
×6.0 row and *Set in the NVIDIA App: Fixed ×6*. Then *Dynamic, Target FPS = Max refresh rate, Multiplier = Up to 6x*
→ several rows or *Not classified*, and *Set in the NVIDIA App: Dynamic, up to ×6, target: max refresh rate*. Record
the stored `driver_profile` values for the Dynamic run: `NGX_DLSSG_DYNAMIC_MULTI_FRAME_COUNT_MAX` 5 and the target
`0x01000000` confirm the decode; anything else corrects `NvidiaOverrides.FrameGenerationContext`.
(b) **The quality mode (D63) on Expedition 33:** the App's Super Resolution mode *Quality*, then *DLAA*, *Ultra
Performance*, *Performance*, one short session each → the header reads *DLSS (driver-reported) Quality · NVIDIA App*
and so on. Stored `performanceMode`: Ultra Performance 3 (already measured on Silent Hill 2) and DLAA 5 confirm NGX's
numbering; DLAA 4 would mean the report follows the profile's numbering above 3 — then
`UpscalerNames.FromDriverReport` changes, and the row goes into `spike-notes`.
(c) **The libraries (D64):** the same sessions' DLSS line names the super-resolution library and *from the graphics
driver* when the override's copy is loaded; preset L → *DLSS 4.5 (preset L)*. With *Model Presets* on *Use 3D app
setting*, the game's own library and no generation beyond what was observed. Record the names the override loads
under `%ProgramData%\NVIDIA\NGX` (the summary's *Loaded:* line) — they correct `05_DETECTION` §Shipped is not loaded.
(d) **DLSS 5** on the owner's DLSS 5 title: *DLSS 5 runtime loaded*. If it is not shown, record the module names it
loads (*Loaded:* line); `nvngx_dlssnr.dll` is then corrected in `CensusNames` and `05_DETECTION`.
(e) **SonarCloud (D67):** bulk-mark per `13_CI_CD` §SonarCloud; optionally its *Ignore issues on multiple criteria*
rows; close PR #315. (f) The Legal Gate shows **Disclaimer 2.11** and **Privacy Policy 2.12** once. (g) The `ja`
strings marked `review`.
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
headers **and** `amd64/nvapi64.lib`; Windows 11 is the **measurement scope** only —
@@ -280,8 +317,14 @@ Where each owner decision is recorded — the file and its section, and a label
| D57 | [`handoff/history/0.1.0-beta.21.md`](handoff/history/0.1.0-beta.21.md) | the four itch "launchers" are malware: the documentation is corrected, the import is no… |
| D58 | [`handoff/history/0.1.0-beta.21.md`](handoff/history/0.1.0-beta.21.md) | Wuthering Waves is on the title list (Steam 3513350, Anti-Cheat Expert), beside the fix… |
| D59 | [`handoff/history/0.1.0-beta.21.md`](handoff/history/0.1.0-beta.21.md) | Play, in two modes switched in Settings: "1: press Play → the platform opens → it runs;… |
| D60 | this file, §START HERE | a game's artwork is what is already on the PC |
| D61 | this file, §START HERE | the band takes the artwork's colour as far as every text on it reads: primary and secon… |
| D60 | [`handoff/history/0.1.0-beta.23.md`](handoff/history/0.1.0-beta.23.md) | a game's artwork is what is already on the PC |
| D61 | [`handoff/history/0.1.0-beta.23.md`](handoff/history/0.1.0-beta.23.md) | the band takes the artwork's colour as far as every text on it reads: primary and secon… |
| D62 | this file, §START HERE | the mix: every frame-generation state a session held, with its share, never averaged |
| D63 | this file, §START HERE | the NVIDIA App's override is the quality mode where the driver reports it applied |
| D64 | this file, §START HERE | DLSS labels are evidence-bound: versions and folder class, DLSS 4/4.5 only when shown, 5 only loaded |
| D65 | this file, §START HERE | FSR's quality mode through ffxQuery — deferred to the next beta |
| D66 | this file, §START HERE | the long documents are split; every original path stays as the index of its parts |
| D67 | this file, §START HERE | SonarCloud stays on Automatic Analysis with .sonarcloud.properties; the owner marks in its UI |
---
+99
View File
@@ -0,0 +1,99 @@
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.24 was cut, 2026-10-19 (D66). CHANGELOG.md lists every release. -->
## [0.1.0-beta.24] - 2026-10-19
**The twenty-fourth pre-release: every frame-generation state a session held, the quality mode the NVIDIA App set, and
which DLSS ran.** The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
**Updating from `0.1.0-beta.23`:** Help ▸ Check for updates, then *Restart to update* with no game running. The
Disclaimer (2.11) and the Privacy Policy (2.12) are shown once for you to accept. The ledger moves to schema 21, which
a beta.23 cannot open. No game is read again: the detection rules (`2026.10.4`) are beta.23's. The mix of
frame-generation states and where each DLSS library was loaded from are kept for sessions recorded from now on; the
quality mode the NVIDIA App set reads on sessions you already have.
### Added
- **Every frame-generation state a session held, in its summary** (owner request 2026-10-19, decision D62). Under the
figures, *Frame generation in this session* lists each state — `×2.0`, `×3.0`, `×4.0`, `×6.0`… — with its own
Native → Displayed and its share of the time to two decimals, then the time with no frame generation and the time no
state explains (*Not classified*: switching, loading, a multiplier that changed faster than five seconds), above a bar
of those shares. A line above them says how frame generation was set: in the NVIDIA App (*Dynamic, up to ×6, target:
max refresh rate*, *Fixed ×4*, from the driver profile stored with the session) or in the game. Each state is read
over the same five-second windows as the steady state and lasts at least 10 seconds; nothing is averaged across
states (rule 6). Stored with the session (schema 0020, `sessions.fg_mix`): a session recorded before has none, and
its summary says so in one line. The CSV export gains a `# fg_mix:` line; the JSON carries the column. The FG×
column's two formats are translated strings now, and the driver-profile line's automatic dynamic target reads as the
NVIDIA App says it: *max refresh rate*.
- **The quality mode the NVIDIA App set, on every page that names the upscaler** (owner request 2026-10-19, decision
D63). Where the NVIDIA App overrides DLSS Super Resolution for a game and the NVIDIA driver reports that the
override applied in the session, the summary, the Sessions tab, the game page and the live card say so:
*DLSS (driver-reported) Quality · NVIDIA App*. It is read from what every session already stores, so sessions
recorded before read the same; when the profile and the driver disagree, or the driver's report alone cannot settle
the mode, the session reads *· NVIDIA App override* with no mode — never the game's own value in its place. The CSV
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
- **The analyzers are Meziantou.Analyzer 3.0.307 and Microsoft.VisualStudio.Threading.Analyzers 18.12.1**
(developers only): the update Dependabot proposed in #314 and then closed itself as "updatable in another way" —
applied by hand, with the two suppressions it needed merged earlier in the train.
- **SonarCloud analyses only FrameLedger's own code** (developers only; owner request 2026-10-19, decision D67). A
`.sonarcloud.properties` at the root keeps the vendored SDK headers, generated files, test fixtures, licence texts and
the SQLite migrations out of the analysis and reports the native code against C++20; `docs/13_CI_CD.md` §SonarCloud
records the triage of the 341 issues the last analysis left — the rules this project breaks by design and why, the
false positives, and the ones the next change fixes — with the steps to mark them in SonarCloud.
- **The long documents are split** (developers only; owner request 2026-10-19, decision D66). `CHANGELOG.md`
keeps `[Unreleased]` and a table of the releases; each release's section now lives in its own file,
`docs/changelog/<version>.md`, and the ledger kept before the first tag in five parts — moved verbatim: the notes
`tools/release-notes.ps1` takes for each of the 23 releases are byte for byte what they were, and it reads the
version's own file. `docs/HANDOFF.md` (2,844 lines, now 299) keeps what to do next, the open owner-only items and an
index of every owner decision; the history of each phase and train, the passed owner-only items and the traps
moved to `docs/handoff/`, and a table there resolves every section the code and the documents cite. A new gate,
`tools/docs-split-check.ps1`, keeps each index and its files naming each other.
- **The open questions and the measurement notes are split too** (developers only, D66). `docs/20_OPEN_QUESTIONS.md`
(4,467 lines, now 2,008) keeps its rules, §S24 and every entry not resolved; the 30 entries §S24 marks resolved
moved, with their reasoning and in their order, to `docs/open-questions/closed-s.md` and `closed-h.md`, and a table
at the end of each series lists them. `docs/spike-notes.md` (2,816 lines) is now the index of its 24 sections, each
in its own file under `docs/spike-notes/`; a new measurement gets the next number, its own file and a row. Both
rebuild their originals byte for byte, and the same gate holds their indexes to their files.
### Fixed
- **The NVIDIA driver line read the driver's mode in the wrong numbering.** The driver reports the mode an override
set in NGX's own numbering, not the driver profile's: the owner's Silent Hill 2 session ran under the NVIDIA App's
Ultra Performance (profile value 5) and the driver reported 3 — which the line printed as nothing, and a DLAA
override's 5 would have printed as "Ultra Performance". Five comments in the native code called a quality byte of
0 "NGX MaxPerf" — in the numbering that byte carries, 0 is "DLSS off" (comments only, no code changes).
- **Opening a folder in Explorer** — the logs, the data folder, the licences, a bug report's zip and the folder named
after a failed start — starts `explorer.exe` from the Windows folder by its full path, never a program of that name
found on the search path, and always hands it the path in quotes (three of the five places passed it bare).
- **What SonarCloud found that was real** (developers only): the one third-party GitHub Action is pinned to its
commit; two string reads in native code are bounded by their buffer (the guard's rules-file path handed to the Agent,
and the driver's branch name the NVAPI bridge copies); the pipe server's accept loop states that it ends only when
cancelled; a launch's own session names its absent stop token (`CancellationToken.None`, with the reason) where it
wrote `default` — the same value, now said on purpose; an unused overload of
the process launcher that hid the other is gone; the identifier `module` (a C++20 keyword in some positions) is
renamed in the hook layer — a rename only, no code changes; and a hook-overhead probe no longer uses a compound
assignment on a `volatile`, which C++20 deprecates. The analyzers Dependabot updates in #314 flag the first-start
window's own answer task and one test fake's synchronous wait; both are suppressed with their reasons, so that update
can merge.
- **The game-side log keeps every line a stop writes.** When hooking stopped on a game's own drawing thread — the
capture agent's safety stop takes effect within one frame there — the Overlay's last write of its log could happen
while that thread was still listing the hooks it removed, and the last of them never reached the file
(`overlay-*.log`, the file a bug report carries). The last write now waits, at most two seconds, for the stop to
finish and ends with a `STOP_FLUSHED` line; a line still being written is never printed half-done. Nothing changes
on the per-frame path. This was the native test that went red under load since beta.9 (`fl_guard`'s log case),
now run 20 times with every processor busy.
+58
View File
@@ -0,0 +1,58 @@
# HANDOFF history — 0.1.0-beta.23
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.24 was cut, 2026-10-19 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" point inside the original file.*
## **START HERE** — 2026-10-14, 0.1.0-beta.23: a game's artwork, pages that do not freeze, the documents that drifted
*Status is `CHANGELOG.md` `[0.1.0-beta.23]`; this is what no other file carries.* The owner, 2026-10-14: "Bạn phân tích
và lên plan cho phần tiếp theo gồm những nội dung sau: 1. Thêm ảnh bìa/hero/cover của game từ các nền tảng đó - Đặt trong
detail của game. (Nếu được); Tuỳ chọn: có thể sync màu cùa cover với màu của detail; 2. Cập nhật, sync docs; 3. Kiểm tra
hiệu suất khi chuyển giữa các tab (nếu có vấn đề hiệu năng)" — then the whole train to the release without asking again.
On top of #308 (PR-1): #309 (the pages, measured first), #310 (the artwork), #311 (the drift), then this release.
**Decisions:**
- **D60 — a game's artwork is what is already on the PC.** The image the user chose (*Edit… ▸ Choose image…*), else
what the Steam or GOG GALAXY app keeps for the game it installed — found through the stores' own records as Play finds
them (`StoreRecords.Owning`, never the row's platform alone). Nothing is downloaded: `privacy.online_metadata` stays
reserved. A chosen image is a PNG copy, `<data>\covers\game-<id>-<unix ms>.png`, named relative in `cover_path`; only
those names are followed — never a rooted, share or `..` path, never through a junction or a symbolic link, because a
viewer's copy of a ledger may come from anywhere (D52).
- **D61 — the band takes the artwork's colour as far as every text on it reads**: primary and secondary 4.5:1, tertiary
3:1, the pills' and the warning's text 4.5:1 on their own fills; at most 30 % on the dark theme, 22 % on the light. On
by default (the owner's choice); never in high contrast; it follows a theme switch by resource reference.
- **The pages' speed was judged by a bar written before the first measurement** (`spike-notes` §21): fix what keeps the
UI thread busy 50 ms or more, can block on I/O, or grows with each visit. Recorded, not fixed: page builds of 85–370 ms,
and **the library grid (275 ms at 48 games) — non-virtualizing by the beta.11 decision; a virtualizing one changes the
page's look, which is the owner's call** *(answered 2026-10-15: it stays as it is — §After the release below)*; no
`sessions.started_at` index (a schema version locks out every earlier
build, and nothing measured asked for it).
- `LIST_GAME_TESTED`: the Everhex Demo row and the corrected Vulkan sentence, approved by the owner under D35.
**Traps met on the way:**
- **Microsoft.Data.Sqlite completes its "async" calls synchronously**: after a ledger read, `ConfigureAwait(false)` is
still on the UI thread — the session decode, the sorts and the stutter detection all ran there (`16_WPFUI_SYNTAX`
§Gotchas).
- **A transient view model that is `IDisposable` lives until the App exits** (the root container keeps it), and every
Dashboard ever opened stayed subscribed. FR-3.8's "Session saved" lived in that view model and reached every page only
through the leak — it is `Services.SessionNotices` now.
- **A `ui:Image` given a `Style` of its own that is not based on `DefaultImageStyle` has no template** and draws nothing
in the place it takes. Only a render showed it; `AccessibilityTests.NoStyleOfAWpfUiControlLeavesOutItsTemplate`
refuses it now.
- **A page just navigated to is mid-fade**: a `RenderTargetBitmap` of it reads every colour washed out unless the
presenter's `Transition` is `None`.
- **The Bash tool's heredocs halve backslashes**: `covers\game-` became an invalid C# escape, and `\r\n` in a Python
heredoc became real line breaks. Write such files with the editor tools.
- **`Directory.Delete(…, recursive: true)` over a junction throws without elevation** (it asks Windows to unmount a
volume, and the link is removed anyway): a test deletes its junction itself first.
**Owner-only, added to the list below:** item 19 — **passed 2026-10-15**.
**After the release (owner, 2026-10-15):** "Item 19 hiện đã đạt 100% yêu cầu. Phần chip sẽ đi kèm với phiên bản tiếp
theo. Bạn có thể cập nhật và đóng phiên, thư viện vẫn giữ như cũ." — item 19 passed; the chip the release tree's local
gate left goes with the next pre-release (`fl_guard`'s native-log test, red under load: after the stop, the last
`UNHOOK_RESTORED` lines were not in the file within its 10-second wait — known since beta.9, and no native code changed
in beta.23; green on the re-run); and **the library grid stays as it is**: the beta.11 decision
(`Controls/UniformWrapPanel`, non-virtualizing — cards an equal share of the width, each row as tall as its tallest
card) holds, at 275 ms for 48 games (`spike-notes` §21). Recorded with no release: nothing a user runs changed.
+4
View File
@@ -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,
+2
View File
@@ -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
+4 -1
View File
@@ -12,7 +12,7 @@
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.23`** (2026-10-14), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.24`** (2026-10-19), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -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
+4 -1
View File
@@ -114,7 +114,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.23`** (2026-10-14), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.24`** (2026-10-19), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -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
+2 -2
View File
@@ -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.
+246
View File
@@ -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));
+48
View File
@@ -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);
+64
View File
@@ -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>
+48
View File
@@ -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>
+48
View File
@@ -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}]}",
};