From c9b0aab8622cfaf6b21398a241f1f84a0278af79 Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Fri, 6 Nov 2026 15:39:42 +0700 Subject: [PATCH] feat: DLSS 5 is named where the game ran its neural rendering (schema 0022, rules 2026.11.2, Privacy 2.14); Streamline headers re-vendored at v2.14.16 (D84) (beta.34 PR-3) (#358) The owner, 2026-11-06: Hogwarts Legacy with Neural Rendering on loaded DLSS 5's runtime (nvngx_dlssnr.dll 310.9.16.0, from the game's folder) and the session could say only "DLSS 5 runtime loaded". Then: check what changed in recent Streamline versions, fix it if needed. - Streamline: the vendored closure was v2.12.0 byte for byte; v2.14.16 changes three of its eleven files (kFeatureDLSS_NR = 1004, the uplift buffer types 70-72, kStructVersion7, the version). Re-vendored byte for byte; README provenance, THIRD_PARTY_NOTICES row. - Overlay (hook path): the slEvaluateFeature detour decodes kFeatureDLSS_NR into its own bit; RecordPresent sets FL_FEAT_SL_NEURAL_RENDERING (feature byte bit 7, an enumerator - no layout change) under the condition every Streamline fact shares; the evaluate row's family also claims FL_HOOK_SL_NEURAL_RENDERING (bit 12), published with the detour. Overhead: decode unchanged within noise (4.7 ns a call), +0.14..0.19 ns a present. - Agent: Domain.Metrics.NeuralRendering.SharePct; sessions.dlss_nr_pct (schema 0022) only from a writer that published the family - an older Overlay's silence is never a measured 0 %. CensusNames records sl.dlss_nr.dll. - Rules 2026.11.2: capability dlss_nr -> "Supports DLSS 5 Neural Rendering". - App (D84): DLSS 5 heads the DLSS line where it ran ("DLSS 5 (neural rendering on 97.3% of rendered frames)"); its library listed with version and source; measured 0 -> "runtime loaded, not seen running"; nothing to tell -> "runtime loaded" as before. CSV basis/pct. - CaptureHost dev census: a kFeatureDLSS_NR bucket. - Privacy Policy 2.14 (neural-rendering libraries); the accuracy block's DLSS 5 sentence. - Tests: native guard_test (the new harness mode through an injected Overlay; 0xF00D lights no NR fact; the token case's exact mask gains the family), NeuralRenderingTests, SessionAggregatorTests, DlssGenerationTests, DlssTextTests (a row shaped from session 132), LedgerDatabaseTests (0022), the repository round trip, the rules fixture, RuntimeModuleSourcesTests, SlCensusTests. - Docs: 05_DETECTION, 06_DATA_MODEL, 17_HOOK_ENGINE, LIMITATIONS, guide/03, guide/10, the accuracy block, spike-notes 26 (+ owner-only item 30(a)'s decision table), HANDOFF (D84), CHANGELOG. Co-authored-by: Claude Opus 5.5 --- CHANGELOG.md | 16 ++++ LIMITATIONS.md | 5 +- README.md | 3 +- docs/05_DETECTION.md | 22 ++++- docs/06_DATA_MODEL.md | 13 +++ docs/17_HOOK_ENGINE.md | 2 +- docs/HANDOFF.md | 5 +- .../26-dlss5-dynamic-streamline.md | 16 ++++ guide/03-read-your-results.md | 5 +- guide/10-glossary.md | 1 + legal/ACCURACY.md | 3 +- legal/DISCLAIMER.md | 3 +- legal/PRIVACY_POLICY.md | 4 +- legal/THIRD_PARTY_NOTICES.md | 2 +- rules/detection-rules.json | 3 +- src/FrameLedger.App/Services/DlssText.cs | 23 ++++- src/FrameLedger.App/Strings.Designer.cs | 9 ++ src/FrameLedger.App/Strings.ja.resx | 12 +++ src/FrameLedger.App/Strings.resx | 9 ++ src/FrameLedger.App/Strings.vi.resx | 9 ++ .../ViewModels/GameDetailViewModel.cs | 1 + .../Capture/CensusNames.cs | 8 +- .../Persistence/SessionRow.cs | 7 ++ .../Recording/SessionAggregator.cs | 4 + .../Consume/SlCensus.cs | 16 +++- src/FrameLedger.Domain/Detection/DlssBasis.cs | 3 + .../Detection/DlssEvidence.cs | 6 +- .../Detection/DlssGeneration.cs | 13 ++- .../Detection/DlssGenerationKind.cs | 3 + src/FrameLedger.Domain/Metrics/FeatureBits.cs | 6 ++ .../Metrics/HookFamilies.cs | 3 + .../Metrics/NeuralRendering.cs | 42 +++++++++ .../Persistence/Migrations/0022_dlss_nr.sql | 10 ++ .../Persistence/SessionRowColumns.cs | 10 +- src/FrameLedger.Shared/ShmLayout.cs | 16 ++++ .../include/fl_hook_inventory.h | 14 ++- .../FrameLedger.Overlay/src/dllmain.cpp | 23 +++++ src/native/FrameLedger.Shm/include/fl_shm.h | 20 +++- src/native/tests/guard_test.cpp | 94 ++++++++++++++++++- src/native/third_party/streamline/README.md | 23 ++++- .../streamline/include/sl_core_types.h | 27 ++++-- .../streamline/include/sl_struct.h | 1 + .../streamline/include/sl_version.h | 4 +- src/native/tools/hook-harness/main.cpp | 8 ++ tests/FrameLedger.App.Tests/DlssTextTests.cs | 36 ++++++- .../Capture/RuntimeModuleSourcesTests.cs | 2 +- .../Recording/SessionAggregatorTests.cs | 27 ++++++ .../Consume/SlCensusTests.cs | 1 + .../Detection/DlssGenerationTests.cs | 17 ++++ .../Metrics/NeuralRenderingTests.cs | 33 +++++++ .../Persistence/LedgerDatabaseTests.cs | 39 ++++++++ .../SqliteSessionRepositoryTests.cs | 1 + .../capabilities/dlss_stack/expected.json | 2 +- .../capabilities/dlss_stack/nvngx_dlssnr.dll | 0 54 files changed, 634 insertions(+), 51 deletions(-) create mode 100644 src/FrameLedger.Domain/Metrics/NeuralRendering.cs create mode 100644 src/FrameLedger.Infrastructure/Persistence/Migrations/0022_dlss_nr.sql create mode 100644 tests/FrameLedger.Domain.Tests/Metrics/NeuralRenderingTests.cs create mode 100644 tests/fixtures/rules/capabilities/dlss_stack/nvngx_dlssnr.dll diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b52dfba..16e5027a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,22 @@ numeric core and does not move; the heading is the full version — corrected 20 ### Changed +- **DLSS 5 is named where the game ran it** (owner decision D84, amending D64). The owner's Hogwarts Legacy, Neural + Rendering on, loaded DLSS 5's runtime (`nvngx_dlssnr.dll` 310.9.16.0, from the game's folder) and the session could say + only *DLSS 5 runtime loaded* — nothing measured whether it ran. The Overlay's Streamline hook now decodes DLSS 5's + feature (`kFeatureDLSS_NR`, Streamline 2.14) into its own per-frame fact, and the Agent keeps the share of the frames + the game rendered through Streamline that carried it (`sessions.dlss_nr_pct`, **schema 0022** — a ledger this build + migrated no longer opens in an earlier one). Seen running, the DLSS line reads *DLSS 5 (neural rendering on 97.3% of + rendered frames)*, above every other generation; loaded and seen not running, *DLSS 5 runtime loaded, not seen + running*; where nothing could tell (an earlier Overlay, a title outside Streamline), *DLSS 5 runtime loaded*, as + before. Its library is listed with its version and source like the others, its Streamline plugin `sl.dlss_nr.dll` + is recorded when loaded, and a game shipping either file shows *Supports DLSS 5 Neural Rendering* (rules + `2026.11.2`, capability `dlss_nr`). The **Privacy Policy 2.14** names neural-rendering libraries among those whose + versions are read; the **Disclaimer 2.13**'s accuracy block says when DLSS 5 is named. One hook-path change: one more + compare in the `slEvaluateFeature` detour and one more test where a present is recorded (`spike-notes` §26). +- **Streamline's headers are `v2.14.16`'s** (developers): the vendored copy was `v2.12.0`, byte for byte; three of its + eleven files change — `kFeatureDLSS_NR`, the uplift buffer types 70–72, `kStructVersion7`, the version — and + nothing FrameLedger consumed otherwise (`src/native/third_party/streamline/README.md`). - **A session under the NVIDIA App's *Dynamic* frame generation reads DLSS 4.5** (owner decision D83, amending D64). Dynamic and its ×6 mode exist only in DLSS 4.5, and the DLSS line named a generation from the measured multiplier alone: the owner's Phantom Blade Zero under *Dynamic, up to ×3* held ×2.0 and ×3.0 and read *DLSS 4 (a ×3.0 diff --git a/LIMITATIONS.md b/LIMITATIONS.md index 65c33ab3..847b58f7 100644 --- a/LIMITATIONS.md +++ b/LIMITATIONS.md @@ -109,7 +109,10 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md)) DLSS 4), the NVIDIA App's *Dynamic* frame generation that the driver reports applied (DLSS 4.5, whatever multiplier it chose — since 0.1.0-beta.34), or a library whose major version names one (2.x, 3.x). A *Fixed* ×5 or ×6 set in the App names DLSS 4.5 only when the frames show it. A 310 library with no such evidence shows its - version only. DLSS 5 is shown only as *runtime loaded*, by a library name not yet seen on a real game. Where each + version only. ~~DLSS 5 is shown only as *runtime loaded*, by a library name not yet seen on a real game.~~ **DLSS 5** + (since 0.1.0-beta.34) is named where the game was seen running its neural rendering through Streamline, with the share + of rendered frames; its library loaded and nothing seen reads *runtime loaded* — *not seen running* only where the + Overlay looked. A game that runs neural rendering outside Streamline is not seen. Where each library was loaded from is read from its folder, for sessions recorded since 0.1.0-beta.24. - **Ray tracing** is *Yes*, *No* or *N/A* — measured from the game's ray-tracing calls on Direct3D 12, and N/A where FrameLedger could not look. **Path tracing is never stated as a fact**: there is no API signal diff --git a/README.md b/README.md index bacab0ad..4c284cc9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ pages. > - **DLSS version:** the version of each DLSS library the game loaded and whether it came from the game or from > the NVIDIA driver; "DLSS 4" or "DLSS 4.5" only when the session shows it (the model preset the driver reports, > a measured multi-frame factor, or the NVIDIA App's Dynamic frame generation that the driver reports applied); -> DLSS 5 only as "runtime loaded". +> "DLSS 5" only when the game was seen running its neural rendering, otherwise "runtime loaded" when its library was +> loaded. > - **Render → output resolution:** measured where the vendor's own per-frame call carries the render > size (AMD FidelityFX dispatches, and Streamline titles whose resource tags state it); `N/A` where it > does not: DLSS titles that bypass Streamline, Streamline titles whose tags carry no size, and Vulkan diff --git a/docs/05_DETECTION.md b/docs/05_DETECTION.md index 1ef42e8c..c34c4b45 100644 --- a/docs/05_DETECTION.md +++ b/docs/05_DETECTION.md @@ -488,7 +488,9 @@ never the path), and the super-resolution preset the driver reports applied: | `nvngx_dlss.dll` **2.x** | DLSS 2 | `runtime_modules` | | `nvngx_dlss.dll` **3.x**, or `nvngx_dlssg.dll` **1.x–3.x** | DLSS 3 | `runtime_modules` | | A **310.x** library alone, a CNN preset (A–F), ×2 | *no label* — the versions are shown | DLSS 4 and 4.5 ship the same major number; the preset is what names the model | -| `nvngx_dlssnr.dll` loaded | "DLSS 5 runtime loaded" — never a generation of these features | the module name is community-sourced until owner-only item 20(d) sees it load | +| ~~`nvngx_dlssnr.dll` loaded~~ | ~~"DLSS 5 runtime loaded" — never a generation of these features~~ | ~~the module name is community-sourced until owner-only item 20(d) sees it load~~ *(replaced 2026-11-06 by the two rows below, D84)* | +| DLSS 5's neural rendering **evaluated** — `kFeatureDLSS_NR` (Streamline 2.14) on some of the frames the game rendered through Streamline, seen by an Overlay that decodes it *(beta.34, owner decision D84)* | DLSS 5 (neural rendering on N % of rendered frames) — **heads the table** | `dlss_nr_pct` (schema 0022), from `FL_FEAT_SL_NEURAL_RENDERING` under `FL_HOOK_SL_NEURAL_RENDERING` | +| `nvngx_dlssnr.dll` loaded, neural rendering not seen evaluated | "DLSS 5 runtime loaded" — and "…, not seen running" where an Overlay that decodes it drained Streamline batches and none carried it (0 %); never a generation | `runtime_modules` (the name seen on Hogwarts Legacy, 2026-11-06) and `dlss_nr_pct` | **Amended 2026-11-06 (beta.34, owner decision D83): Dynamic is DLSS 4.5's.** The NVIDIA App's *Dynamic* frame generation and its ×6 mode exist only in DLSS 4.5, so a session the driver reports running Dynamic is DLSS 4.5 whatever @@ -507,7 +509,21 @@ nothing and is not used (the owner's Silent Hill 2 session: preset L applied, no the ×6.0 state's). **Sources:** NVAPI's `NV_NGX_DLSS_OVERRIDE_GET_STATE_PARAMS_V1` (the vendored `src/native/third_party/nvapi/nvapi.h`); presets L/M with DLL 310.5.0 — PCGH's DLSS 4.5 test and NVIDIA's driver 591.74 release notes; DLSS 4.5's Dynamic MFG and 6× — NVIDIA's announcement (driver 595, RTX 50); DLSS 5 — NVIDIA's -GTC 2026 announcement and its 2026-09-03 launch; `nvngx_dlssnr.dll` — community reports only. +GTC 2026 announcement and its 2026-09-03 launch; ~~`nvngx_dlssnr.dll` — community reports only~~ `nvngx_dlssnr.dll` — +loaded by the owner's Hogwarts Legacy with Neural Rendering on, 310.9.16.0 from the game's folder (2026-11-06, +`spike-notes` §26), beside its Streamline plugin `sl.dlss_nr.dll`; `kFeatureDLSS_NR = 1004` — Streamline `v2.14.16`'s +public `sl_core_types.h` (re-vendored for it, `src/native/third_party/streamline/README.md`). + +**Amended 2026-11-06 (beta.34, owner decision D84): DLSS 5 is named where it ran.** Until then a session could say only +that DLSS 5's runtime was LOADED — and Hogwarts Legacy, Neural Rendering on, loaded it. The Overlay's +`slEvaluateFeature` detour now decodes `kFeatureDLSS_NR` into its own per-frame fact (`FL_FEAT_SL_NEURAL_RENDERING`, +the feature byte's last bit, under the condition every Streamline fact shares) and publishes +`FL_HOOK_SL_NEURAL_RENDERING` with the detour; the Agent stores the share of Streamline batches that carried it +(`dlss_nr_pct`) **only from a writer that published that family** — an older Overlay drains the same batches and never +sets the bit, and its silence must not read as 0 %. Above every other row because DLSS 5 is named for that feature as +DLSS 4.5 is for its own: the session's super resolution, ray reconstruction and frame generation are the libraries the +line lists after it. Whether the game routes neural rendering through `slEvaluateFeature` at all is owner-only item +30(a)'s run; a title that does not reads *runtime loaded*, never *not running*. ## Anti-cheat pre-scan (static) @@ -541,7 +557,7 @@ Three things this section previously implied that are not true, and are worth st > the user's and stays; a `detected` entry is refreshed; **an empty field with no entry has nothing to protect > and is filled and badged `detected`** — without that clause a freshly added game could never receive an > engine at all, since `EnsureAsync` writes no provenance. A null detected value erases nothing. - > `capability_flags` is written whole every run (a JSON array of the rule ids — `dlss`, `dlss_g`, `dlss_rr`, + > `capability_flags` is written whole every run (a JSON array of the rule ids — `dlss`, `dlss_g`, `dlss_rr`, `dlss_nr` (beta.34), > `streamline`, `fsr`, `xess`, `xefg`) because the Supports row has no user-edit surface and a stale "Supports > DLSS-G" after the DLL left is the confusion §Capability hints exists to prevent. - Strings scans bounded to 8 MB, local only. diff --git a/docs/06_DATA_MODEL.md b/docs/06_DATA_MODEL.md index 28dee612..316179a8 100644 --- a/docs/06_DATA_MODEL.md +++ b/docs/06_DATA_MODEL.md @@ -320,6 +320,9 @@ CREATE TABLE sessions ( -- schema 0021 (2026-10-19, beta.24, D64): each loaded runtime module's folder class — 05_DETECTION §DLSS generation runtime_module_sources TEXT, -- {"nvngx_dlss.dll":"graphics_driver", …}: game | graphics_driver | windows; never a path + -- schema 0022 (2026-11-06, beta.34, D84): DLSS 5's neural rendering — 05_DETECTION §DLSS generation + dlss_nr_pct REAL, -- 0–100 of the Streamline batches that evaluated kFeatureDLSS_NR; NULL = nothing could tell + -- schema 0020 (2026-10-19, beta.24, D62): every frame-generation state the session held — 03_METRICS §The mix fg_mix TEXT, -- {"Rows":[{"Kind":"generated","Factor":4.0,"NativeFps":…,"DisplayedFps":…, -- "Seconds":…,"Share":…,"Windows":…}, …]}: states by rising factor, then @@ -715,6 +718,16 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied > from its crash file (which carries no module list). `LatestVersion` is 21; > `LedgerDatabaseTests.ScriptTwentyOneAddsTheModuleSourcesColumnAndAnEarlierSessionHasNone`, the repository round trip. +> **`0022_dlss_nr.sql` (beta.34, 2026-11-06, owner decision D84) — DLSS 5's neural rendering, measured.** One REAL column, +> ADD COLUMN only: `dlss_nr_pct`, the share (0–100) of the presents that drained a Streamline evaluation on which the game +> evaluated `kFeatureDLSS_NR` (`Domain.Metrics.NeuralRendering`). Written by the recorder's aggregation +> (`SessionAggregator.ApplyRt`) **only when the writer published `FL_HOOK_SL_NEURAL_RENDERING`** — an Overlay older than +> the script drains the same batches and never sets the bit, so its NULL is "could not tell", never 0. NULL before, and +> never rebuilt (`frame_blobs` keep no feature byte); a session recovered from its crash file is re-aggregated from its +> raw records and keeps it. `LatestVersion` is 22; +> `LedgerDatabaseTests.ScriptTwentyTwoAddsTheNeuralRenderingColumnAndAnEarlierSessionHasNone`, the repository round trip. +> **A beta.33 or alpha.2 cannot open a ledger beta.34 migrated** (the alpha keeps its copy first, D73). + > **Every open used to migrate, and one that should not have did — 2026-09-16.** The Agent's `--console sessions`, > a verb that prints, was run against the owner's ledger while the file on disk was at schema 2 and applied 0003 and > 0004 to it. `LedgerDatabase.OpenReadOnlyAsync` exists since that day: an existing file, `PRAGMA query_only`, no diff --git a/docs/17_HOOK_ENGINE.md b/docs/17_HOOK_ENGINE.md index 23d4fa45..6ad516e3 100644 --- a/docs/17_HOOK_ENGINE.md +++ b/docs/17_HOOK_ENGINE.md @@ -194,7 +194,7 @@ Every hook must be listed here with a purpose. Anything not on this list is not |---|---| | NGX: `NVSDK_NGX_D3D11/D3D12/VULKAN_CreateFeature`, `EvaluateFeature`, `ReleaseFeature` | Which NGX feature is *actually created and evaluated per frame*: SuperSampling (DLSS), RayReconstruction (DLSS-D), FrameGeneration (DLSS-G) | | NGX parameter accessors (`NVSDK_NGX_Parameter_SetI/GetI/SetUI`) — **exported by `sl.common.dll` only; see below** | `Width`/`Height` (render) vs `OutWidth`/`OutHeight` (output), `PerfQualityValue` (quality preset), sharpness | -| ✅ Streamline: `slEvaluateFeature` · ⏳ `slInit`, `slSetFeatureLoaded`, `slSetConstants`, `slGetFeatureRequirements` | Feature set actually active when the game goes through SL rather than NGX directly (`kFeatureDLSS`, `DLSS_G`, `DLSS_RR`, `Reflex`, `NIS`). **Built 2026-08-09**, identity only: one MinHook detour on `sl.interposer.dll!slEvaluateFeature`, resolved **module-scoped** and installed lazily by the watchdog. Sets `FL_MEASURED_UPSCALER` + `FL_HOOK_UPSCALER_IDENTITY`; decodes `kFeatureDLSS`/`kFeatureNIS` and reports `FL_UPSCALER_UNKNOWN` for anything else. **Never `FL_UPSCALER_NONE`** — a Streamline-only writer cannot see FFX, XeSS or NGX-direct, and `NONE` is the only one of the three states that may be aggregated as a negative | +| ✅ Streamline: `slEvaluateFeature` · ⏳ `slInit`, `slSetFeatureLoaded`, `slSetConstants`, `slGetFeatureRequirements` | Feature set actually active when the game goes through SL rather than NGX directly (`kFeatureDLSS`, `DLSS_G`, `DLSS_RR`, `Reflex`, `NIS`; since beta.34 `kFeatureDLSS_NR` — DLSS 5's neural rendering, its own fact bit and family `FL_HOOK_SL_NEURAL_RENDERING`, D84; rule 4: the `feature` argument of the API hooked, nothing else). **Built 2026-08-09**, identity only: one MinHook detour on `sl.interposer.dll!slEvaluateFeature`, resolved **module-scoped** and installed lazily by the watchdog. Sets `FL_MEASURED_UPSCALER` + `FL_HOOK_UPSCALER_IDENTITY`; decodes `kFeatureDLSS`/`kFeatureNIS` and reports `FL_UPSCALER_UNKNOWN` for anything else. **Never `FL_UPSCALER_NONE`** — a Streamline-only writer cannot see FFX, XeSS or NGX-direct, and `NONE` is the only one of the three states that may be aggregated as a negative | | ✅ Streamline: `slSetTag` — **and, since 2026-09-05, every tag's TYPE** (`slTagCensus`; a HUD-less / UI tag marks the present `FL_FG_DLSS_G`, rule 4: the same argument) | The **global** resource tags, where a title states the size of the buffer it is upscaling *from*: `kBufferTypeScalingInputColor`'s extent → `renderW/H` — **or, since 2026-09-05, the size the tagged `sl::Resource` declares when the extent is zero** (`TagSize` in `fl_sl_inputs.h`, shared by all three tag routes; GUID-checked; a Resource declaring no size is still the honest unknown). **Built 2026-08-15** (`FL_HOOK_UPSCALER_PARAMS`), and it is an ALTERNATIVE to the local tags in `slEvaluateFeature`'s `inputs`, not a layer over them — `sl_core_api.h:258` says global and local tags "do NOT interact", so a title using one yields nothing from the other and both are read. Published only on a frame where an evaluation was also seen, because a tag is viewport state that outlives any one frame. This row was MISSING from this table while the hook shipped, which is the gap the banner above now names | | ✅ Streamline: `slSetTagForFrame` — **and every tag's TYPE, as above** | The same global tags through **Streamline 2.8's frame-based entry point**, which deprecates `slSetTag`: `(const FrameToken&, const ViewportHandle&, const ResourceTag*, uint32_t, CommandBuffer*)` — the token first, then exactly `slSetTag`'s list, handed to the same tag walk. **Built 2026-09-04** (`FL_HOOK_UPSCALER_PARAMS`, its own trampoline; the family is now **published when whole** — once every tag export the loaded interposer has is patched — because publishing on the first row entitled records the second was not yet producing, 38 of 41 on the fixture: the ffx leaves' #110 defect again, fixed the same way). Measured need: Dying Light: The Beast (SL 2.8.0) published `Dlss` identity on every batch and the params bit on none across three captures, because a 2.8 title that tags per frame never calls the deprecated export. The token is not read; the frame count stays with `slGetNewFrameToken`. The installer picks this detour by SYMBOL (`kSymbolSlSetTagForFrame`, bound to the row by `static_assert`), not by family, since the two rows share a family bit and differ in signature | | ✅ **FidelityFX ffx-api: `ffxDispatch` on the FOUR modules a game calls** — `amd_fidelityfx_dx12.dll` (SDK 1.1.x monolith), `amd_fidelityfx_upscaler_dx12.dll`, `amd_fidelityfx_framegeneration_dx12.dll`, **and `amd_fidelityfx_loader_dx12.dll`** (added the evening of 2026-09-04: three loader-shipping titles at FSR produced zero dispatches at any leaf export, so the loader is where their calls arrive) · ⏳ FSR 3.0 host route `ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale` / `ffxFsr3DispatchFrameGeneration` · ~~`ffxFsr2ContextCreate`~~ · ~~`ffxCreateContext`~~ | **Built 2026-09-04** (`HANDOFF` item 7c). One observer behind three trampolines reads the DESCRIPTOR the title passed — head type first, body only after the type matched a constant from the vendored MIT headers (`third_party/fidelityfx/`, tag v2.3.0): **UPSCALE** → identity (`FSR3` from the monolith, `FSR_UNVERSIONED` from the 2.x upscaler DLL, which hosts FSR 3.1 and FSR 4 behind one type) + `renderSize` → `renderW/H` (quality and sharpness `0xFF`: the dispatch carries neither — *since beta.25 the quality byte is the mode the `ffxQuery` row below names for the dispatched size, `0xFF` when none does*) + one COUNT; **PREPARE / PREPARE_V2** → `frameID` counted on a *new* index only — this vendor's `slGetNewFrameToken`, the `fgEvaluations` producer once a title has ever prepared, with the UPSCALE count as the fallback for a title that never does; **FRAMEGENERATION** → `fgMode = FSR_FG` on that present. Rule 4: the argument of the API we hooked, never `context`, `pNext`, a command list or a resource. **Why all four:** a UE5 title ships the two leaves with no loader and calls their exports; a loader-shipping title calls the loader's export and the signed loader reaches its providers through an object, not the leaves' exports (measured: Dying Light: The Beast, KCD2, Wukong). The morning's "never the loader" rested on the export tables alone and was reversed by the run. What guards against a loader that DID re-enter a leaf's export is the K = 1 control with all four hooked and the consumer's `frames/upscale-drained`, both of which read 2× in that case. `ffxCreateContext` is deliberately NOT a row — nothing it carries fills a field the dispatch does not, and its honest family would collide with `slEvaluateFeature`'s under the installer's equality binding. The family is compound (`IDENTITY \| PARAMS \| FG_EVALUATIONS`), pinned by `static_assert`s that also bind the leaf table to the rows both ways and refuse the loader as a row. Streamline keeps precedence for the count once it has ever issued a token, so every §S31-validated title is byte-identical. Second count: the consumer prints `frames/upscale-drained`, the AMD `tokens/batch`. **FSR 3.0 — BUILT 2026-09-05 as a fifth AMD target:** `ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale` (Cyberpunk's copy; named export, its own descriptor, vendored from tag **`fsr3-v3.0.4`** — the tag whose twelve `ffxFsr3*` declarations match the shipped module, not the `v1.1.4` first named). Rule 4: the detour reads `renderSize` of the descriptor the title passed and nothing else — never the context, a resource or the command list; the offset is pinned to a literal (1256) so a re-vendoring that moved it fails to compile. Same family and publish point as the four rows (`PublishFfxFamilyIfWhole` waits for a loaded host too), keyed by module in the installer; identity `FSR3` as a fact. `ffxFsr3DispatchFrameGeneration` is deliberately not a row (§H11 carries the reversal condition); the `ffx_fsr3upscaler_x64.dll` leaf is the pre-committed alternative if the facade reads silent (row B2) — never both, or `frames/upscale-drained` reads 2.00 | diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 503e32e2..64b992c9 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -264,7 +264,9 @@ an alpha's release has to find — #350's lookup, by the name the pack lists. It setting*, the game's own library and no generation beyond what was observed. Record the names the override loads under `%ProgramData%\NVIDIA\NGX` (the summary's *Loaded:* line) — they correct `05_DETECTION` §Shipped is not loaded. (d) **DLSS 5** on the owner's DLSS 5 title: *DLSS 5 runtime loaded*. If it is not shown, record the module names it - loads (*Loaded:* line); `nvngx_dlssnr.dll` is then corrected in `CensusNames` and `05_DETECTION`. + loads (*Loaded:* line); `nvngx_dlssnr.dll` is then corrected in `CensusNames` and `05_DETECTION`. *(2026-11-06, `spike-notes` §26: + Hogwarts Legacy, Neural Rendering on, loaded `nvngx_dlssnr.dll` 310.9.16.0 from the game's folder — the name holds; + whether it ran is what beta.34 measures, item 30(a).)* (e) **SonarCloud (D67):** bulk-mark per `13_CI_CD` §SonarCloud; optionally its *Ignore issues on multiple criteria* rows; close PR #315. (f) The Legal Gate shows **Disclaimer 2.11** and **Privacy Policy 2.12** once. (g) The `ja` strings marked `review`. *(2026-10-19, the owner's first runs — `spike-notes` §22: (a) the Dynamic context line @@ -465,6 +467,7 @@ Where each owner decision is recorded — the file and its section, and a label | D81 | [`20_OPEN_QUESTIONS.md`](20_OPEN_QUESTIONS.md) §G | title lists stay keyed by Steam id; an Xbox copy is matched by everything but that entry | | D82 | [`HANDOFF.md`](HANDOFF.md) §START HERE | alpha.2 right after beta.33; on RC3 unless the train reaches it after .NET 11 ships (then SDK 11.0.100, packages 11.0.0) | | D83 | [`05_DETECTION.md`](05_DETECTION.md) §DLSS generation | the NVIDIA App's Dynamic frame generation, reported applied by the driver in a session that counted DLSS Frame Generation, is DLSS 4.5 (amends D64) | +| D84 | [`05_DETECTION.md`](05_DETECTION.md) §DLSS generation | DLSS 5 heads the DLSS line where its neural rendering was measured running (`kFeatureDLSS_NR`, `dlss_nr_pct`); loaded only reads "runtime loaded" (amends D64) | --- diff --git a/docs/spike-notes/26-dlss5-dynamic-streamline.md b/docs/spike-notes/26-dlss5-dynamic-streamline.md index 2c34efe0..38cf5ade 100644 --- a/docs/spike-notes/26-dlss5-dynamic-streamline.md +++ b/docs/spike-notes/26-dlss5-dynamic-streamline.md @@ -66,3 +66,19 @@ App's override loads (`1B0_E658700.dll` 2.14.16.0). From `v2.12.0` to `v2.14.16` `sl_core_api.h` (`PFun_slEvaluateFeature`), `sl_dlss.h`, `sl.h` and `license.txt` are unchanged, and nothing of FrameLedger reads `Resource::reserved`. **Decided:** re-vendor at `v2.14.16` (the owner: "check what changed … and fix it if really needed") so the Overlay decodes DLSS 5's evaluations by the vendor's own constant (D84). + +### What beta.34 builds on it, and owner-only item 30(a)'s decision table — written before the run + +Built (D84): the Overlay decodes `kFeatureDLSS_NR` into `FL_FEAT_SL_NEURAL_RENDERING` and publishes +`FL_HOOK_SL_NEURAL_RENDERING` with the detour; the Agent stores `dlss_nr_pct` — the share of the Streamline batches that +carried it — only from a writer that published the family. The harness drives the id through an injected Overlay +(`guard_test`, *DLSS 5's neural rendering is its own fact*). What no fixture can say is whether Hogwarts Legacy evaluates +neural rendering through `slEvaluateFeature` at all; one short hooked session each: + +| Neural Rendering in the game | `dlss_nr_pct` | What it means, and what follows | +|---|---|---| +| On | above 0 | the game evaluates it through Streamline: *DLSS 5 (neural rendering on N % of rendered frames)* — D84 holds as built | +| On | 0 | Streamline batches drained and none carried 1004: neural rendering runs another way (NGX directly, or another id). The line reads *runtime loaded, not seen running*; record the session's `sl_tag_census`, and the decode is revisited before anything is named | +| On | NULL | no Streamline batch drained, or the family is missing from `hooks_installed_mask` (bit 12): the detour never installed — record which | +| Off | 0, the runtime loaded | the runtime loads with the feature off: "loaded" never meant "on", which is why D84 waits for the evaluation | +| Off | NULL, the runtime not loaded | the game loads it only when on — recorded, nothing changes | diff --git a/guide/03-read-your-results.md b/guide/03-read-your-results.md index 373b63fd..c8161ac2 100644 --- a/guide/03-read-your-results.md +++ b/guide/03-read-your-results.md @@ -21,8 +21,9 @@ A value FrameLedger could not measure reads **N/A** — never 0, and never an es - **The DLSS line** names the DLSS the game ran: *DLSS 4.5* or *DLSS 4* only when the session showed it (the model preset the NVIDIA driver reports, a frame-generation multiplier of ×3 and above, or the NVIDIA App's *Dynamic* frame generation, which is DLSS 4.5's), each DLSS library's version and - whether it came from the game or from the graphics driver (the NVIDIA App can swap in the driver's copy), and *DLSS 5 - runtime loaded* when it was. With nothing to add to the header's *DLSS*, it is not shown. + whether it came from the game or from the graphics driver (the NVIDIA App can swap in the driver's copy). *DLSS 5* + heads the line when the game was seen running its neural rendering — with the share of the frames it rendered —; its + library loaded and nothing seen reads *DLSS 5 runtime loaded* (*not seen running* when FrameLedger looked). With nothing to add to the header's *DLSS*, it is not shown. - **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, diff --git a/guide/10-glossary.md b/guide/10-glossary.md index 14dcad2e..ff30c874 100644 --- a/guide/10-glossary.md +++ b/guide/10-glossary.md @@ -18,6 +18,7 @@ What the words on FrameLedger's screens mean, in alphabetical order. How each fi - **DLSS 4, DLSS 4.5** — NVIDIA's DLSS generations. FrameLedger names one only when the session shows it: the model preset the NVIDIA driver reports, a frame-generation multiplier of ×3 and above, or the NVIDIA App's *Dynamic* frame generation (DLSS 4.5 only). +- **DLSS 5** — NVIDIA's neural rendering. Named only when the game was seen running it (since 0.1.0-beta.34). - **FG factor** — Displayed FPS divided by Native FPS, shown as `×1.9 FG`. - **FPS** — frames per second over the time measured. - **Frame generation** — the technology (DLSS Frame Generation, FSR Frame Generation) that inserts frames the game did diff --git a/legal/ACCURACY.md b/legal/ACCURACY.md index e0463156..72e331b4 100644 --- a/legal/ACCURACY.md +++ b/legal/ACCURACY.md @@ -45,7 +45,8 @@ > - **DLSS version:** the version of each DLSS library the game loaded and whether it came from the game or from > the NVIDIA driver; "DLSS 4" or "DLSS 4.5" only when the session shows it (the model preset the driver reports, > a measured multi-frame factor, or the NVIDIA App's Dynamic frame generation that the driver reports applied); -> DLSS 5 only as "runtime loaded". +> "DLSS 5" only when the game was seen running its neural rendering, otherwise "runtime loaded" when its library was +> loaded. > - **Render → output resolution:** measured where the vendor's own per-frame call carries the render > size (AMD FidelityFX dispatches, and Streamline titles whose resource tags state it); `N/A` where it > does not: DLSS titles that bypass Streamline, Streamline titles whose tags carry no size, and Vulkan diff --git a/legal/DISCLAIMER.md b/legal/DISCLAIMER.md index d3d7ff11..ca75ba5c 100644 --- a/legal/DISCLAIMER.md +++ b/legal/DISCLAIMER.md @@ -149,7 +149,8 @@ Frame timing is derived from high-resolution timestamps taken at the moment the > - **DLSS version:** the version of each DLSS library the game loaded and whether it came from the game or from > the NVIDIA driver; "DLSS 4" or "DLSS 4.5" only when the session shows it (the model preset the driver reports, > a measured multi-frame factor, or the NVIDIA App's Dynamic frame generation that the driver reports applied); -> DLSS 5 only as "runtime loaded". +> "DLSS 5" only when the game was seen running its neural rendering, otherwise "runtime loaded" when its library was +> loaded. > - **Render → output resolution:** measured where the vendor's own per-frame call carries the render > size (AMD FidelityFX dispatches, and Streamline titles whose resource tags state it); `N/A` where it > does not: DLSS titles that bypass Streamline, Streamline titles whose tags carry no size, and Vulkan diff --git a/legal/PRIVACY_POLICY.md b/legal/PRIVACY_POLICY.md index 8ecc5653..a661da1d 100644 --- a/legal/PRIVACY_POLICY.md +++ b/legal/PRIVACY_POLICY.md @@ -1,6 +1,6 @@ # FrameLedger — Privacy Policy -**Version:** 2.13 · **Effective:** {{RELEASE_DATE}} +**Version:** 2.14 · **Effective:** {{RELEASE_DATE}} **Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.** @@ -42,7 +42,7 @@ An exported session (CSV or JSON) and a bug report can contain your games' names ## 4. What the app can technically observe -To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; whether a game you enabled hooking for runs in an app container, and which of Windows' code-protection settings it runs under (for example, accepting only Microsoft-signed code), read from Windows before any injection; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling and frame-generation libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) and, for a game the Xbox app or the Microsoft Store installed, the package files in its install folder that describe it (`MicrosoftGame.config` and `appxmanifest.xml`) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed, the folders the Xbox app installs games into on each drive (named by the `.GamingRoot` file at the drive's root) with each game's package files, and Windows' answer to whether that game's package is installed for you — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library and the logo and splash-screen images a game from the Xbox app ships in its own folder — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised. +To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; whether a game you enabled hooking for runs in an app container, and which of Windows' code-protection settings it runs under (for example, accepting only Microsoft-signed code), read from Windows before any injection; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling, frame-generation and neural-rendering libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling and neural-rendering libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) and, for a game the Xbox app or the Microsoft Store installed, the package files in its install folder that describe it (`MicrosoftGame.config` and `appxmanifest.xml`) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed, the folders the Xbox app installs games into on each drive (named by the `.GamingRoot` file at the drive's root) with each game's package files, and Windows' answer to whether that game's package is installed for you — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library and the logo and splash-screen images a game from the Xbox app ships in its own folder — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised. It does **not** read game memory outside those API parameters, and does not read game saves, chat, input content, network traffic, or anything unrelated to performance measurement. It records only for programs you added to your library and did not switch recording off for — a program whose recording is off is not watched at all — and injects only into games you individually enabled. diff --git a/legal/THIRD_PARTY_NOTICES.md b/legal/THIRD_PARTY_NOTICES.md index 4631cf3c..a029e7cf 100644 --- a/legal/THIRD_PARTY_NOTICES.md +++ b/legal/THIRD_PARTY_NOTICES.md @@ -62,7 +62,7 @@ Telemetry is layered so no proprietary vendor licence is ever required (`docs/18 | `nvapi64.dll` (runtime implementation) | Loaded at runtime from the user's system | Part of the NVIDIA graphics driver | No — never redistributed by us | | **LibreHardwareMonitorLib** | GPU sensors for **all vendors** (AMD, Intel, NVIDIA) + CPU/board sensors when elevated | **MPL-2.0** | Yes, as an unmodified NuGet package | | **DXGI + Windows performance counters (PDH)** | Vendor-neutral baseline: utilisation, VRAM, adapter identity | Windows OS APIs | n/a | -| **NVIDIA Streamline headers** (`sl.h`, its eight-file include closure, and `sl_dlss.h`) | Declarations only — `sl::Feature`, the `kFeature*` ids and `PFun_slEvaluateFeature` — so the Overlay's upscaler hook has the vendor's own signature instead of a hand-written guess. **Types and `decltype` only: never linked**, or `sl.interposer.dll` would become a load-time dependency and the Overlay would fail to load in every game that ships no Streamline | **MIT** — , `main`, 2026-08-09 | **Vendored 2026-08-09** at `src/native/third_party/streamline/`: `license.txt` and ten headers. **`sl_nvperf.h` is excluded** — the same `license.txt` carries a second, proprietary "NSight Perf SDK License, Version 2023.3" block naming `sl_nvperf.h` and `sl_nvperf.dll`. **All of `external/` is excluded** — upstream's `external/ngx-sdk/` is the RTX SDKs Licence. `license-check.ps1` asserts both exclusions and the grant text | +| **NVIDIA Streamline headers** (`sl.h`, its eight-file include closure, and `sl_dlss.h`) | Declarations only — `sl::Feature`, the `kFeature*` ids and `PFun_slEvaluateFeature` — so the Overlay's upscaler hook has the vendor's own signature instead of a hand-written guess. **Types and `decltype` only: never linked**, or `sl.interposer.dll` would become a load-time dependency and the Overlay would fail to load in every game that ships no Streamline | **MIT** — , `main`, 2026-08-09 (= tag `v2.12.0`); tag `v2.14.16` since 2026-11-06 | **Vendored 2026-08-09**, re-vendored at `v2.14.16` on 2026-11-06, at `src/native/third_party/streamline/`: `license.txt` and ten headers. **`sl_nvperf.h` is excluded** — the same `license.txt` carries a second, proprietary "NSight Perf SDK License, Version 2023.3" block naming `sl_nvperf.h` and `sl_nvperf.dll`. **All of `external/` is excluded** — upstream's `external/ngx-sdk/` is the RTX SDKs Licence. `license-check.ps1` asserts both exclusions and the grant text | | **AMD FidelityFX SDK headers** (`ffx_api.h`, `ffx_api_types.h`, `ffx_upscale.h`, `ffx_framegeneration.h`, `ffx_framegeneration_api_types.h`) | Declarations only — `ffxApiHeader::type`, the `FFX_API_*_DESC_TYPE_*` values, `ffxDispatchDescUpscale::renderSize`, the frame-generation `Prepare` descriptors' `frameID` and `PfnFfxDispatch` — so the Overlay's AMD hook decodes the dispatch descriptor by the vendor's own layout instead of a guess. **Types only: never linked**, and the Overlay defines none of the names the header declares `dllexport` (`hookinventory-check` Pass C reads its export table) | **MIT, by exception** — tag `v2.3.0` (`60f4ea81`, 2026-06-24). Upstream's `docs/license.md` is a binary-only default licence followed by an MIT exception list; on 2026-09-04 that list named all 845 files in the tree, these five among them, and each header carries the grant in its own banner | **Vendored 2026-09-04** at `src/native/third_party/fidelityfx/`: `license.md` verbatim (exception list included) and five headers in upstream's `Kits/FidelityFX/…` layout. **No `signedbin/`, no `.lib`, no source, no `dx12/` backend headers** (no consumer yet). `license-check.ps1` §2d asserts every vendored path is on the exception list and every header carries the grant | | **AMD FidelityFX SDK 3.0 host headers** (`ffx_fsr3.h` and its nine-file include closure: `ffx_interface.h`, `ffx_fsr3upscaler.h`, `ffx_frameinterpolation.h`, `ffx_opticalflow.h`, `ffx_assert.h`, `ffx_types.h`, `ffx_error.h`, `ffx_util.h`, `gpu/fsr3upscaler/ffx_fsr3upscaler_resources.h`) | Declarations only — `FfxFsr3DispatchUpscaleDescription::renderSize` and the type of `ffxFsr3ContextDispatchUpscale` — so the Overlay's hook on the FSR 3.0 **host** DLL (`ffx_fsr3_x64.dll`, Cyberpunk 2077's copy, which upscales through named exports rather than the ffx-api facade) reads the render extent by the vendor's own layout. **Types and `decltype` only: never linked**, and the Overlay defines none of the names the header declares `dllexport` (`hookinventory-check` Pass C reads its export table; the `ffx_fsr3_x64.dll` fixture in `tools/vendor-stubs` is that parser's second positive control) | **MIT** — tag `fsr3-v3.0.4` (`55ff22bb`). The root `LICENSE.txt` at that tag is the MIT grant verbatim and every header carries it inline — a different licence *shape* from the `v2.3.0` row above, which is why it is a separate directory and `license-check.ps1` §2e rather than §2d. The tag is the one whose declarations match the module the title ships (twelve `ffxFsr3*` exports); `v1.1.4`, which the docs first named, declares three more and appends fields to the dispatch descriptor | **Vendored 2026-09-05** at `src/native/third_party/fidelityfx-fsr3/`: `LICENSE.txt` verbatim and ten headers in upstream's `sdk/include/FidelityFX/…` layout, each blob sha checked against the upstream tree. **No backends, no `.cpp`, no shaders, no samples.** `license-check.ps1` §2e asserts the root grant and every header's banner, file by file. Same MIT text as the row above, so `legal/licenses/fidelityfx-MIT.txt` is the notice for both | | NVIDIA **NGX** / **Streamline**, AMD **FidelityFX**, Intel **XeSS** **runtimes** (the DLLs themselves) | Not loaded, not linked, not redistributed. We observe the calls a *game* makes to the copies it ships (`docs/17_HOOK_ENGINE.md`). Unchanged by the row above, which vendors **headers** and no runtime | — | **No vendor upscaler code is distributed by FrameLedger** | diff --git a/rules/detection-rules.json b/rules/detection-rules.json index b2e0b897..ddca0f1b 100644 --- a/rules/detection-rules.json +++ b/rules/detection-rules.json @@ -42,7 +42,7 @@ "level, which made it a check that could not fire." ], "schemaVersion": 2, - "rulesVersion": "2026.11.1", + "rulesVersion": "2026.11.2", "engines": [ { @@ -191,6 +191,7 @@ { "id": "dlss", "name": "DLSS", "signals": [ "nvngx_dlss.dll" ] }, { "id": "dlss_g", "name": "DLSS Frame Gen", "signals": [ "nvngx_dlssg.dll", "sl.dlss_g.dll" ] }, { "id": "dlss_rr", "name": "Ray Reconstruction","signals": [ "nvngx_dlssd.dll" ] }, + { "id": "dlss_nr", "name": "DLSS 5 Neural Rendering", "signals": [ "nvngx_dlssnr.dll", "sl.dlss_nr.dll" ] }, { "id": "streamline", "name": "Streamline", "signals": [ "sl.interposer.dll", "sl.reflex.dll" ] }, { "id": "fsr", "name": "FSR", "signals": [ "ffx_fsr2_*.dll", "ffx_fsr3*.dll", "ffx_frameinterpolation_*.dll", "amd_fidelityfx_*.dll", "ffx_api*.dll" ] }, { "id": "xess", "name": "XeSS", "signals": [ "libxess.dll", "libxess_dx11.dll" ] }, diff --git a/src/FrameLedger.App/Services/DlssText.cs b/src/FrameLedger.App/Services/DlssText.cs index 595b15eb..c33421ab 100644 --- a/src/FrameLedger.App/Services/DlssText.cs +++ b/src/FrameLedger.App/Services/DlssText.cs @@ -16,7 +16,8 @@ namespace FrameLedger.App.Services; /// The DLSS a session ran, in words (beta.24, owner decision D64; 05_DETECTION §DLSS generation): each DLSS /// library's version and where it was loaded from, the model preset the NVIDIA driver reports, and a generation only /// where the session shows one (, strongest evidence first) — since beta.34 (D83) also the -/// NVIDIA App's Dynamic frame generation the driver reports applied. DLSS 5 only as "runtime loaded". +/// NVIDIA App's Dynamic frame generation the driver reports applied, and (D84) DLSS 5 where its neural rendering was seen +/// running; a DLSS 5 runtime that was only loaded says so, and whether the Overlay looked. /// /// Read from what the row stores; nothing here infers a generation from a version that does not name one. [SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")] @@ -34,7 +35,7 @@ public static class DlssText ArgumentNullException.ThrowIfNull(row); Dictionary modules = Modules(row.RuntimeModulesJson); return new DlssEvidence(VersionOf(modules, _superResolutionFile), VersionOf(modules, _frameGenerationFile), ReportedPreset(row), LargestFrameGenerationFactor(row), - DynamicFrameGeneration(row)); + DynamicFrameGeneration(row), row.DlssNrPct); } /// The generation the row establishes, as a label with what it rests on (DLSS 4.5 (preset L)), or null. @@ -47,7 +48,8 @@ public static class DlssText /// /// The summary's DLSS line: the label first when one is established, then each library with its version, where it was - /// loaded from and — for super resolution — the preset the driver reports, then DLSS 5's runtime when it was loaded. + /// loaded from and — for super resolution — the preset the driver reports, then DLSS 5's runtime when it was loaded — + /// since beta.34 (D84) listed as a library too, and, where it is not the label, whether it was seen running. /// Null for a session with no DLSS library, no DLSS upscaler and no DLSS Frame Generation — and, since beta.27, where it /// would say only "DLSS": the header already names the upscaler. The NVIDIA App's override loads its libraries under /// names no census lists (Witcher 3, 2026-10-20: 160_E658700.bin, which the loaded-libraries line prints), and an @@ -76,9 +78,12 @@ public static class DlssText parts.Add(preset); } - if (modules.ContainsKey(_neuralRenderingFile)) + AddLibrary(parts, modules, sources, _neuralRenderingFile, Strings.Dlss_Feature_NeuralRendering, detail: null); + if (modules.ContainsKey(_neuralRenderingFile) && evidence.NeuralRenderingPct is not > 0) { - parts.Add(Strings.Dlss_NeuralRendering_Loaded); + // Loaded, and not the label: a writer that decodes it saw it evaluate nowhere (0 %), or nothing could tell + // (null: an Overlay before beta.34, or a title that never went through Streamline) — never "off". + parts.Add(evidence.NeuralRenderingPct is null ? Strings.Dlss_NeuralRendering_Loaded : Strings.Dlss_NeuralRendering_NotSeen); } return label is null && parts.Count == 1 ? null : string.Join(" · ", parts); @@ -110,6 +115,11 @@ public static class DlssText parts.Add("preset=" + letter.ToString(_inv)); } + if (row.DlssNrPct is double neural) + { + parts.Add("neural_rendering_pct=" + neural.ToString("0.0", _inv)); + } + return parts.Count == 0 ? "N/A" : string.Join("; ", parts); } @@ -119,6 +129,7 @@ public static class DlssText DlssBasis.Preset => string.Format(CultureInfo.CurrentCulture, Strings.Nv_Preset_Format, DlssGeneration.PresetLetter(evidence.Preset)), DlssBasis.FrameGenerationFactor => string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Basis_Factor_Format, evidence.LargestFrameGenerationFactor), DlssBasis.DynamicFrameGeneration => Strings.Dlss_Basis_Dynamic, + DlssBasis.NeuralRendering => string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Basis_NeuralRendering_Format, Formats.Share(evidence.NeuralRenderingPct)), _ => string.Format(CultureInfo.CurrentCulture, Strings.Dlss_Basis_Library_Format, Short(evidence.SuperResolution is { Major: 2 or 3 } ? evidence.SuperResolution : evidence.FrameGeneration)), }); @@ -127,6 +138,7 @@ public static class DlssText DlssBasis.Preset => "preset", DlssBasis.FrameGenerationFactor => "frame_generation_factor", DlssBasis.DynamicFrameGeneration => "dynamic_frame_generation", + DlssBasis.NeuralRendering => "neural_rendering", _ => "library_version", }; @@ -136,6 +148,7 @@ public static class DlssText DlssGenerationKind.Dlss3 => "DLSS 3", DlssGenerationKind.Dlss4 => "DLSS 4", DlssGenerationKind.Dlss45 => "DLSS 4.5", + DlssGenerationKind.Dlss5 => "DLSS 5", _ => "DLSS", }; diff --git a/src/FrameLedger.App/Strings.Designer.cs b/src/FrameLedger.App/Strings.Designer.cs index 77157201..ff0a7c6b 100644 --- a/src/FrameLedger.App/Strings.Designer.cs +++ b/src/FrameLedger.App/Strings.Designer.cs @@ -277,7 +277,9 @@ public static class Strings nameof(Dlss_Basis_Dynamic), nameof(Dlss_Basis_Factor_Format), nameof(Dlss_Basis_Library_Format), + nameof(Dlss_Basis_NeuralRendering_Format), nameof(Dlss_Feature_FrameGeneration), + nameof(Dlss_Feature_NeuralRendering), nameof(Dlss_Feature_RayReconstruction), nameof(Dlss_Feature_SuperResolution), nameof(Dlss_From_Game), @@ -290,6 +292,7 @@ public static class Strings nameof(Dlss_Model_Transformer), nameof(Dlss_Model_Unknown), nameof(Dlss_NeuralRendering_Loaded), + nameof(Dlss_NeuralRendering_NotSeen), nameof(Dlss_Preset_Format), nameof(Document_OnGitHub), nameof(Document_Pages), @@ -1690,8 +1693,12 @@ public static class Strings public static string Dlss_Basis_Library_Format => ResourceManager.GetString(nameof(Dlss_Basis_Library_Format), Culture) ?? nameof(Dlss_Basis_Library_Format); + public static string Dlss_Basis_NeuralRendering_Format => ResourceManager.GetString(nameof(Dlss_Basis_NeuralRendering_Format), Culture) ?? nameof(Dlss_Basis_NeuralRendering_Format); + public static string Dlss_Feature_FrameGeneration => ResourceManager.GetString(nameof(Dlss_Feature_FrameGeneration), Culture) ?? nameof(Dlss_Feature_FrameGeneration); + public static string Dlss_Feature_NeuralRendering => ResourceManager.GetString(nameof(Dlss_Feature_NeuralRendering), Culture) ?? nameof(Dlss_Feature_NeuralRendering); + public static string Dlss_Feature_RayReconstruction => ResourceManager.GetString(nameof(Dlss_Feature_RayReconstruction), Culture) ?? nameof(Dlss_Feature_RayReconstruction); public static string Dlss_Feature_SuperResolution => ResourceManager.GetString(nameof(Dlss_Feature_SuperResolution), Culture) ?? nameof(Dlss_Feature_SuperResolution); @@ -1716,6 +1723,8 @@ public static class Strings public static string Dlss_NeuralRendering_Loaded => ResourceManager.GetString(nameof(Dlss_NeuralRendering_Loaded), Culture) ?? nameof(Dlss_NeuralRendering_Loaded); + public static string Dlss_NeuralRendering_NotSeen => ResourceManager.GetString(nameof(Dlss_NeuralRendering_NotSeen), Culture) ?? nameof(Dlss_NeuralRendering_NotSeen); + public static string Dlss_Preset_Format => ResourceManager.GetString(nameof(Dlss_Preset_Format), Culture) ?? nameof(Dlss_Preset_Format); public static string Document_OnGitHub => ResourceManager.GetString(nameof(Document_OnGitHub), Culture) ?? nameof(Document_OnGitHub); diff --git a/src/FrameLedger.App/Strings.ja.resx b/src/FrameLedger.App/Strings.ja.resx index 0d4c6486..f37691de 100644 --- a/src/FrameLedger.App/Strings.ja.resx +++ b/src/FrameLedger.App/Strings.ja.resx @@ -4625,6 +4625,18 @@ DLSS 5 ランタイムを読み込み済み review + + DLSS 5 ランタイムを読み込み済み、実行は確認されず + review + + + Neural Rendering + review + + + 描画フレームの {0} でニューラルレンダリング + review + ネイティブ AA review diff --git a/src/FrameLedger.App/Strings.resx b/src/FrameLedger.App/Strings.resx index 491210a0..0d35d1ca 100644 --- a/src/FrameLedger.App/Strings.resx +++ b/src/FrameLedger.App/Strings.resx @@ -3479,6 +3479,15 @@ The documents below are the full terms; this summary does not replace them. DLSS 5 runtime loaded + + DLSS 5 runtime loaded, not seen running + + + Neural Rendering + + + neural rendering on {0} of rendered frames + Native AA diff --git a/src/FrameLedger.App/Strings.vi.resx b/src/FrameLedger.App/Strings.vi.resx index fd7a4b9a..aad7fac7 100644 --- a/src/FrameLedger.App/Strings.vi.resx +++ b/src/FrameLedger.App/Strings.vi.resx @@ -3474,6 +3474,15 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt đã nạp runtime DLSS 5 + + đã nạp runtime DLSS 5, không thấy chạy + + + Neural Rendering + + + neural rendering trên {0} khung hình đã kết xuất + Native AA diff --git a/src/FrameLedger.App/ViewModels/GameDetailViewModel.cs b/src/FrameLedger.App/ViewModels/GameDetailViewModel.cs index bdee0de7..8a24d1ef 100644 --- a/src/FrameLedger.App/ViewModels/GameDetailViewModel.cs +++ b/src/FrameLedger.App/ViewModels/GameDetailViewModel.cs @@ -1453,6 +1453,7 @@ public sealed partial class GameDetailViewModel : ObservableObject "dlss" => "DLSS", "dlssg" or "dlss_g" => "DLSS-G", "dlssd" or "dlss_rr" => "DLSS Ray Reconstruction", + "dlss_nr" => "DLSS 5 Neural Rendering", "streamline" => "Streamline", "vulkan" => "Vulkan", "fsr" => "FSR", diff --git a/src/FrameLedger.Application/Capture/CensusNames.cs b/src/FrameLedger.Application/Capture/CensusNames.cs index b5f4cd10..0c837594 100644 --- a/src/FrameLedger.Application/Capture/CensusNames.cs +++ b/src/FrameLedger.Application/Capture/CensusNames.cs @@ -41,11 +41,13 @@ public static class CensusNames /// /// Modules the snapshot records though the in-process census has no bit for them (beta.24, D64): DLSS's Ray - /// Reconstruction and DLSS 5's runtime, Streamline's other plugins, and AMD's FidelityFX loader. The name of DLSS 5's - /// runtime, nvngx_dlssnr.dll, is from community sources until owner-only item 20(d) sees it load. + /// Reconstruction and DLSS 5's runtime, Streamline's other plugins, and AMD's FidelityFX loader. DLSS 5's runtime, + /// nvngx_dlssnr.dll, was a community-sourced name until 2026-11-06, when the owner's Hogwarts Legacy loaded it + /// (310.9.16.0, from the game's folder, Neural Rendering on — spike-notes §26); its Streamline plugin, + /// sl.dlss_nr.dll, ships beside it and is recorded since beta.34. /// private static readonly string[] _snapshotOnly = - ["sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll", "nvngx_dlssnr.dll"]; + ["sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll", "nvngx_dlssnr.dll", "sl.dlss_nr.dll"]; /// /// Every module FILE name a snapshot answers for — the census's, the a / b pairs above split into their diff --git a/src/FrameLedger.Application/Persistence/SessionRow.cs b/src/FrameLedger.Application/Persistence/SessionRow.cs index 1323f39b..68f3d398 100644 --- a/src/FrameLedger.Application/Persistence/SessionRow.cs +++ b/src/FrameLedger.Application/Persistence/SessionRow.cs @@ -153,6 +153,13 @@ public sealed record SessionRow /// public string? RuntimeModuleSourcesJson { get; init; } + /// + /// dlss_nr_pct (schema 0022, beta.34, D84): on how many of the frames the game rendered through Streamline DLSS 5's + /// neural rendering was evaluated, 0–100 (Domain.Metrics.NeuralRendering). Null where nothing could tell — an + /// Overlay that does not decode it, a title that never routed through Streamline — and on every session before. + /// + public double? DlssNrPct { get; init; } + public double? PresentedFps { get; init; } public string? PresentedQualifier { get; init; } diff --git a/src/FrameLedger.Application/Recording/SessionAggregator.cs b/src/FrameLedger.Application/Recording/SessionAggregator.cs index 1857f1ae..e3c8cd65 100644 --- a/src/FrameLedger.Application/Recording/SessionAggregator.cs +++ b/src/FrameLedger.Application/Recording/SessionAggregator.cs @@ -219,6 +219,10 @@ public static class SessionAggregator RtTier = c.Input.Writer.RtTier == (uint)RtTierValue.NotQueried ? null : c.Input.Writer.RtTier, HooksInstalledMask = c.Input.Writer.HooksInstalledMask, RasterPsoCount = hooks.HasFlag(FlHookFamily.Pso) ? c.Input.Writer.RasterPsoCreated : null, + + // beta.34 (D84): DLSS 5's neural rendering, only from a writer whose Streamline detour decodes it — an older + // Overlay drains the same batches and never sets the bit, and its silence must not be stored as 0 %. + DlssNrPct = hooks.HasFlag(FlHookFamily.SlNeuralRendering) ? NeuralRendering.SharePct(c.Dominant) : null, }; } diff --git a/src/FrameLedger.CaptureHost/Consume/SlCensus.cs b/src/FrameLedger.CaptureHost/Consume/SlCensus.cs index 7009ace0..0ab7d333 100644 --- a/src/FrameLedger.CaptureHost/Consume/SlCensus.cs +++ b/src/FrameLedger.CaptureHost/Consume/SlCensus.cs @@ -55,6 +55,13 @@ internal sealed record SlCensus /// Batches that carried a feature id the Overlay does not decode. public required int WithUndecoded { get; init; } + /// + /// Batches that carried DLSS 5's kFeatureDLSS_NR (beta.34, D84). Until that build the id fell to + /// , so the two buckets are read together across builds: a writer older than beta.34 + /// counted DLSS 5 as undecoded. + /// + public required int WithNeuralRendering { get; init; } + /// /// IS NOT AN ID OBSERVATION, and must never be quoted /// as one beside fgEvaluations. @@ -64,7 +71,7 @@ internal sealed record SlCensus /// It is fgEvaluations > 0 restated — the same byte read twice — because /// FL_SL_SEEN_RETIRED_DLSS_G was retired deliberately so frame generation travels /// only as the count (dllmain.cpp §FlSlSeen), and has - /// no free fact bit left to carry a raw one. So "the census says zero" and "every record + /// no free fact bit left to carry a raw one (since beta.34 its last one is DLSS 5's). So "the census says zero" and "every record /// says zero" are ONE measurement with one provenance, and a ledger entry citing them as /// two corroborating lines would be manufacturing agreement out of a single fact. /// @@ -101,10 +108,11 @@ internal sealed record SlCensus private const int _idxFg = 3; private const int _idxUndecoded = 4; private const int _idxFgOnly = 5; + private const int _idxNeural = 6; private static SlCensus Tally(IReadOnlyList stream, int start) { - int[] n = new int[6]; + int[] n = new int[7]; int batches = 0; for (int i = start; i < stream.Count; i++) { @@ -129,6 +137,7 @@ internal sealed record SlCensus n[_idxNis] += superResolution && upscaler == FlUpscaler.Nis ? 1 : 0; n[_idxRr] += flags.HasFlag(FlFeatureFlags.RayReconstruction) ? 1 : 0; n[_idxUndecoded] += flags.HasFlag(FlFeatureFlags.SlUndecoded) ? 1 : 0; + n[_idxNeural] += flags.HasFlag(FlFeatureFlags.SlNeuralRendering) ? 1 : 0; n[_idxFg] += r.FgEvaluations > 0 ? 1 : 0; n[_idxFgOnly] += r.FgEvaluations > 0 && !superResolution ? 1 : 0; } @@ -142,6 +151,7 @@ internal sealed record SlCensus WithRayReconstruction = n[_idxRr], WithFrameGeneration = n[_idxFg], WithUndecoded = n[_idxUndecoded], + WithNeuralRendering = n[_idxNeural], FgWithoutSuperResolution = n[_idxFgOnly], }; } @@ -155,6 +165,7 @@ internal sealed record SlCensus WithRayReconstruction = 0, WithFrameGeneration = 0, WithUndecoded = 0, + WithNeuralRendering = 0, FgWithoutSuperResolution = 0, }; @@ -172,6 +183,7 @@ internal sealed record SlCensus sb.Append(" kFeatureDLSS=").Append(N(WithDlss)) .Append(" kFeatureNIS=").Append(N(WithNis)) .Append(" kFeatureDLSS_RR=").Append(N(WithRayReconstruction)) + .Append(" kFeatureDLSS_NR=").Append(N(WithNeuralRendering)) .Append(" UNDECODED=").AppendLine(N(WithUndecoded)); // NOT ON THE ID LINE. Every other column there is a distinct bit decoded from the diff --git a/src/FrameLedger.Domain/Detection/DlssBasis.cs b/src/FrameLedger.Domain/Detection/DlssBasis.cs index ad51ad2f..740815bc 100644 --- a/src/FrameLedger.Domain/Detection/DlssBasis.cs +++ b/src/FrameLedger.Domain/Detection/DlssBasis.cs @@ -20,4 +20,7 @@ public enum DlssBasis /// The NVIDIA App's Dynamic frame generation, which the driver reported applied (beta.34, D83). DynamicFrameGeneration = 4, + + /// DLSS 5's neural rendering, seen evaluated on some of the session's frames (beta.34, D84). + NeuralRendering = 5, } diff --git a/src/FrameLedger.Domain/Detection/DlssEvidence.cs b/src/FrameLedger.Domain/Detection/DlssEvidence.cs index 4c1d0374..6e67439c 100644 --- a/src/FrameLedger.Domain/Detection/DlssEvidence.cs +++ b/src/FrameLedger.Domain/Detection/DlssEvidence.cs @@ -13,5 +13,9 @@ namespace FrameLedger.Domain.Detection; /// Dynamic mode, the driver reports its frame-generation override applied in the game's process, and DLSS Frame Generation /// was counted. Dynamic exists only in DLSS 4.5, whatever multiplier it settled on. /// +/// +/// On how many of the frames the game rendered through Streamline DLSS 5's neural rendering was evaluated, 0–100 +/// (sessions.dlss_nr_pct, beta.34, D84); null where nothing could tell. +/// public sealed record DlssEvidence(Version? SuperResolution, Version? FrameGeneration, uint? Preset, double? LargestFrameGenerationFactor, - bool DynamicFrameGeneration = false); + bool DynamicFrameGeneration = false, double? NeuralRenderingPct = null); diff --git a/src/FrameLedger.Domain/Detection/DlssGeneration.cs b/src/FrameLedger.Domain/Detection/DlssGeneration.cs index 66962550..3abbd06f 100644 --- a/src/FrameLedger.Domain/Detection/DlssGeneration.cs +++ b/src/FrameLedger.Domain/Detection/DlssGeneration.cs @@ -26,8 +26,12 @@ namespace FrameLedger.Domain.Detection; /// Fixed ×5 or ×6 names DLSS 4.5 only where the frames show it. /// /// -/// DLSS 5's neural rendering is not a generation of these features and is not in this table: a session states only that -/// its runtime was loaded. +/// Until beta.34 this read "DLSS 5's neural rendering is not a generation of these features and is not in this table: a +/// session states only that its runtime was loaded". Since beta.34 (owner decision D84) DLSS 5 heads the table where its +/// neural rendering was measured running — the game evaluated kFeatureDLSS_NR on some of its frames — because DLSS 5 is named for that +/// feature as DLSS 4.5 is for its second-generation model and Dynamic frame generation: the session's other DLSS +/// features are the libraries the line lists after it. A runtime that was only loaded still names nothing (Hogwarts Legacy +/// loads it; whether it ran is the evaluation's to say). /// /// /// The generation established. @@ -38,6 +42,11 @@ public sealed record DlssGeneration(DlssGenerationKind Kind, DlssBasis Basis) public static DlssGeneration? Of(DlssEvidence evidence) { ArgumentNullException.ThrowIfNull(evidence); + if (evidence.NeuralRenderingPct is > 0) + { + return new DlssGeneration(DlssGenerationKind.Dlss5, DlssBasis.NeuralRendering); + } + if (evidence.Preset is 12 or 13) { return new DlssGeneration(DlssGenerationKind.Dlss45, DlssBasis.Preset); diff --git a/src/FrameLedger.Domain/Detection/DlssGenerationKind.cs b/src/FrameLedger.Domain/Detection/DlssGenerationKind.cs index 9f2b2618..e421f310 100644 --- a/src/FrameLedger.Domain/Detection/DlssGenerationKind.cs +++ b/src/FrameLedger.Domain/Detection/DlssGenerationKind.cs @@ -14,4 +14,7 @@ public enum DlssGenerationKind /// DLSS 4.5. Dlss45 = 45, + + /// DLSS 5 — its neural rendering measured running (beta.34, D84). + Dlss5 = 5, } diff --git a/src/FrameLedger.Domain/Metrics/FeatureBits.cs b/src/FrameLedger.Domain/Metrics/FeatureBits.cs index edf8ec78..e4d07e77 100644 --- a/src/FrameLedger.Domain/Metrics/FeatureBits.cs +++ b/src/FrameLedger.Domain/Metrics/FeatureBits.cs @@ -27,4 +27,10 @@ public enum FeatureBits RayReconstructionObserved = 1 << 4, ReflexObserved = 1 << 5, SlUndecodedObserved = 1 << 6, + + /// + /// DLSS 5's neural rendering was evaluated (beta.34, D84) — a fact whose OBSERVED is , + /// read only from a writer that published . + /// + SlNeuralRendering = 1 << 7, } diff --git a/src/FrameLedger.Domain/Metrics/HookFamilies.cs b/src/FrameLedger.Domain/Metrics/HookFamilies.cs index b8966aa2..fec1096e 100644 --- a/src/FrameLedger.Domain/Metrics/HookFamilies.cs +++ b/src/FrameLedger.Domain/Metrics/HookFamilies.cs @@ -26,4 +26,7 @@ public enum HookFamilies /// The FidelityFX quality query (beta.25, D65). UpscalerQuality = 1 << 11, + + /// The Streamline detour decodes DLSS 5's neural rendering (beta.34, D84). + SlNeuralRendering = 1 << 12, } diff --git a/src/FrameLedger.Domain/Metrics/NeuralRendering.cs b/src/FrameLedger.Domain/Metrics/NeuralRendering.cs new file mode 100644 index 00000000..a55195ae --- /dev/null +++ b/src/FrameLedger.Domain/Metrics/NeuralRendering.cs @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-3.0-only +// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE + +namespace FrameLedger.Domain.Metrics; + +/// +/// DLSS 5's neural rendering in a session (beta.34, owner decision D84; 05_DETECTION §DLSS generation): on how many +/// of the frames the game rendered through Streamline it evaluated kFeatureDLSS_NR. +/// +/// +/// Counted over the presents that drained a Streamline evaluation (, the +/// one condition every Streamline fact of the byte is published under) — about one per application frame, so a session +/// under frame generation is not diluted by its generated presents. A stream with no such present gives no share at all: +/// the title never routed through Streamline while the hook was in, and its silence says nothing about DLSS 5. Whether the +/// writer could have seen neural rendering is the caller's to ask first (): an +/// Overlay older than beta.34 drains the same batches and never sets the bit. +/// +public static class NeuralRendering +{ + /// The percentage (0–100) of the stream's Streamline batches that carried a neural-rendering evaluation, or null. + public static double? SharePct(IReadOnlyList stream) + { + ArgumentNullException.ThrowIfNull(stream); + int batches = 0; + int neural = 0; + foreach (FrameSample s in stream) + { + if (!s.Features.HasFlag(FeatureBits.RayReconstructionObserved)) + { + continue; + } + + batches++; + if (s.Features.HasFlag(FeatureBits.SlNeuralRendering)) + { + neural++; + } + } + + return batches == 0 ? null : 100.0 * neural / batches; + } +} diff --git a/src/FrameLedger.Infrastructure/Persistence/Migrations/0022_dlss_nr.sql b/src/FrameLedger.Infrastructure/Persistence/Migrations/0022_dlss_nr.sql new file mode 100644 index 00000000..1a37b421 --- /dev/null +++ b/src/FrameLedger.Infrastructure/Persistence/Migrations/0022_dlss_nr.sql @@ -0,0 +1,10 @@ +-- 0022 (2026-11-06, beta.34, owner decision D84): DLSS 5's neural rendering, measured. +-- +-- The share (0-100) of the frames a game rendered through Streamline on which it evaluated DLSS 5's neural rendering +-- (kFeatureDLSS_NR, Streamline 2.14), from the Overlay's per-frame fact (FL_FEAT_SL_NEURAL_RENDERING) over the presents that +-- drained a Streamline evaluation (Domain.Metrics.NeuralRendering). NULL where nothing could tell: an Overlay older than +-- this script decodes no neural rendering (its writer state lacks FL_HOOK_SL_NEURAL_RENDERING), and a title that never went +-- through Streamline drains no batch. Written by the Agent only (06_DATA_MODEL section Writer ownership); ADD COLUMN only. +-- A session written before has none and is never rebuilt: frame_blobs keep no feature byte. + +ALTER TABLE sessions ADD COLUMN dlss_nr_pct REAL; diff --git a/src/FrameLedger.Infrastructure/Persistence/SessionRowColumns.cs b/src/FrameLedger.Infrastructure/Persistence/SessionRowColumns.cs index f9c88a04..208d4549 100644 --- a/src/FrameLedger.Infrastructure/Persistence/SessionRowColumns.cs +++ b/src/FrameLedger.Infrastructure/Persistence/SessionRowColumns.cs @@ -19,10 +19,10 @@ namespace FrameLedger.Infrastructure.Persistence; internal static class SessionRowColumns { public const string Insert = - "INSERT INTO sessions (session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix, runtime_module_sources) " - + "VALUES (@session_guid, @game_id, @snapshot_id, @started_at, @ended_at, @duration_s, @qpc_epoch, @qpc_frequency, @capture_tier, @capture_mode, @capture_notes, @ac_exception_family, @late_attach, @telemetry_source, @overlay_build_id, @exit_status, @drain_ticks, @foreground_ticks, @records_before_attach, @dxgi_presents_before_hook, @gap_count, @guard_ticks_published, @launch_wait_ms, @api, @present_mode, @swap_effect, @hdr_flag, @hdr_source, @sync_interval_mode, @upscaler, @upscaler_quality, @upscaler_sharpness, @upscaler_driver_reported, @render_w, @render_h, @output_w, @output_h, @upscale_ratio, @settings_changed_midsession, @fg_mode, @fg_source, @fg_factor, @fg_driver_reported, @fg_runtime_census, @fg_none_withheld_reason, @fg_refusal, @fg_refusal_detail, @fg_factor_scope, @fg_steady_share, @presented_fps, @presented_qualifier, @dxgi_unseen_total, @dxgi_present_samples, @displayed_counted_by, @sl_tag_census, @sl_interposer_version, @runtime_modules, @driver_profile, @executable_markers, @ngx_driver_words, @rt_flag, @rt_source, @pt_flag, @pt_source, @pt_confidence, @rr_flag, @rr_source, @rt_frame_pct, @rays_per_pixel, @rt_pso_count, @rt_tier, @hooks_installed_mask, @raster_pso_count, @frame_count, @app_frame_count, @displayed_frame_count, @dropped_frames, @native_fps, @displayed_fps, @median_fps, @p1_low_fps, @p01_low_fps, @displayed_p1_low_fps, @min_fps, @max_fps, @frametime_stddev_ms, @stutter_count, @stutter_time_pct, @pso_stutter_pct, @reflex_active, @latency_avg_us, @latency_p95_us, @dropped_records, @fault_count, @data_quality_warnings, @writer_status_at_end, @early_stop_family, @loader_signals, @vram_proc_avg_mb, @vram_proc_max_mb, @vram_budget_exceeded_pct, @vram_adapter_max_mb, @avg_cpu_temp, @max_cpu_temp, @avg_gpu_temp, @max_gpu_temp, @max_gpu_hotspot, @avg_gpu_load, @avg_cpu_load, @avg_ram_mb, @avg_gpu_power_w, @throttle_pct, @display_exclusive_ms, @display_borderless_ms, @display_windowed_ms, @display_covers_ms, @display_minimized_ms, @display_nowindow_ms, @display_changes, @display_source, @display_window_w, @display_window_h, @display_buffer_w, @display_buffer_h, @display_monitor_w, @display_monitor_h, @display_monitor_hz, @game_vram_dedicated_avg_mb, @game_vram_dedicated_median_mb, @game_vram_dedicated_max_mb, @game_vram_shared_max_mb, @game_ram_private_avg_mb, @game_ram_private_median_mb, @game_ram_private_max_mb, @game_ram_ws_max_mb, @game_commit_max_mb, @game_memory_processes, @game_memory_source, @sensor_stats_json, @time_below_30_pct, @time_below_60_pct, @time_below_refresh_pct, @frametime_delta_mean_ms, @vsync_present_pct, @tearing_allowed_pct, @avg_gpu_core_clock_mhz, @avg_gpu_mem_clock_mhz, @avg_gpu_fan_rpm, @max_gpu_mem_temp, @power_limit_pct, @thermal_limit_pct, @app_frames_per_joule, @fg_mix, @runtime_module_sources) RETURNING id"; + "INSERT INTO sessions (session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix, runtime_module_sources, dlss_nr_pct) " + + "VALUES (@session_guid, @game_id, @snapshot_id, @started_at, @ended_at, @duration_s, @qpc_epoch, @qpc_frequency, @capture_tier, @capture_mode, @capture_notes, @ac_exception_family, @late_attach, @telemetry_source, @overlay_build_id, @exit_status, @drain_ticks, @foreground_ticks, @records_before_attach, @dxgi_presents_before_hook, @gap_count, @guard_ticks_published, @launch_wait_ms, @api, @present_mode, @swap_effect, @hdr_flag, @hdr_source, @sync_interval_mode, @upscaler, @upscaler_quality, @upscaler_sharpness, @upscaler_driver_reported, @render_w, @render_h, @output_w, @output_h, @upscale_ratio, @settings_changed_midsession, @fg_mode, @fg_source, @fg_factor, @fg_driver_reported, @fg_runtime_census, @fg_none_withheld_reason, @fg_refusal, @fg_refusal_detail, @fg_factor_scope, @fg_steady_share, @presented_fps, @presented_qualifier, @dxgi_unseen_total, @dxgi_present_samples, @displayed_counted_by, @sl_tag_census, @sl_interposer_version, @runtime_modules, @driver_profile, @executable_markers, @ngx_driver_words, @rt_flag, @rt_source, @pt_flag, @pt_source, @pt_confidence, @rr_flag, @rr_source, @rt_frame_pct, @rays_per_pixel, @rt_pso_count, @rt_tier, @hooks_installed_mask, @raster_pso_count, @frame_count, @app_frame_count, @displayed_frame_count, @dropped_frames, @native_fps, @displayed_fps, @median_fps, @p1_low_fps, @p01_low_fps, @displayed_p1_low_fps, @min_fps, @max_fps, @frametime_stddev_ms, @stutter_count, @stutter_time_pct, @pso_stutter_pct, @reflex_active, @latency_avg_us, @latency_p95_us, @dropped_records, @fault_count, @data_quality_warnings, @writer_status_at_end, @early_stop_family, @loader_signals, @vram_proc_avg_mb, @vram_proc_max_mb, @vram_budget_exceeded_pct, @vram_adapter_max_mb, @avg_cpu_temp, @max_cpu_temp, @avg_gpu_temp, @max_gpu_temp, @max_gpu_hotspot, @avg_gpu_load, @avg_cpu_load, @avg_ram_mb, @avg_gpu_power_w, @throttle_pct, @display_exclusive_ms, @display_borderless_ms, @display_windowed_ms, @display_covers_ms, @display_minimized_ms, @display_nowindow_ms, @display_changes, @display_source, @display_window_w, @display_window_h, @display_buffer_w, @display_buffer_h, @display_monitor_w, @display_monitor_h, @display_monitor_hz, @game_vram_dedicated_avg_mb, @game_vram_dedicated_median_mb, @game_vram_dedicated_max_mb, @game_vram_shared_max_mb, @game_ram_private_avg_mb, @game_ram_private_median_mb, @game_ram_private_max_mb, @game_ram_ws_max_mb, @game_commit_max_mb, @game_memory_processes, @game_memory_source, @sensor_stats_json, @time_below_30_pct, @time_below_60_pct, @time_below_refresh_pct, @frametime_delta_mean_ms, @vsync_present_pct, @tearing_allowed_pct, @avg_gpu_core_clock_mhz, @avg_gpu_mem_clock_mhz, @avg_gpu_fan_rpm, @max_gpu_mem_temp, @power_limit_pct, @thermal_limit_pct, @app_frames_per_joule, @fg_mix, @runtime_module_sources, @dlss_nr_pct) RETURNING id"; - public const string Select = "SELECT id, session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix, runtime_module_sources FROM sessions"; + public const string Select = "SELECT id, session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, capture_notes, ac_exception_family, late_attach, telemetry_source, overlay_build_id, exit_status, drain_ticks, foreground_ticks, records_before_attach, dxgi_presents_before_hook, gap_count, guard_ticks_published, launch_wait_ms, api, present_mode, swap_effect, hdr_flag, hdr_source, sync_interval_mode, upscaler, upscaler_quality, upscaler_sharpness, upscaler_driver_reported, render_w, render_h, output_w, output_h, upscale_ratio, settings_changed_midsession, fg_mode, fg_source, fg_factor, fg_driver_reported, fg_runtime_census, fg_none_withheld_reason, fg_refusal, fg_refusal_detail, fg_factor_scope, fg_steady_share, presented_fps, presented_qualifier, dxgi_unseen_total, dxgi_present_samples, displayed_counted_by, sl_tag_census, sl_interposer_version, runtime_modules, driver_profile, executable_markers, ngx_driver_words, rt_flag, rt_source, pt_flag, pt_source, pt_confidence, rr_flag, rr_source, rt_frame_pct, rays_per_pixel, rt_pso_count, rt_tier, hooks_installed_mask, raster_pso_count, frame_count, app_frame_count, displayed_frame_count, dropped_frames, native_fps, displayed_fps, median_fps, p1_low_fps, p01_low_fps, displayed_p1_low_fps, min_fps, max_fps, frametime_stddev_ms, stutter_count, stutter_time_pct, pso_stutter_pct, reflex_active, latency_avg_us, latency_p95_us, dropped_records, fault_count, data_quality_warnings, writer_status_at_end, early_stop_family, loader_signals, vram_proc_avg_mb, vram_proc_max_mb, vram_budget_exceeded_pct, vram_adapter_max_mb, avg_cpu_temp, max_cpu_temp, avg_gpu_temp, max_gpu_temp, max_gpu_hotspot, avg_gpu_load, avg_cpu_load, avg_ram_mb, avg_gpu_power_w, throttle_pct, display_exclusive_ms, display_borderless_ms, display_windowed_ms, display_covers_ms, display_minimized_ms, display_nowindow_ms, display_changes, display_source, display_window_w, display_window_h, display_buffer_w, display_buffer_h, display_monitor_w, display_monitor_h, display_monitor_hz, game_vram_dedicated_avg_mb, game_vram_dedicated_median_mb, game_vram_dedicated_max_mb, game_vram_shared_max_mb, game_ram_private_avg_mb, game_ram_private_median_mb, game_ram_private_max_mb, game_ram_ws_max_mb, game_commit_max_mb, game_memory_processes, game_memory_source, sensor_stats_json, time_below_30_pct, time_below_60_pct, time_below_refresh_pct, frametime_delta_mean_ms, vsync_present_pct, tearing_allowed_pct, avg_gpu_core_clock_mhz, avg_gpu_mem_clock_mhz, avg_gpu_fan_rpm, max_gpu_mem_temp, power_limit_pct, thermal_limit_pct, app_frames_per_joule, fg_mix, runtime_module_sources, dlss_nr_pct FROM sessions"; public static Dictionary Parameters(SessionRow s) { @@ -413,12 +413,16 @@ internal static class SessionRowColumns // Schema 0021 (beta.24, D64): each runtime module's folder class. d["runtime_module_sources"] = s.RuntimeModuleSourcesJson; + + // Schema 0022 (beta.34, D84): DLSS 5's neural rendering, the share of Streamline frames that evaluated it. + d["dlss_nr_pct"] = s.DlssNrPct; } private static SessionRow Read7(SessionRow row, DbDataReader r) => row with { FgMixJson = S(r, "fg_mix"), RuntimeModuleSourcesJson = S(r, "runtime_module_sources"), + DlssNrPct = D(r, "dlss_nr_pct"), }; public static string ExitStatusText(ExitStatus status) => Vocabulary.ExitStatusText(status); diff --git a/src/FrameLedger.Shared/ShmLayout.cs b/src/FrameLedger.Shared/ShmLayout.cs index d4ec3c27..0a42a6c0 100644 --- a/src/FrameLedger.Shared/ShmLayout.cs +++ b/src/FrameLedger.Shared/ShmLayout.cs @@ -232,6 +232,16 @@ public enum FlFeatureFlags : byte RayReconstructionObserved = 1 << 4, ReflexObserved = 1 << 5, SlUndecodedObserved = 1 << 6, + + /// + /// DLSS 5's neural rendering — kFeatureDLSS_NR — was evaluated this frame (beta.34, D84). + /// + /// + /// A fact in the companions' half, the byte's last free bit: like it is published only + /// where an evaluation drained, so is its OBSERVED; and only a writer that + /// published could set it — an older one's silence is not a "No". + /// + SlNeuralRendering = 1 << 7, } /// Which hook families a writer installed. Bits in . @@ -258,6 +268,12 @@ public enum FlHookFamily : uint /// The FidelityFX quality query, ffxQuery (beta.25, D65): what lets a dispatch's size name its mode. UpscalerQuality = 1u << 11, + + /// + /// The slEvaluateFeature detour decodes DLSS 5's kFeatureDLSS_NR (beta.34, D84) — published with it, so a + /// writer that looked for neural rendering is told from one built before it could (). + /// + SlNeuralRendering = 1u << 12, } /// diff --git a/src/native/FrameLedger.Overlay/include/fl_hook_inventory.h b/src/native/FrameLedger.Overlay/include/fl_hook_inventory.h index 03c390a9..7c26e074 100644 --- a/src/native/FrameLedger.Overlay/include/fl_hook_inventory.h +++ b/src/native/FrameLedger.Overlay/include/fl_hook_inventory.h @@ -99,7 +99,13 @@ namespace fl::inventory { // ones that never evaluate anything through this export. The family bit moved with // the count, so EntitledBy still binds FL_MEASURED_FG_COUNTS to the detour that // actually produces it. -inline constexpr uint32_t kFamilyEvaluateFeature = static_cast(fl::FL_HOOK_UPSCALER_IDENTITY); +// +// AND NEURAL RENDERING SINCE beta.34 (owner decision D84): the same detour decodes kFeatureDLSS_NR (Streamline 2.14's +// sl_core_types.h, re-vendored for it) into FL_FEAT_SL_NEURAL_RENDERING, so the row claims FL_HOOK_SL_NEURAL_RENDERING +// beside identity -- the family is what separates "this writer looked and DLSS 5 did not run" from "this writer was +// built before it could look". +inline constexpr uint32_t kFamilyEvaluateFeature = + static_cast(fl::FL_HOOK_UPSCALER_IDENTITY) | static_cast(fl::FL_HOOK_SL_NEURAL_RENDERING); // EVERY FAMILY THIS DETOUR DOES NOT IMPLEMENT, NAMED. The obvious assertion -- // `kFamilyEvaluateFeature == (IDENTITY | FG_EVALUATIONS)` -- is a TAUTOLOGY against @@ -126,6 +132,10 @@ static_assert((kFamilyEvaluateFeature & kFamiliesEvaluateFeatureDoesNotImplement "verdict available"); static_assert((kFamilyEvaluateFeature & static_cast(fl::FL_HOOK_UPSCALER_IDENTITY)) != 0u, "the detour decodes sl::Feature, so it must claim upscaler identity"); +static_assert( + (kFamilyEvaluateFeature & static_cast(fl::FL_HOOK_SL_NEURAL_RENDERING)) != 0u, + "the detour decodes kFeatureDLSS_NR, so it must say so -- without the family an Agent cannot tell a writer " + "that saw no neural rendering from one that could not have seen it"); static_assert((kFamilyEvaluateFeature & static_cast(fl::FL_HOOK_FG_EVALUATIONS)) == 0u, "the evaluate detour no longer produces the application-frame count -- slGetNewFrameToken does -- " "so claiming FG_EVALUATIONS here would entitle FL_MEASURED_FG_COUNTS to a detour that writes " @@ -190,7 +200,7 @@ inline constexpr uint32_t kFamiliesFfxDispatchDoesNotImplement = static_cast(fl::FL_HOOK_RT_AS_BUILD) | static_cast(fl::FL_HOOK_RT_PSO) | static_cast(fl::FL_HOOK_PSO) | static_cast(fl::FL_HOOK_COLOR_SPACE) | static_cast(fl::FL_HOOK_REFLEX) | static_cast(fl::FL_HOOK_VRAM) | - static_cast(fl::FL_HOOK_UPSCALER_QUALITY); + static_cast(fl::FL_HOOK_UPSCALER_QUALITY) | static_cast(fl::FL_HOOK_SL_NEURAL_RENDERING); static_assert((kFamilyFfxDispatch & kFamiliesFfxDispatchDoesNotImplement) == 0u, "the ffxDispatch rows claim a family their detour does not implement -- hookinventory-check reads " diff --git a/src/native/FrameLedger.Overlay/src/dllmain.cpp b/src/native/FrameLedger.Overlay/src/dllmain.cpp index 1ca1f191..e43365b4 100644 --- a/src/native/FrameLedger.Overlay/src/dllmain.cpp +++ b/src/native/FrameLedger.Overlay/src/dllmain.cpp @@ -987,6 +987,14 @@ enum FlSlSeen : uint32_t { FL_SL_SEEN_RETIRED_DLSS_G = 1u << 3, FL_SL_SEEN_OTHER = 1u << 4, // an id we do not decode -- coverage is short, and we say so + + // kFeatureDLSS_NR (1004, Streamline 2.14's sl_core_types.h): DLSS 5's neural rendering, which is neither an + // upscaler nor frame generation, so it moves no decoded byte -- RecordPresent turns it into + // FL_FEAT_SL_NEURAL_RENDERING and nothing else. Until beta.34 it fell to FL_SL_SEEN_OTHER: the owner's Hogwarts + // Legacy loaded DLSS 5's runtime with Neural Rendering on and the session could say only that it was LOADED + // (spike-notes §26, owner decision D84). Bit 5 sits inside fl::slseen::kFeatureMask (8 bits, derived), below the + // frame-generation count. + FL_SL_SEEN_DLSS_NR = 1u << 5, }; std::atomic g_slSeen{0}; @@ -1628,6 +1636,8 @@ sl::Result STDMETHODCALLTYPE Hook_SlEvaluateFeature(sl::Feature feature, const s bit = FL_SL_SEEN_NIS; } else if (feature == sl::kFeatureDLSS_RR) { bit = FL_SL_SEEN_DLSS_RR; + } else if (feature == sl::kFeatureDLSS_NR) { + bit = FL_SL_SEEN_DLSS_NR; } else if (feature == sl::kFeatureDLSS_G) { bit = 0u; // carried as a COUNT below, not as a bit } @@ -3089,11 +3099,24 @@ void RecordPresent(IDXGISwapChain* sc, UINT syncInterval, UINT flags) noexcept { // repo keeps catching -- `a != b` passes when one side is absent. The fixture is // cheap: --hold-presenting-fg already drives a chosen sl::Feature, so a mode // passing an id outside the four decoded constants would settle it. + // (Settled since, and this paragraph predates it -- noted 2026-11-06: guard_test's + // "an upscaler the Overlay cannot identify is UNKNOWN, never NONE" drives 0xF00D + // through an injected Overlay and finds UNDECODED on every record.) feat = static_cast(feat | FL_FEAT_SL_UNDECODED_OBSERVED); if ((seen & FL_SL_SEEN_OTHER) != 0u) { feat = static_cast(feat | FL_FEAT_SL_UNDECODED); } + // DLSS 5'S NEURAL RENDERING RAN THIS FRAME (beta.34, D84): kFeatureDLSS_NR was evaluated. + // Under the same condition as the facts above -- an evaluation was drained -- so its + // OBSERVED companion is FL_FEAT_RAY_RECONSTRUCTION_OBSERVED, as it is for the + // super-resolution fact below, and for the same reason: a second companion would be + // equal to it bit for bit. Never inferred from the module being loaded: Hogwarts Legacy + // loads nvngx_dlssnr.dll, and a load is not an evaluation. + if ((seen & FL_SL_SEEN_DLSS_NR) != 0u) { + feat = static_cast(feat | FL_FEAT_SL_NEURAL_RENDERING); + } + // THE RAW SUPER-RESOLUTION FACT, kept apart from the decoded `upscaler` byte. // // The decode maps kFeatureDLSS_RR to FL_UPSCALER_DLSS, because Ray Reconstruction diff --git a/src/native/FrameLedger.Shm/include/fl_shm.h b/src/native/FrameLedger.Shm/include/fl_shm.h index c5855b5f..cfefe5cc 100644 --- a/src/native/FrameLedger.Shm/include/fl_shm.h +++ b/src/native/FrameLedger.Shm/include/fl_shm.h @@ -291,7 +291,19 @@ enum FlFeatureFlags : uint8_t { FL_FEAT_RAY_RECONSTRUCTION_OBSERVED = 1u << 4, FL_FEAT_REFLEX_OBSERVED = 1u << 5, FL_FEAT_SL_UNDECODED_OBSERVED = 1u << 6, - // bit 7 free, and must pair with the fact bit four places below + + // DLSS 5'S NEURAL RENDERING -- kFeatureDLSS_NR (1004, Streamline 2.14) was evaluated this frame + // (beta.34, owner decision D84). The byte's last free bit, and a FACT in the companions' half: + // this line said "bit 7 free, and must pair with the fact bit four places below", and bit 3 + // took no companion for the reason it gives above -- every Streamline fact here is published + // under one condition, an evaluation drained, so its OBSERVED is + // FL_FEAT_RAY_RECONSTRUCTION_OBSERVED. This one is the same kind of fact and takes the same + // companion. Until it existed DLSS 5's evaluations fell to FL_FEAT_SL_UNDECODED, and a session + // could say only that the runtime was LOADED (spike-notes §26). + // + // AN ENUMERATOR, NOT A FIELD: no struct changes, so no FL_SHM_LAYOUT_VERSION bump, no + // ShmLayout.cs struct edit and no fl-layout-dump entry -- the mirror's enum gains the member. + FL_FEAT_SL_NEURAL_RENDERING = 1u << 7, }; // bits in FlFrameRecord::rtFlags — POLARITY FLIPPED IN v3. @@ -379,6 +391,12 @@ enum FlHookFamily : uint32_t { // It measures nothing by itself; it is what lets an UPSCALE dispatch's renderSize name the mode the title asked // for, so "hooked, and the title never asked" can be told from "not hooked". FL_HOOK_UPSCALER_QUALITY = 1u << 11, + // DLSS 5's neural rendering (beta.34, owner decision D84): the slEvaluateFeature detour that publishes this decodes + // kFeatureDLSS_NR into FL_FEAT_SL_NEURAL_RENDERING. Published with the detour, never by itself, it is what tells a + // writer that LOOKED for neural rendering from one built before it could: an Overlay older than beta.34 sets + // FL_FEAT_RAY_RECONSTRUCTION_OBSERVED and never bit 7, and without this family its silence would read as a + // measured "not running" -- a fabricated negative of the kind 03_METRICS §RT/PT/RR forbids for ray reconstruction. + FL_HOOK_SL_NEURAL_RENDERING = 1u << 12, }; // FlWriterState::runtimeCensus -- which vendor RUNTIME MODULES the loader reported diff --git a/src/native/tests/guard_test.cpp b/src/native/tests/guard_test.cpp index 2a69423e..13e9e7b9 100644 --- a/src/native/tests/guard_test.cpp +++ b/src/native/tests/guard_test.cpp @@ -5339,6 +5339,95 @@ TEST_CASE("an upscaler the Overlay cannot identify is UNKNOWN, never NONE", "[gu CHECK(undecoded == static_cast(all.size())); CHECK(superResolution == 0); + // And 0xF00D is not DLSS 5 either (beta.34): the neural-rendering fact belongs to kFeatureDLSS_NR alone. + int neural = 0; + for (const auto& r : all) { + if ((r.featureFlags & fl::FL_FEAT_SL_NEURAL_RENDERING) != 0u) { + ++neural; + } + } + CHECK(neural == 0); + + UnmapViewOfFile(base); + CloseHandle(mapping); +} + +TEST_CASE("DLSS 5's neural rendering is its own fact, never an undecoded id and never an upscaler", + "[guard][inject][shm][upscaler]") { + // beta.34, owner decision D84. The target evaluates kFeatureDLSS_NR (1004, Streamline 2.14's sl_core_types.h) once + // per present. Until this build the id fell to FL_SL_SEEN_OTHER, and the owner's Hogwarts Legacy -- DLSS 5's + // runtime loaded, Neural Rendering on -- could only be said to have LOADED it. Three things are asserted, each by + // count: the fact on every record; UNDECODED on none (the id is decoded now); and the upscaler UNKNOWN, as for any + // id that names no upscaler -- neural rendering is not one, and naming DLSS for it would be the decode inventing an + // answer. And the family the Agent keys the session's share on is published with the detour, so a measured 0 % can + // only come from a writer that looked. + Child child; + std::wstring cmd = std::wstring(L"\"") + FL_HARNESS_EXE + L"\" --real --hold-presenting-upscaled-nr 12"; + STARTUPINFOW si{}; + si.cb = sizeof(si); + REQUIRE(CreateProcessW(FL_HARNESS_EXE, cmd.data(), nullptr, nullptr, FALSE, CREATE_NO_WINDOW, nullptr, nullptr, &si, + &child.pi)); + Sleep(800); + REQUIRE(WaitForSingleObject(child.pi.hProcess, 0) == WAIT_TIMEOUT); + + ResetFake(); + g.modules = {"kernel32.dll"}; + g.scanSet = {child.pi.dwProcessId}; + REQUIRE(GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, FakeSources()).Allowed()); + + wchar_t name[128]{}; + REQUIRE(_snwprintf_s(name, _TRUNCATE, L"Local\\FrameLedger.Ring.%lu", child.pi.dwProcessId) > 0); + HANDLE mapping = nullptr; + for (int i = 0; i < 100 && mapping == nullptr; ++i) { + mapping = OpenFileMappingW(FILE_MAP_READ, FALSE, name); + if (mapping == nullptr) { + Sleep(50); + } + } + REQUIRE(mapping != nullptr); + const void* base = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0); + REQUIRE(base != nullptr); + + const auto* st = + reinterpret_cast(static_cast(base) + FL_SHM_WRITER_OFFSET); + REQUIRE(WaitForIdentityHook(st)); + CHECK((st->hooksInstalledMask & static_cast(fl::FL_HOOK_SL_NEURAL_RENDERING)) != 0u); + + fl::RingReader rd; + REQUIRE(rd.Init(base, FL_SHM_DEFAULT_CAPACITY)); + DiscardBacklog(rd); + const std::vector all = DrainAtLeast(rd, 40, 8000); + REQUIRE(all.size() > 20); + + int neural = 0; + int observed = 0; + int undecoded = 0; + int superResolution = 0; + int unknown = 0; + for (const auto& r : all) { + if ((r.featureFlags & fl::FL_FEAT_SL_NEURAL_RENDERING) != 0u) { + ++neural; + } + if ((r.featureFlags & fl::FL_FEAT_RAY_RECONSTRUCTION_OBSERVED) != 0u) { + ++observed; + } + if ((r.featureFlags & fl::FL_FEAT_SL_UNDECODED) != 0u) { + ++undecoded; + } + if ((r.featureFlags & fl::FL_FEAT_SL_SUPER_RESOLUTION) != 0u) { + ++superResolution; + } + if (r.upscaler == fl::FL_UPSCALER_UNKNOWN) { + ++unknown; + } + } + CHECK(neural == static_cast(all.size())); // one evaluation per present, so every record + CHECK(observed == static_cast(all.size())); // under the condition every Streamline fact shares + CHECK(undecoded == 0); // decoded now -- not "an id we do not know" + CHECK(superResolution == 0); // and not a super-resolution id + CHECK(unknown == static_cast(all.size())); // neural rendering names no upscaler + CHECK(st->faultCount == 0); + UnmapViewOfFile(base); CloseHandle(mapping); } @@ -5533,8 +5622,11 @@ TEST_CASE("application-frame tokens are COUNTED, and the count tracks the fixtur // UPSCALER_PARAMS is in the expected set because the stub exports slSetTag as // well, so the watchdog installs BOTH inventory rows regardless of whether // this fixture ever calls the second one. Installing is what the mask records. + // SL_NEURAL_RENDERING since beta.34 (D84): the evaluate row's compound family + // carries it, published with the detour, so a writer that could see DLSS 5 says so. CHECK(obs.hooks == static_cast(fl::FL_HOOK_PRESENT | fl::FL_HOOK_UPSCALER_IDENTITY | - fl::FL_HOOK_UPSCALER_PARAMS | fl::FL_HOOK_FG_EVALUATIONS)); + fl::FL_HOOK_UPSCALER_PARAMS | fl::FL_HOOK_FG_EVALUATIONS | + fl::FL_HOOK_SL_NEURAL_RENDERING)); // THE CENSUS SEES THE STUB BY NAME. The interposer stub is loaded by absolute // path and is still called sl.interposer.dll, so the loader answers yes for diff --git a/src/native/third_party/streamline/README.md b/src/native/third_party/streamline/README.md index 820d4372..500c0c5a 100644 --- a/src/native/third_party/streamline/README.md +++ b/src/native/third_party/streamline/README.md @@ -1,7 +1,8 @@ # NVIDIA Streamline headers (vendored) -Copied from , `main`, on 2026-08-09. -**Headers only. No `.lib`, no `.dll`, no source, and deliberately not the whole +Copied from , `main`, on 2026-08-09 — which was tag `v2.12.0`, byte for byte — +and **re-vendored at tag `v2.14.16` on 2026-11-06** (beta.34, the owner: "check what changed in recent Streamline +versions and fix it if really needed"). **Headers only. No `.lib`, no `.dll`, no source, and deliberately not the whole `include/` directory** — see §What is here, and what is not. **Licence:** MIT. `license.txt` is the upstream file, verbatim, and it opens with @@ -19,6 +20,24 @@ the index blob is CRLF too, so unlike the NVAPI case — where upstream is LF an transformation happens here in either direction. The bytes under version control are the upstream bytes. +## 2026-11-06: v2.12.0 → v2.14.16, and why + +Compared with the upstream tags through GitHub's API, all eleven files byte for byte: the copy of 2026-08-09 equals +`v2.12.0`; `v2.14.16` (2026-10-16) — the Streamline that Hogwarts Legacy ships and the NVIDIA App's DLSS override loads +— changes three of them, and the three are now its bytes (CRLF, as upstream): + +- `sl_core_types.h` — **`kFeatureDLSS_NR = 1004`**, DLSS 5's neural rendering, which the Overlay's `slEvaluateFeature` + detour now decodes (`spike-notes` §26, owner decision D84); buffer types 70–72, reserved until then, become + `kBufferTypeUpliftInputColor`, `kBufferTypeUpliftOutputColor` and `kBufferTypeUpliftControlMask` (the tag census still + counts them as *other*); `Resource::reserved` (32 bits) becomes `internalFlags` + `reserved` (16 bits each — the + struct's size is unchanged, and nothing here reads either). +- `sl_struct.h` — `kStructVersion7`. +- `sl_version.h` — 2.14.16, so `kSDKVersion` is 2.14.16's: the dev probe `tools/fl-probe-interposer` passes it to `slInit`. + +`sl.h`, `sl_core_api.h` (`PFun_slEvaluateFeature` — `hookinventory-check` Pass A's signature), `sl_dlss.h` and +`license.txt` are identical in both tags, and the closure is still the same ten headers. Re-checked on the new bytes: +no `throw`, `try` or `catch` in code (one "try" in a comment), and none of the four licence needles. + ## Why this could be vendored at all `docs/18_GPU_VENDOR_APIS.md` §Checklist before adding any vendor SDK, step 1: MIT diff --git a/src/native/third_party/streamline/include/sl_core_types.h b/src/native/third_party/streamline/include/sl_core_types.h index 712e6261..aa38649a 100644 --- a/src/native/third_party/streamline/include/sl_core_types.h +++ b/src/native/third_party/streamline/include/sl_core_types.h @@ -206,12 +206,13 @@ constexpr BufferType kBufferTypeResponsivityMask = 68; //! A 1 channel resource containing the alpha value of on-screen elements, between 0.0f and 1.0f inclusive. //! Similar to kBufferTypeUIColorAndAlpha, but only the alpha channel for optimized run-time performance. constexpr BufferType kBufferTypeUIAlpha = 69; -//! Reserved for future use, do not use -constexpr BufferType kBufferTypeReserved70 = 70; -//! Reserved for future use, do not use -constexpr BufferType kBufferTypeReserved71 = 71; -//! Reserved for future use, do not use -constexpr BufferType kBufferTypeReserved72 = 72; +//! Input color for neural-net "uplift" passes +constexpr BufferType kBufferTypeUpliftInputColor = 70; +//! Output color for neural-net "uplift" passes +//! May alias kBufferTypeUpliftInputColor (in-place uplift); the feature transitions appropriately. +constexpr BufferType kBufferTypeUpliftOutputColor = 71; +//! Optional - 4-channel control mask consumed by uplift passes +constexpr BufferType kBufferTypeUpliftControlMask = 72; //! Features supported with this SDK //! @@ -249,6 +250,7 @@ constexpr Feature kFeatureNvPerf = 1002; constexpr Feature kFeatureDirectSR = 1003; +constexpr Feature kFeatureDLSS_NR = 1004; // ImGUI constexpr Feature kFeatureImGUI = 9999; @@ -371,8 +373,17 @@ SL_STRUCT_BEGIN(Resource, StructType({ 0x3a9d70cf, 0x2418, 0x4b72, { 0x83, 0x91, uint32_t flags; //! VkImageUsageFlags uint32_t usage{}; - //! Reserved for internal use - uint32_t reserved{}; + //! Internal flags (bitfield) - do not modify + enum InternalFlags : uint16_t + { + eNone = 0, + //! Resource wraps a Vulkan swapchain image not allocated by SL or the host callback. + //! The release callback must not be invoked for such resources. + eVulkanSwapChainImage = 1 << 0, + }; + uint16_t internalFlags{}; + //! Reserved for future use + uint16_t reserved{}; //! IMPORTANT: New members go here or if optional can be chained in a new struct, see sl_struct.h for details SL_STRUCT_END() diff --git a/src/native/third_party/streamline/include/sl_struct.h b/src/native/third_party/streamline/include/sl_struct.h index 79420733..e9e91118 100644 --- a/src/native/third_party/streamline/include/sl_struct.h +++ b/src/native/third_party/streamline/include/sl_struct.h @@ -103,6 +103,7 @@ constexpr uint32_t kStructVersion3 = 3; constexpr uint32_t kStructVersion4 = 4; constexpr uint32_t kStructVersion5 = 5; constexpr uint32_t kStructVersion6 = 6; +constexpr uint32_t kStructVersion7 = 7; struct BaseStructure { diff --git a/src/native/third_party/streamline/include/sl_version.h b/src/native/third_party/streamline/include/sl_version.h index be512364..1848f70d 100644 --- a/src/native/third_party/streamline/include/sl_version.h +++ b/src/native/third_party/streamline/include/sl_version.h @@ -22,8 +22,8 @@ #pragma once #define SL_VERSION_MAJOR 2 -#define SL_VERSION_MINOR 12 -#define SL_VERSION_PATCH 0 +#define SL_VERSION_MINOR 14 +#define SL_VERSION_PATCH 16 #include #include diff --git a/src/native/tools/hook-harness/main.cpp b/src/native/tools/hook-harness/main.cpp index 726f65b3..e4250ece 100644 --- a/src/native/tools/hook-harness/main.cpp +++ b/src/native/tools/hook-harness/main.cpp @@ -3134,6 +3134,14 @@ int main(int argc, char** argv) { slTagWholeResource, slTagDlssgInputs) == 0 && ok; ranSomething = true; + } else if (std::strcmp(argv[i], "--hold-presenting-upscaled-nr") == 0 && i + 1 < argc) { + // The SAME target, evaluating DLSS 5's neural rendering (kFeatureDLSS_NR, Streamline 2.14 -- beta.34, D84) + // once per present. It is not an upscaler: the record must say UNKNOWN for the upscaler, as for any id + // that names none, and carry FL_FEAT_SL_NEURAL_RENDERING rather than FL_FEAT_SL_UNDECODED. + ok = HoldPresentingUpscaled(g, std::atoi(argv[++i]), real, sl::kFeatureDLSS_NR, slTagForFrame, + slTagWholeResource, slTagDlssgInputs) == 0 && + ok; + ranSomething = true; } else if (std::strcmp(argv[i], "--probe-upscaler-resolve") == 0) { ok = ProbeUpscalerResolve() && ok; ranSomething = true; diff --git a/tests/FrameLedger.App.Tests/DlssTextTests.cs b/tests/FrameLedger.App.Tests/DlssTextTests.cs index 9ca49eeb..3ddf4659 100644 --- a/tests/FrameLedger.App.Tests/DlssTextTests.cs +++ b/tests/FrameLedger.App.Tests/DlssTextTests.cs @@ -54,7 +54,7 @@ public sealed class DlssTextTests "{\"Kind\":\"none\",\"Factor\":null,\"NativeFps\":61.68,\"DisplayedFps\":61.69,\"Seconds\":1203.9,\"Share\":0.198,\"Windows\":241}]}"; private static SessionRow Row(string? modules = null, string? sources = null, string? upscaler = null, string? driverReported = null, string? words = null, - string fgMode = "na", double? factor = null, string? mix = null, string? profile = null) => new() + string fgMode = "na", double? factor = null, string? mix = null, string? profile = null, double? neural = null) => new() { SessionGuid = Guid.NewGuid(), GameId = 1, @@ -76,8 +76,39 @@ public sealed class DlssTextTests FgFactor = factor, FgMixJson = mix, DriverProfileJson = profile, + DlssNrPct = neural, }; + /// + /// beta.34, owner decision D84: Hogwarts Legacy with Neural Rendering on (the owner's session 132, 2026-11-06) loaded DLSS + /// 5's runtime, 310.9.16.0 from the game's folder, and could say only that. Measured running, DLSS 5 is the generation; + /// measured not running, it says so; with nothing able to tell, it stays "loaded". + /// + [Fact] + public void Dlss5IsTheGenerationWhereItsNeuralRenderingWasSeenRunning() => InEnglish(() => + { + const string modules = "{\"sl.interposer.dll\":\"2,14,16,0\",\"nvngx_dlss.dll\":\"310,9,16,0\",\"nvngx_dlssg.dll\":\"310,9,16,0\"," + + "\"nvngx_dlssd.dll\":\"310,9,16,0\",\"nvngx_dlssnr.dll\":\"310,9,16,0\"}"; + const string sources = "{\"nvngx_dlss.dll\":\"game\",\"nvngx_dlssg.dll\":\"game\",\"nvngx_dlssd.dll\":\"game\",\"nvngx_dlssnr.dll\":\"game\"}"; + SessionRow hogwarts = Row(modules, sources, upscaler: "unknown", driverReported: "dlss", fgMode: "dlssg", neural: 97.31, + words: "{\"Outcome\":\"Answered\",\"Sr\":\"0x80605\",\"Rr\":\"0x5\",\"Fg\":\"0x5\",\"Readings\":5,\"Answered\":4}"); + + DlssText.Label(hogwarts).Should().Be("DLSS 5 (neural rendering on 97.3% of rendered frames)"); + DlssText.Line(hogwarts).Should().Be("DLSS 5 (neural rendering on 97.3% of rendered frames) · Super Resolution 310.9.16, from the game" + + " · Ray Reconstruction 310.9.16, from the game · Frame Generation 310.9.16, from the game · Neural Rendering 310.9.16, from the game"); + DlssText.ExportLine(hogwarts).Should().Be("generation=DLSS 5 basis=neural_rendering; nvngx_dlss.dll=310,9,16,0 game; nvngx_dlssd.dll=310,9,16,0 game;" + + " nvngx_dlssg.dll=310,9,16,0 game; nvngx_dlssnr.dll=310,9,16,0 game; neural_rendering_pct=97.3"); + + SessionRow off = hogwarts with { DlssNrPct = 0 }; + DlssText.Label(off).Should().BeNull("not running, and the rest names no generation"); + DlssText.Line(off).Should().EndWith("Neural Rendering 310.9.16, from the game · DLSS 5 runtime loaded, not seen running"); + + SessionRow unknown = hogwarts with { DlssNrPct = null }; + DlssText.Line(unknown).Should().EndWith("Neural Rendering 310.9.16, from the game · DLSS 5 runtime loaded", + "an Overlay before beta.34, or a title outside Streamline: nothing could tell, so never \"not running\""); + return 0; + }); + /// /// beta.34, owner decision D83: Phantom Blade Zero under the NVIDIA App's Dynamic frame generation, up to ×3, held ×2.0 /// and ×3.0 and read "DLSS 4 (a ×3.0 frame-generation state)" — Dynamic exists only in DLSS 4.5. Evidence is the @@ -149,7 +180,8 @@ public sealed class DlssTextTests DlssText.Label(Row("{\"nvngx_dlss.dll\":\"3.7.10.0\"}", upscaler: "dlss")).Should().Be("DLSS 3 (library 3.7.10)"); DlssText.Label(Row("{\"nvngx_dlss.dll\":\"2.5.1.0\"}", upscaler: "dlss")).Should().Be("DLSS 2 (library 2.5.1)"); DlssText.Line(Row("{\"nvngx_dlss.dll\":\"310.9.1.0\",\"nvngx_dlssnr.dll\":\"1.0.0.0\"}", upscaler: "dlss")) - .Should().Be("DLSS · Super Resolution 310.9.1 · DLSS 5 runtime loaded"); + .Should().Be("DLSS · Super Resolution 310.9.1 · Neural Rendering 1.0.0 · DLSS 5 runtime loaded", + "since beta.34 DLSS 5's library is listed like the others; loaded, with nothing measured, it is only loaded"); DlssText.Line(Row("{\"sl.interposer.dll\":\"2,8,0,0\"}", upscaler: "fsr3")).Should().BeNull("no DLSS at all"); DlssText.Line(Row("{broken", upscaler: "dlss")).Should().BeNull("a line that would say only DLSS says nothing the header does not (beta.27)"); DlssText.ExportLine(Row()).Should().Be("N/A"); diff --git a/tests/FrameLedger.Application.Tests/Capture/RuntimeModuleSourcesTests.cs b/tests/FrameLedger.Application.Tests/Capture/RuntimeModuleSourcesTests.cs index fafbfd30..06d5eba6 100644 --- a/tests/FrameLedger.Application.Tests/Capture/RuntimeModuleSourcesTests.cs +++ b/tests/FrameLedger.Application.Tests/Capture/RuntimeModuleSourcesTests.cs @@ -40,7 +40,7 @@ public sealed class RuntimeModuleSourcesTests RuntimeModuleSources.Token(RuntimeModuleSource.Unknown).Should().BeNull(); RuntimeModuleSources.FromToken("cloud").Should().Be(RuntimeModuleSource.Unknown); - CensusNames.ModuleFileNames.Should().Contain(["nvngx_dlssnr.dll", "sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll"], + CensusNames.ModuleFileNames.Should().Contain(["nvngx_dlssnr.dll", "sl.dlss_nr.dll", "sl.dlss_d.dll", "sl.common.dll", "sl.reflex.dll", "amd_fidelityfx_loader_dx12.dll"], "the snapshot records them though the census has no bit"); } } diff --git a/tests/FrameLedger.Application.Tests/Recording/SessionAggregatorTests.cs b/tests/FrameLedger.Application.Tests/Recording/SessionAggregatorTests.cs index 6b9952ff..ba474e29 100644 --- a/tests/FrameLedger.Application.Tests/Recording/SessionAggregatorTests.cs +++ b/tests/FrameLedger.Application.Tests/Recording/SessionAggregatorTests.cs @@ -303,6 +303,33 @@ public sealed class SessionAggregatorTests row.Upscaler.Should().Be("unknown", "a hook ran and could not identify what it saw: coverage short, not N/A"); } + /// + /// beta.34, owner decision D84: DLSS 5's neural rendering is stored as its share of the Streamline batches — and only + /// from a writer whose detour decodes it (). An Overlay built before it + /// drains the same batches and never sets the bit; storing its silence as 0 % would be a measured "not running" nobody + /// measured. + /// + [Fact] + public void NeuralRenderingIsAShareOfTheBatchesOnlyFromAWriterThatDecodesIt() + { + List records = SessionFixtures.Stream(400, _presentOnly | FlMeasured.Upscaler); + for (int i = 0; i < records.Count; i++) + { + FlFrameRecord r = records[i]; + r.FeatureFlags = (byte)(FlFeatureFlags.RayReconstructionObserved | (i % 4 == 0 ? FlFeatureFlags.None : FlFeatureFlags.SlNeuralRendering)); + records[i] = r; + } + + const uint decodes = (uint)(FlHookFamily.Present | FlHookFamily.UpscalerIdentity | FlHookFamily.SlNeuralRendering); + SessionRow row = SessionAggregator.Aggregate(SessionFixtures.Skeleton(), + SessionFixtures.Hooked(records, new FlWriterState { Status = 1, HooksInstalledMask = decodes })).Row; + row.DlssNrPct.Should().BeApproximately(75, 0.01); + + SessionRow older = SessionAggregator.Aggregate(SessionFixtures.Skeleton(), + SessionFixtures.Hooked(records, new FlWriterState { Status = 1, HooksInstalledMask = decodes & ~(uint)FlHookFamily.SlNeuralRendering })).Row; + older.DlssNrPct.Should().BeNull("a writer built before it could look says nothing, never 0 %"); + } + [Fact] public void RayTracingVramLatencyAndSensorsAggregateWhereMeasured() { diff --git a/tests/FrameLedger.CaptureHost.Tests/Consume/SlCensusTests.cs b/tests/FrameLedger.CaptureHost.Tests/Consume/SlCensusTests.cs index 87415ec7..c960a56f 100644 --- a/tests/FrameLedger.CaptureHost.Tests/Consume/SlCensusTests.cs +++ b/tests/FrameLedger.CaptureHost.Tests/Consume/SlCensusTests.cs @@ -41,6 +41,7 @@ public sealed class SlCensusTests c.Batches.Should().Be(20); c.WithUndecoded.Should().Be(20, "the undecoded fact must survive co-occurring with a count"); + c.WithNeuralRendering.Should().Be(0, "no record carried DLSS 5's fact"); c.WithFrameGeneration.Should().Be(20); c.FgWithoutSuperResolution.Should().Be(20, "this is §S30's exact shape"); } diff --git a/tests/FrameLedger.Domain.Tests/Detection/DlssGenerationTests.cs b/tests/FrameLedger.Domain.Tests/Detection/DlssGenerationTests.cs index 284d1c52..62b466f3 100644 --- a/tests/FrameLedger.Domain.Tests/Detection/DlssGenerationTests.cs +++ b/tests/FrameLedger.Domain.Tests/Detection/DlssGenerationTests.cs @@ -57,6 +57,23 @@ public sealed class DlssGenerationTests .Should().Be(new DlssGeneration(DlssGenerationKind.Dlss4, DlssBasis.FrameGenerationFactor), "without Dynamic a ×3 state is DLSS 4's"); } + /// + /// beta.34, owner decision D84: DLSS 5 heads the table where its neural rendering was measured running, above every + /// other row — the session's other DLSS features are the libraries the line lists after it. Measured not running, or + /// not measurable, it names nothing. + /// + [Fact] + public void Dlss5IsTheGenerationWhereItsNeuralRenderingRanAndNowhereElse() + { + DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, 12, 6.0, DynamicFrameGeneration: true, NeuralRenderingPct: 97.3)) + .Should().Be(new DlssGeneration(DlssGenerationKind.Dlss5, DlssBasis.NeuralRendering), "it outranks every DLSS 4.5 row"); + DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, null, null, NeuralRenderingPct: 0.4)) + .Should().Be(new DlssGeneration(DlssGenerationKind.Dlss5, DlssBasis.NeuralRendering), "running on any frame is running"); + DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, null, null, NeuralRenderingPct: 0)).Should().BeNull("seen not running"); + DlssGeneration.Of(new DlssEvidence(_dlss4Library, _dlss4Library, 12, null, NeuralRenderingPct: 0)) + .Should().Be(new DlssGeneration(DlssGenerationKind.Dlss45, DlssBasis.Preset), "without it, the rest of the table speaks"); + } + [Fact] public void ALibraryVersionNamesAGenerationOnlyWhereItsMajorNumberDoes() { diff --git a/tests/FrameLedger.Domain.Tests/Metrics/NeuralRenderingTests.cs b/tests/FrameLedger.Domain.Tests/Metrics/NeuralRenderingTests.cs new file mode 100644 index 00000000..8ddd6e8d --- /dev/null +++ b/tests/FrameLedger.Domain.Tests/Metrics/NeuralRenderingTests.cs @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-3.0-only +// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE + +using FluentAssertions; +using FrameLedger.Domain.Metrics; +using static FrameLedger.Domain.Tests.Metrics.SampleFixtures; + +namespace FrameLedger.Domain.Tests.Metrics; + +/// +/// beta.34, owner decision D84: DLSS 5's neural rendering, as the share of the presents that drained a Streamline batch — +/// the frames the game rendered through Streamline — on which kFeatureDLSS_NR was evaluated. +/// +public sealed class NeuralRenderingTests +{ + [Fact] + public void TheShareIsOverTheBatchesAndNothingDrainedIsNoShare() + { + FrameSample plain = Present(1); + FrameSample batch = plain with { Features = FeatureBits.RayReconstructionObserved }; + FrameSample neural = plain with { Features = FeatureBits.RayReconstructionObserved | FeatureBits.SlNeuralRendering }; + + NeuralRendering.SharePct([plain, plain]).Should().BeNull("no present drained a Streamline batch: silence says nothing"); + NeuralRendering.SharePct([]).Should().BeNull(); + NeuralRendering.SharePct([batch, batch, plain]).Should().Be(0, "Streamline batches, and none evaluated neural rendering"); + NeuralRendering.SharePct([neural, neural, neural, batch]).Should().Be(75); + NeuralRendering.SharePct([neural, plain, neural, plain, neural, plain]).Should().Be(100, + "a generated present drains no batch, so frame generation does not dilute the share"); + NeuralRendering.SharePct([plain with { Features = FeatureBits.SlNeuralRendering }]).Should().BeNull( + "the fact without its OBSERVED says nothing"); + FluentActions.Invoking(static () => NeuralRendering.SharePct(null!)).Should().Throw(); + } +} diff --git a/tests/FrameLedger.Infrastructure.Tests/Persistence/LedgerDatabaseTests.cs b/tests/FrameLedger.Infrastructure.Tests/Persistence/LedgerDatabaseTests.cs index 34f4aeb5..b665ee85 100644 --- a/tests/FrameLedger.Infrastructure.Tests/Persistence/LedgerDatabaseTests.cs +++ b/tests/FrameLedger.Infrastructure.Tests/Persistence/LedgerDatabaseTests.cs @@ -304,6 +304,45 @@ public sealed class LedgerDatabaseTests } } + /// + /// Schema 0022 (2026-11-06, beta.34, D84): sessions.dlss_nr_pct, DLSS 5's neural rendering measured — ADD COLUMN + /// only; a session written before has none, and is not rebuilt (its frames keep no feature byte). + /// + [Fact] + public async Task ScriptTwentyTwoAddsTheNeuralRenderingColumnAndAnEarlierSessionHasNone() + { + await using LedgerFixture f = await LedgerFixture.OpenAsync(); + MigrationRunner.LatestVersion.Should().BeGreaterThanOrEqualTo(22); + long gameId = (await new SqliteGameRepository(f.Db).EnsureAsync( + new() { ExePath = @"C:\Games\H\h.exe", SizeBytes = 1, MtimeUnixMs = 2 }, "H", Ct).ConfigureAwait(true)).Id; + long snapshotId = await new SqliteHardwareSnapshotRepository(f.Db).EnsureAsync(new HardwareSnapshot { GpuName = "g" }, DateTimeOffset.UnixEpoch, Ct) + .ConfigureAwait(true); + string path = f.Path; + await f.Db.DisposeAsync().ConfigureAwait(true); + var c21 = new SqliteConnection(new SqliteConnectionStringBuilder { DataSource = path, Pooling = false }.ToString()); + await using (c21.ConfigureAwait(true)) + { + await c21.OpenAsync(Ct).ConfigureAwait(true); + await RewindToAsync(c21, 21).ConfigureAwait(true); + await c21.ExecuteAsync(new CommandDefinition( + "INSERT INTO sessions (session_guid, game_id, snapshot_id, started_at, ended_at, duration_s, qpc_epoch, qpc_frequency, capture_tier, capture_mode, exit_status, frame_count, app_frame_count, displayed_frame_count, dropped_frames, runtime_modules) " + + "VALUES ('00000000-0000-0000-0000-000000000022', @gameId, @snapshotId, 0, 60000, 60, 0, 10000000, 1, 'attach', 'normal', 6000, 6000, 6000, 0, '{\"nvngx_dlssnr.dll\":\"310,9,16,0\"}')", + new { gameId, snapshotId }, cancellationToken: Ct)).ConfigureAwait(true); + } + + LedgerDatabase migrated = await LedgerDatabase.OpenAsync(path, ct: Ct).ConfigureAwait(true); + await using (migrated.ConfigureAwait(true)) + { + migrated.SchemaVersion.Should().Be(MigrationRunner.LatestVersion); + IReadOnlyList added = await migrated.ReadAsync(async (c, ct) => (IReadOnlyList)[.. await c.QueryAsync(new CommandDefinition( + "SELECT name FROM pragma_table_info('sessions') WHERE name = 'dlss_nr_pct' AND type = 'REAL'", cancellationToken: ct)).ConfigureAwait(false)], Ct).ConfigureAwait(true); + added.Should().ContainSingle(); + SessionRow before = (await new SqliteSessionRepository(migrated).FindAsync(Guid.Parse("00000000-0000-0000-0000-000000000022"), Ct).ConfigureAwait(true))!; + before.RuntimeModulesJson.Should().Be("{\"nvngx_dlssnr.dll\":\"310,9,16,0\"}", "the row keeps everything it had"); + before.DlssNrPct.Should().BeNull("a session recorded before beta.34 says only that DLSS 5's runtime was loaded"); + } + } + /// /// Schema 0017 (2026-10-03, beta.11, D38): games.ac_exception_trial_failed_at, NULL on every row written before — a /// grant made under D33 keeps everything it had and carries no failed trial. diff --git a/tests/FrameLedger.Infrastructure.Tests/Persistence/SqliteSessionRepositoryTests.cs b/tests/FrameLedger.Infrastructure.Tests/Persistence/SqliteSessionRepositoryTests.cs index 4fd175a2..d1357781 100644 --- a/tests/FrameLedger.Infrastructure.Tests/Persistence/SqliteSessionRepositoryTests.cs +++ b/tests/FrameLedger.Infrastructure.Tests/Persistence/SqliteSessionRepositoryTests.cs @@ -108,6 +108,7 @@ public sealed class SqliteSessionRepositoryTests ThermalLimitPct = 2.5, AppFramesPerJoule = 0.3125, RuntimeModuleSourcesJson = "{\"nvngx_dlss.dll\":\"graphics_driver\"}", + DlssNrPct = 97.25, FgMixJson = "{\"Rows\":[{\"Kind\":\"generated\",\"Factor\":3.99,\"NativeFps\":70.5,\"DisplayedFps\":281.3,\"Seconds\":120,\"Share\":0.75,\"Windows\":24}]}", }; diff --git a/tests/fixtures/rules/capabilities/dlss_stack/expected.json b/tests/fixtures/rules/capabilities/dlss_stack/expected.json index 6d2e41a3..1a3a07b9 100644 --- a/tests/fixtures/rules/capabilities/dlss_stack/expected.json +++ b/tests/fixtures/rules/capabilities/dlss_stack/expected.json @@ -1 +1 @@ -{ "engine": null, "platform": null, "capabilities": ["dlss", "dlss_g", "dlss_rr", "streamline"], "$why": "Every capability matches independently - there is no precedence here, unlike engines, because a game ships several." } +{ "engine": null, "platform": null, "capabilities": ["dlss", "dlss_g", "dlss_rr", "dlss_nr", "streamline"], "$why": "Every capability matches independently - there is no precedence here, unlike engines, because a game ships several." } diff --git a/tests/fixtures/rules/capabilities/dlss_stack/nvngx_dlssnr.dll b/tests/fixtures/rules/capabilities/dlss_stack/nvngx_dlssnr.dll new file mode 100644 index 00000000..e69de29b