Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 ecb8858aa6 feat: the quality mode the NVIDIA App set, where the driver reports its override applied - on every page that names the upscaler; the driver line reads NGX's numbering (D63, beta.24 PR-7)
- Application: Recording/QualityResolver (D63). When DLSS super resolution ran (a hook named it, or the
  driver saw it created and evaluated) and the driver's per-process word says an NVIDIA App override
  applied (ENABLED with PERF_MODE, SR_DLAA_MODE or SCALING_RATIO), the mode is the profile's
  NGX_DLSS_SR_MODE checked against the word's performanceMode; DLAA from its bit; a custom ratio with
  its percent. Disagreement, or a report that does not settle, reads as overridden with no mode - never
  the game's value. Otherwise the hooked Streamline byte; otherwise none. Read at display time from
  ngx_driver_words and driver_profile, so sessions recorded before resolve alike. NgxDriverWords.Parse;
  the live progress event gains upscalerQualityOverride (07_IPC: optional, from the report alone).
- Domain: UpscalerQualityMode, and UpscalerNames decodes the three numberings - the hooked byte
  (sl::DLSSMode), the driver's report (NGX's own: measured on the owner's ledger, Silent Hill 2 under the
  App's Ultra Performance, profile 5, was reported as 3) and the profile (NGX_DLSS_SR_MODE).
- App: Formats.UpscalerOf(SessionRow / SessionProgressEvent) on the summary, the Sessions tab, the game
  page and the live card ("DLSS (driver-reported) Quality · NVIDIA App", "· NVIDIA App override"); mode
  names from resx; the driver line decodes the report in NGX's numbering (it printed nothing for 3 and
  would have printed a DLAA override's 5 as Ultra Performance); CSV "# quality_mode:".
- Native: five comments that called a quality byte of 0 "NGX MaxPerf" corrected - comments only.
- Strings: 4 new keys en/vi/ja (ja marked review).
- Tests: QualityResolverTests (the owner's Silent Hill 2 and Expedition 33 words as fixtures),
  UpscalerNamesTests, FormatsTests, NvidiaOverridesTests, SessionProgressCalculatorTests,
  SessionExporterTests, MetricEnumMirrorTests.
- Docs: 03_METRICS Upscaling (D63 amendment; the beta.8 sentence struck for the mode only), 05_DETECTION,
  07_IPC, 08_UI, 18_GPU_VENDOR_APIS, LIMITATIONS, guide 03/10, CHANGELOG; legal/ACCURACY.md's Quality mode
  bullet in the words approved with the plan, without its FSR clause; Disclaimer 2.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:05:08 +07:00
44 changed files with 812 additions and 102 deletions

No files matched your search

+14
View File
@@ -49,6 +49,15 @@ numeric core and does not move; the heading is the full version — corrected 20
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
@@ -73,6 +82,11 @@ numeric core and does not move; the heading is the full version — corrected 20
### 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).
+6 -2
View File
@@ -87,8 +87,12 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
FidelityFX libraries. **Intel XeSS is not read** (its licence forbids it), FSR 2 and upscalers built into the
game are not identified, and Vulkan and OpenGL games read N/A. Where no hook saw DLSS but the NVIDIA driver
reports it, the page says it is the driver's report.
- **The quality preset** (Quality, Balanced, …) has not been reported on any game yet, and the render
resolution is N/A where the game's own calls do not carry it (DLSS without Streamline, for one).
- **The quality mode** (Quality, Balanced, DLAA, …) is shown only when it is known: the NVIDIA App's override
where the NVIDIA driver reports it applied (marked *· NVIDIA App*, since 0.1.0-beta.24), or the mode the game
passed to a call FrameLedger reads — which no game has done yet. The mode chosen in a game's own menu is not
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))
- **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 -3
View File
@@ -36,9 +36,11 @@ pages.
> was measured. Intel XeSS is **not** read (its SDK licence
> forbids it), and neither is an upscaler compiled into the game: those read `N/A`, or "Unknown
> upscaler" when another vendor's hook ran in the game. Vulkan and OpenGL titles read `N/A`.
> - **Quality preset:** not reported on any title measured. The one route this software may use — the
> DLSS options a Streamline title passes with its per-frame call — has not been seen on a real
> title, and AMD's per-frame call carries no preset.
> - **Quality mode:** shown only when it is known. When the NVIDIA App overrides DLSS Super Resolution for
> the game and the NVIDIA driver reports that the override applied in the session, the override's mode is
> 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.
> - **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
+24 -3
View File
@@ -593,8 +593,27 @@ carries the three shapes.
> or memory, CLAUDE.md rule 4) and the driver's own per-process override report in full (`ngx_driver_words`: preset,
> mode, ratio beside the masks). Both are shown as what the driver was set to do and what it says it did — "NVIDIA
> profile …: DLSS override (preset K, Quality)" — and neither changes a measured value, a rung of the upscaler ladder or
> the frame-generation factor: those stay what the hooks saw. A profile override the hooks contradict is two true
> statements about different things, and the page shows both.
> the frame-generation factor: those stay what the hooks saw. ~~A profile override the hooks contradict is two true
> statements about different things, and the page shows both.~~ *(Struck 2026-10-19 for the quality mode only — the
> amendment below; render size, ratio and the frame-generation factor are unchanged.)*
>
> **Amended 2026-10-19 (owner decision D63): the override is the standard for the quality MODE — when the driver
> confirms it applied.** The owner, shown the note above: an NVIDIA App override is what the game ran at, so it is the
> mode a session states. `Application.Recording.QualityResolver`, read at display time from what every session already
> stores (`ngx_driver_words` since P2, `driver_profile` since beta.8 — so a session recorded before reads alike): when
> DLSS super resolution ran (a hook named it, or the driver reports the feature created and evaluated) and the driver's
> per-process report says the override applied (`ENABLED` with `PERF_MODE`, `SR_DLAA_MODE` or `SCALING_RATIO`), the mode
> is the profile's `NGX_DLSS_SR_MODE` (documented: 0 Performance, 1 Balanced, 2 Quality, 4 DLAA, 5 Ultra Performance,
> 6 a custom ratio with `NGX_DLSS_SR_OVERRIDE_SCALING_RATIO`), checked against the report's `performanceMode`; DLAA from
> its bit. **The report is in NGX's own numbering, not the profile's** — measured on the owner's ledger: Silent Hill 2
> (2026-10-13) under the App's *Ultra Performance* (profile 5) was reported as **3**, NGX's Ultra Performance, where the
> profile's 3 is "the game's own" (Expedition 33's Quality was 2 in both). When the two disagree, or the report alone
> carries a value that does not settle, the session reads as overridden with no mode — never the game's own value,
> which the override replaced. Otherwise the mode the game passed to a hooked call (the Streamline byte); otherwise
> none. Every surface says it the same way (`Formats.UpscalerOf`): *DLSS (driver-reported) Quality · NVIDIA App*,
> *DLSS · NVIDIA App override*, *DLSS Quality*. The live card names what the report settles by itself
> (`upscalerQualityOverride`, `07_IPC`). Nothing infers a mode from the render scale (`HANDOFF` §7a). Silent Hill 2's
> own session reads no mode: its word lacks `CREATED | EVALUATE`, so no super resolution ran that the driver saw.
From the upscaler hooks we get, per frame:
@@ -657,7 +676,9 @@ Tier 2 has none of this: `upscaler = unknown`, ratio `N/A`.
>
> **What it may claim: the vendor and the feature, attributed to the driver.** What it may NOT claim,
> each one measured: a quality (`performanceMode` / `renderPreset` are populated only under an
> NVIDIA-app override and are then the OVERRIDE's values), a ratio or render size (`scalingRatio` is
> NVIDIA-app override and are then the OVERRIDE's values — *which is why, since 2026-10-19 (D63), the
> override's mode IS the session's mode where the report says it applied: §Upscaling's amendment above*),
> a ratio or render size (`scalingRatio` is
> 0 even under the override), a frame-generation multiplier (`FG_MODE` / `FG_MULTI_FRAME` stay clear
> and `frameGenerationCount` is 0 at ×4 — it is the override target). **Corrected the same day, on the
> loop's own readings:** the FG word DOES follow DLSS-G once the feature exists — `CREATED | EVALUATE`
+1 -1
View File
@@ -18,7 +18,7 @@ Derived in the Agent from the record stream; the mapping is in `03_METRICS`. Sum
| Graphics API + swapchain format, buffer count, swap effect, flags | `CreateSwapChain*` / present hooks |
| Present mode (flip / blt / independent flip) | swapchain desc + `presentFlags` + `syncInterval` |
| HDR output | `SetColorSpace1` |
| Upscaler identity + quality preset | NGX / Streamline / FFX / XeSS create+evaluate calls — **or, when no hook saw one, the NVIDIA driver's per-process NGX word, out of process and attributed (`03_METRICS` §Upscaling, the driver-reported rung, 2026-09-06): identity only, never the preset** |
| Upscaler identity + quality preset | NGX / Streamline / FFX / XeSS create+evaluate calls — **or, when no hook saw one, the NVIDIA driver's per-process NGX word, out of process and attributed (`03_METRICS` §Upscaling, the driver-reported rung, 2026-09-06): identity only, never the game's preset** — since beta.24 (D63) an NVIDIA App override's mode, where that report says the override applied, is the session's quality mode, marked as the App's (`QualityResolver`) |
| Render resolution vs output resolution (incl. mid-session changes) | upscaler parameter reads + `ResizeBuffers` |
| Frame Generation mode + factor | NGX/SL/FFX FG feature evaluation, then cadence — **Tier 1 only**. ~~then (Tier 2 only) PresentMon `FrameType`~~ retired (§S31 row P2), and Tier 2 no longer produces frames to run cadence over either |
| Ray Tracing active | AS builds + `DispatchRays` (both, to catch inline RayQuery) |
+1 -1
View File
@@ -404,7 +404,7 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
| `SweepRetention` | UI→A | **no payload** — a trigger, like `UpdateRules`: the Agent applies `06_DATA_MODEL` §Retention to every game with the `retention.raw_sessions_per_game` it reads itself → `SweepRetentionAck { keep, games, sessions }` (`keep` 0 = unlimited, and then nothing was swept). *(Built 2026-09-15, P4 PR-7, for Tools ▸ Database maintenance: `Application.Recording.RetentionSweep` over `ISessionRepository.SweepRetentionAllAsync`, composed into `AgentCommandHandler` under `--serve`. The client names no number because the rows are the Agent's (§Writer ownership). Additive: an older Agent answers `Error UnknownType`, which the dialog reads as "restart the Agent". Carries no safety fact.)* |
| `SessionStarted` | A→UI | `{ sessionGuid, gameId, gameName, pid, tier, startedAt, hold? }` — **published once per session**: at the attach (tier 1, `startedAt` the attach), or — **since 2026-09-23** — at the first tick of a session held unhooked (tier 2, `startedAt` the session's start, `pid` 0 when the loop never opened the process, as a hooking-off hold never does). ~~a session that never attaches has no `SessionStarted`, only its `SessionCompleted` (tier 2)~~ — that was the beta.5 wire, and every hooking-off, refused or unreadable game read "Nothing is being captured." for as long as it ran. **`hold` (optional, tier 2 only)** is why nothing is measured: `{ reason, guardReason?, family?, signal?, hookingTurnedOff }` — the loop's `SessionEndReason` and, when the guard said anything but allow, its reason, family and signal: the same words the row's `capture_notes` will carry, so the live card and the summary read one sentence (`Formats.Tier2HoldReason` / `Tier2Reason`). The refusal's own event (`CaptureRefused` and the rest, below) goes out with this start rather than when the game exits, and is not repeated at the end |
| `SessionHeld` | A→UI | **Added 2026-09-23.** 1 Hz while a client listens, for a session held unhooked only: `{ sessionGuid, elapsedS, gpuTempC?, cpuTempC?, gpuLoadPct?, cpuLoadPct?, gameVramDedicatedMb?, gameRamPrivateMb? }` — how long it has run and the machine's sensors (and since beta.12 the game process's own memory, read from outside it — optional, an older client ignores them). **Never `SessionProgress`**: its `presents5s`, `presentedQualifier` and `fgMode` are required, and zeros there would put measured-looking numbers on the wire for a session that measures nothing (rule 6 has nothing to show and shows nothing) |
| `SessionProgress` | A→UI | 1 Hz: `{ sessionGuid, elapsedS, presents5s, presentedFps5s?, presentedQualifier, nativeFps5s?, displayedFps5s?, fgFactor?, fgMode, upscaler?, upscalerQuality?, upscalerDriverReported?, renderW/H?, outputW/H?, rtActive?, gpuTempC?, cpuTempC?, cpuLoadPct?, vramProcMb?, latencyUs?, fgRefusal?, fgRuntimeCensus?, gameVramDedicatedMb?, gameRamPrivateMb? }` (the last two added 2026-10-03, beta.12, optional: the game process's dedicated GPU memory and private working set, MiB, from the newest telemetry tick; `vramProcMb` stays reserved for the in-process figure and has no producer) — a 5 s rolling window over the ring through the SAME Domain calculators the row uses (`SessionProgressCalculator`, D13). **`upscalerDriverReported` added 2026-09-21, optional:** `dlss` when the NVIDIA driver reports an NGX super-resolution feature created and evaluated in the target (`03_METRICS` §The driver-reported rung), so the live card says `DLSS (driver-reported)` where no hook can name the upscaler; identity only. **`cpuLoadPct` added 2026-09-21, optional** (CPU time busy over the last telemetry tick, 0–100; `cpuTempC` has a producer from the same date, present only when the Agent is elevated with PawnIO). **Two fields added 2026-09-14, both optional (an older client ignores them, §C):** `fgRefusal` is the row's `fg_refusal` (schema 0003) — present when `fgMode` names a technology and `fgFactor` is absent, so the live card can say "DLSS-G active — factor not counted" rather than N/A; `fgRuntimeCensus` is the raw census so the `fg_runtime_loaded` chip can name the module. **Rule 6 at the wire (2026-09-13):** `nativeFps5s` / `displayedFps5s` / `fgFactor` are present only when frame generation was measured in the window; otherwise `presentedFps5s` stands alone with `presentedQualifier` (`census_not_run` · `no_fg_runtime` · `fg_runtime_loaded` · `none_withheld`, the row's `presented_qualifier` from the same function). Every unmeasured field is absent, never 0. Suppressed when no client is connected |
| `SessionProgress` | A→UI | 1 Hz: `{ sessionGuid, elapsedS, presents5s, presentedFps5s?, presentedQualifier, nativeFps5s?, displayedFps5s?, fgFactor?, fgMode, upscaler?, upscalerQuality?, upscalerDriverReported?, renderW/H?, outputW/H?, rtActive?, gpuTempC?, cpuTempC?, cpuLoadPct?, vramProcMb?, latencyUs?, fgRefusal?, fgRuntimeCensus?, gameVramDedicatedMb?, gameRamPrivateMb? }` (the last two added 2026-10-03, beta.12, optional: the game process's dedicated GPU memory and private working set, MiB, from the newest telemetry tick; `vramProcMb` stays reserved for the in-process figure and has no producer) — a 5 s rolling window over the ring through the SAME Domain calculators the row uses (`SessionProgressCalculator`, D13). **`upscalerQualityOverride` added 2026-10-19 (beta.24, D63), optional:** the mode an NVIDIA App override set when the driver reports it applied in the target and DLSS super resolution ran there — `performance`, `balanced`, `quality`, `ultra_performance`, `ultra_quality`, `dlaa`, or `override` when the driver's report alone does not settle the mode (the profile is the stored session's); absent otherwise. **`upscalerDriverReported` added 2026-09-21, optional:** `dlss` when the NVIDIA driver reports an NGX super-resolution feature created and evaluated in the target (`03_METRICS` §The driver-reported rung), so the live card says `DLSS (driver-reported)` where no hook can name the upscaler; identity only. **`cpuLoadPct` added 2026-09-21, optional** (CPU time busy over the last telemetry tick, 0–100; `cpuTempC` has a producer from the same date, present only when the Agent is elevated with PawnIO). **Two fields added 2026-09-14, both optional (an older client ignores them, §C):** `fgRefusal` is the row's `fg_refusal` (schema 0003) — present when `fgMode` names a technology and `fgFactor` is absent, so the live card can say "DLSS-G active — factor not counted" rather than N/A; `fgRuntimeCensus` is the raw census so the `fg_runtime_loaded` chip can name the module. **Rule 6 at the wire (2026-09-13):** `nativeFps5s` / `displayedFps5s` / `fgFactor` are present only when frame generation was measured in the window; otherwise `presentedFps5s` stands alone with `presentedQualifier` (`census_not_run` · `no_fg_runtime` · `fg_runtime_loaded` · `none_withheld`, the row's `presented_qualifier` from the same function). Every unmeasured field is absent, never 0. Suppressed when no client is connected |
| `SessionCompleted` | A→UI | `{ sessionGuid, sessionId?, exitStatus, tier, finalize, reason, gameId?, gameName? }` — UI loads the full row from SQLite; `sessionId` is null and `finalize` is `discarded` when the row was not stored (under the minimum length), or `game_removed` when its entry was removed with its sessions while it ran (2026-09-23), or **`faulted` when the session's task threw before it could finalize** (2026-09-23: it follows the `CaptureError SessionFaulted`, with `exitStatus` `interrupted` and `reason` `SessionFaulted`, so the live card and the tray let go of a session that no longer runs; the `.partial` stays for recovery); `exitStatus` is the row's vocabulary (`normal` · `crashed` · `unhooked_safety` · `degraded`); `reason` is the loop's `SessionEndReason`. **`gameId` / `gameName` added 2026-09-23, optional:** the entry the session was stored under — the finalizer's owner when it re-keyed a session whose entry was removed, else the one it started under — so the notice names the session that completed, not whatever the live card last showed |
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff, guardReason? }` — **`guardReason` (beta.13, optional)** is the guard's own reason ~~when it named a family~~ **whenever it refused (beta.18; beside a family only until then)**: `BlockedService` / `BlockedDriver` is a finding on the PC, not in the game, and the notice says so (§S23-3), and a refusal no family names is said in the guard's words (`Formats.GuardSentence`) — it printed the end's name, "reason RefusedByGuard"; `reason` stays the session's end reason — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch`, `PreScanCouldNotVerify` and, since 2026-09-21 (beta.4), `TargetUnreadable` — a protected process the Agent could not open (added 2026-10-04) — `PreScanCouldNotVerify` with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
| `CaptureDegraded` | A→UI | `{ sessionGuid, from: 1, to: 2, reason }` — Tier 1 → Tier 2 mid-flight, or overlay self-disabled. **Under a two-rung ladder this means measurement STOPPED**, not that it continued at lower fidelity, and the notice must say so. *(Since beta.18 it says the end in words, `Formats.EndReasonText`; it printed `reason` raw — "The hook stopped (WriterSelfDisabled); the session continues without measuring" — and a stop ends the session, it does not continue it.)* *(Built: `SupervisionLost`, `WriterSelfDisabled`, `WriterStoppedBlocklisted`, `WriterNeverInstalledHooks`, `SupervisionFaulted`, `KillSwitchEngaged` — `RecordedSessionEvents.Classify` is the table.)* |
+8
View File
@@ -561,6 +561,14 @@ 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 (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
> *DLSS · NVIDIA App override* when its mode is not settled —, else the mode the game passed (*DLSS Quality*), else the
> name alone. Mode names come from the resources (`Nv_Mode_*`). Chart segments stay the hooks' (a segment carries no
> driver report). The driver line reads the report's mode in NGX's numbering (it read it through the profile's table
> until beta.24). CSV export: `# quality_mode:` (`quality (nvidia_app)`, `stored 9 (game)`, `N/A`).
> **beta.24 (D62): the frame-generation mix.** Under the stat cards, **Frame generation in this session** — shown when
> the session stored a mix of two rows or more (`sessions.fg_mix`, `03_METRICS` §The mix): a line saying how frame
> generation was set (the NVIDIA App's Frame Generation Mode from the stored driver profile — *Set in the NVIDIA App:
+1 -1
View File
@@ -237,7 +237,7 @@ Still resolve **entry points defensively at runtime**: `nvapi64.dll` may be abse
| Memory | `NvAPI_GPU_GetMemoryInfoEx` — **not `NvAPI_GPU_GetMemoryInfo`**, which this table named until 2026-08-05. The vendored headers mark it `__nvapi_deprecated_function` ("deprecated in release 520"), so under `/W4 /WX` a call to it fails the native build. **Neither is called (2026-09-10):** the vendored `nvapi.h` (`cd6918f6`) does not declare `GetMemoryInfoEx` at all — the deprecation message names a function the same header set does not ship — so the bridge's `vram` field is **reserved**, its bit is never set, and VRAM stays L1's PDH adapter counter. Taking a newer header set is the way to change that, not a call to the deprecated one |
| **Throttle reasons** | `NvAPI_GPU_GetPerfDecreaseInfo` — not available from L1 or L2. **Bridge (2026-09-10):** the raw reason mask, and 0 is a measurement (no reason), not a clear bit |
| Driver version | `NvAPI_SYS_GetDriverAndBranchVersion` — **bridge (2026-09-10):** `FlNvDriverVersion`, surfaced as `616.64 (r616_41)` |
| **NGX per-process state** | `NvAPI_NGX_GetNGXOverrideState` (R570+) — the driver's feedback word per DLSS feature for a PID, read OUT OF PROCESS by `fl-probe-nvapi --ngx-state` and, since 2026-09-06, by the capture host beside each module snapshot — **in-process through the bridge since 2026-09-10** (`NvapiNgxStateProbe`; the spawn is retired and the words, the merge and the printed block are unchanged). Measured: the SR word's `CREATED \| EVALUATE` is set without an NVIDIA-app override; the FG word follows DLSS-G once created (`CREATED \| EVALUATE` at ×4, corrected the same day — the first reading was blind because it was early), the multiplier bits stay clear; `scalingRatio` is 0 even under an override. Identity only, SR and FG (`03_METRICS` §Upscaling) |
| **NGX per-process state** | `NvAPI_NGX_GetNGXOverrideState` (R570+) — the driver's feedback word per DLSS feature for a PID, read OUT OF PROCESS by `fl-probe-nvapi --ngx-state` and, since 2026-09-06, by the capture host beside each module snapshot — **in-process through the bridge since 2026-09-10** (`NvapiNgxStateProbe`; the spawn is retired and the words, the merge and the printed block are unchanged). Measured: the SR word's `CREATED \| EVALUATE` is set without an NVIDIA-app override; the FG word follows DLSS-G once created (`CREATED \| EVALUATE` at ×4, corrected the same day — the first reading was blind because it was early), the multiplier bits stay clear; `scalingRatio` is 0 even under an override. Identity only, SR and FG (`03_METRICS` §Upscaling) — and, since beta.24 (D63), the mode an NVIDIA App override set where the word says it applied; its `performanceMode` is in NGX's own numbering (Silent Hill 2, 2026-10-13: the App's Ultra Performance, profile value 5, reported as 3) |
| **Reflex / PC latency** | `NvAPI_D3D_GetLatency` → per-frame sim/render/present/driver/GPU timestamps; hooking `NvAPI_D3D_SetSleepMode` / `SetLatencyMarker` in the Overlay tells us the game enabled Reflex (`17_HOOK_ENGINE`) |
Reflex latency is the single strongest reason L3 exists — it is genuinely unavailable anywhere else.
+3
View File
@@ -13,6 +13,9 @@ A value FrameLedger could not measure reads **N/A** — never 0, and never an es
- **When frame generation was measured**, the game's own frames and the frames you saw are shown together:
`62 → 118 FPS (×1.9 FG)`. If frame generation changed during the session (menus, loading screens, a settings change),
the figures are for the state that lasted longest, with the share of the session it covers: `(×1.9 FG · 75%)`.
- **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.
- **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
@@ -36,6 +36,8 @@ What the words on FrameLedger's screens mean, in alphabetical order. How each fi
- **Presented FPS** — every frame the game handed to Windows, shown when frame generation could not be measured, with a
note saying whether generated frames could be among them.
- **RAM (this game)** — the game's own memory, what Task Manager's Details tab shows as its private working set.
- **Quality mode** — the upscaler's setting (Quality, Balanced, Performance, Ultra Performance, DLAA). *· NVIDIA App*
marks one the NVIDIA App set for the game, which the NVIDIA driver reported applied.
- **Ray tracing, Path tracing, Ray reconstruction** — read *Yes*, *No* or *N/A*. Ray tracing is measured on DirectX 12
games; path tracing is never stated as a fact.
- **Render scale** — the share of the screen's resolution the game drew at before upscaling. 100% means no upscaling.
+5 -3
View File
@@ -36,9 +36,11 @@
> was measured. Intel XeSS is **not** read (its SDK licence
> forbids it), and neither is an upscaler compiled into the game: those read `N/A`, or "Unknown
> upscaler" when another vendor's hook ran in the game. Vulkan and OpenGL titles read `N/A`.
> - **Quality preset:** not reported on any title measured. The one route this software may use — the
> DLSS options a Streamline title passes with its per-frame call — has not been seen on a real
> title, and AMD's per-frame call carries no preset.
> - **Quality mode:** shown only when it is known. When the NVIDIA App overrides DLSS Super Resolution for
> the game and the NVIDIA driver reports that the override applied in the session, the override's mode is
> 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.
> - **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
+6 -4
View File
@@ -1,6 +1,6 @@
# FrameLedger — Disclaimer
**Version:** 2.10 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.11 · **Effective:** {{RELEASE_DATE}}
## 0. This is pre-release (beta) software
@@ -138,9 +138,11 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> was measured. Intel XeSS is **not** read (its SDK licence
> forbids it), and neither is an upscaler compiled into the game: those read `N/A`, or "Unknown
> upscaler" when another vendor's hook ran in the game. Vulkan and OpenGL titles read `N/A`.
> - **Quality preset:** not reported on any title measured. The one route this software may use — the
> DLSS options a Streamline title passes with its per-frame call — has not been seen on a real
> title, and AMD's per-frame call carries no preset.
> - **Quality mode:** shown only when it is known. When the NVIDIA App overrides DLSS Super Resolution for
> the game and the NVIDIA driver reports that the override applied in the session, the override's mode is
> 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.
> - **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
+72 -11
View File
@@ -5,10 +5,12 @@ using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Detection;
using FrameLedger.Domain.Metrics;
using FrameLedger.Domain.Sessions;
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Services;
@@ -126,27 +128,86 @@ public static class Formats
};
/// <summary>
/// The upscaler as the UI states it, down <c>03_METRICS</c> §Upscaling's ladder: a name a HOOK produced outranks
/// everything and takes its measured preset; where no hook named one (<c>unknown</c>: a hook ran and saw nothing —
/// every NGX-direct DLSS title, since no NGX hook may exist — or no claim at all) and the NVIDIA driver reports the
/// feature created and evaluated in the process, the name is the driver's and SAYS so; otherwise what the token
/// says. The driver's word is identity only: it never takes a quality, even when a byte is on the row.
/// A session's upscaler with its quality mode, as every surface states it (beta.24, D63): the mode the NVIDIA App's
/// override set where the driver reports it applied in the game's process — marked as the App's —, else the mode the
/// game passed to a hooked call, else none (<see cref="QualityResolver"/>). The summary, the Sessions tab and the game
/// page call this one, so they resolve alike.
/// </summary>
public static string UpscalerOf(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
return UpscalerText(row.Upscaler, row.UpscalerDriverReported,
QualityResolver.Of(row.Upscaler, row.UpscalerQuality, row.UpscalerDriverReported, row.NgxDriverWordsJson, row.DriverProfileJson));
}
/// <summary>
/// The live card's: an override's mode travels as <c>upscalerQualityOverride</c>, from the driver's report alone (the
/// profile is the stored session's), so a mode that report cannot settle reads as the App's override with no mode.
/// </summary>
public static string UpscalerOf(SessionProgressEvent progress)
{
ArgumentNullException.ThrowIfNull(progress);
return UpscalerText(progress.Upscaler, progress.UpscalerDriverReported,
QualityResolver.FromToken(progress.UpscalerQualityOverride)
?? QualityResolver.Of(progress.Upscaler, progress.UpscalerQuality, progress.UpscalerDriverReported, ngxDriverWordsJson: null, driverProfileJson: null));
}
/// <summary>
/// The upscaler as the UI states it, down <c>03_METRICS</c> §Upscaling's ladder, from what the hooks saw alone — a
/// segment's, which carries no driver report. A name a HOOK produced outranks everything and takes its measured mode;
/// where no hook named one (<c>unknown</c>: a hook ran and saw nothing — every NGX-direct DLSS title, since no NGX hook
/// may exist — or no claim at all) and the NVIDIA driver reports the feature created and evaluated in the process, the
/// name is the driver's and SAYS so; otherwise what the token says.
/// </summary>
/// <remarks>
/// The row has stored <c>upscaler_driver_reported</c> since P2 and the capture host has printed it since 2026-09-06;
/// the App never read it, which is why DLSS read "Unknown upscaler" on most titles while FSR, whose dispatch the
/// hook does see, was named (owner's report, 2026-09-21).
/// hook does see, was named (owner's report, 2026-09-21). The driver's word alone is identity: a mode comes with it
/// only from an override the driver reports applied (<see cref="UpscalerOf(SessionRow)"/>).
/// </remarks>
public static string Upscaler(string? token, string? quality, string? driverReported)
public static string Upscaler(string? token, string? quality, string? driverReported) =>
UpscalerText(token, driverReported, QualityResolver.Of(token, quality, driverReported, ngxDriverWordsJson: null, driverProfileJson: null));
/// <summary>The name, then the mode when one is known, then "· NVIDIA App" when the App's override set it.</summary>
internal static string UpscalerText(string? token, string? driverReported, ResolvedQuality? resolved)
{
bool hookNamed = token is { Length: > 0 } and not "unknown";
if (!hookNamed && driverReported is { Length: > 0 })
string name = !hookNamed && driverReported is { Length: > 0 }
? string.Format(CultureInfo.CurrentCulture, Strings.Upscaler_DriverReported_Format, Upscaler(driverReported))
: Upscaler(token);
if (resolved is null)
{
return string.Format(CultureInfo.CurrentCulture, Strings.Upscaler_DriverReported_Format, Upscaler(driverReported));
return name;
}
string name = Upscaler(token);
return hookNamed && UpscalerNames.Quality(token, quality) is { } preset ? name + " " + preset : name;
string? mode = QualityName(resolved);
if (resolved.Source == QualitySource.NvidiaApp)
{
return mode is null
? string.Format(CultureInfo.CurrentCulture, Strings.Upscaler_Override_App_Format, name)
: string.Format(CultureInfo.CurrentCulture, Strings.Upscaler_Mode_App_Format, name, mode);
}
return mode is null ? name : string.Format(CultureInfo.CurrentCulture, Strings.Upscaler_Mode_Format, name, mode);
}
/// <summary>A resolved mode by the name its menu uses, in the reader's language; a hooked value no table names, as stored.</summary>
public static string? QualityName(ResolvedQuality resolved)
{
ArgumentNullException.ThrowIfNull(resolved);
return resolved.Mode switch
{
UpscalerQualityMode.Performance => Strings.Nv_Mode_Performance,
UpscalerQualityMode.Balanced => Strings.Nv_Mode_Balanced,
UpscalerQualityMode.Quality => Strings.Nv_Mode_Quality,
UpscalerQualityMode.UltraPerformance => Strings.Nv_Mode_UltraPerformance,
UpscalerQualityMode.UltraQuality => Strings.Nv_Mode_UltraQuality,
UpscalerQualityMode.Dlaa => Strings.Nv_Mode_Dlaa,
UpscalerQualityMode.Custom => resolved.CustomPercent is uint percent
? string.Format(CultureInfo.CurrentCulture, Strings.Nv_Mode_Custom_Format, percent)
: Strings.Nv_Mode_Custom,
_ => resolved.Stored,
};
}
/// <summary>The row's fg_mode token as its product name.</summary>
@@ -3,9 +3,9 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Text.Json;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Metrics;
using S = FrameLedger.Application.Capture.NvidiaDriverSettings;
namespace FrameLedger.App.Services;
@@ -163,16 +163,7 @@ public static class NvidiaOverrides
return null;
}
NgxDriverWords? words;
try
{
words = JsonSerializer.Deserialize(ngxDriverWordsJson, RecordingJsonContext.Default.NgxDriverWords);
}
catch (JsonException)
{
return null;
}
NgxDriverWords? words = NgxDriverWords.Parse(ngxDriverWordsJson);
if (words is null || !string.Equals(words.Outcome, nameof(NgxProbeOutcome.Answered), StringComparison.Ordinal))
{
return null;
@@ -191,7 +182,10 @@ public static class NvidiaOverrides
parts.Add(preset);
}
if ((sr & NgxOverrideFlags.PerfMode) != 0 && Mode(words.Mode, ratio: null) is { } mode)
// NGX's own numbering, not the profile's (beta.24: until then this read the report through Mode below, so a DLAA
// override's 5 printed "Ultra Performance" and Ultra Performance's 3 printed nothing).
if ((sr & NgxOverrideFlags.PerfMode) != 0 && UpscalerNames.FromDriverReport(words.Mode) is { } reported
&& Formats.QualityName(new ResolvedQuality(reported, QualitySource.NvidiaApp)) is { } mode)
{
parts.Add(mode);
}
@@ -8,6 +8,7 @@ using System.Text.Json;
using FrameLedger.App.Charts;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Metrics;
using FrameLedger.Domain.Sessions;
namespace FrameLedger.App.Services;
@@ -119,6 +120,9 @@ public sealed class SessionExporter
w.WriteLine("# game_memory: " + GameMemoryText.ExportLine(row));
w.WriteLine("# hardware: " + (hardware is null ? "N/A" : string.Join("; ", new[] { hardware.CpuName, hardware.GpuName, hardware.GpuDriver, hardware.OsBuild, hardware.DisplayRes }.Where(static s => !string.IsNullOrEmpty(s)))));
w.WriteLine("# rt: " + row.RtFlag + " (" + (row.RtSource ?? "n/a") + "); pt: " + row.PtFlag + " (" + (row.PtSource ?? "n/a") + "); rr: " + row.RrFlag + " (" + (row.RrSource ?? "n/a") + ")");
// 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));
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));
@@ -131,6 +135,24 @@ public sealed class SessionExporter
w.WriteLine("# note: one swapchain's presents, the stream the statistics are over; qpc_ms closes up every gap (frametime_ms 0)");
}
private static string QualityExport(SessionRow row)
{
ResolvedQuality? resolved = QualityResolver.Of(row.Upscaler, row.UpscalerQuality, row.UpscalerDriverReported, row.NgxDriverWordsJson, row.DriverProfileJson);
if (resolved is null)
{
return "N/A";
}
string source = resolved.Source == QualitySource.NvidiaApp ? "nvidia_app" : "game";
string mode = resolved.Mode switch
{
null => resolved.Stored is { } stored ? "stored " + stored : "not settled",
UpscalerQualityMode.Custom => resolved.CustomPercent is uint percent ? "custom " + percent.ToString(_inv) + "%" : "custom",
{ } named => QualityResolver.ModeToken(named) ?? named.ToString(),
};
return mode + " (" + source + ")";
}
private static SegmentRow? SegmentAt(SegmentRow[] byFrame, uint frameIndex)
{
SegmentRow? found = null;
+12
View File
@@ -727,6 +727,7 @@ public static class Strings
nameof(Nv_Mode_Performance),
nameof(Nv_Mode_Quality),
nameof(Nv_Mode_UltraPerformance),
nameof(Nv_Mode_UltraQuality),
nameof(Nv_Override_Fg),
nameof(Nv_Override_None),
nameof(Nv_Override_Rr),
@@ -1139,7 +1140,10 @@ public static class Strings
nameof(Update_Unsigned_Footer),
nameof(Update_UpToDate_Format),
nameof(Upscaler_DriverReported_Format),
nameof(Upscaler_Mode_App_Format),
nameof(Upscaler_Mode_Format),
nameof(Upscaler_None),
nameof(Upscaler_Override_App_Format),
nameof(Upscaler_Unknown),
nameof(Viewer_Banner_Body_Format),
nameof(Viewer_Banner_Title),
@@ -2542,6 +2546,8 @@ public static class Strings
public static string Nv_Mode_UltraPerformance => ResourceManager.GetString(nameof(Nv_Mode_UltraPerformance), Culture) ?? nameof(Nv_Mode_UltraPerformance);
public static string Nv_Mode_UltraQuality => ResourceManager.GetString(nameof(Nv_Mode_UltraQuality), Culture) ?? nameof(Nv_Mode_UltraQuality);
public static string Nv_Override_Fg => ResourceManager.GetString(nameof(Nv_Override_Fg), Culture) ?? nameof(Nv_Override_Fg);
public static string Nv_Override_None => ResourceManager.GetString(nameof(Nv_Override_None), Culture) ?? nameof(Nv_Override_None);
@@ -3366,8 +3372,14 @@ public static class Strings
public static string Upscaler_DriverReported_Format => ResourceManager.GetString(nameof(Upscaler_DriverReported_Format), Culture) ?? nameof(Upscaler_DriverReported_Format);
public static string Upscaler_Mode_App_Format => ResourceManager.GetString(nameof(Upscaler_Mode_App_Format), Culture) ?? nameof(Upscaler_Mode_App_Format);
public static string Upscaler_Mode_Format => ResourceManager.GetString(nameof(Upscaler_Mode_Format), Culture) ?? nameof(Upscaler_Mode_Format);
public static string Upscaler_None => ResourceManager.GetString(nameof(Upscaler_None), Culture) ?? nameof(Upscaler_None);
public static string Upscaler_Override_App_Format => ResourceManager.GetString(nameof(Upscaler_Override_App_Format), Culture) ?? nameof(Upscaler_Override_App_Format);
public static string Upscaler_Unknown => ResourceManager.GetString(nameof(Upscaler_Unknown), Culture) ?? nameof(Upscaler_Unknown);
public static string Viewer_Banner_Body_Format => ResourceManager.GetString(nameof(Viewer_Banner_Body_Format), Culture) ?? nameof(Viewer_Banner_Body_Format);
+16
View File
@@ -4493,4 +4493,20 @@
<value>×{0:0.0} · {1:0}%</value>
<comment>review</comment>
</data>
<data name="Upscaler_Mode_Format" xml:space="preserve">
<value>{0} {1}</value>
<comment>review</comment>
</data>
<data name="Upscaler_Mode_App_Format" xml:space="preserve">
<value>{0} {1} · NVIDIA App</value>
<comment>review</comment>
</data>
<data name="Upscaler_Override_App_Format" xml:space="preserve">
<value>{0} · NVIDIA App による上書き</value>
<comment>review</comment>
</data>
<data name="Nv_Mode_UltraQuality" xml:space="preserve">
<value>ウルトラ クオリティ</value>
<comment>review</comment>
</data>
</root>
+12
View File
@@ -3380,4 +3380,16 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Fps_Fg_Column_Steady_Format" xml:space="preserve">
<value>×{0:0.0} · {1:0}%</value>
</data>
<data name="Upscaler_Mode_Format" xml:space="preserve">
<value>{0} {1}</value>
</data>
<data name="Upscaler_Mode_App_Format" xml:space="preserve">
<value>{0} {1} · NVIDIA App</value>
</data>
<data name="Upscaler_Override_App_Format" xml:space="preserve">
<value>{0} · NVIDIA App override</value>
</data>
<data name="Nv_Mode_UltraQuality" xml:space="preserve">
<value>Ultra Quality</value>
</data>
</root>
+12
View File
@@ -3375,4 +3375,16 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
<data name="Fps_Fg_Column_Steady_Format" xml:space="preserve">
<value>×{0:0.0} · {1:0}%</value>
</data>
<data name="Upscaler_Mode_Format" xml:space="preserve">
<value>{0} {1}</value>
</data>
<data name="Upscaler_Mode_App_Format" xml:space="preserve">
<value>{0} {1} · NVIDIA App</value>
</data>
<data name="Upscaler_Override_App_Format" xml:space="preserve">
<value>{0} · ghi đè từ NVIDIA App</value>
</data>
<data name="Nv_Mode_UltraQuality" xml:space="preserve">
<value>Ultra Quality</value>
</data>
</root>
@@ -1252,7 +1252,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
}
MeasuredEmptyText = string.Empty;
string upscaler = Formats.Upscaler(lastHooked.Upscaler, lastHooked.UpscalerQuality, lastHooked.UpscalerDriverReported);
string upscaler = Formats.UpscalerOf(lastHooked);
Measured.Add(upscaler + " · " + Formats.Resolution(lastHooked.RenderW, lastHooked.RenderH, lastHooked.OutputW, lastHooked.OutputH));
Measured.Add(FpsPresentation.FrameGenerationLabel(FpsPresentation.FromRow(lastHooked), lastHooked.FgMode));
foreach (TriStateChipModel chip in Chips.Where(static c => !c.IsNotApplicable))
@@ -162,7 +162,7 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
ElapsedText = string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_Elapsed_Format, Formats.Duration(progress.ElapsedS));
Readout = FpsPresentation.FromProgress(progress);
ResolutionText = Formats.Resolution(progress.RenderW, progress.RenderH, progress.OutputW, progress.OutputH);
UpscalerText = Formats.Upscaler(progress.Upscaler, progress.UpscalerQuality, progress.UpscalerDriverReported);
UpscalerText = Formats.UpscalerOf(progress);
FgText = FpsPresentation.FrameGenerationLabel(Readout, progress.FgMode);
RtActive = progress.RtActive == true;
GpuTempText = progress.GpuTempC is double g ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_GpuTemp_Format, Math.Round(g)) : string.Empty;
@@ -38,7 +38,7 @@ public sealed class SessionItemViewModel
FpsTooltip = FpsPresentation.ColumnTooltip(row);
P1LowText = IsHooked ? Formats.Fps(row.P1LowFps) : Strings.Common_NotAvailable;
P01LowText = IsHooked ? Formats.Fps(row.P01LowFps) : Strings.Common_NotAvailable;
ResolutionText = IsHooked ? Formats.Resolution(row.RenderW, row.RenderH, row.OutputW, row.OutputH) + " · " + Formats.Upscaler(row.Upscaler, row.UpscalerQuality, row.UpscalerDriverReported) : Strings.Common_NotAvailable;
ResolutionText = IsHooked ? Formats.Resolution(row.RenderW, row.RenderH, row.OutputW, row.OutputH) + " · " + Formats.UpscalerOf(row) : Strings.Common_NotAvailable;
GpuTempText = Formats.Temperature(row.MaxGpuTemp);
// beta.12 (D43), both tiers: the game's own memory, median · peak, the rest in the tooltip.
IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats = Application.Recording.SensorSeriesStats.Parse(row.SensorStatsJson);
@@ -411,7 +411,7 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
Readout = FpsPresentation.FromRow(row);
Line = string.Format(CultureInfo.CurrentCulture, Strings.Summary_Line_Format,
IsHooked ? Formats.Api(row.Api) : Strings.Tier_NotHooked, row.PresentMode ?? Strings.Common_NotAvailable,
IsHooked ? Formats.Upscaler(row.Upscaler, row.UpscalerQuality, row.UpscalerDriverReported) : Strings.Common_NotAvailable, Formats.Resolution(row.RenderW, row.RenderH, row.OutputW, row.OutputH));
IsHooked ? Formats.UpscalerOf(row) : Strings.Common_NotAvailable, Formats.Resolution(row.RenderW, row.RenderH, row.OutputW, row.OutputH));
HardwareLine = _snapshot is null
? string.Empty
: string.Join(" · ", SystemInfoViewModel.Describe(_snapshot).Where(static l => !string.Equals(l.Value, Strings.Common_NotAvailable, StringComparison.Ordinal)).Select(static l => l.Value));
@@ -15,8 +15,11 @@ namespace FrameLedger.Application.Capture;
/// (CLAUDE.md rule 4) nor a static hint (<c>05_DETECTION</c>): the driver says a feature was created and
/// evaluated in this process, and this host repeats that with the attribution. What it may stand in for is
/// the super-resolution IDENTITY on a session where no hook saw an evaluation (<c>03_METRICS</c> §Upscaling,
/// the driver-reported rung, owner decision 2026-09-06). What it may not stand in for: a quality, a ratio, a
/// render size, a frame-generation mode or a multiplier — measured 2026-09-06 to be override fields or blind.
/// the driver-reported rung, owner decision 2026-09-06). What it may not stand in for: a ratio, a render size,
/// a frame-generation mode or a multiplier — measured 2026-09-06 to be override fields or blind. Nor a quality the
/// GAME chose; but since beta.24 (owner decision D63) the mode an NVIDIA App override set, when the report says the
/// override applied in this process, is the session's quality mode, marked as the App's
/// (<c>Recording.QualityResolver</c>).
/// </para>
/// <para>
/// The last ANSWERED reading is the state; <see cref="Readings"/> counts probe runs, <see cref="Answered"/> the
@@ -66,6 +66,10 @@ public static class SessionProgressCalculator
Upscaler = upscaler is { } u ? Vocabulary.Upscaler(u) : FgLadder.UpscalerHookRan(progress.Records) ? "unknown" : null,
UpscalerQuality = Modal([.. withParams.Where(static s => s.UpscalerQuality != FrameSample.QualityNotTold)])?.ToString(CultureInfo.InvariantCulture),
UpscalerDriverReported = progress.NgxDriver.SrCreatedAndEvaluated ? "dlss" : null,
UpscalerQualityOverride = QualityResolver.Token(QualityResolver.Live(
upscaler == FlUpscaler.Dlss || (upscaler is null && progress.NgxDriver.SrCreatedAndEvaluated),
progress.NgxDriver.Outcome == NgxProbeOutcome.Answered ? progress.NgxDriver.Sr : 0,
progress.NgxDriver.PerformanceMode)),
RenderW = extent?.RenderW,
RenderH = extent?.RenderH,
OutputW = extent?.OutputW,
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Text.Json;
namespace FrameLedger.Application.Recording;
/// <summary>What <c>sessions.ngx_driver_words</c> stores: the driver's raw words as probed, plus how the probing went.</summary>
@@ -22,7 +24,11 @@ public sealed record NgxDriverWords
/// <summary>The scaling ratio the driver reports for super resolution.</summary>
public float? Ratio { get; init; }
/// <summary>The performance mode the driver reports (<c>NGX_DLSS_SR_MODE</c>'s numbering when an override set it).</summary>
/// <summary>
/// The performance mode the driver reports, in NGX's own numbering (0 Performance … 3 Ultra Performance, 5 DLAA —
/// <c>UpscalerNames.FromDriverReport</c>), filled when an override set it. This said <c>NGX_DLSS_SR_MODE</c>'s numbering
/// until beta.24: Silent Hill 2 under the NVIDIA App's Ultra Performance (profile value 5) was reported as 3.
/// </summary>
public uint? Mode { get; init; }
/// <summary>The render preset for super resolution / ray reconstruction (1 = A … 15 = O).</summary>
@@ -44,4 +50,22 @@ public sealed record NgxDriverWords
public bool Changed { get; init; }
public string? Detail { get; init; }
/// <summary>The column read back; null for NULL and for a value this build cannot read.</summary>
public static NgxDriverWords? Parse(string? json)
{
if (string.IsNullOrWhiteSpace(json))
{
return null;
}
try
{
return JsonSerializer.Deserialize(json, RecordingJsonContext.Default.NgxDriverWords);
}
catch (JsonException)
{
return null;
}
}
}
@@ -0,0 +1,140 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using FrameLedger.Application.Capture;
using FrameLedger.Domain.Metrics;
using S = FrameLedger.Application.Capture.NvidiaDriverSettings;
namespace FrameLedger.Application.Recording;
/// <summary>
/// Which quality mode a session ran DLSS at, and on whose authority (beta.24, owner decision D63; <c>03_METRICS</c>
/// §Upscaling). Read at display time from what every session already stores, so a session recorded before reads alike.
/// </summary>
/// <remarks>
/// <para>
/// <b>The NVIDIA App's override is the standard — when the driver confirms it applied.</b> The override is configuration
/// until the driver's per-process report (<c>ngx_driver_words</c>) says it took effect in the game's process: the
/// override ENABLED and its mode, DLAA or ratio bit set, on a session where DLSS super resolution itself ran (a hook named
/// it, or the driver reports the feature created and evaluated). The mode is then the profile's (<c>NGX_DLSS_SR_MODE</c>,
/// documented), checked against the driver's own report where both say something. When they disagree, or the report
/// alone carries a value its numbering does not settle, the session reads as overridden with no mode — never the game's
/// own value, which the override replaced.
/// </para>
/// <para>
/// <b>Otherwise the mode the game passed to a hooked call</b> (the Streamline byte, <see cref="UpscalerNames.Mode"/>; a
/// value no table names is kept as stored), and otherwise none. Nothing here infers a mode from the render scale
/// (<c>HANDOFF</c> §7a).
/// </para>
/// </remarks>
public static class QualityResolver
{
/// <summary>The live card's token for an override whose mode the driver's report alone does not settle.</summary>
public const string OverrideToken = "override";
/// <summary>A stored session's mode, or null when none is known.</summary>
/// <param name="upscaler">The row's upscaler token (what a hook named).</param>
/// <param name="quality">The row's hooked quality byte.</param>
/// <param name="driverReported">The row's driver-reported upscaler (<c>dlss</c> when the driver saw the feature run).</param>
/// <param name="ngxDriverWordsJson">The row's <c>ngx_driver_words</c>.</param>
/// <param name="driverProfileJson">The row's <c>driver_profile</c>.</param>
public static ResolvedQuality? Of(string? upscaler, string? quality, string? driverReported, string? ngxDriverWordsJson, string? driverProfileJson)
{
bool hookNamed = upscaler is { Length: > 0 } and not "unknown";
NgxDriverWords? words = NgxDriverWords.Parse(ngxDriverWordsJson);
if (DlssRan(upscaler, driverReported) && words is { Outcome: nameof(NgxProbeOutcome.Answered) } && Applied(Mask(words.Sr)))
{
return Override(Mask(words.Sr), words.Mode, DriverProfileRecord.Parse(driverProfileJson));
}
if (!hookNamed || string.IsNullOrWhiteSpace(quality))
{
return null;
}
return UpscalerNames.Mode(upscaler, quality) is { } mode
? new ResolvedQuality(mode, QualitySource.Game)
: new ResolvedQuality(null, QualitySource.Game, Stored: quality);
}
/// <summary>
/// The live card's override from the driver's report alone — the profile is read once per session by the recorder and
/// does not travel with a progress event — so it names what the report settles by itself and marks the rest as an
/// override with no mode until the stored session resolves it. Null unless DLSS ran and the override applied.
/// </summary>
public static ResolvedQuality? Live(bool dlssRan, ulong srMask, uint performanceMode) =>
dlssRan && Applied(srMask) ? Override(srMask, performanceMode, profile: null) : null;
/// <summary>
/// The wire token for an override (<c>SessionProgressEvent.UpscalerQualityOverride</c>): the mode's, or
/// <see cref="OverrideToken"/> when its mode is not settled; null for no override.
/// </summary>
public static string? Token(ResolvedQuality? resolved) =>
resolved is { Source: QualitySource.NvidiaApp } ? ModeToken(resolved.Mode) ?? OverrideToken : null;
/// <summary>A mode's invariant token — the wire's and the export's —, or null for none.</summary>
public static string? ModeToken(UpscalerQualityMode? mode) => mode switch
{
UpscalerQualityMode.Performance => "performance",
UpscalerQualityMode.Balanced => "balanced",
UpscalerQualityMode.Quality => "quality",
UpscalerQualityMode.UltraPerformance => "ultra_performance",
UpscalerQualityMode.UltraQuality => "ultra_quality",
UpscalerQualityMode.Dlaa => "dlaa",
UpscalerQualityMode.Custom => "custom",
_ => null,
};
/// <summary>A wire token back as the override it names; null for none and for a token this build does not know.</summary>
public static ResolvedQuality? FromToken(string? token)
{
UpscalerQualityMode? mode = token switch
{
"performance" => UpscalerQualityMode.Performance,
"balanced" => UpscalerQualityMode.Balanced,
"quality" => UpscalerQualityMode.Quality,
"ultra_performance" => UpscalerQualityMode.UltraPerformance,
"ultra_quality" => UpscalerQualityMode.UltraQuality,
"dlaa" => UpscalerQualityMode.Dlaa,
"custom" => UpscalerQualityMode.Custom,
_ => null,
};
return mode is not null || string.Equals(token, OverrideToken, StringComparison.Ordinal) ? new ResolvedQuality(mode, QualitySource.NvidiaApp) : null;
}
/// <summary>DLSS super resolution ran in the session: a hook named it, or — where no hook named anything — the driver saw it.</summary>
private static bool DlssRan(string? upscaler, string? driverReported) => upscaler is { Length: > 0 } and not "unknown"
? string.Equals(upscaler, "dlss", StringComparison.Ordinal)
: string.Equals(driverReported, "dlss", StringComparison.Ordinal);
/// <summary>The driver says the override is on in this process and set the mode (or DLAA, or a ratio) there.</summary>
private static bool Applied(ulong sr) =>
(sr & NgxOverrideFlags.Enabled) != 0 && (sr & (NgxOverrideFlags.PerfMode | NgxOverrideFlags.SrDlaaMode | NgxOverrideFlags.ScalingRatio)) != 0;
private static ResolvedQuality Override(ulong sr, uint? reported, DriverProfileRecord? profile)
{
if ((sr & NgxOverrideFlags.SrDlaaMode) != 0)
{
return new ResolvedQuality(UpscalerQualityMode.Dlaa, QualitySource.NvidiaApp);
}
UpscalerQualityMode? fromReport = (sr & NgxOverrideFlags.PerfMode) != 0 ? UpscalerNames.FromDriverReport(reported) : null;
UpscalerQualityMode? fromProfile = profile is not null && IsRead(profile) ? UpscalerNames.FromProfile(profile.ValueOf(S.DlssSrMode)) : null;
if (fromProfile == UpscalerQualityMode.Custom)
{
uint? ratio = profile!.ValueOf(S.DlssSrScalingRatio);
return new ResolvedQuality(UpscalerQualityMode.Custom, QualitySource.NvidiaApp, ratio is >= 33 and <= 100 ? ratio : null);
}
// Two NVIDIA sources that disagree about one setting: the override stands, its mode is not shown.
UpscalerQualityMode? mode = fromProfile is not null && fromReport is not null && fromProfile != fromReport ? null : fromProfile ?? fromReport;
return new ResolvedQuality(mode, QualitySource.NvidiaApp);
}
private static bool IsRead(DriverProfileRecord profile) =>
profile.Outcome is nameof(DriverProfileOutcome.Application) or nameof(DriverProfileOutcome.Global);
private static ulong Mask(string? hex) =>
hex is { Length: > 2 } && ulong.TryParse(hex.AsSpan(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out ulong value) ? value : 0;
}
@@ -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.Application.Recording;
/// <summary>Where a session's quality mode came from (beta.24, D63).</summary>
public enum QualitySource
{
/// <summary>Nobody named a source. The zero value, so a default is not a claim.</summary>
None = 0,
/// <summary>The mode the game passed to a hooked call.</summary>
Game = 1,
/// <summary>The NVIDIA App's override, which the driver reported applied in the game's process.</summary>
NvidiaApp = 2,
}
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Domain.Metrics;
namespace FrameLedger.Application.Recording;
/// <summary>A session's quality mode as <see cref="QualityResolver"/> settled it (beta.24, D63).</summary>
/// <param name="Mode">The mode, by its menu name; null only for a hooked value no table names (<paramref name="Stored"/>).</param>
/// <param name="Source">Whose it is: the game's own call, or the NVIDIA App's override the driver confirmed.</param>
/// <param name="CustomPercent">An override's custom render-scale percentage (33–100), when it set one.</param>
/// <param name="Stored">A hooked value no table names, as stored: still what was measured, so it is shown as it is.</param>
public sealed record ResolvedQuality(UpscalerQualityMode? Mode, QualitySource Source, uint? CustomPercent = null, string? Stored = null);
+55 -28
View File
@@ -4,54 +4,81 @@
namespace FrameLedger.Domain.Metrics;
/// <summary>
/// The vendor's own quality value as the name the vendor's menu uses (<c>03_METRICS</c> §Upscaling promised this type
/// from the start; until 2026-09-21 the UI printed the raw integer beside the upscaler).
/// The vendors' own quality values as modes (<c>03_METRICS</c> §Upscaling promised this type from the start; until
/// 2026-09-21 the UI printed the raw integer beside the upscaler). Three numberings reach this build, one table each:
/// the hooked byte (Streamline's <c>sl::DLSSMode</c>), the NVIDIA driver's per-process report (NGX's own
/// <c>PerfQuality</c> values) and the NVIDIA App's override as the driver profile stores it (<c>NGX_DLSS_SR_MODE</c>).
/// </summary>
/// <remarks>
/// <para>
/// <b>One producer exists, so one table exists.</b> The only writer of <c>upscalerQuality</c> is the Streamline route:
/// <c>sl::DLSSMode</c> as the title chained it into <c>slEvaluateFeature</c> (<c>fl_sl_inputs.h</c>
/// <c>QualityFromMode</c>), where <c>eOff</c> and anything at or past <c>eCount</c> are already folded to "not told" and
/// never reach a row. The ffx-api dispatch carries no quality mode, and XeSS has no hook, so their bytes are always
/// "not told" and no table for them would have a row to name.
/// <b>The hooked byte.</b> Its only writer is the Streamline route: <c>sl::DLSSMode</c> as the title chained it into
/// <c>slEvaluateFeature</c> (<c>fl_sl_inputs.h</c> <c>QualityFromMode</c>), where <c>eOff</c> and anything at or past
/// <c>eCount</c> are already folded to "not told" and never reach a row. A value this table does not know is not named —
/// the App prints the stored number, because a number nobody can name is still what was measured.
/// </para>
/// <para>
/// A value this table does not know is returned as it is stored: a number nobody can name is still what was measured,
/// and dropping it would turn a newer SDK's preset into "nothing was told".
/// <b>The two NVIDIA numberings disagree from 3 up</b>, which is why each has its own table and neither is read through
/// the other (beta.24, D63). Measured on the owner's ledger: Silent Hill 2 under the App's <i>Ultra Performance</i>
/// (profile value 5) was reported by the driver as 3 — NGX's numbering, not the profile's, where 3 is "the game's own".
/// </para>
/// <para>
/// This is the MEASURED byte. A label derived from the render/output ratio is a different thing and an owner decision
/// not taken (<c>HANDOFF</c> §7a); nothing here infers.
/// This decodes what was stored. A label derived from the render/output ratio is a different thing and an owner
/// decision not taken (<c>HANDOFF</c> §7a); nothing here infers.
/// </para>
/// </remarks>
public static class UpscalerNames
{
/// <summary>
/// The preset's name, the stored value when it has none, or null when the row stores no quality at all.
/// </summary>
/// <summary>The hooked byte as a mode, or null when the row stores none or a value this table does not know.</summary>
/// <param name="upscaler">The row's upscaler token (<c>dlss</c>, <c>fsr3</c>, …).</param>
/// <param name="quality">The row's quality value: the vendor's integer, invariant.</param>
public static string? Quality(string? upscaler, string? quality)
public static UpscalerQualityMode? Mode(string? upscaler, string? quality)
{
if (string.IsNullOrWhiteSpace(quality))
if (string.IsNullOrWhiteSpace(quality) || !string.Equals(upscaler, "dlss", StringComparison.Ordinal))
{
return null;
}
if (!string.Equals(upscaler, "dlss", StringComparison.Ordinal))
{
return quality;
}
return quality switch
{
"1" => "Performance",
"2" => "Balanced",
"3" => "Quality",
"4" => "Ultra Performance",
"5" => "Ultra Quality",
"6" => "DLAA",
_ => quality,
"1" => UpscalerQualityMode.Performance,
"2" => UpscalerQualityMode.Balanced,
"3" => UpscalerQualityMode.Quality,
"4" => UpscalerQualityMode.UltraPerformance,
"5" => UpscalerQualityMode.UltraQuality,
"6" => UpscalerQualityMode.Dlaa,
_ => null,
};
}
/// <summary>
/// The NVIDIA driver's per-process report (<c>NvAPI_NGX_GetNGXOverrideState</c>'s <c>performanceMode</c>) in NGX's own
/// numbering: 0 Performance, 1 Balanced, 2 Quality, 3 Ultra Performance, 4 Ultra Quality, 5 DLAA. 0–2 agree with the
/// profile's numbering and 3 is measured (the remarks above); 4 and 5 are NGX's documented values, not yet measured.
/// </summary>
public static UpscalerQualityMode? FromDriverReport(uint? performanceMode) => performanceMode switch
{
0 => UpscalerQualityMode.Performance,
1 => UpscalerQualityMode.Balanced,
2 => UpscalerQualityMode.Quality,
3 => UpscalerQualityMode.UltraPerformance,
4 => UpscalerQualityMode.UltraQuality,
5 => UpscalerQualityMode.Dlaa,
_ => null,
};
/// <summary>
/// The NVIDIA App's Super Resolution Mode as the driver profile stores it (<c>NGX_DLSS_SR_MODE</c>, NVIDIA's
/// <c>NvApiDriverSettings.h</c>): 0 Performance, 1 Balanced, 2 Quality, 4 DLAA, 5 Ultra Performance, 6 a custom ratio;
/// 3 is "the game's own" — no override — and is null, as is anything else.
/// </summary>
public static UpscalerQualityMode? FromProfile(uint? srMode) => srMode switch
{
0 => UpscalerQualityMode.Performance,
1 => UpscalerQualityMode.Balanced,
2 => UpscalerQualityMode.Quality,
4 => UpscalerQualityMode.Dlaa,
5 => UpscalerQualityMode.UltraPerformance,
6 => UpscalerQualityMode.Custom,
_ => null,
};
}
@@ -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.Domain.Metrics;
/// <summary>
/// An upscaler's quality mode by the name its menu gives it (beta.24, owner decision D63): the mode a hooked call carried
/// and the mode an NVIDIA App override set are the same names, so every surface says a mode alike whoever chose it. Each
/// source numbers them its own way, and <see cref="UpscalerNames"/> decodes each where it is read.
/// </summary>
/// <remarks>A mode nobody decoded is a null; the zero member exists so a default is not a claim, never Performance.</remarks>
public enum UpscalerQualityMode
{
/// <summary>Nobody named a mode. The zero value, so a default is not a claim; never stored or shown.</summary>
None = 0,
Performance = 1,
Balanced = 2,
Quality = 3,
UltraPerformance = 4,
UltraQuality = 5,
Dlaa = 6,
/// <summary>An override's custom render-scale ratio; its percentage travels beside it.</summary>
Custom = 7,
}
@@ -260,6 +260,14 @@ public sealed record SessionProgressEvent
/// </summary>
public string? UpscalerDriverReported { get; init; }
/// <summary>
/// The quality mode an NVIDIA App override set, when the driver reports it applied in the target and DLSS super
/// resolution ran there (beta.24, D63): <c>performance</c>, <c>balanced</c>, <c>quality</c>, <c>ultra_performance</c>,
/// <c>ultra_quality</c> or <c>dlaa</c>. From the driver's report alone — the profile is the stored session's — so a
/// value the report cannot settle is absent here and named by the summary. An older client ignores it (<c>07_IPC</c> §C).
/// </summary>
public string? UpscalerQualityOverride { get; init; }
public int? RenderW { get; init; }
public int? RenderH { get; init; }
@@ -94,8 +94,9 @@ struct ScanResult {
// The vendor's own DLSSMode value, or 0xFF for "a hook ran and could not
// tell". NEVER 0: fl_shm.h has no in-band "not measured" for
// upscalerQuality, so 0 would publish DLSSMode::eMaxPerformance -- "DLSS
// Performance" -- as a measurement.
// upscalerQuality, and 0 is DLSSMode::eOff -- "DLSS is off", not a quality
// -- so 0 would publish a mode nobody measured. (Until beta.24 this said 0
// was eMaxPerformance; that is 1 in the numbering this byte carries.)
uint8_t quality = 0xFFu;
bool qualityFound = false;
};
@@ -2779,9 +2779,11 @@ void RecordPresent(IDXGISwapChain* sc, UINT syncInterval, UINT flags) noexcept {
rec.renderH = static_cast<uint16_t>((tag >> 16) & 0xFFFFu);
// 0xFF, NEVER 0, and for two different reasons that land on the same
// byte. upscalerQuality has no in-band "not measured" sentinel -- 0 is
// NGX MaxPerf, a real preset -- so 0 here would publish "DLSS
// Performance" as a measurement (fl_shm.h §FL_MEASURED_UPSCALER_PARAMS).
// byte. upscalerQuality has no in-band "not measured" sentinel, and 0
// in the numbering it carries (sl::DLSSMode) is eOff -- not a quality --
// so 0 here would publish a mode nobody measured (fl_shm.h
// §FL_MEASURED_UPSCALER_PARAMS). Until beta.24 this said "NGX MaxPerf":
// NGX's own numbering, which this byte does not use.
// 0xFF is the defined "a hook ran and could not tell", and it stays
// the value for the many titles that set the preset out of band
// through slDLSSSetOptions and never pass sl::DLSSOptions to us.
+3 -1
View File
@@ -552,7 +552,9 @@ enum FlMeasured : uint16_t {
// exports only the parameter-object FACTORIES -- so a writer hooking
// CreateFeature/EvaluateFeature knows WHICH upscaler ran and nothing about
// quality, sharpness or render size. One bit for both published
// upscalerQuality = 0 -- NGX MaxPerf, "DLSS Performance" -- as a measurement.
// upscalerQuality = 0 as a measurement -- in the byte's numbering
// (sl::DLSSMode) 0 is eOff, not a quality; "NGX MaxPerf" until beta.24 named
// NGX's own numbering, which the byte does not use.
FL_MEASURED_UPSCALER_PARAMS = 1u << 8,
// syncInterval + presentFlags.
+3 -2
View File
@@ -4664,8 +4664,9 @@ TEST_CASE("the injected Overlay measures an upscaler it can identify", "[guard][
++claimedParams;
// THE HONESTY INVARIANT, checked on every record that claims the bit
// rather than once at the end. fl_shm.h has no in-band "not measured"
// for upscalerQuality -- 0 is NGX MaxPerf, a real preset -- so 0 here
// would publish "DLSS Performance" as a measurement. Sharpness is
// for upscalerQuality -- 0 is sl::DLSSMode::eOff, not a quality (it
// said "NGX MaxPerf" until beta.24) -- so 0 here would publish a mode
// nobody measured. Sharpness is
// 0xFF permanently: DLSSOptions::sharpness is deprecated as
// unsupported, so there is no in-policy route to what a title applied.
if (r.upscalerQuality == 0u || r.upscalerSharpness != 0xFFu) {
+2 -1
View File
@@ -1905,7 +1905,8 @@ bool ProbeSlInputs() {
// THE COLLISION THIS MAPPING EXISTS FOR. DLSSMode::eOff is 0, and
// upscalerQuality reserves 0 for "nobody looked" -- so a verbatim copy
// would make "the title turned DLSS off" indistinguishable from an
// unhooked writer, and 0 would decode as NGX MaxPerf, "DLSS Performance".
// unhooked writer. (Until beta.24 this added that 0 would decode as NGX
// MaxPerf: NGX's own numbering, which this byte does not use.)
sl::DLSSOptions off;
off.mode = sl::DLSSMode::eOff;
const sl::BaseStructure* one[] = {&off};
@@ -71,6 +71,61 @@ public sealed class FormatsTests
InEnglish(() => Formats.Upscaler(null, null, null)).Should().Be("N/A");
}
/// <summary>
/// D63 (beta.24): a session's mode on every surface — the NVIDIA App's override where the driver reports it applied,
/// marked as the App's; the game's own hooked mode otherwise; an override whose mode is not settled says so and never
/// shows the game's value instead. The driver words are the owner's Expedition 33 session's (2026-09-06).
/// </summary>
[Fact]
public void ASessionsModeIsTheNvidiaAppsWhereTheDriverConfirmsItsOverride()
{
const string quality = "{\"Outcome\":\"Answered\",\"Sr\":\"0x8067F\",\"Mode\":2,\"Preset\":11,\"Readings\":3,\"Answered\":3}";
const string disagreeing = "{\"Outcome\":\"Answered\",\"Sr\":\"0x8067F\",\"Mode\":0,\"Readings\":3,\"Answered\":3}";
string profile = Application.Recording.DriverProfileRecord.Serialize(new Application.Capture.DriverProfileReading
{
Outcome = Application.Capture.DriverProfileOutcome.Application,
ProfileName = "Clair Obscur: Expedition 33",
Settings = [new Application.Capture.DriverSettingReading(Application.Capture.NvidiaDriverSettings.DlssSrMode, 2, Application.Capture.DriverSettingLocation.Profile, false)],
})!;
InEnglish(() => Formats.UpscalerOf(Row("unknown", null, "dlss", quality, profile))).Should().Be("DLSS (driver-reported) Quality · NVIDIA App");
InEnglish(() => Formats.UpscalerOf(Row("dlss", "1", null, quality, null))).Should().Be("DLSS Quality · NVIDIA App", "the override replaces what the game passed");
InEnglish(() => Formats.UpscalerOf(Row("unknown", null, "dlss", disagreeing, profile))).Should().Be("DLSS (driver-reported) · NVIDIA App override", "two NVIDIA sources disagree: no mode");
InEnglish(() => Formats.UpscalerOf(Row("dlss", "3", null, null, null))).Should().Be("DLSS Quality", "no override: the game's own");
InEnglish(() => Formats.UpscalerOf(Row("dlss", "9", null, null, null))).Should().Be("DLSS 9");
InEnglish(() => Formats.UpscalerOf(Row("unknown", null, null, quality, profile))).Should().Be("Upscaler not identified", "the driver never saw super resolution run");
InEnglish(() => Formats.UpscalerOf(new Shared.Ipc.SessionProgressEvent { SessionGuid = Guid.Empty, Presents5s = 500, ElapsedS = 5, PresentedQualifier = "census_not_run", FgMode = "na", Upscaler = "unknown", UpscalerDriverReported = "dlss", UpscalerQualityOverride = "dlaa" }))
.Should().Be("DLSS (driver-reported) DLAA · NVIDIA App");
InEnglish(() => Formats.UpscalerOf(new Shared.Ipc.SessionProgressEvent { SessionGuid = Guid.Empty, Presents5s = 500, ElapsedS = 5, PresentedQualifier = "census_not_run", FgMode = "na", Upscaler = "dlss", UpscalerQuality = "2", UpscalerQualityOverride = "override" }))
.Should().Be("DLSS · NVIDIA App override", "live, an override the report alone cannot settle");
InEnglish(() => Formats.UpscalerOf(new Shared.Ipc.SessionProgressEvent { SessionGuid = Guid.Empty, Presents5s = 500, ElapsedS = 5, PresentedQualifier = "census_not_run", FgMode = "na", Upscaler = "dlss", UpscalerQuality = "2" }))
.Should().Be("DLSS Balanced");
InEnglish(() => Formats.QualityName(new Application.Recording.ResolvedQuality(Domain.Metrics.UpscalerQualityMode.Custom, Application.Recording.QualitySource.NvidiaApp, 77)))
.Should().Be("custom 77%");
InEnglish(() => Formats.QualityName(new Application.Recording.ResolvedQuality(Domain.Metrics.UpscalerQualityMode.UltraQuality, Application.Recording.QualitySource.Game)))
.Should().Be("Ultra Quality");
}
private static Application.Persistence.SessionRow Row(string? upscaler, string? quality, string? driverReported, string? words, string? profile) => new()
{
SessionGuid = Guid.NewGuid(),
GameId = 1,
SnapshotId = 1,
StartedAt = DateTimeOffset.UnixEpoch,
EndedAt = DateTimeOffset.UnixEpoch.AddMinutes(5),
QpcEpoch = 0,
QpcFrequency = 1,
Tier = Domain.Sessions.CaptureTier.Hooked,
Mode = Domain.Sessions.CaptureMode.Launch,
ExitStatus = Domain.Sessions.ExitStatus.Normal,
Upscaler = upscaler,
UpscalerQuality = quality,
UpscalerDriverReported = driverReported,
NgxDriverWordsJson = words,
DriverProfileJson = profile,
};
[Fact]
public void ResolutionsUpscalersAndFrameGeneration()
{
@@ -93,6 +93,20 @@ public sealed class NvidiaOverridesTests
return 0;
});
/// <summary>
/// The driver reports its mode in NGX's own numbering, not the profile's (beta.24): the owner's Silent Hill 2 session of
/// 2026-10-13 ran under the NVIDIA App's Ultra Performance — profile value 5 — and the driver reported 3. Read through the
/// profile's table, 3 said nothing and a DLAA override's 5 would have printed "Ultra Performance".
/// </summary>
[Fact]
public void TheDriversModeIsReadInNgxsNumbering() => InEnglish(() =>
{
const string silentHill2 = "{\"Outcome\":\"Answered\",\"Sr\":\"0x8007F\",\"Rr\":\"0x0\",\"Fg\":\"0xA03F\",\"Mode\":3,\"Preset\":12,\"FgCount\":5,\"Readings\":3,\"Answered\":3}";
NvidiaOverrides.DriverLine(silentHill2).Should().Be("NVIDIA driver, for this game's process: DLSS DLL chosen by the driver · preset L · Ultra Performance · Frame Generation override (×6)");
NvidiaOverrides.DriverLine(silentHill2.Replace("\"Mode\":3", "\"Mode\":5", StringComparison.Ordinal)).Should().Contain("DLAA").And.NotContain("Ultra Performance");
return 0;
});
[Theory]
[InlineData(1u, "preset A")]
[InlineData(15u, "preset O")]
@@ -78,6 +78,7 @@ public sealed class SessionExporterTests
lines.Should().Contain("# game_memory: vram_dedicated_mb avg=1000 median=1024 max=2048; vram_shared_mb max=N/A; ram_private_ws_mb avg=N/A median=N/A max=N/A; ram_ws_mb max=N/A; commit_mb max=N/A; processes=1; source=counters",
"a Tier-2 session has the game's memory too (beta.12): a header line, the session's figure, never a per-frame column");
lines.Should().Contain("# fg_mix: N/A", "beta.24: a session with no stored mix says so");
lines.Should().Contain("# quality_mode: N/A", "beta.24 (D63): no mode was known");
SessionExportDocument doc = SessionExporter.Document(row, game, null, [], await s.Annotations.FindAsync(id, Ct));
using var stream = new MemoryStream();
@@ -53,6 +53,25 @@ public sealed class SessionProgressCalculatorTests
.UpscalerDriverReported.Should().BeNull("no probe ran: AMD, Intel, or no bridge beside the Agent");
}
/// <summary>D63 (beta.24): the live card names an NVIDIA App override's mode when the driver's report alone settles it.</summary>
[Fact]
public void AnOverridesModeTravelsToTheLiveCardWhenTheDriverReportsItApplied()
{
List<FlFrameRecord> records = SessionFixtures.Stream(1000, FlMeasured.OutputRes | FlMeasured.PresentArgs);
NgxDriverState ultraPerformance = NgxDriverState.Parse("NGXSTATE status=ANSWERED sr=0x8067F rr=0x1 fg=0x5 ratio=0.0000 mode=3 preset=12 fgcount=0 fgpreset=0 fgmode=0 driver=61664");
NgxDriverState noOverride = NgxDriverState.Parse("NGXSTATE status=ANSWERED sr=0x60F rr=0x1 fg=0x5 ratio=0.0000 mode=0 preset=0 fgcount=0 fgpreset=0 fgmode=0 driver=61664");
NgxDriverState notSeenRunning = NgxDriverState.Parse("NGXSTATE status=ANSWERED sr=0x8007F rr=0x1 fg=0x5 ratio=0.0000 mode=3 preset=12 fgcount=0 fgpreset=0 fgmode=0 driver=61664");
SessionProgressCalculator.Compute(_guid, Progress(records) with { NgxDriver = ultraPerformance }, SessionFixtures.QpcFrequency, 12.5, gpu: null)
.UpscalerQualityOverride.Should().Be("ultra_performance", "the override applied and the driver saw super resolution run");
SessionProgressCalculator.Compute(_guid, Progress(records) with { NgxDriver = noOverride }, SessionFixtures.QpcFrequency, 12.5, gpu: null)
.UpscalerQualityOverride.Should().BeNull("no override bit");
SessionProgressCalculator.Compute(_guid, Progress(records) with { NgxDriver = notSeenRunning }, SessionFixtures.QpcFrequency, 12.5, gpu: null)
.UpscalerQualityOverride.Should().BeNull("an override on a feature nobody saw run");
SessionProgressCalculator.Compute(_guid, Progress(records), SessionFixtures.QpcFrequency, 12.5, gpu: null)
.UpscalerQualityOverride.Should().BeNull("no probe ran");
}
[Fact]
public void TheMachinesLatestReadingIsOnTheLiveCardAndAbsentWhenNothingReadIt()
{
@@ -58,8 +58,9 @@ public sealed class MetricEnumMirrorTests
// A new enum in Domain.Metrics that mirrors nothing is fine; one that mirrors a Shared enum and is
// not in the table above would be a mirror nobody checks. Enumerate Domain.Metrics' enums and
// require each to be either paired or explicitly local.
// FgMixKind (beta.24, D62): a row of the stored mix — Domain's own, read by no native code.
string[] local = [nameof(Tri), nameof(FgRefusalKind), nameof(FgRefusalSubject), nameof(FgMixKind)];
// FgMixKind (beta.24, D62): a row of the stored mix; UpscalerQualityMode (beta.24, D63): a mode by its menu name —
// both Domain's own, read by no native code.
string[] local = [nameof(Tri), nameof(FgRefusalKind), nameof(FgRefusalSubject), nameof(FgMixKind), nameof(UpscalerQualityMode)];
IEnumerable<string> enums = typeof(FrameSample).Assembly.GetTypes()
.Where(t => t.IsEnum && string.Equals(t.Namespace, typeof(FrameSample).Namespace, StringComparison.Ordinal))
.Select(t => t.Name);
@@ -0,0 +1,137 @@
// 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;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Metrics;
using S = FrameLedger.Application.Capture.NvidiaDriverSettings;
namespace FrameLedger.Application.Tests.Recording;
/// <summary>
/// D63 (beta.24): the NVIDIA App's override is a session's quality mode when the driver reports it applied in the game's
/// process; otherwise the mode the game passed to a hooked call; otherwise none. The fixtures are the driver's words and
/// profile as the owner's ledger stored them (Silent Hill 2, 2026-10-13; Expedition 33, 2026-09-06).
/// </summary>
public sealed class QualityResolverTests
{
// INITIALIZED | ENABLED | DLL_EXISTS | DLL_LOADED | DLL_SELECTED | PRESET | PERF_MODE, and bit 19 — as stored.
private const string _silentHill2Sr = "0x8007F";
// The same with CREATED | EVALUATE: the super-resolution feature ran (Expedition 33's word).
private const string _expeditionSr = "0x8067F";
// CREATED | EVALUATE and no override bit: the game's own DLSS.
private const string _plainSr = "0x60F";
private static string Words(string sr, uint? mode, string outcome = "Answered") =>
"{\"Outcome\":\"" + outcome + "\",\"Sr\":\"" + sr + "\",\"Rr\":\"0x0\",\"Fg\":\"0x0\",\"Mode\":" + (mode?.ToString(System.Globalization.CultureInfo.InvariantCulture) ?? "null")
+ ",\"Preset\":12,\"Readings\":3,\"Answered\":3}";
private static string Profile(params (uint Id, uint Value)[] settings) => DriverProfileRecord.Serialize(new DriverProfileReading
{
Outcome = DriverProfileOutcome.Application,
ProfileName = "SILENT HILL 2",
Settings = [.. settings.Select(static s => new DriverSettingReading(s.Id, s.Value, DriverSettingLocation.Profile, false))],
})!;
private static readonly string _silentHill2Profile = Profile((S.DlssSrOverride, 1), (S.DlssSrPreset, 12), (S.DlssSrMode, 5), (S.DlssSrScalingRatio, 33));
[Fact]
public void TheOwnersSilentHill2SessionReadsNoModeBecauseNoSuperResolutionRanThatTheDriverSaw()
{
// As stored: the hook ran and named nothing, and the driver's word lacks CREATED | EVALUATE.
QualityResolver.Of("unknown", null, null, Words(_silentHill2Sr, 3), _silentHill2Profile).Should().BeNull(
"an override the driver applied to a feature nobody saw run names the mode of nothing");
// Had the driver seen it run, the profile's Ultra Performance (5) and the report's 3 are one mode in NGX's numbering.
QualityResolver.Of("unknown", null, "dlss", Words(_expeditionSr, 3), _silentHill2Profile)
.Should().Be(new ResolvedQuality(UpscalerQualityMode.UltraPerformance, QualitySource.NvidiaApp));
}
[Fact]
public void ExpeditionThirtyThreesOverrideIsQualityFromTheNvidiaApp()
{
QualityResolver.Of("unknown", null, "dlss", Words(_expeditionSr, 2), Profile((S.DlssSrOverride, 1), (S.DlssSrMode, 2)))
.Should().Be(new ResolvedQuality(UpscalerQualityMode.Quality, QualitySource.NvidiaApp));
QualityResolver.Of("unknown", null, "dlss", Words(_expeditionSr, 2), driverProfileJson: null)
.Should().Be(new ResolvedQuality(UpscalerQualityMode.Quality, QualitySource.NvidiaApp), "the report alone, where no profile was read");
QualityResolver.Of("dlss", "1", null, Words(_expeditionSr, 2), driverProfileJson: null)
.Should().Be(new ResolvedQuality(UpscalerQualityMode.Quality, QualitySource.NvidiaApp), "the override replaces what the Streamline title passed");
}
[Fact]
public void DlaaAndACustomRatioAreTheOverridesOwn()
{
string dlaa = "0x" + (NgxOverrideFlags.Enabled | NgxOverrideFlags.SrDlaaMode | NgxOverrideFlags.CreatedAndEvaluated).ToString("X", System.Globalization.CultureInfo.InvariantCulture);
QualityResolver.Of("unknown", null, "dlss", Words(dlaa, null), driverProfileJson: null)
.Should().Be(new ResolvedQuality(UpscalerQualityMode.Dlaa, QualitySource.NvidiaApp));
string ratio = "0x" + (NgxOverrideFlags.Enabled | NgxOverrideFlags.ScalingRatio | NgxOverrideFlags.CreatedAndEvaluated).ToString("X", System.Globalization.CultureInfo.InvariantCulture);
QualityResolver.Of("unknown", null, "dlss", Words(ratio, null), Profile((S.DlssSrMode, 6), (S.DlssSrScalingRatio, 77)))
.Should().Be(new ResolvedQuality(UpscalerQualityMode.Custom, QualitySource.NvidiaApp, 77));
QualityResolver.Of("unknown", null, "dlss", Words(ratio, null), Profile((S.DlssSrMode, 6), (S.DlssSrScalingRatio, 120)))
.Should().Be(new ResolvedQuality(UpscalerQualityMode.Custom, QualitySource.NvidiaApp), "a ratio outside 33–100 is not named");
QualityResolver.Of("unknown", null, "dlss", Words(ratio, null), driverProfileJson: null)
.Should().Be(new ResolvedQuality(null, QualitySource.NvidiaApp), "overridden, and nothing says to what");
}
[Fact]
public void WhenTheProfileAndTheReportDisagreeTheOverrideStandsWithNoMode()
{
QualityResolver.Of("unknown", null, "dlss", Words(_expeditionSr, 0), Profile((S.DlssSrMode, 2)))
.Should().Be(new ResolvedQuality(null, QualitySource.NvidiaApp), "Quality in the profile, Performance in the report: neither is shown");
QualityResolver.Of("dlss", "3", null, Words(_expeditionSr, 0), Profile((S.DlssSrMode, 2)))
.Should().Be(new ResolvedQuality(null, QualitySource.NvidiaApp), "and never the game's own value in its place");
QualityResolver.Of("unknown", null, "dlss", Words(_expeditionSr, 9), Profile((S.DlssSrMode, 3)))
.Should().Be(new ResolvedQuality(null, QualitySource.NvidiaApp), "a report no numbering names, and the profile's 'the game's own'");
}
[Fact]
public void WithNoOverrideTheGamesOwnHookedModeIsShown()
{
QualityResolver.Of("dlss", "3", null, Words(_plainSr, 0), driverProfileJson: null).Should().Be(new ResolvedQuality(UpscalerQualityMode.Quality, QualitySource.Game));
QualityResolver.Of("dlss", "9", null, null, null).Should().Be(new ResolvedQuality(null, QualitySource.Game, Stored: "9"), "a number nobody can name is still what was measured");
QualityResolver.Of("fsr3", "2", null, Words(_expeditionSr, 2), null).Should().Be(new ResolvedQuality(null, QualitySource.Game, Stored: "2"), "a DLSS override does not apply to FSR");
QualityResolver.Of("dlss", null, null, null, null).Should().BeNull();
QualityResolver.Of("unknown", "3", null, null, null).Should().BeNull("a quality without a name to hang it on");
QualityResolver.Of(null, null, "dlss", Words(_plainSr, 0), null).Should().BeNull("the driver's word alone is identity");
}
[Fact]
public void AnUnansweredOrUnreadableReportIsNoOverride()
{
QualityResolver.Of("dlss", "2", null, Words(_expeditionSr, 2, outcome: "Unanswered"), null).Should().Be(new ResolvedQuality(UpscalerQualityMode.Balanced, QualitySource.Game));
QualityResolver.Of("dlss", "2", null, "{broken", null).Should().Be(new ResolvedQuality(UpscalerQualityMode.Balanced, QualitySource.Game));
QualityResolver.Of("dlss", "2", null, Words("garbage", 2), null).Should().Be(new ResolvedQuality(UpscalerQualityMode.Balanced, QualitySource.Game));
}
[Fact]
public void TheLiveCardReadsTheReportAloneAndSaysWhatItCannotSettle()
{
const ulong applied = NgxOverrideFlags.Enabled | NgxOverrideFlags.PerfMode | NgxOverrideFlags.CreatedAndEvaluated;
QualityResolver.Live(dlssRan: true, applied, 3).Should().Be(new ResolvedQuality(UpscalerQualityMode.UltraPerformance, QualitySource.NvidiaApp));
QualityResolver.Live(dlssRan: false, applied, 3).Should().BeNull("no DLSS ran");
QualityResolver.Live(dlssRan: true, NgxOverrideFlags.CreatedAndEvaluated, 3).Should().BeNull("no override bit");
QualityResolver.Live(dlssRan: true, NgxOverrideFlags.Enabled | NgxOverrideFlags.ScalingRatio, 0).Should().Be(new ResolvedQuality(null, QualitySource.NvidiaApp));
}
[Fact]
public void TheWireTokensRoundTrip()
{
foreach (UpscalerQualityMode mode in Enum.GetValues<UpscalerQualityMode>().Where(static m => m != UpscalerQualityMode.None))
{
string token = QualityResolver.Token(new ResolvedQuality(mode, QualitySource.NvidiaApp))!;
QualityResolver.FromToken(token).Should().Be(new ResolvedQuality(mode, QualitySource.NvidiaApp), token);
}
QualityResolver.Token(new ResolvedQuality(null, QualitySource.NvidiaApp)).Should().Be(QualityResolver.OverrideToken);
QualityResolver.FromToken(QualityResolver.OverrideToken).Should().Be(new ResolvedQuality(null, QualitySource.NvidiaApp));
QualityResolver.Token(new ResolvedQuality(UpscalerQualityMode.Quality, QualitySource.Game)).Should().BeNull("the game's own mode is the hooked byte's, already on the wire");
QualityResolver.Token(null).Should().BeNull();
QualityResolver.FromToken("eMaxQuality").Should().BeNull();
QualityResolver.FromToken(null).Should().BeNull();
QualityResolver.ModeToken(UpscalerQualityMode.None).Should().BeNull();
}
}
@@ -6,17 +6,18 @@ using FrameLedger.Domain.Metrics;
namespace FrameLedger.Domain.Tests.Metrics;
/// <summary>Three numberings, one table each (beta.24, D63): the hooked byte, the driver's report and the App's profile value.</summary>
public sealed class UpscalerNamesTests
{
[Theory]
[InlineData("1", "Performance")]
[InlineData("2", "Balanced")]
[InlineData("3", "Quality")]
[InlineData("4", "Ultra Performance")]
[InlineData("5", "Ultra Quality")]
[InlineData("6", "DLAA")]
public void ADlssModeIsTheNameTheMenuUses(string stored, string name) =>
UpscalerNames.Quality("dlss", stored).Should().Be(name, "sl::DLSSMode, as fl_sl_inputs.h QualityFromMode writes it");
[InlineData("1", UpscalerQualityMode.Performance)]
[InlineData("2", UpscalerQualityMode.Balanced)]
[InlineData("3", UpscalerQualityMode.Quality)]
[InlineData("4", UpscalerQualityMode.UltraPerformance)]
[InlineData("5", UpscalerQualityMode.UltraQuality)]
[InlineData("6", UpscalerQualityMode.Dlaa)]
public void AHookedDlssByteIsTheModeStreamlineNamesIt(string stored, UpscalerQualityMode mode) =>
UpscalerNames.Mode("dlss", stored).Should().Be(mode, "sl::DLSSMode, as fl_sl_inputs.h QualityFromMode writes it");
[Theory]
[InlineData("dlss", "7")]
@@ -24,13 +25,39 @@ public sealed class UpscalerNamesTests
[InlineData("fsr3", "2")]
[InlineData("xess", "3")]
[InlineData(null, "2")]
public void AValueWithNoNameIsShownAsStored(string? upscaler, string stored) =>
UpscalerNames.Quality(upscaler, stored).Should().Be(stored, "a number nobody can name is still what was measured");
[InlineData("dlss", null)]
[InlineData("dlss", "")]
[InlineData("dlss", " ")]
public void AValueNoTableNamesIsNoMode(string? upscaler, string? stored) =>
UpscalerNames.Mode(upscaler, stored).Should().BeNull("the App prints a stored number nobody can name as it is");
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
public void NoQualityIsNoName(string? stored) =>
UpscalerNames.Quality("dlss", stored).Should().BeNull();
[InlineData(0u, UpscalerQualityMode.Performance)]
[InlineData(1u, UpscalerQualityMode.Balanced)]
[InlineData(2u, UpscalerQualityMode.Quality)]
[InlineData(3u, UpscalerQualityMode.UltraPerformance)]
[InlineData(4u, UpscalerQualityMode.UltraQuality)]
[InlineData(5u, UpscalerQualityMode.Dlaa)]
public void TheDriversReportIsInNgxsOwnNumbering(uint reported, UpscalerQualityMode mode) =>
UpscalerNames.FromDriverReport(reported).Should().Be(mode, "Silent Hill 2 under the App's Ultra Performance (profile 5) was reported as 3");
[Theory]
[InlineData(0u, UpscalerQualityMode.Performance)]
[InlineData(1u, UpscalerQualityMode.Balanced)]
[InlineData(2u, UpscalerQualityMode.Quality)]
[InlineData(4u, UpscalerQualityMode.Dlaa)]
[InlineData(5u, UpscalerQualityMode.UltraPerformance)]
[InlineData(6u, UpscalerQualityMode.Custom)]
public void TheProfileValueIsInNvidiasSettingsNumbering(uint stored, UpscalerQualityMode mode) =>
UpscalerNames.FromProfile(stored).Should().Be(mode, "NGX_DLSS_SR_MODE, NvApiDriverSettings.h");
[Fact]
public void ValuesNeitherNumberingNamesAreNoMode()
{
UpscalerNames.FromDriverReport(6).Should().BeNull();
UpscalerNames.FromDriverReport(null).Should().BeNull();
UpscalerNames.FromProfile(3).Should().BeNull("3 is the game's own: no override");
UpscalerNames.FromProfile(7).Should().BeNull("reserved");
UpscalerNames.FromProfile(null).Should().BeNull();
}
}