Compare commits

...
Author SHA1 Message Date
poli0981andClaude Fable 5.2 63b761519e docs(handoff): 0.1.0-beta.44's release facts - the tag's run, the digests, the delta, the wiki, what SonarCloud and Qodana said on the release's commit, and the one flaky check on the way
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:26:26 +07:00
poli0981andClaude Fable 5.2 f9e9fdb175 release: 0.1.0-beta.44 - what the first real games on beta.43 found, fixed (a field of view in degrees, the count of early abnormal ends, flags none), and Streamline's answers about a feature hooked only where asked (D126-D128): its changelog file, HANDOFF's beta.44 section, owner-only item 42, the release lines (#424)
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 12:04:30 +00:00
poli0981andClaude Fable 5.2 99efc08423 feat(advanced): a session shows which version each Streamline feature is and what it requires; Privacy Policy 2.18 (beta.44 PR-3) (#423)
* feat(advanced): a session shows which version each Streamline feature is and what it requires - two catalog entries read inside the game, and for each of the two calls whether it was read, not hooked, or hooked and not asked again; Privacy Policy 2.18 (beta.44 PR-3)

The Agent turns region 5's feature slots into sl.feature.versions and sl.feature.requirements, rows named
<feature> - <member> in the vendor's words; AdvancedSources says for each call which of three things happened,
and the App words hooked-and-not-seen for a start-up call as what it is: the game did not ask again. The Agent's
end-to-end tests run a Streamline target for the first time. Privacy Policy 2.18 names what Streamline answers
about a feature and what of the answer is never read. No layout change (5), no schema change (23).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style(recorder): drop two namespace qualifiers the new using made redundant (Qodana managed, RedundantNameQualifier)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 11:31:47 +00:00
poli0981andClaude Fable 5.2 91204ed8d3 feat(overlay): hook slGetFeatureVersion and slGetFeatureRequirements - Streamline's answers about a feature, read only where asked; never the lists the answer points to (beta.44 PR-2) (#422)
* feat(overlay): hook slGetFeatureVersion and slGetFeatureRequirements - what Streamline answers when a game asks which version a feature is and what it requires, read after the original call and only once the Agent has asked; never the lists the answer points to (beta.44 PR-2)

Two new patch sites on sl.interposer.dll, a row and a family bit each (15, 16), installed only in a process that
was asked for Advanced metrics (D111) and the first two rows the watchdog patches. The answer is read only when
the original returned eOk and the struct carries its own GUID: two versions; the flags, three counts and four
versions of the requirements - every one a member of struct version 1 at each of sixteen upstream tags (D115).
requiredTags and the Vulkan members are never read; no pointer of the game's is followed. Twelve slots in region 5
(layout 5 as it was), kept across a new request.

Measured (the detours' bodies on the headers, the Overlay's flags, 20 M calls x 3): the version +0.58/+0.61/+0.58 ns
not asked, +14.82/+14.54/+14.47 ns asked; the requirements +0.58/+0.63/+0.61 ns not asked, +20.88/+21.01/+20.96 ns
asked.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(tests): compute the index of a feature slot in size_t - three products of two 32-bit values used as a pointer offset, in the injected test and the harness (Qodana native, bugprone-implicit-widening-of-multiplication-result)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 10:47:32 +00:00
poli0981andClaude Fable 5.2 3f16235c73 fix(advanced): a field of view a game gives in degrees is no longer labelled radians, switching hooking back on starts the count of early abnormal ends again, and a frame-generation configure with no flag says none (beta.44 PR-1; D126-D128) (#421)
What the owner's nine sessions on 0.1.0-beta.43 found. The Overlay does not change.
- D128: a field of view over pi is the number as the game gave it, with a row that says it is not radians; never converted.
- D126: the consent grant sets hook_crash_count to 0 - it was never set back, so one early end was enough once a game had had two.
- D127: a fault while a game is closing, unseen by a hooked session, is written down and not changed.
- The accuracy statement and LIMITATIONS say what was read from real games and what was not.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 10:11:23 +00:00
poli0981andClaude Fable 5.2 c8d0731ed8 docs(handoff): what the owner's nine sessions on 0.1.0-beta.43 showed - both new hooks read real games, off meant off, and Cyberpunk 2077 gives Streamline its field of view in degrees (item 41) (#420)
Read from a copy of the ledger, the Agent's log, nine overlay logs and Windows' application log.
Not exercised: a configure through the FidelityFX 2.3 loader, a game with neither library.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 09:44:28 +00:00
poli0981andClaude Fable 5.2 e422a416a2 docs(handoff): 0.1.0-beta.43's release facts - the tag's run, the digests, the delta, the wiki, and what SonarCloud and Qodana said on the release's commit (#419)
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 07:15:20 +00:00
poli0981andClaude Fable 5.2 6c7ba74eb0 release: 0.1.0-beta.43 - two hooks installed only where asked for (what a game tells Streamline each frame, how it configures FSR frame generation), the guard reads a moving module list again, an FSR UPSCALE counted once (D123-D125): its changelog file, HANDOFF's beta.43 section, owner-only item 41, the release lines (#418)
docs/changelog/0.1.0-beta.43.md takes [Unreleased]; HANDOFF's beta.42 section moves verbatim to docs/handoff/history/0.1.0-beta.42.md and a new START HERE says what the release decided beyond D123-D125, the traps of the train and what is left open; owner-only item 41 is the first real games with the two new hooks, with what each outcome means written before the run.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 06:38:31 +00:00
53 changed files with 2090 additions and 359 deletions

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ barrier. It is written for the person who has just met one; the details for deve
FrameLedger is a desktop program: its own window, its dialogs, its document windows, the icon by the clock and the
notices Windows shows for it. It draws nothing inside a game, so it cannot make a game itself any easier to use.
*Beta software: this page describes version 0.1.0-beta.42. In the app: Help ▸ Accessibility.*
*Beta software: this page describes version 0.1.0-beta.44. In the app: Help ▸ Accessibility.*
## What FrameLedger aims for
+2 -60
View File
@@ -35,72 +35,14 @@ numeric core and does not move; the heading is the full version — corrected 20
## [Unreleased]
### Added
- **Advanced metrics: a session now shows what the game told Streamline each frame and how it configured FSR frame
generation.** For a game FrameLedger measures from inside, a session recorded with **Advanced metrics** on keeps
— beside what the game told DLSS and FSR — the largest jitter offset, the motion-vector scale and how motion
vectors are stored, the near and far planes and whether depth is inverted, the range of the field of view, the
aspect ratio, whether the projection is orthographic and how often the game reset the upscaler's history
(Streamline); and whether FSR frame generation was configured on, whether it may run asynchronously, its flags,
whether only generated frames are presented, and the part of the picture it generates in. A setting the game
changed during the session reads *on and off*. The line under the session now also says, for each of the two,
whether it was read, hooked and never called by the game, or not hooked because the game did not load the
library — so an empty page says which it is. These are what the game asked for, not a check of what happened;
neither has been confirmed on a real game yet. Never read: where the camera is, which way it looks, its
matrices.
- **The terms are shown once after this update: Privacy Policy 2.17.** It names the two new readings above and says
that the two calls they come from are intercepted in a game only once a session with Advanced metrics on has
started there. Nothing is sent anywhere, as before.
- **Advanced metrics, inside the game: how the game configures FSR frame generation** (the part inside the game;
what a session shows of it comes with the same release). With **Advanced metrics** on, FrameLedger now also
reads, from the call a game makes to configure AMD's frame generation, whether generation is on, whether it may
run asynchronously, its flags, whether only generated frames are presented, and the part of the picture it
generates in. Nothing else of that call is read. Like the Streamline hook, this one is put into a game only once
Advanced metrics has been asked for. Measured cost: about 15 billionths of a second per call while the option is
on, under 2 while it is off.
- **Advanced metrics, inside the game: what the game tells NVIDIA Streamline about each frame** (the part inside the
game; what a session shows of it comes with the same release). With **Advanced metrics** on, FrameLedger now also
reads, from a call a Streamline game makes every frame, the size of the jitter, the motion-vector scale, the depth
range, the range of the field of view, the aspect ratio and seven on/off settings (inverted depth, how motion
vectors are stored, whether the upscaler's history was reset). It never reads where the game's camera is, which
way it looks, or its matrices, which sit in the same data — a check in the build refuses any code that names
them. This is the first reading that needs a hook of its own, and that hook is put into a game only once
Advanced metrics has been asked for: with the option off, nothing in the game is touched for it. Measured cost:
about 20 billionths of a second per frame while the option is on, under one billionth while it is off.
### Fixed
- **FSR upscaling is counted once per frame whichever way the game's FidelityFX loader passes it on.** Newer
FidelityFX loaders hand a call on to the library behind them in a way that brought the same upscale to
FrameLedger twice; with frame generation off, the count of frames the game rendered would have doubled — Native
FPS twice too high. Seen in how Cyberpunk 2077's loader passes on its frame-generation calls; no game tested so
far upscales through such a loader, so this is a precaution. The upscale is now counted where the game calls it,
and nowhere else. (Owner decision D125. Measured cost: none that can be told from noise.)
- **A game is no longer left unrecorded because it was still loading when FrameLedger looked at it.** Before it
hooks a game, and again right after, FrameLedger lists the modules the game has loaded and checks them against
the anti-cheat list. A game that is starting loads and unloads modules for several seconds, and when the list
changed in the middle of being read FrameLedger treated it as unreadable and stopped: the session ended as a
safety stop with nothing recorded, and the game ran on unmeasured until it was restarted. It now reads the list
again — up to three more times, a quarter of a second apart — and only stops if the list never holds still. What
stops a session has not changed: an anti-cheat module found in any read stops it at once, a protected process
still stops it at once, and a list that cannot be read in the end is still a stop, never a pass. (Owner decision
D123; seen five times in one PC's logs in a week.)
- **A test of the Overlay's log reads its lines without `strlen`.** The helper that looks for a line in the log
took its text as C strings and measured one with `strlen`; it takes strings now. Test code only: nothing in the
installed software changes. (Found by SonarCloud after 0.1.0-beta.42 was merged.)
## Releases
Newest first. Each file holds that release's section exactly as it stood here.
| Version | Date | Notes |
|---|---|---|
| `0.1.0-beta.44` | 2026-11-12 | [`docs/changelog/0.1.0-beta.44.md`](docs/changelog/0.1.0-beta.44.md) |
| `0.1.0-beta.43` | 2026-11-12 | [`docs/changelog/0.1.0-beta.43.md`](docs/changelog/0.1.0-beta.43.md) |
| `0.1.0-beta.42` | 2026-11-12 | [`docs/changelog/0.1.0-beta.42.md`](docs/changelog/0.1.0-beta.42.md) |
| `0.1.0-beta.41` | 2026-11-12 | [`docs/changelog/0.1.0-beta.41.md`](docs/changelog/0.1.0-beta.41.md) |
| `0.1.0-beta.40` | 2026-11-12 | [`docs/changelog/0.1.0-beta.40.md`](docs/changelog/0.1.0-beta.40.md) |
+3
View File
@@ -125,6 +125,9 @@ src/
# Since 0.1.0-beta.43 also what the game tells Streamline each frame and how it
# configures FSR frame generation, from two calls hooked only once Advanced has been
# asked for; AdvancedInGameCall says of each: read, never called, or not hooked.
# Since 0.1.0-beta.44 also what Streamline answers when the game asks about a
# feature (its version, what it requires), from two more calls hooked the same
# way; a game asks while it starts, so "never called" is the usual answer there.
FrameLedger.Infrastructure/ # SQLite, shm reader, vendor APIs, injector interop, parsers,
# and Capture/ (PR-C): ShmRingAttacher/ShmCaptureSink over the
# reader, HeldProcessLivenessSource, TargetResolver (path only,
+24 -3
View File
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
page lists them in plain words; each item links to the document that has the details.
*Beta software: this page describes version 0.1.0-beta.42.*
*Beta software: this page describes version 0.1.0-beta.44.*
## Games it will not measure
@@ -51,6 +51,10 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
game). Unity's crash handler and Chromium's `crashpad_handler` start with every game that has them, so their presence
says nothing. Sessions recorded before 0.1.0-beta.14 keep how they were stored — a few of them may read *crashed*
because Windows logged a memory report about the game. ([details](docs/04_CAPTURE.md))
- **A game that faults while it is closing can read *ended normally* in a session measured from inside the game.**
FrameLedger looks for Windows' crash report when it saves the session, and for such a session that is before
Windows has written it; the same fault in a session that was not measured from inside reads *crashed*. Seen on one
game whose graphics-driver library faults at every exit, measured or not (2026-11-12). Not changed yet.
## Frame rate and frame generation
@@ -194,7 +198,22 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
generation and gets none still reads "on", and the session's summary is where what was generated is measured. A
setting the game changed during the session reads "on and off". The session's line says, for each of the two,
whether it was read, hooked and never called by the game, or not hooked (the game did not load the library).
Streamline 1.x is not read. **Neither has been confirmed on a real game yet.**
Streamline 1.x is not read. Streamline's values have been read from three real games and the frame-generation
configuration from one (2026-11-12); **a configuration that reaches FSR through AMD's 2.3 loader has not been
read from a real game yet.** **A game may give a value in a unit of its own**: Cyberpunk 2077 gives Streamline
its field of view in degrees where NVIDIA's header says radians. A field of view too large to be radians is
shown as the game gave it, with a line saying so, and is never converted (since 0.1.0-beta.44; a session
recorded before keeps the line it was stored with, which labels the degrees as radians). The count of resets is
the number of calls in which the game said so — menus and loading screens raise it.
- **Which version each Streamline feature is, and what it requires** (since 0.1.0-beta.44) are Streamline's
answers to two questions **a game asks while it starts**. FrameLedger hooks the two calls only once a session
with Advanced metrics on has started in that game, which is usually after the game asked: **most sessions will
show nothing here**, and the session's line then says the call was hooked and the game did not ask again. A
game that asks later is read then, and a second session of a game that kept running keeps what the first one
read. The rows are Streamline's answer as the game received it — the versions
of Windows and of the driver are the ones Streamline found — not FrameLedger's own check of the PC. Twelve
features are kept; a thirteenth is not. The lists the answer points to (the buffers, the Vulkan extensions) are
never read, so the rows give how many buffers a feature needs and not which. Not confirmed on a real game yet.
- **The driver's own figures** — the card's firmware and architecture, its memory in detail, what a display can do
with HDR and variable refresh, the driver's settings for the game — exist on **NVIDIA** cards only. On other cards
they read N/A; the card's sensors (fans, voltages, loads) are read on every brand, and none has been tested on an
@@ -273,7 +292,9 @@ a barrier is on its own page: [Accessibility](ACCESSIBILITY.md) (in the app: Hel
- **Some games will not start directly** (seen on two Steam games, 2026-10-19 and 20). Lies of P, started by *Start
directly*, hands itself to Steam within seconds — since 0.1.0-beta.27 the game Steam then starts is recorded —, and
Clair Obscur: Expedition 33 closes within seconds, with or without FrameLedger's hook. Each such start ends a
measured session early, which the crash safety counts: two turn hooking off for the game. Start such a game through
measured session early, which the crash safety counts: two turn hooking off for the game — and since
0.1.0-beta.44 the count starts again each time you switch hooking back on (before, one more such end was enough
once a game had been switched off). Start such a game through
its store (Settings ▸ Games ▸ *Play button*); the notice after Play says when a Steam game may hand itself to Steam.
([details](docs/spike-notes/23-owner-runs-2026-10-20.md))
+10 -4
View File
@@ -13,7 +13,7 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-11-11.** The software is a beta; its latest
> **beta is `0.1.0-beta.42`** (2026-11-12), an unsigned installer built from that tag with its
> **beta is `0.1.0-beta.44`** (2026-11-12), an unsigned installer built from that tag with its
> checksums published beside it (alphas — experimental builds that try a newer .NET — are published apart). The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -117,8 +117,14 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
> later through AMD's own library. Since beta.43 also what a game tells NVIDIA Streamline about each frame (jitter,
> motion-vector scale, depth range, field-of-view range, how often it reset the upscaler's history — for the first
> viewport that called, where a game has several) and how it configures FSR frame generation (the settings it asked
> for, not whether frames were generated). FSR's upscaling values have been read from real games; the DLSS options,
> Streamline's constants and the frame-generation configuration have not been confirmed on one yet.
> for, not whether frames were generated). Since beta.44 also what Streamline answers when a game asks about a
> feature — its version, and what it requires (graphics APIs, V-Sync, GPU scheduling, Windows and driver versions):
> Streamline's answer as the game received it, not a check of the PC, and a game asks while it starts, so a
> session that attached later usually has none and says so. FSR's upscaling values, Streamline's constants (three
> games) and the
> frame-generation configuration (one game) have been read from real games; the DLSS options have not been
> confirmed on one yet. A game may give a value in a unit of its own: one gives Streamline its field of view in
> degrees, and it is shown as given.
> - **Safety:** every pre-injection check runs before injection, including the signed-by-a-known-vendor
> half of the suspicious-module rule. During every capture the Agent re-runs the checks every 30 s and
> stops capturing on a refusal: a Direct3D or OpenGL game's hooks are removed, and the Vulkan layer
@@ -195,7 +201,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest beta is `v0.1.0-beta.42` (2026-11-12); before it `v0.1.0-beta.41` (2026-11-12), `v0.1.0-beta.40` (2026-11-12), `v0.1.0-beta.39` (2026-11-11), `v0.1.0-beta.38` (2026-11-11), `v0.1.0-beta.37` (2026-11-11), `v0.1.0-beta.36` (2026-11-10), `v0.1.0-beta.35` (2026-11-09), `v0.1.0-beta.34` (2026-11-06), `v0.1.0-beta.33` (2026-11-03), `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
> **The latest beta is `v0.1.0-beta.44` (2026-11-12); before it `v0.1.0-beta.43` (2026-11-12), `v0.1.0-beta.42` (2026-11-12), `v0.1.0-beta.41` (2026-11-12), `v0.1.0-beta.40` (2026-11-12), `v0.1.0-beta.39` (2026-11-11), `v0.1.0-beta.38` (2026-11-11), `v0.1.0-beta.37` (2026-11-11), `v0.1.0-beta.36` (2026-11-10), `v0.1.0-beta.35` (2026-11-09), `v0.1.0-beta.34` (2026-11-06), `v0.1.0-beta.33` (2026-11-03), `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
+4 -1
View File
@@ -764,7 +764,10 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> `adv.ffx.memory_usage` in `sensor_blobs`. **Since 0.1.0-beta.43** `sources` may also hold `streamlineConstants`
> and `fsrFrameGeneration` (`Read`, `NeverCalled`, `NotHooked`; `Application.Advanced.AdvancedInGameCall`) — what
> became, in that session, of the two calls hooked only for Advanced metrics; both absent in a row written before,
> and in a session not measured inside the game. No column and no script: schema 23 as it was. A session deleted
> and in a session not measured inside the game. **Since 0.1.0-beta.44** also `streamlineFeatureVersion` and
> `streamlineFeatureRequirements`, the same three values for the two questions a game asks Streamline about a
> feature — where `NeverCalled` is the usual one, a game asking while it starts — and the facts
> `sl.feature.versions` and `sl.feature.requirements`, rows named `<feature> · <member>` in the vendor's words. No column and no script: schema 23 as it was. A session deleted
> takes its row with it; a profile no session points to is left, as a hardware snapshot is; the retention sweep
> removes a session's `adv.` series with its other raw series and keeps its row. Written by the Agent only, in the
> session's own transaction (`SqliteSessionRepository.InsertAdvancedAsync`). `LatestVersion` is 23;
+7
View File
@@ -145,6 +145,13 @@ What the region is, as a contract between the two sides:
the last generation rectangle as left, top, width, height — **four `-1` for a rectangle with a negative side or
one past 32,767**, never a clipped one. `FL_HOOK_FFX_CONFIGURE` (bit 14) is published when every ffx-api module
the process loaded has its `ffxConfigure` patched.
- **The feature slots are written since 0.1.0-beta.44**: `features` is twelve slots of twenty-four words — word 0
the `sl::Feature` id plus one (0 is an empty slot), word 1 which of the two questions has an answer (bit 0 the
version, bit 1 the requirements), then the two versions, the flags, three counts and four more versions, as
`fl_shm.h` lays them out. Slots fill from 0 in the order the game first asked about each feature; **a new request
does not empty them** — the one group that is a fact about the process and not about a session — and
`FL_ADV_VALID_SL_FEATURES` stays set with them. `FL_HOOK_SL_FEATURE_VERSION` (bit 15) and
`FL_HOOK_SL_FEATURE_REQUIREMENTS` (bit 16) are published with their patches, in a process that was asked.
- The Vulkan layer never writes it. `ShmLayoutMirrorTests.TheAdvancedStateMirrorMatches` checks every member's
offset against `fl-layout-dump`; `ShmRingReaderTests` the three reads and that the request is stored either way.
+4
View File
@@ -877,6 +877,10 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
> (`Advanced_InGameCallsLine` with `AdvInGameCall_*`): for what the game tells Streamline each frame and for how it
> configures FSR frame generation, each *read*, *hooked - the game did not make the call*, or *not hooked - the
> game did not load the library that has the call*. "Nothing here" then says which of the two it is.
> **Since 0.1.0-beta.44** one more (`Advanced_InGameFeatureCallsLine`): for which version each Streamline feature
> is and for what each requires, the same three — except that hooked and not seen reads *hooked - the game asks
> this while it starts, and did not ask again after FrameLedger attached* (`AdvInGameCall_NotAskedAgain`,
> `AdvancedLabels.InGameStartupCall`): the usual case, and not a finding about the game.
>
> **Words.** Every catalog entry, group, reason, source state and driver token is a `Strings.resx` key made from its own
> name (`Adv_<id>`, `AdvGroup_*`, `AdvReach_*`, `AdvSource_*`, `AdvToken_*`) in `en`, `vi`, `ja`; the English label of
+14 -1
View File
@@ -194,8 +194,9 @@ 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`~~ *(its own row below since beta.43)*, `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. **Since 0.1.0-beta.40 (Advanced metrics train B, D111), and only while the Agent asks** (`FlControlBlock.advancedRequested`): the `sl::DLSSOptions` a title chains into `inputs` — the struct the quality mode is read from — is read further: `outputWidth`/`outputHeight`, `preExposure`, `exposureScale`, `colorBuffersHDR`, the five presets of version 1, and where the struct's own `structVersion` proves them present `ultraQualityPreset` and `useAutoExposure` (≥ 2) and `alphaUpscalingEnabled` (≥ 3) — §Which struct version carries which field. Rule 4: more members of the same argument of the same call; `fl_adv_fields.h` is the one place, `tools/overlay-fields-check.ps1` holds it. No new patch site. **Measured** (the header's own functions, `/O2 /guard:cf /Qspectre /MT`, 20 M calls × 3): +9.5–11.7 ns per evaluation that chains the options while asked; with the word at 0, one relaxed load and a branch not taken — below what the bench resolves. Most titles set these through `slDLSSSetOptions`, which is not an export, and read N/A (train D) |
| ✅ Streamline: `slEvaluateFeature` · ⏳ `slInit`, `slSetFeatureLoaded`, ~~`slSetConstants`~~ *(its own row below since beta.43)*, ~~`slGetFeatureRequirements`~~ *(its own row below since beta.44, with `slGetFeatureVersion`)* | 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. **Since 0.1.0-beta.40 (Advanced metrics train B, D111), and only while the Agent asks** (`FlControlBlock.advancedRequested`): the `sl::DLSSOptions` a title chains into `inputs` — the struct the quality mode is read from — is read further: `outputWidth`/`outputHeight`, `preExposure`, `exposureScale`, `colorBuffersHDR`, the five presets of version 1, and where the struct's own `structVersion` proves them present `ultraQualityPreset` and `useAutoExposure` (≥ 2) and `alphaUpscalingEnabled` (≥ 3) — §Which struct version carries which field. Rule 4: more members of the same argument of the same call; `fl_adv_fields.h` is the one place, `tools/overlay-fields-check.ps1` holds it. No new patch site. **Measured** (the header's own functions, `/O2 /guard:cf /Qspectre /MT`, 20 M calls × 3): +9.5–11.7 ns per evaluation that chains the options while asked; with the word at 0, one relaxed load and a branch not taken — below what the bench resolves. Most titles set these through `slDLSSSetOptions`, which is not an export, and read N/A (train D) |
| ✅ Streamline: `slSetConstants` (0.1.0-beta.43, Advanced metrics train B; owner decisions D111–D116, D122) | **What the game tells Streamline about a frame**, once per frame and viewport, read from the `sl::Constants` it passes — rule 4: an argument of the call hooked, and of it only the members named here. **Read:** `jitterOffset`, `mvecScale`, `cameraNear`, `cameraFar`, `cameraFOV`, `cameraAspectRatio` and the seven `Boolean`s (`depthInverted`, `cameraMotionIncluded`, `motionVectors3D`, `reset`, `orthographicProjection`, `motionVectorsDilated`, `motionVectorsJittered`). **Never read:** the five matrices (bytes 32..351 of the struct), `cameraPinholeOffset`, and the camera's position and three axes (bytes 368..423) — `tools/overlay-fields-check.ps1` refuses their names anywhere in code loaded into a game, and ctest `fl_adv_fields` publishes two structs that differ in every one of those bytes and gets the same bytes out. **The one row that is not installed unless asked for** (D111): `InstallByFamily` returns before it resolves the symbol in a process the Agent has never asked for Advanced metrics — resolving takes a reference on the module — so with the option off the export's first bytes are the file's (`fl_guard` `[advanced]` reads them from the target). Once asked, the patch goes in on that watchdog tick and stays for the life of the process; the detour forwards without looking while the request is off, and after a stop (`MayObserve`). **Every call** checks the struct's GUID and a `structVersion` of at least 1 before any member is read, and the viewport handle's the same way; every member read is one version 1 carries, so a version-1 struct laid against unreadable memory is read whole without a fault (the same ctest). **Summaries are the first viewport's**: a title with two viewports sets constants for each every frame, and "the last value" across them would flip twice a frame; the call count is of every viewport. `FLT_MAX` is Streamline's "not set" here and is kept nowhere (D119's plane at infinity is FidelityFX's). Family `FL_HOOK_SL_CONSTANTS` (bit 13), published with the patch: it entitles no field of a frame record, and tells "hooked, never called" from "not hooked". **Measured overhead** (the detour's body on the headers, the Overlay's flags, 20 million calls a run, three runs): not asked **+0.57 / +0.60 / +0.58 ns**; asked, the summarised viewport **+19.61 / +19.54 / +19.79 ns**; asked, another viewport +5.83 / +6.01 / +5.62 ns. |
| ✅ Streamline: `slGetFeatureVersion` and `slGetFeatureRequirements` (0.1.0-beta.44, Advanced metrics train B's third step; owner decisions D111–D116, D122) | **What Streamline answers when the game asks about a feature** — which version it is, and what it requires. Two rows, two patches, two detours of one shape: **the original runs first, exactly once, on every path, with both arguments forwarded untouched**, and the struct the game passed is read only when the original said `eOk` — a refusal leaves the struct as the game made it, which is not an answer. Rule 4: an argument of the call hooked, read after the call, and of it only the members named here. **Read from `sl::FeatureVersion`:** `versionSL`, `versionNGX`. **Read from `sl::FeatureRequirements`:** `flags`, `maxNumCPUThreads`, `maxNumViewports`, `numRequiredTags`, `osVersionDetected`, `osVersionRequired`, `driverVersionDetected`, `driverVersionRequired`. **Never read:** `requiredTags` — the pointer the count belongs to — and everything after `driverVersionRequired`: the Vulkan queue counts and the pointers to the names of extensions and features. **No pointer of the game's is followed** (`tools/overlay-fields-check.ps1`, parameters `fv` and `fr`; ctest `fl_adv_fields`: two answers that differ only in those bytes publish the same region, and an answer cut off where the Vulkan members begin, laid against unreadable memory, is read without a fault; the injected `fl_guard` case's stub hands back wild pointers and no fault is counted). **Installed only where asked for** (D111), as `slSetConstants` is: `InstallByFamily` returns before it resolves either symbol in a process the Agent has never asked for Advanced metrics; once in, a patch stays for the life of the process and its detour forwards without looking while the request is off. **They are the first two rows of the table**: a game asks these while it starts, the watchdog patches rows in the table's order, and each patch stops the game's threads for a moment (0.1–0.25 s apart in the owner's logs of 2026-11-12, where `slSetConstants` was the fifth Streamline patch in, 1.9–7.8 s after the attach). In a process never asked they are passed over and the order changes nothing. **Most sessions will still have missed the calls** — an attach after the game's start-up is the usual case — and the session then says the call was hooked and the game did not ask again. Three conditions before a read, as for `slSetConstants`: the Agent is asking, observing has not stopped, and the struct carries its own GUID and a version of at least 1 on this call (a struct with another GUID is not kept: the injected case sends one). Every member read is version 1's (§Which struct version carries which field). **Twelve slots** in region 5 (`FlAdvancedState.features`, layout 5 as it was), one per feature in the order first asked about; the last answer about a feature is the one kept; a thirteenth feature is not kept. **A new request does not empty them**: what version a feature is and what it requires are facts about the process, and a second session of a game that kept running would otherwise have nothing where the first had the answer — the one group `Reset` leaves, with its bit of the mask. Streamline 1.x is refused before anything is resolved (`SpeaksStreamline2`). Families `FL_HOOK_SL_FEATURE_VERSION` (bit 15) and `FL_HOOK_SL_FEATURE_REQUIREMENTS` (bit 16), each published with its patch; neither entitles a field of a frame record. **Measured overhead** (the detours' bodies on the headers, the Overlay's flags, 20 million calls a run, three runs, eight features asked about in turn): the version — not asked **+0.58 / +0.61 / +0.58 ns**, asked **+14.82 / +14.54 / +14.47 ns**; the requirements — not asked **+0.58 / +0.63 / +0.61 ns**, asked **+20.88 / +21.01 / +20.96 ns**. A game makes these calls a handful of times. |
| ✅ 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 *(since 0.1.0-beta.43, owner decision D125: **counted at the first source that saw an UPSCALE and at no other** — `g_ffxUpscaleOwner`, `fl::adv::Owns`. Cyberpunk 2077's loader 2.3.0 hands a dispatch on to the leaf's export — its frame-generation dispatch types are logged on the loader and on the leaf — so an UPSCALE through such a loader reaches two hooked modules, and one count per module read K = 1 as 2.0 on the fixture bound that way (`--ffx-topology 2x-export`: 60 presents, 120 counted). No title run so far upscales through one; it is a precaution. Measured on the header with the Overlay's flags: +0.02 to +0.03 ns on the module that is counted, about 4 ns less on the forwarded copy)*; **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. **Since 0.1.0-beta.40 (Advanced metrics train B, D111), and only while the Agent asks:** the UPSCALE arm reads the rest of `ffxDispatchDescUpscale` — `enableSharpening`, `sharpness`, `jitterOffset`, `preExposure`, `cameraNear`, `cameraFar`, `cameraFovAngleVertical`, `flags`, `reset`, `frameTimeDelta` — into process-local summaries (an "ever seen" mask, a largest magnitude, a lowest and highest, a count and a sum; one module's dispatches are counted, so a dispatch that reaches the loader and a leaf is one). Never on the FSR 3.0 host's legacy descriptor, which is vouched Line truncated
@@ -325,6 +326,9 @@ v2.8.0, v2.9.0, v2.10.0, v2.10.3, v2.11.1, v2.12.0, v2.14.1, v2.14.16):
| | 3 | v2.4.0 (`27d352db364f`) | `alphaUpscalingEnabled` |
| `sl::Constants` (`include/sl_consts.h`) | 1 | v2.0.0 (`db6f37adcf66`) | every member through `motionVectorsJittered` — the matrices, `jitterOffset`, `mvecScale`, `cameraPinholeOffset`, the camera's position and axes, `cameraNear`, `cameraFar`, `cameraFOV`, `cameraAspectRatio`, `motionVectorsInvalidValue`, the seven `Boolean`s |
| | 2 | v2.4.0 (`bba15338a623`) | `minRelativeLinearDepthObjectSeparation` |
| `sl::FeatureVersion` (`include/sl.h`; `include/sl_core_types.h` from v2.7.2) | 1 | v2.0.0 (`fc2d6ee39fea`) | `versionSL`, `versionNGX` |
| `sl::FeatureRequirements` (the same headers) | 1 | v2.0.0 (`fc2d6ee39fea`) | `flags`, `maxNumCPUThreads`, `maxNumViewports`, `numRequiredTags`, `requiredTags`, `osVersionDetected`, `osVersionRequired`, `driverVersionDetected`, `driverVersionRequired`, then ten Vulkan members from `vkNumComputeQueuesRequired` to `vkFeatures13` |
| | 2 | v2.1.0 (`79037e0974d2`) | `vkNumOpticalFlowQueuesRequired` |
`sl::DLSSOptions` keeps those seventeen declarations, same types and order, through v2.14.16 (`9a875bd4f843`); v2.8.0
only re-spelled the deprecated `sharpness`. `sl::Constants` is unchanged from v2.4.0 through v2.14.16
@@ -333,6 +337,15 @@ Overlay reads `sl::Constants`, and only members of version 1** — nothing of ve
"at least 1" is needed, and the read ends before `minRelativeLinearDepthObjectSeparation`, the member version 2
added.
**The two answers about a feature** (established 2026-11-12, the same way, over the same sixteen tags):
`sl::FeatureVersion` is two members at every tag, and `sl::FeatureRequirements` is the nineteen of v2.0.0 plus the
one v2.1.0 added, unchanged through v2.14.16 (`a255f5c5e99a`). `sl::Version` is three `uint32_t` — `major`, `minor`,
`build` — in `include/sl_version.h` from v2.0.0 (`deec7cd04363`) to v2.14.16 (`dc3041ae8b44`), and the two functions'
declarations are the same at both ends: `sl::Result slGetFeatureVersion(sl::Feature, sl::FeatureVersion&)` and
`sl::Result slGetFeatureRequirements(sl::Feature, sl::FeatureRequirements&)`. **Since 0.1.0-beta.44 the Overlay reads
both, and only members of version 1**: the read of the requirements ends at `driverVersionRequired`, before the first
Vulkan member, so no version test beyond "at least 1" is needed.
**FidelityFX** (`GPUOpen-LibrariesAndSDKs/FidelityFX-SDK`; tags v1.1.0 — FSR 3.1.0, the first ffx-api — v1.1.1,
v1.1.2, v1.1.3, v1.1.4, v2.0.0, v2.1.0, v2.2.0, v2.3.0, v2.4.0). The descriptor header carries a `type` and no size
or version, so the question is whether the declaration ever changed:
+25 -4
View File
@@ -752,7 +752,7 @@ planning, the design reviewed against the code before it was approved.
`ICaptureObserver.WantsInGameAdvanced`; `CaptureSession` writes the word either way as the ring is attached, before
its first guard result, and from then on carries each publication of region 5 on `CaptureProgress.InGameAdvanced`
— one instance a publication, the same one on the ten ticks between two. `Application.Capture.InGameAdvancedSampler`
turns a publication into what a session stores: the session facts of the thirteen `Game` entries below (nineteen since 0.1.0-beta.43), in the
turns a publication into what a session stores: the session facts of the thirteen `Game` entries below (nineteen since 0.1.0-beta.43, twenty-one since 0.1.0-beta.44), in the
vendor's own words (a preset is its letter, a member its name), and two series —
`adv.ffx.upscale.frame_time_delta`, the mean of one second's dispatches, and `adv.ffx.memory_usage`, a point for
each second the game asked. The facts are one list until a field they are made of moves, so the recorder's context
@@ -770,6 +770,11 @@ planning, the design reviewed against the code before it was approved.
them from members region 5 already had (layout 5 as it was; schema 23 as it was): a switch is `on`, `off` or
`on_and_off` from the two words of what was seen, the flags are AMD's own names, the rectangle is the last one
the game gave and is left out where the capture side could not state it, the field of view is a range (D114).
**A field of view over π is said as given (owner decision D128, 0.1.0-beta.44).** Both vendors' headers say
radians; Cyberpunk 2077 gives Streamline 51–90, and the row read `51.0055 – 90 rad (2922.4° – 5156.6°)`. Such a
value is now the number alone, with a second row (`cameraFOV unit`, token `not_radians`) that says what it is
not; it is never converted, which would store this project's guess at the unit as the game's word. A
frame-generation configure that set no flag has a `flags` row of `none`, as an upscale does.
**A count is not part of what makes the facts new** — `sl.constants.resets` grows all session, and a context
rewritten on each would be one a second — so `InGameAdvancedSampler.Conclude` brings it up to the last
publication once, when the session ends. `AdvancedSources.StreamlineConstants` and `.FsrFrameGeneration`
@@ -778,6 +783,18 @@ planning, the design reviewed against the code before it was approved.
(`FlHookFamily.SlConstants`, `.FfxConfigure` in the writer state's mask) and no publication carried the group; or
`NotHooked` — the family was never published, which is a game that did not load the library, a Streamline 1.x
interposer, or a patch that was refused. The page says it in one more sentence of the session's sources line.
**The third step, 2026-11-12 (0.1.0-beta.44).** Two more entries have reach `Game`: `sl.feature.versions` and
`sl.feature.requirements`, from what Streamline answers `slGetFeatureVersion` and `slGetFeatureRequirements`
(`17_HOOK_ENGINE` §Hook inventory). The sampler makes them from region 5's twelve feature slots (layout 5 and
schema 23 as they were): rows named `<feature> · <member>`, the feature by NVIDIA's constant (`kFeatureDLSS_G`;
`feature 4242` for an id this build has no name for), a version as `major.minor.build`, the requirement flags by
their enumerators. A version of all zeros is the vendor's "none" and has no row — a feature with no NGX model, a
requirement nobody stated — except `versionSL`; a count of 0 is a count. One bit of the mask covers both
questions, so which was answered is told by the slots (`InGameAdvancedSampler.FeatureCall`), and
`AdvancedSources.StreamlineFeatureVersion` and `.StreamlineFeatureRequirements` say for each: `Read`;
`NeverCalled` — hooked, and the game did not ask after that, **the usual case, because a game asks while it
starts**, and the page words it so; or `NotHooked`. The slots are not emptied by a new request, so a second
session of a game that kept running stores what the first one read. `sl.init.preferences` stays unread (D112).
- **D113 — three releases, because a new patch site cannot be proven in CI.** A crash in a game under the user-mode
anti-cheat exception's trial ends that exception for good (D38), and every release already means restarting the
game. **beta.40**: more fields of calls *already* hooked — `sl::DLSSOptions` where the game chains it into
@@ -809,10 +826,14 @@ planning, the design reviewed against the code before it was approved.
- **D116 — "never the camera" is a build check**, as "never a setter" is (D108): `tools/overlay-fields-check.ps1` —
every read of a vendor struct in one header, each allowed member named and used, the camera's names refused
anywhere in the Overlay and the Vulkan layer, no copy of `sl::Constants` by value. *(Built 2026-11-12:
twenty-eight members on `tools/overlay-allowed-fields.txt`; `12_BUILD` gate 14f.)*
twenty-eight members on `tools/overlay-allowed-fields.txt`; `12_BUILD` gate 14f. Fifty-six since 0.1.0-beta.44,
with the two answers about a feature.)*
- **What will read N/A, and says why.** Many titles set their DLSS options through `slDLSSSetOptions`, which is not
an export (train D), so `sl.dlss.*` is filled only for a title that passes its options with the evaluate call.
`slGetFeatureVersion` and `slGetFeatureRequirements` are calls a game makes while starting.
- **Privacy Policy 2.18** at beta.44 (approved with that release's plan): 2.17 named two further calls and what
they give; Streamline's answers about a feature are in neither list, so they are named, with what of the answer
is never read — the lists it points to.
- **Privacy Policy 2.17** at beta.43 (approved with that release's plan): 2.16 listed DLSS's and FSR's upscaling
parameters by name, and Streamline's per-frame constants and the frame-generation configuration are in neither
list, so they are named — and §4 says the two calls are intercepted only once a session with the option on has
@@ -1008,8 +1029,8 @@ that is not built — Train B), `Spike` (Trains C and D), `Refused`, `Deferred`,
| `sl.constants.projection` | Field of view, aspect ratio, orthographic or not | SessionFact | Streamline | Game | Table |
| `sl.constants.resets` | How often the game reset the upscaler's history | SessionFact | Streamline | Game | Count |
| `ffx.framegen.config` | The game's FSR frame-generation configuration | SessionFact | FidelityFx | Game | Table |
| `sl.feature.versions` | Each Streamline feature's version and its NGX model version | SessionFact | Streamline | NewHook | Table |
| `sl.feature.requirements` | What each Streamline feature requires: operating system, driver, buffers | SessionFact | Streamline | NewHook | Table |
| `sl.feature.versions` | Each Streamline feature's version and its NGX model version | SessionFact | Streamline | Game | Table |
| `sl.feature.requirements` | What each Streamline feature requires: operating system, driver, buffers | SessionFact | Streamline | Game | Table |
| `sl.init.preferences` | The preferences the game started Streamline with | SessionFact | Streamline | NewHook | Text |
| `sl.constants.camera` | Camera position, axes and matrices | SessionFact | Streamline | PlayerState | Text |
+14
View File
@@ -1234,6 +1234,20 @@ outlives a rules change, a game update and *Change executable*; §What a finding
hooked session's early abnormal end; the policy counted them, and two turned hooking off. It cannot tell either from
the hang it exists for, so it stands as written; whether a witness — the same executable started again within
seconds — may exempt a hand-off is the owner's decision, not taken. Users are told in `LIMITATIONS.md` §Play.
- **The count starts again when the user switches hooking on (owner decision D126, 0.1.0-beta.44).** Until then
`hook_crash_count` only ever grew: Lies of P had two such ends on 2026-10-19/20 (the hand-off above), its user
switched hooking on again, and on 2026-11-12 one more early end — the game's own crash, by the owner, after a shader
failed to compile — switched it off at once, under a reason that says *twice*. The consent grant, the only
statement that turns hooking on, now sets the count to 0 (`SqliteGameConsentStore`). The policy still only
disables, a block is still never cleared, and the user-mode exception's trial (D38) keeps its own record, which
nothing sets back.
- **A fault while the game is closing is not seen by a hooked session (owner decision D127: written down, not
changed in 0.1.0-beta.44).** Hogwarts Legacy faults in the driver's `_nvngx.dll` at exit — six times in Windows'
application log since 2026-11-06, hooked or not. The one unhooked session reads `crashed`; the five hooked ones
read `normal` with exit code 0: the witness is looked for when the session is saved, which for a hooked session
is before Windows has written the event. Looking again later would make every session of such a game `crashed`,
and under a user-mode exception that ends the exception for good for a fault no hook caused — so it is a decision
of its own, not a fix to slip in beside two new hooks.
- **What reads as a crash changed in beta.14, in both directions** (`04_CAPTURE` §Crash & exit classification): a
Windows report that is not a crash (a memory-leak or hang report) no longer makes one, and an engine's crash reporter
started by a game that then left does — Unreal's crash ended with exit code 3 and read `normal`. Both feed this policy,
+178 -186
View File
@@ -81,6 +81,8 @@ owner-only items stay below; the history of every train, the passed owner-only i
| `§beta.39`, train B's plan as approved (its `§NEXT`) | [`handoff/history/0.1.0-beta.39.md`](handoff/history/0.1.0-beta.39.md) |
| `§beta.40`, what the owner's first sessions with it showed, train B's traps | [`handoff/history/0.1.0-beta.40.md`](handoff/history/0.1.0-beta.40.md) |
| `§beta.41`, what the owner's sessions on beta.40 and beta.41 showed, the plan of 2026-11-12 (D119–D122) | [`handoff/history/0.1.0-beta.41.md`](handoff/history/0.1.0-beta.41.md) |
| `§beta.42`, what the owner's seven sessions on beta.42 showed (D121 answered, the guard's lost launches), beta.43's design as planned | [`handoff/history/0.1.0-beta.42.md`](handoff/history/0.1.0-beta.42.md) |
| `§beta.43`, what the owner's nine sessions on beta.43 showed, session by session (item 41), the traps of that train | [`handoff/history/0.1.0-beta.43.md`](handoff/history/0.1.0-beta.43.md) |
| `§Owner-only`, an open item | [§Owner-only](#owner-only--no-pr-can-close-these) below |
| `§Owner-only`, a passed item (3, 12, 14–19, 38, 39) | [`handoff/owner-only-passed.md`](handoff/owner-only-passed.md) |
| `§Traps`, `§Two corrections carried forward` | [`handoff/traps.md`](handoff/traps.md) |
@@ -88,206 +90,120 @@ owner-only items stay below; the history of every train, the passed owner-only i
---
## **START HERE** — 2026-11-12, 0.1.0-beta.42: no new patch site — the label, the registry, a log that outlives the game, the plane at infinity
## **START HERE** — 2026-11-12, 0.1.0-beta.44: what the first real games on beta.43 found, fixed; Streamline's answers about a feature, hooked only where asked
*Status is `docs/changelog/0.1.0-beta.42.md`; this is what no other file carries.* The owner marked items 38 and 39
passed on 2026-11-12 and train B's second step was planned the same morning. A review of the draft against the code
changed it, and the owner split it (D122): **this release adds no patch site**, and the two new hooks are
0.1.0-beta.43. Four pull requests and this one: #406 (the session's upscaler label, D120; the decisions D119–D122),
#407 (the patch registry), #408 (the native log and the descriptor-type census, D121), #409 (FSR's plane at
infinity, D119; Qodana's native report). **What the owner's sessions on beta.40 and beta.41 showed, and the plan as
approved, are [`handoff/history/0.1.0-beta.41.md`](handoff/history/0.1.0-beta.41.md)**; what each pull request built
is [`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) §Unhooking and §Native logging, [`03_METRICS.md`](03_METRICS.md)
§Upscaling and [`07_IPC.md`](07_IPC.md) §Region 5.
*Status is `docs/changelog/0.1.0-beta.44.md`; this is what no other file carries.* The owner ran nine sessions on
beta.43 the afternoon it was released and said: read them, write down the result, go on if it passes. They were read
from a copy of the ledger, the Agent's log, nine overlay logs and Windows' application log (#420); item 41 was judged
passed, and the owner decided D126–D128 and approved the plan the same afternoon, Privacy Policy 2.18's wording with
it. Four pull requests and this one: #421 (the fixes: a field of view in degrees, the count of early abnormal ends,
`flags` of `none`; D126–D128), #422 (`slGetFeatureVersion` and `slGetFeatureRequirements` in the Overlay), #423
(the Agent, the App, Privacy Policy 2.18). **What the nine sessions showed, session by session, is
[`handoff/history/0.1.0-beta.43.md`](handoff/history/0.1.0-beta.43.md)**; what each pull request built is
[`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) §Crash & stability safety,
[`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) §Hook inventory (the row of the two calls, with their measured cost) and
[`18_GPU_VENDOR_APIS.md`](18_GPU_VENDOR_APIS.md) §Train B.
### What this release decided, beyond D119–D122
### What this release decided, beyond D126–D128
- **The descriptor-type census is not behind the Advanced-metrics switch.** It is a diagnostic that reaches the log
file and nothing else — no record, no shared memory, no session — like `HOOK_INSTALLED`. Behind the switch it
could not answer D121 for a session recorded with the switch off, which is most of them. Its cost was measured
and stated instead (+3.8 ns a dispatch).
- **The log's text grew to 72 characters; nothing else about the ring did.** 256 events, static, 24 KiB.
- **A slot of the patch registry that was ever live is never reused**, and a failed create or enable leaves the
hook created in MinHook as it always did. Both are the smaller change: the first keeps the stop's walk lock-free
without a second word per slot, the second changes no failure path that has never been seen to run.
- **The live card still names the first upscaler a session saw** (`FgLadder.UpscalerIdentity`). The stored
session's name is the modal one (D120); for a session in progress the question is a different one.
- **Qodana's "never used" on the registry test's stand-in engines is switched off for that file**, not answered by
turning the template into function pointers: the header is loaded into a game, and D100 changes such code only
for a defect.
- **What is read of these two calls is the answer, and only a good one.** The detours call the original first and
read the struct the game passed when it returned `eOk`; a refusal leaves the struct as the game made it, and the
fixture's stub leaves 99s in it to prove nothing of a refused answer is kept. The pointers the answer carries —
the list of required buffer tags, the names of Vulkan extensions and features — are never followed; the stub's
are wild, and no fault is counted.
- **The feature slots are the one group of region 5 a new request does not empty.** Every other group is a
session's — ranges, counts, switches seen. Which version a feature is and what it requires are facts about the
process, and a game asks once: a second session of a game that kept running would have nothing where the first
had the answer. `Reset` keeps the slots and their bit of the mask. They were read only while a session asked.
- **The two rows are the first of the table, because rows are patched in the table's order.** Nothing in the
Overlay paces the installs: the 0.1–0.25 s between `HOOK_INSTALLED` lines in the owner's logs is MinHook stopping
every thread of the game for each patch. In a process that was asked, the two calls a game makes while starting
are the ones that cannot wait behind five others; in a process never asked, the two rows are passed over before
anything is resolved.
- **"Hooked, and the game did not call" has words of its own for a call made while starting**
(`AdvInGameCall_NotAskedAgain`). For a call made every frame it is a finding about the game; for these two it is
what every late attach will say. One bit of the mask covers both questions, so which was answered is told by the
slots (`InGameAdvancedSampler.FeatureCall`).
- **Privacy Policy 2.18, not 2.17 stretched**: 2.17 says "two further calls" and lists what they give. 2.18 also
says what of the answer is never read.
- **The rows are the vendor's words**: `kFeatureDLSS_G · versionNGX`, the requirement flags by their enumerators,
an id this build has no name for as `feature <number>`. A version of all zeros has no row, except `versionSL`.
- **The Agent's end-to-end tests run a Streamline target now** (until this release only an FSR one): the constants
and the two answers, through the shipped Agent and the real Overlay.
- **A field of view over π is two rows** (D128): the number, and `cameraFOV unit` with the token `not_radians` —
a token replaces a row's value in the App, so a note beside a number is a row of its own.
- **The count of early abnormal ends is set back by the consent grant and by nothing else** (D126) — the one
statement that turns hooking on. `hook_autodisabled_reason` and `_at` stay as the row's history; the App shows
them only while hooking is off.
### What the owner's first four sessions on beta.42 showed (2026-11-12, 09:40–09:53)
### Traps this train left
Dying Light: The Beast, Kingdom Come: Deliverance II, Cyberpunk 2077 and Lies of P, each quit from its own menu;
read from the four `overlay-<pid>-….log` files, a copy of the ledger, and — for Cyberpunk — the game's own settings
file and executable on disk. All four hooked, no fault, no `PATCH_FAILED`, the Agent's log without an `advanced:`
line.
- **D121 is answered, and it is not a detection gap: in that session Cyberpunk 2077 upscaled with FSR 2.1, which is
compiled into the game.** Its `UserSettings.json`, written when the session ended, has `ResolutionScaling = FSR2`,
`FSR2 = Quality`, `FrameGeneration = FSR3`, `FSR3_FrameGeneration = true` — FSR **2** for the upscale, FSR **3**
for frame generation only. Quality is a ratio of 1.5, and the session's render size is 1707×960 at 2560×1440.
`Cyberpunk2077.exe` carries FSR 2's own function names (`ffxFsr2GetJitterPhaseCount`,
`ffxFsr2GetUpscaleRatioFromQualityMode`) and names one FidelityFX module, the loader; its folder has no FSR 2
DLL. **The log says the same from the other side**: the loader (2.3.0), the upscaler leaf (4.1.1) and the
frame-generation leaf (4.0.1) were all patched; the loader and the frame-generation leaf were handed `0x20004`
(PREPARE) and `0x20003` (FRAMEGENERATION); the loader and the upscaler leaf were asked `0x10002` (the ratio of a
quality mode) once at start; **no module was ever handed `0x10001`**, and there is no `UPSCALE_ROUTE` line. The
NVIDIA driver's words for the session say DLSS was not running. So the upscale goes through no export at all —
the case `LIMITATIONS.md` already names ("FSR 2 and upscalers built into the game are not identified"), and
"unknown" beside a measured render size is the true reading. ~~**The owner had said FSR 3 or 4; that the setting is
FSR 2.1 is read from the file, and is the owner's to confirm.**~~ **Confirmed by the owner the same morning with
a screenshot of the game's Graphics menu: Resolution Scaling reads "AMD FidelityFX Super Resolution 2.1"** (the
file's `FSR2`), with its own quality and sharpening rows under it. Nothing to fix for it in beta.43.
- **The loader of SDK 2.3 passes a dispatch on to the leaf's export — the older loader does not — and that is a
double count waiting for the first title that upscales through it.** In Cyberpunk each frame-generation dispatch
type is logged on the loader AND on the frame-generation leaf: the game calls the loader, the loader calls the
leaf's exported `ffxDispatch`. In Kingdom Come and Dying Light (loader 1.0.2) the UPSCALE is logged on the loader
alone, which is what `fl_hook_inventory.h` measured in September and what the fixture's loader stub copies.
Frame generation is unharmed — PREPARE is counted by its frame number, FRAMEGENERATION is a bit, and the
session's factor is ×2.0001. **An UPSCALE is counted once per hooked module that sees it**
(`g_ffxSeen`'s count): through a 2.3 loader that would be two a frame, and with frame generation off — no
PREPARE, so the count falls back to UPSCALE dispatches — the application-frame count would double. Not
observed: no UPSCALE was dispatched. **One session answers it: Cyberpunk with Resolution Scaling set to FSR 3
and frame generation off** — the log shows whether `0x10001` is on both modules, and the session's frame
counts show whether it was counted twice. If so, the fix is beta.43's: count at the first module seen, as
`fl::adv::Owns` already does for the Advanced reads.
- **The plane at infinity is measured, not a hypothesis any more (D119).** Lies of P: `cameraNear = ∞`,
`cameraFar = 10`. Dying Light: `cameraNear = ∞`, `cameraFar = 0.1`. Both gave one plane on beta.41. Kingdom
Come still gives both as numbers (0.05 and 8000). Clair Obscur was not run.
- **The logs are whole.** Each has its installs by module and symbol, the census as it grew, and lines long after
the first second — Dying Light's first UPSCALE at 71.6 s, Kingdom Come's at 37.5 s, when play began. One line
looks odd and was not looked into: Cyberpunk's frame-generation leaf's `ffxDispatch` is at `0x241cde7ba10`, far
from where the other modules sit (`0x7ff…`); the patch went in and was called.
- **Dying Light was named FSR, Quality, with DLSS frame generation ×3.99** — its settings as the owner gave them.
No session changed upscaler part-way, so D120's case was not exercised.
### And three more starts of Cyberpunk 2077, 10:05–10:15 the same morning
Asked for as "Resolution Scaling = FSR 3, frame generation off". Read the same way.
- **The game was still on FSR 2.** After the last of them `UserSettings.json` has `ResolutionScaling = FSR2`,
`FSR2 = Performance` (it was `Quality` at 09:50), `FSR3 = Auto` untouched, `FrameGeneration = Off`. So the quality
and the frame generation were changed and the upscaler was not: **the owner's screenshot of the menu, taken after
them, shows Resolution Scaling = "AMD FidelityFX Super Resolution 2.1", Performance, Frame Generation Off** —
the file's `FSR2` is the menu's FSR 2.1. Both
stored sessions (215 s and 158 s, attached to a game already running) agree with FSR 2.1 built in and frame
generation off: every hook in, **not one ffx dispatch or query of any type**, no Streamline evaluation, no render
size, upscaler "unknown", factor 1.0 from Streamline's frame tokens, ~290 FPS. **So the 2.3 loader's double count
is still unobserved either way**: what answers it is a session in which `UserSettings.json` says
`ResolutionScaling = FSR3` afterwards.
- **The first start was lost to the transient this file recorded an hour earlier — in a real session this time.**
10:05:20 the game appeared; the Overlay went in at 10:05:23; 0.47 s later it was told to stop, and the Agent's
log says why: `SafetyUnhook; Discarded (tier 1, exit=UnhookedSafety, frames=0); guard=ModuleScanFailed/a module
list came back incomplete`. The Overlay's log shows the four patches restored within 0.75 s. The game ran on
unrecorded for two minutes until the owner restarted it. **It is not new and not rare**: the Agent's logs kept on
this PC (2026-11-05 onwards) hold five such ends — Phantom Blade Zero three times on 2026-11-05 (two safety
unhooks and one refusal before injection), Crown & Coin on 2026-11-10, Cyberpunk today — beside the two test
runs. Each is a module list read while the target was still loading modules, at a launch. **The question for the
owner is no longer hypothetical**: a list that cannot be read is not a finding, and rule 2 treats it as a refusal
so that an unreadable game is never hooked; reading it again a bounded number of times before refusing would
keep that — a list that stays unreadable still refuses — and stop losing sessions to a moment of loading. It
changes what the guard does on a check, so it is the owner's decision, and it is not made here. *(Made the same
day: D123, §NEXT item 1b.)*
- **`vswhere -latest` names SQL Server Management Studio on this PC.** Ask for the C++ tools as `build.ps1` does
(`-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`). The `x64-release` preset writes no
`compile_commands.json`: `ninja -C build/native/x64-release -t commands FrameLedger.Overlay` gives the Overlay's
flags for a bench.
- **Run clang-format on the native files an edit script wrote before the gate** — the format check comes after the
native build and tests, and a miss costs the whole run.
- **`tools/resx-gen.ps1` needs `-Resx src/FrameLedger.App/Strings.resx`**; started without it from a shell that
has no console it waits for the missing parameter until it is stopped.
- **A Python script passed to a shell as a here-document loses its backslashes** before Python sees them: write
the script to a file.
- **`gh pr checks --watch` returns at once when no check has started yet**; wait a moment before starting it.
- **Qodana's native report is advisory, and auto-merge does not wait for it.** On #422 it reported three
`bugprone-implicit-widening-of-multiplication-result` in the test and the harness (an index into the feature
slots computed as a product of two 32-bit values: compute it in `size_t`) while the required checks were still
running; auto-merge was switched off until the fix was pushed. A finished job's log while its run is still going:
`gh api repos/…/actions/jobs/<id>/logs --allow-escape-sequences`; the report's SARIF is a zip inside the
artifact's zip.
- **GPG's pinentry timed out once** (the cache had expired); the second attempt went through when the owner was
at the keyboard.
### NEXT
1. ~~**The owner runs item 40** — above all **one session of Cyberpunk 2077 with FSR upscaling** on beta.42, then
quits the game the ordinary way. Its `logs\overlay-<pid>-….log` is what beta.43 waits for.~~ **Run 2026-11-12;
the section above is what it showed.** What is left of item 40 is (d), a session that changes upscaler, and
the owner's word on the rest.
1a. ~~**Before beta.43's plan: one session of Cyberpunk 2077 with Resolution Scaling = FSR 3, frame generation
off** (the second bullet above), and a second with it on. It says whether FrameLedger names FSR 3 there —
the route through the loader that D121 was first taken to be about — and whether the 2.3 loader counts an
UPSCALE twice. *(Tried 2026-11-12 10:08 and 10:12: the game was still on FSR 2 — the section above. The check
that the right thing ran is the file: `ResolutionScaling = FSR3`.)*~~
**It cannot be run, the owner said the same day: Cyberpunk 2077 has FSR 2.1 as its only FSR upscaler and
FSR 3.1 as frame generation only — two separate settings, not a pair; there is no FSR 3 under Resolution
Scaling.** So D121 is closed for good — every Cyberpunk session upscaling with FSR reads "unknown", by the
limit `LIMITATIONS.md` states — and **no title run so far upscales through a 2.3 loader**. The double
count stays unobserved. What IS measured is that this loader hands a frame-generation dispatch to the leaf's
export; an UPSCALE through the same `ffxDispatch` would take the same path. beta.43's plan therefore counts
an UPSCALE at the first hooked module that sees it (as `fl::adv::Owns` does) as a precaution, with a fixture
whose loader forwards to the leaf's export — rather than wait for a session that cannot be had.
1b. ~~**The owner's decision on the guard's module-list read** (the section above): refuse at the first incomplete
list, as now, or read again a bounded number of times first. If the second, it is a pull request of its own
in the guard (`FrameLedger.Injector`), with `19_SAFETY` amended in it, before or with beta.43.~~ **Decided
2026-11-12 — read again (D123) — and built the same day**: `Collected::kUnsettled`, up to three re-reads,
`19_SAFETY` amended. Not released: it ships with the next pre-release, and until then a launch can still be
lost this way on beta.42. What the owner then checks is the Agent's log: no `guard=ModuleScanFailed` end at a
game's launch, and if one comes its signal now says which kind — *kept changing while it was read* (four reads
were not enough) or *came back incomplete* (more modules than the guard's buffer holds).
2. **0.1.0-beta.43 — planned and approved 2026-11-12 (D123–D125), and under way.** The guard's re-read (D123,
#413) ships with it and not on its own (D124). Five pull requests after it: (1) an UPSCALE is counted at the
first source that saw one (D125) — the fixture's loader bound through the leaves' exports read K = 1 as 2.0
before it; (2) `slSetConstants`; (3) `ffxConfigure` on the four ffx modules; (4) the Agent, the App and the
Privacy Policy 2.17, whose wording the plan carried and the owner approved with it; (5) the release, owner-only
item 41. The design is the one below, as the review of 2026-11-12's first plan left it; nothing in the logs
changed it except D125.
~~**Read that log, then plan 0.1.0-beta.43**~~ — `slSetConstants` and `ffxConfigure`, and the fix for D121 if the
log shows the route. What to look for: which `HOOK_INSTALLED` lines there are (which of the four ffx modules and
the FSR 3.0 host were patched); the `FFX_DISPATCH` lines — is `b=0x10001` (UPSCALE) on any module, or only
`0x20004` / `0x2000c` / `0x20003`; an `UPSCALE_ROUTE` line; `PATCH_FAILED`; the last `RUNTIME_CENSUS` word.
**No UPSCALE type anywhere and no route line means the upscale does not come through any export the Overlay
patches** — statically linked, or a module the inventory does not name — and then the fix is not a new arm in
a detour. The design for the two hooks, as the review left it, is the plan of 2026-11-12 (moved with the
section above) and these points: the new rows are gated at the top of `InstallByFamily`, **before**
`ResolveScoped`, and installed only once the process was ever asked; hook families 13 and 14 with latches of
their own; `slSetConstants` checks the struct's GUID and `structVersion ≥ 1` on every call and reads only
`jitterOffset`, `mvecScale`, `cameraNear` … `cameraAspectRatio` and the seven Booleans — never bytes 368..423,
pinned by `offsetof` of the allowed members; summaries from the first viewport seen; `ffxConfigure` has an
owner slot of its own and reads `frameGenerationEnabled`, `allowAsyncWorkloads`, `flags`,
`onlyPresentGenerated`, `generationRect` and nothing else; the detours also consult `MayObserve()`;
`overlay-fields-check` gains three parameter names, `structType` among the shared members and an `offsetof` per
listed `sl::Constants` member. The registry holds 48 and the worst case becomes 25
(`kPatchSitesOutsideTheInventory` stays 7; the inventory's row count goes from 13 to 18 and its
`static_assert` says so).
3. **0.1.0-beta.44** — `slGetFeatureVersion` and `slGetFeatureRequirements` — when the owner says beta.43 passed.
4. **Trains C and D** (beta.45, beta.46) each begin with a spike and end in the owner's go or no.
1. **The owner runs item 42** — the first time the two new hooks are in a real game, and the first look at whether
any attach is early enough to see a game's start-up calls. Not first on a game under the user-mode exception's
trial (D38).
2. **Train C (0.1.0-beta.45, Reflex latency per frame)** begins with a spike and ends in the owner's go or no — and
only when the owner says beta.44 passed. If item 42 shows the two calls are never seen in attach mode, whether
they keep their two patches is the owner's to say first.
3. **Train D** (beta.46) the same way.
### Left open by this session
- ~~**This release's own facts** — the tag's run, the digests, the delta — are not in any file yet: the release is cut
after this text. Record them in the next pull request.~~ **Recorded 2026-11-12: 0.1.0-beta.42 was released
2026-11-12T02:31:07Z** (09:31 in the owner's time zone) from the signed tag on `a708ae8` (#410), by run
43139775713 — green at the first attempt, one run for the one tag push. Eight assets; the seven digests of
`SHA256SUMS.txt` equal the ones GitHub computed; the four shipped natives carry `FL_BUILD_ID v0.1.0-beta.42`. The
delta from beta.41 is 710,943 bytes beside a full package of 110,716,228 — "Delta processed 0452 files. 0023
patched, 0429 unchanged". The wiki was published by run 43142009098. The rehearsal on the release branch (run
43137520796) had made a delta of 735,485 bytes with the same file counts.
- **No real game was run on this build.** The four changes were tested with the harness and the cost measured on
the headers. Item 40 is the first real session.
- **Whether the missing plane of Lies of P, Clair Obscur and Dying Light is `FLT_MAX`** is still the reading their
small `cameraFar` values point to, not a measurement. Item 40 (c).
- **A flake with a cause now, and a question in it for the owner.**
`ShmDrainIntegrationTests.TheGuardInjectsTheOverlayAndTheReaderDrainsRealFrames` was red once in this release's
local gate (and once on 2026-11-11, when the assertion did not yet print the verdict): the supervisor's first
re-scan, 0.8 s after the injection, came back `ModuleScanFailed` — *a module list came back incomplete* — while
the harness was still loading modules. The same gate was green on the same code before and after. In the test
it is a re-run. **In a real session the same answer is a safety unhook**: a re-scan that cannot read the module
list of a game that is still running stops the session (`19_SAFETY` §During a session; D48 covers only a game
that has exited). Whether the guard should read the list a second time before refusing is a change to rule 2's
checks and is the owner's to decide; nothing was changed. **A second one within the hour, in the gate of the pull
request that records the release's facts:**
`ToolhelpProcessSnapshotSourceTests.ThisProcessIsInTheSnapshotWithItsNormalisedImagePathAndACreationTime` got an
empty snapshot — `ToolhelpProcessSnapshotSource.Take` returns an empty list when the snapshot cannot be taken or
walked, and says nothing. Green on the run after. Both are Windows refusing, for a moment, to enumerate something
on a PC that was building, testing and running FrameLedger itself at once; what an empty snapshot does to the
watcher's tick in a real session was not looked into.
- ~~**SonarCloud has not answered for #406–#409**: `main`'s `sonarcloud` job was cancelled by the next merge each
time. It runs to its end on this release's commit; read it then.~~ **It answered on `a708ae8`: the quality gate
passed, and one issue was open on `main`** — `cpp:S5813`, a `strlen` in the helper the new log case of
`guard_test.cpp` reads lines with (#408). Fixed in the pull request that records these facts: the helper takes
strings. **`csharpsquid:S3869` on `ParentDump.cs` is no longer open** — SonarCloud shows it accepted at
2026-11-11T21:13Z (04:13 on the 12th, the owner's time), which is before the texts that still called it open
were written; they were not checked against SonarCloud then. **Qodana's two reports are green on the release's
commit**; the native one was red from #407 to #408 on seven problems in test code, answered in #409.
after this text. Record them in the next pull request, with what SonarCloud and Qodana said.~~ **Recorded
2026-11-12: 0.1.0-beta.44 was released 2026-11-12T12:24:26Z** (19:24 in the owner's time zone) from the signed
tag on `f9e9fdb` (#424), by run 43214789700 — green at the first attempt, one run for the one tag push. Eight
assets; the seven digests of `SHA256SUMS.txt` equal the ones GitHub computed; the four shipped natives carry
`FL_BUILD_ID v0.1.0-beta.44`. The delta from beta.43 is 1,866,183 bytes beside a full package of 110,750,960 —
"Delta processed 0452 files. 0025 patched, 0427 unchanged". The wiki was published by run 43217647799. The
rehearsal on the release branch (run 43204362797, at `56b1157` — the released tree but for two namespace
qualifiers #423 dropped afterwards) had made a delta of 1,878,774 bytes with the same file counts. **SonarCloud
answered on `f9e9fdb`: the quality gate passed and no issue is open on `main`. Qodana's two reports are green on
that commit.** Qodana found two things on the way, each fixed before its pull request merged: three index
products in the injected test and the harness (#422, native), and two namespace qualifiers a new `using` made
redundant (#423, managed) — #423's auto-merge was held until that report was in. **`check` failed once on
#424**, a pull request that changes no code: the CaptureHost's launch-mode end-to-end test
(`LaunchModeStartsTheHarnessItselfAndReportsWhatRanUnhooked`) read 19.8 presented frames a second from the
harness on a slow runner where it asks for more than 30; the job was run again and passed. A rate asserted
against a wall clock on a shared runner — the one flake of this train, not looked into further.
- **No real game was run on this build.** Two new patch sites, tested with the harness and the stub; their cost
measured on the headers.
- **What item 41 left unexercised**: a configure through the FidelityFX 2.3 loader (Cyberpunk 2077 with FSR frame
generation), a game with neither library.
- **A fault while a game is closing is not seen by a hooked session** (D127: written down, not changed). Looking
again later would make every session of Hogwarts Legacy `crashed`, and under a user-mode exception would end the
exception for a fault no hook caused; the decision is the owner's, and is not taken.
- **Phantom Blade Zero and Hogwarts Legacy name no upscaler beside DLSS frame generation**, as on every release
before; not looked into.
- **`docs/LIST_GAME_TESTED.md` is as of 2026-11-06**: refreshing it is a new copy of the ledger and the owner's review.
- **Item 40 (d)** was not exercised and the owner has not said item 40 passed. **Items 36 (d) and 37 are still open.**
- **What an empty process snapshot does to the watcher's tick in a real session** was not looked into (seen once in
a test on 2026-11-12).
- **`LIMITATIONS.md` and the accuracy statement still say the processor's, the memory's and the motherboard's
sensors "have never been read on real hardware"** — the owner's to reword. ~~**SonarCloud's `csharpsquid:S3869` on
`ParentDump.cs`** is the owner's to accept.~~ *(Done — the line above.)* **Items 36 (d) and 37 are still open.** The alpha line still rests
(D98).
sensors "have never been read on real hardware"** — the owner's to reword. The alpha line still rests (D98).
**Owner-only:** item 40.
**Owner-only:** item 42; what item 41 left unexercised; item 40 (d).
## Owner-only — no PR can close these
@@ -609,6 +525,79 @@ Asked for as "Resolution Scaling = FSR 3, frame generation off". Read the same w
the session upscaled with FSR 2.1, built into the game; (c) Lies of P and Dying Light show `cameraNear = ∞`;
(e) all four logs are whole and none has a `PATCH_FAILED`. **(d) was not exercised**, and the owner has not
said the item passed.
41. **beta.43 — the first real games with the two new hooks, and the guard's re-read** (D123–D125). **Not first on
a game under the user-mode exception's trial** (D38): a crash there ends the exception for good. (a) **The
update from beta.42**: Help ▸ Check for updates, *Restart to update* with no game running; **the terms window
shows once, with Privacy Policy 2.17**. (b) **The guard**: over the games played, the Agent's log
(`logs\agent-<date>.log`) has no session that ended at a game's launch with `guard=ModuleScanFailed`. If one
does, its signal now says which kind — *kept changing while it was read* (four reads were not enough) or *came
back incomplete* — say which. (c) **A Streamline game with Advanced metrics on** (Dying Light: The Beast, or
Cyberpunk 2077 with DLSS): a session of a few minutes, quit from the game's menu. Its Advanced page shows the
Streamline rows — jitter, motion vectors, depth, projection, resets — and the line under the session says
*read*. **Read them for sense**: a field of view between about 0.3 and 2.5 rad, an aspect ratio near the
screen's, a jitter under 1, planes that are not both zero. Values that make no sense mean the game's struct is
not laid out as the one FrameLedger was built against: say so, with the numbers, and do not run further games.
(d) **FSR frame generation on** (Cyberpunk 2077 or Lies of P), Advanced metrics on: the page shows the
frame-generation rows — on, asynchronous or not, the flags, the rectangle — and the line says *read*. (e) **The
three answers of the line**: a game with neither library says *not hooked* for both; a game where it says
*hooked — the game did not make the call* for a library the game plainly uses is a finding, not a pass — say
which game. (f) **Off means off**: with Advanced metrics off, **start a game afresh** and record a session; it
has no Advanced button, and its `logs\overlay-<pid>-….log` has no `HOOK_INSTALLED` line naming `slSetConstants`
or `ffxConfigure`. (A game that was already running when a session with the option on was recorded keeps the
two patches until it exits — that is by design, and its log will have the lines.) (g) **Nothing else moved**:
no crash, no `PATCH_FAILED` in any overlay log, frame rates and the frame-generation factor as on beta.42 for
the same game and settings.
**What each outcome means, written before the run.** (c) or (d) empty with *not hooked*: the log of that
session says why — no `HOOK_INSTALLED` for the function (the library is a 1.x interposer or lacks the export)
or a `PATCH_FAILED` (its `a=` number is the reason). Empty with *hooked — the game did not make the call*: the
game reaches Streamline or FSR by a way that does not pass the export — beta.44's plan needs to know. A crash,
or a game that will not start: say so at once; *Disable all hooking* (Settings ▸ Capture) and switching Advanced
metrics off are the two ways to run without the hooks, and which of them cured it says which hook it was.
**Nine sessions were run on 2026-11-12 and read the same afternoon** ([`handoff/history/0.1.0-beta.43.md`](handoff/history/0.1.0-beta.43.md) §What the owner's nine
sessions on beta.43 showed): (a) happened — Privacy Policy 2.17 accepted once, at the update; (b) held — no
`guard=ModuleScanFailed` since the update; (c) read on Phantom Blade Zero, Cyberpunk 2077 and Hogwarts Legacy,
every value sane but one: **Cyberpunk 2077 gives its field of view in degrees** (51–90), and the page labels it
radians — the struct is laid out as expected, the label is wrong; (d) read on Lies of P, **not exercised through
the FidelityFX 2.3 loader**; (e) the three answers were each seen and none is a finding, **a game with neither
library was not run**; (f) held on Lies of P started afresh; (g) no `PATCH_FAILED`, no fault, frame rates as
before — Lies of P's 35 s end with exit code 3 is, by the owner, the game's own crash after a shader failed to
compile, and Hogwarts Legacy's fault at exit is in Windows' log six times since 2026-11-06, hooked or not.
**Judged passed 2026-11-12, on the owner's word to go on if it did**; the two parts in bold stay open.
42. **beta.44 — the two questions about a feature in real games, and what the nine sessions found, fixed**
(D126–D128). **Not first on a game under the user-mode exception's trial** (D38): a crash there ends the
exception for good. (a) **The update from beta.43**: Help ▸ Check for updates, *Restart to update* with no game
running; **the terms window shows once, with Privacy Policy 2.18**. (b) **Cyberpunk 2077 with Advanced metrics
on**, a session of a minute or two: its Advanced page shows the field of view as the game gives it —
`51.0055 – 90`, or whatever the game's setting makes it — with a line under it that says *Not radians*, and no
"rad" beside the number. The two sessions of 2026-11-12 keep `51.0055 – 90 rad (2922.4° – 5156.6°)`: they were
stored that way. (c) **Any Streamline game with Advanced metrics on** (Phantom Blade Zero, Hogwarts Legacy,
Cyberpunk 2077): the line under the session has one more sentence — *Which version each Streamline feature is:
…. What each requires: ….* — and for each it says *read*, or *hooked - the game asks this while it starts, and
did not ask again after FrameLedger attached*. **The second is the expected answer** for a game that was already
past its start-up when FrameLedger attached; it is not a failure. If it says *read*: the page lists features by
NVIDIA's names (`kFeatureDLSS`, `kFeatureDLSS_G`) with versions and requirements — check that the driver version
it shows as *detected* is the installed driver's, and that Streamline's version is the game's `sl.*.dll` file
version. (d) **Which games, if any, say *read***: nothing to set up — FrameLedger attaches as soon as it sees the
game — but say, for each Streamline game run, which of the two answers each call got. Hogwarts Legacy loaded its
Streamline library some six seconds after FrameLedger attached on 2026-11-12, so it is the likeliest to say
*read*; Phantom Blade Zero and Cyberpunk 2077 had it loaded already. (e) **A game with no Streamline** (Lies of P, Kingdom Come:
Deliverance II): both say *not hooked*. (f) **Off means off**: with Advanced metrics off, **start a game
afresh** and record a session; its `logs\overlay-<pid>-….log` has no `HOOK_INSTALLED` line naming
`slGetFeatureVersion`, `slGetFeatureRequirements`, `slSetConstants` or `ffxConfigure`. (g) **Nothing else
moved**: no crash, no `PATCH_FAILED` in any overlay log, frame rates and the frame-generation factor as on
beta.43 for the same game and settings. With Advanced metrics on, a Streamline game's log has
`slGetFeatureVersion` and `slGetFeatureRequirements` as its **first two** Streamline `HOOK_INSTALLED` lines.
(h) **The count of early ends** (D126) is not something to provoke: if a game whose hooking you switched back
on ends once within a minute of starting, hooking stays on; a second such end switches it off, as before.
**What each outcome means, written before the run.** (c) *not hooked* on a Streamline game: the log says why —
no `HOOK_INSTALLED` for the function (a 1.x interposer, or the export is missing) or a `PATCH_FAILED`. (c) and
(d) both *did not ask again* on every game: the calls are made before any attach can be in — then these two
hooks give nothing in attach mode, and whether they are worth their two patches is the owner's to say before
train C. *Read* with numbers that make no sense (a driver version that is not the installed one, a feature
named `feature <number>`): say so with the numbers — an id with no name only means NVIDIA added a feature this
build does not know. A crash, or a game that will not start: say so at once; *Disable all hooking*
(Settings ▸ Capture) and switching Advanced metrics off are the two ways to run without the hooks, and which
of them cured it says which hook it was.
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
@@ -748,6 +737,9 @@ Where each owner decision is recorded — the file and its section, and a label
| D123 | [`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) §Pre-injection checks, check 1 | a module list that changed while the guard read it is read again, at most three times, before it refuses — five real sessions on one PC in a week had ended as a safety unhook with no frame recorded; a list that never settles still refuses, and nothing else about what refuses changed |
| D124 | [`HANDOFF.md`](HANDOFF.md) §NEXT | the guard's re-read (D123) ships with 0.1.0-beta.43 and not as a release of its own — the train's numbers do not move a third time; until then a launch can still be lost that way on beta.42 |
| D125 | [`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) §Hook inventory | an FSR UPSCALE is counted at the first source that saw one and at no other — a precaution for a loader that hands a dispatch on to the leaf's export (Cyberpunk 2077's 2.3.0 does, for frame generation); no title run so far upscales through one |
| D126 | [`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) §Crash & stability safety | the count of early abnormal ends starts again when the user switches hooking on (the consent grant sets it to 0) — it was never set back, so a game once switched off was switched off again by every single such end, under a reason that says "twice" (Lies of P, 2026-11-12) |
| D127 | [`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) §Crash & stability safety | a fault while a game is closing, which a hooked session does not see (Hogwarts Legacy, the driver's `_nvngx.dll`, hooked or not), is written down and not changed in 0.1.0-beta.44 — seeing it would end a user-mode exception for a fault no hook caused; a decision of its own |
| D128 | [`18_GPU_VENDOR_APIS.md`](18_GPU_VENDOR_APIS.md) §Train B | a field of view over π is shown as the game gave it, with a row that says it is not radians, and is never converted — Cyberpunk 2077 gives Streamline degrees; converting would store a guess at the unit as the game's word |
| D109 | [`../legal/DISCLAIMER.md`](../legal/DISCLAIMER.md) §5, §5A | asked on 2026-11-11 with both sentences quoted: the Disclaimer goes to 2.15 with the Privacy Policy — PawnIO and the admin mode are no longer "for the CPU temperature" alone; with Advanced metrics on they also read the processor's, the memory's and the motherboard's sensors. The admin mode's disclosure follows (`agent-admin-dialog/2`) |
---
+86
View File
@@ -0,0 +1,86 @@
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.43 was cut, 2026-11-12 (D66). CHANGELOG.md lists every release. -->
## [0.1.0-beta.43] - 2026-11-12
**The forty-third pre-release: a game that was still loading is no longer lost, and two more readings inside the
game.** Two fixes first. A game that FrameLedger looked at while it was still loading its modules could be left
unrecorded — the session ended as a safety stop with nothing in it; FrameLedger now reads the list again before it
gives up, and what stops a session has not changed. And an FSR upscale is counted once per frame whichever way the
game's FidelityFX loader passes it on. Then, with **Advanced metrics** on, a session of a game measured from inside
also keeps what the game tells NVIDIA Streamline about each frame and how it configures FSR frame generation —
from two calls FrameLedger hooks only once Advanced metrics has been asked for in that game. The same unsigned
installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
**What it is not, yet.** The two new readings have been tested with FrameLedger's own test program and **have not
been run in a real game**: this release is the first time either hook is put into one. They are what the game
asked for, not a check of what happened, and Streamline's values are those of the first view a game draws.
Streamline 1.x is not read. Where the game's camera is, which way it looks and its matrices are never read — they
sit in the same data, and a check in the build refuses code that names them. The cost was measured on the code
itself: about 20 billionths of a second per frame for Streamline's call and 15 per call for FSR's while the option
is on, under 2 while it is off; nothing measurable for the two fixes. A game whose FSR is built in (Cyberpunk 2077's
FSR 2.1) still reads "unknown" as its upscaler. Everything 0.1.0-beta.42's notes say is not yet done still stands.
**Updating from `0.1.0-beta.42`:** Help ▸ Check for updates, then *Restart to update* with no game running. **The
terms are shown once: Privacy Policy 2.17**, which names the two new readings. No change to the ledger (schema 23),
the detection rules stay at `2026.11.2`. **The code loaded into a game changed in this release**, so a game that
was running during the update keeps the old part until it is started again.
### Added
- **Advanced metrics: a session now shows what the game told Streamline each frame and how it configured FSR frame
generation.** For a game FrameLedger measures from inside, a session recorded with **Advanced metrics** on keeps
— beside what the game told DLSS and FSR — the largest jitter offset, the motion-vector scale and how motion
vectors are stored, the near and far planes and whether depth is inverted, the range of the field of view, the
aspect ratio, whether the projection is orthographic and how often the game reset the upscaler's history
(Streamline); and whether FSR frame generation was configured on, whether it may run asynchronously, its flags,
whether only generated frames are presented, and the part of the picture it generates in. A setting the game
changed during the session reads *on and off*. The line under the session now also says, for each of the two,
whether it was read, hooked and never called by the game, or not hooked because the game did not load the
library — so an empty page says which it is. These are what the game asked for, not a check of what happened;
neither has been confirmed on a real game yet. Never read: where the camera is, which way it looks, its
matrices.
- **The terms are shown once after this update: Privacy Policy 2.17.** It names the two new readings above and says
that the two calls they come from are intercepted in a game only once a session with Advanced metrics on has
started there. Nothing is sent anywhere, as before.
- **Advanced metrics, inside the game: how the game configures FSR frame generation** (the part inside the game;
what a session shows of it comes with the same release). With **Advanced metrics** on, FrameLedger now also
reads, from the call a game makes to configure AMD's frame generation, whether generation is on, whether it may
run asynchronously, its flags, whether only generated frames are presented, and the part of the picture it
generates in. Nothing else of that call is read. Like the Streamline hook, this one is put into a game only once
Advanced metrics has been asked for. Measured cost: about 15 billionths of a second per call while the option is
on, under 2 while it is off.
- **Advanced metrics, inside the game: what the game tells NVIDIA Streamline about each frame** (the part inside the
game; what a session shows of it comes with the same release). With **Advanced metrics** on, FrameLedger now also
reads, from a call a Streamline game makes every frame, the size of the jitter, the motion-vector scale, the depth
range, the range of the field of view, the aspect ratio and seven on/off settings (inverted depth, how motion
vectors are stored, whether the upscaler's history was reset). It never reads where the game's camera is, which
way it looks, or its matrices, which sit in the same data — a check in the build refuses any code that names
them. This is the first reading that needs a hook of its own, and that hook is put into a game only once
Advanced metrics has been asked for: with the option off, nothing in the game is touched for it. Measured cost:
about 20 billionths of a second per frame while the option is on, under one billionth while it is off.
### Fixed
- **FSR upscaling is counted once per frame whichever way the game's FidelityFX loader passes it on.** Newer
FidelityFX loaders hand a call on to the library behind them in a way that brought the same upscale to
FrameLedger twice; with frame generation off, the count of frames the game rendered would have doubled — Native
FPS twice too high. Seen in how Cyberpunk 2077's loader passes on its frame-generation calls; no game tested so
far upscales through such a loader, so this is a precaution. The upscale is now counted where the game calls it,
and nowhere else. (Owner decision D125. Measured cost: none that can be told from noise.)
- **A game is no longer left unrecorded because it was still loading when FrameLedger looked at it.** Before it
hooks a game, and again right after, FrameLedger lists the modules the game has loaded and checks them against
the anti-cheat list. A game that is starting loads and unloads modules for several seconds, and when the list
changed in the middle of being read FrameLedger treated it as unreadable and stopped: the session ended as a
safety stop with nothing recorded, and the game ran on unmeasured until it was restarted. It now reads the list
again — up to three more times, a quarter of a second apart — and only stops if the list never holds still. What
stops a session has not changed: an anti-cheat module found in any read stops it at once, a protected process
still stops it at once, and a list that cannot be read in the end is still a stop, never a pass. (Owner decision
D123; seen five times in one PC's logs in a week.)
- **A test of the Overlay's log reads its lines without `strlen`.** The helper that looks for a line in the log
took its text as C strings and measured one with `strlen`; it takes strings now. Test code only: nothing in the
installed software changes. (Found by SonarCloud after 0.1.0-beta.42 was merged.)
+83
View File
@@ -0,0 +1,83 @@
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.44 was cut, 2026-11-12 (D66). CHANGELOG.md lists every release. -->
## [0.1.0-beta.44] - 2026-11-12
**The forty-fourth pre-release: what the first real games on 0.1.0-beta.43 showed, fixed — and two more readings
inside the game.** Nine sessions on five games were read the day 0.1.0-beta.43 came out. Its two new readings
worked on four of them; three things did not read right, and are fixed first. Cyberpunk 2077 tells NVIDIA
Streamline its field of view in degrees, and FrameLedger labelled the number as radians: a value too large to be
radians is now shown as the game gave it, and says so. A game whose hooking had once been switched off after two
early ends was switched off again by every single one after that: the count now starts again each time you switch
hooking back on. And an FSR frame-generation configuration with no flag set now says *None*. Then, with
**Advanced metrics** on, a session of a game measured from inside can also keep what Streamline answers when the
game asks **which version a feature is and what it requires** — from two more calls FrameLedger hooks only once
Advanced metrics has been asked for in that game. The same unsigned installer: verify its hash against
`SHA256SUMS.txt`, then *More info → Run anyway*.
**What it is not, yet.** **Most sessions will show nothing of the two new readings.** A game asks Streamline about
its features while it starts, and FrameLedger is usually not in the game yet; the session then says the call was
hooked and the game did not ask again — which is the expected answer, not a fault. They have been tested with
FrameLedger's own test program and **have not been run in a real game**: this release is the first time either
hook is put into one. What they give is Streamline's answer as the game received it — not FrameLedger's own check
of the PC — and never the lists that answer points to (which buffers, which Vulkan extensions). A game that faults
while it is closing can still read *ended normally* in a session measured from inside; that is written down, not
changed. The two Cyberpunk 2077 sessions recorded on 0.1.0-beta.43 keep the line they were stored with. The cost
was measured on the code itself: 15 and 21 billionths of a second per call while the option is on, under 1 while
it is off, for calls a game makes a handful of times. Everything 0.1.0-beta.43's notes say is not yet done still
stands.
**Updating from `0.1.0-beta.43`:** Help ▸ Check for updates, then *Restart to update* with no game running. **The
terms are shown once: Privacy Policy 2.18**, which names the two new readings. No change to the ledger (schema 23),
the detection rules stay at `2026.11.2`. **The code loaded into a game changed in this release**, so a game that
was running during the update keeps the old part until it is started again.
### Added
- **Two more calls are hooked inside a game, only where Advanced metrics was asked for** (Advanced metrics train B,
the third step): `slGetFeatureVersion` and `slGetFeatureRequirements` of `sl.interposer.dll` — what Streamline
answers when a game asks which version a feature is and what it requires. The original call runs first and its
answer is read only when it succeeded: the feature's Streamline and NGX versions; the graphics APIs it supports,
whether V-Sync must be off and hardware-accelerated GPU scheduling on, how many threads, viewports and buffers,
and the Windows and driver versions found beside the ones required. **The lists the answer points to — the
buffer tags, the names of Vulkan extensions and features — are never followed.** As with `slSetConstants`,
neither patch is made in a game no session has asked, and each stays for the life of the process once made. A
game asks these while it starts, so the two rows are the first the Overlay patches — and most sessions, attached
later, will still not see the calls. Nothing is shown of them yet: the Agent and the App read them in the next
pull request. No layout change (5), no schema change (23).
- **A session shows which version each Streamline feature is, and what it requires** (Advanced metrics). Two
catalog entries are now read inside the game: `sl.feature.versions` and `sl.feature.requirements` — Streamline's
answers to the two questions a game asks about a feature, in NVIDIA's own names (`kFeatureDLSS_G · versionNGX`,
`kFeatureDLSS · driverVersionRequired`). The line under the session says for each of the two calls whether it was
read, not hooked, or — the usual case — *hooked — the game asks this while it starts, and did not ask again after
FrameLedger attached*. **Most sessions will show nothing here**: a game asks before FrameLedger is in it. A game
that asks later is read then, and a second session of a game that kept running keeps what the first read. The
Agent's end-to-end tests now run a Streamline target as well as an FSR one.
### Changed
- **Privacy Policy 2.18**: it names what Streamline answers about a feature — the features asked about, their
versions, what each requires — and what of that answer is never read (the lists it points to: the buffers' names,
the names of Vulkan extensions and features); "two further calls" is four. The terms window shows once after the
update. The Disclaimer stays 2.15.
- **Switching hooking back on starts the count of early abnormal ends again** (owner decision D126). The count was
never set back, so a game that had once been switched off — after two ends within 60 seconds of injection — was
switched off again by every single such end after its user switched it on, under a reason that still said
"twice". Seen on 2026-11-12: Lies of P, two ends in October, one crash of its own that day. Two are needed again
each time. Nothing else about the rule moves: it only switches off, an anti-cheat block is never cleared, and the
user-mode exception's trial keeps its own record.
### Fixed
- **A field of view a game gives in degrees is no longer labelled radians** (Advanced metrics; owner decision
D128). Cyberpunk 2077 gives NVIDIA Streamline 51–90 where the library expects radians, and the session read
`51.0055 – 90 rad (2922.4° – 5156.6°)`. A value too large to be radians is now shown as the game gave it, with a
line that says it is not radians, and is not converted. Sessions recorded on 0.1.0-beta.43 keep the line they
were stored with.
- **An FSR frame-generation configuration with no flag set says "None"** (Advanced metrics). The row was missing,
where an upscale with no flag has always said so.
- **The accuracy statement and the limitations no longer say that what a game tells Streamline, and how it
configures FSR frame generation, have not been read from a real game**: they were, on 2026-11-12 — three games
and one. What is still unconfirmed is named: the DLSS options, and a configuration that reaches FSR through
AMD's 2.3 loader. A fault while a game is closing, which a session measured from inside the game does not see,
is written down as a limit (owner decision D127: not changed in this release).
+204
View File
@@ -0,0 +1,204 @@
# HANDOFF history — 0.1.0-beta.42
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.43 was cut, 2026-11-12 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" mean HANDOFF.md as it stood then, and a path it writes is relative to `docs/`. **Its §NEXT item 2 says 0.1.0-beta.43 is "under way"**: it was released the same day, and what it built and decided is HANDOFF.md's section for it.*
## **START HERE** — 2026-11-12, 0.1.0-beta.42: no new patch site — the label, the registry, a log that outlives the game, the plane at infinity
*Status is `docs/changelog/0.1.0-beta.42.md`; this is what no other file carries.* The owner marked items 38 and 39
passed on 2026-11-12 and train B's second step was planned the same morning. A review of the draft against the code
changed it, and the owner split it (D122): **this release adds no patch site**, and the two new hooks are
0.1.0-beta.43. Four pull requests and this one: #406 (the session's upscaler label, D120; the decisions D119–D122),
#407 (the patch registry), #408 (the native log and the descriptor-type census, D121), #409 (FSR's plane at
infinity, D119; Qodana's native report). **What the owner's sessions on beta.40 and beta.41 showed, and the plan as
approved, are [`handoff/history/0.1.0-beta.41.md`](handoff/history/0.1.0-beta.41.md)**; what each pull request built
is [`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) §Unhooking and §Native logging, [`03_METRICS.md`](03_METRICS.md)
§Upscaling and [`07_IPC.md`](07_IPC.md) §Region 5.
### What this release decided, beyond D119–D122
- **The descriptor-type census is not behind the Advanced-metrics switch.** It is a diagnostic that reaches the log
file and nothing else — no record, no shared memory, no session — like `HOOK_INSTALLED`. Behind the switch it
could not answer D121 for a session recorded with the switch off, which is most of them. Its cost was measured
and stated instead (+3.8 ns a dispatch).
- **The log's text grew to 72 characters; nothing else about the ring did.** 256 events, static, 24 KiB.
- **A slot of the patch registry that was ever live is never reused**, and a failed create or enable leaves the
hook created in MinHook as it always did. Both are the smaller change: the first keeps the stop's walk lock-free
without a second word per slot, the second changes no failure path that has never been seen to run.
- **The live card still names the first upscaler a session saw** (`FgLadder.UpscalerIdentity`). The stored
session's name is the modal one (D120); for a session in progress the question is a different one.
- **Qodana's "never used" on the registry test's stand-in engines is switched off for that file**, not answered by
turning the template into function pointers: the header is loaded into a game, and D100 changes such code only
for a defect.
### What the owner's first four sessions on beta.42 showed (2026-11-12, 09:40–09:53)
Dying Light: The Beast, Kingdom Come: Deliverance II, Cyberpunk 2077 and Lies of P, each quit from its own menu;
read from the four `overlay-<pid>-….log` files, a copy of the ledger, and — for Cyberpunk — the game's own settings
file and executable on disk. All four hooked, no fault, no `PATCH_FAILED`, the Agent's log without an `advanced:`
line.
- **D121 is answered, and it is not a detection gap: in that session Cyberpunk 2077 upscaled with FSR 2.1, which is
compiled into the game.** Its `UserSettings.json`, written when the session ended, has `ResolutionScaling = FSR2`,
`FSR2 = Quality`, `FrameGeneration = FSR3`, `FSR3_FrameGeneration = true` — FSR **2** for the upscale, FSR **3**
for frame generation only. Quality is a ratio of 1.5, and the session's render size is 1707×960 at 2560×1440.
`Cyberpunk2077.exe` carries FSR 2's own function names (`ffxFsr2GetJitterPhaseCount`,
`ffxFsr2GetUpscaleRatioFromQualityMode`) and names one FidelityFX module, the loader; its folder has no FSR 2
DLL. **The log says the same from the other side**: the loader (2.3.0), the upscaler leaf (4.1.1) and the
frame-generation leaf (4.0.1) were all patched; the loader and the frame-generation leaf were handed `0x20004`
(PREPARE) and `0x20003` (FRAMEGENERATION); the loader and the upscaler leaf were asked `0x10002` (the ratio of a
quality mode) once at start; **no module was ever handed `0x10001`**, and there is no `UPSCALE_ROUTE` line. The
NVIDIA driver's words for the session say DLSS was not running. So the upscale goes through no export at all —
the case `LIMITATIONS.md` already names ("FSR 2 and upscalers built into the game are not identified"), and
"unknown" beside a measured render size is the true reading. ~~**The owner had said FSR 3 or 4; that the setting is
FSR 2.1 is read from the file, and is the owner's to confirm.**~~ **Confirmed by the owner the same morning with
a screenshot of the game's Graphics menu: Resolution Scaling reads "AMD FidelityFX Super Resolution 2.1"** (the
file's `FSR2`), with its own quality and sharpening rows under it. Nothing to fix for it in beta.43.
- **The loader of SDK 2.3 passes a dispatch on to the leaf's export — the older loader does not — and that is a
double count waiting for the first title that upscales through it.** In Cyberpunk each frame-generation dispatch
type is logged on the loader AND on the frame-generation leaf: the game calls the loader, the loader calls the
leaf's exported `ffxDispatch`. In Kingdom Come and Dying Light (loader 1.0.2) the UPSCALE is logged on the loader
alone, which is what `fl_hook_inventory.h` measured in September and what the fixture's loader stub copies.
Frame generation is unharmed — PREPARE is counted by its frame number, FRAMEGENERATION is a bit, and the
session's factor is ×2.0001. **An UPSCALE is counted once per hooked module that sees it**
(`g_ffxSeen`'s count): through a 2.3 loader that would be two a frame, and with frame generation off — no
PREPARE, so the count falls back to UPSCALE dispatches — the application-frame count would double. Not
observed: no UPSCALE was dispatched. **One session answers it: Cyberpunk with Resolution Scaling set to FSR 3
and frame generation off** — the log shows whether `0x10001` is on both modules, and the session's frame
counts show whether it was counted twice. If so, the fix is beta.43's: count at the first module seen, as
`fl::adv::Owns` already does for the Advanced reads.
- **The plane at infinity is measured, not a hypothesis any more (D119).** Lies of P: `cameraNear = ∞`,
`cameraFar = 10`. Dying Light: `cameraNear = ∞`, `cameraFar = 0.1`. Both gave one plane on beta.41. Kingdom
Come still gives both as numbers (0.05 and 8000). Clair Obscur was not run.
- **The logs are whole.** Each has its installs by module and symbol, the census as it grew, and lines long after
the first second — Dying Light's first UPSCALE at 71.6 s, Kingdom Come's at 37.5 s, when play began. One line
looks odd and was not looked into: Cyberpunk's frame-generation leaf's `ffxDispatch` is at `0x241cde7ba10`, far
from where the other modules sit (`0x7ff…`); the patch went in and was called.
- **Dying Light was named FSR, Quality, with DLSS frame generation ×3.99** — its settings as the owner gave them.
No session changed upscaler part-way, so D120's case was not exercised.
### And three more starts of Cyberpunk 2077, 10:05–10:15 the same morning
Asked for as "Resolution Scaling = FSR 3, frame generation off". Read the same way.
- **The game was still on FSR 2.** After the last of them `UserSettings.json` has `ResolutionScaling = FSR2`,
`FSR2 = Performance` (it was `Quality` at 09:50), `FSR3 = Auto` untouched, `FrameGeneration = Off`. So the quality
and the frame generation were changed and the upscaler was not: **the owner's screenshot of the menu, taken after
them, shows Resolution Scaling = "AMD FidelityFX Super Resolution 2.1", Performance, Frame Generation Off** —
the file's `FSR2` is the menu's FSR 2.1. Both
stored sessions (215 s and 158 s, attached to a game already running) agree with FSR 2.1 built in and frame
generation off: every hook in, **not one ffx dispatch or query of any type**, no Streamline evaluation, no render
size, upscaler "unknown", factor 1.0 from Streamline's frame tokens, ~290 FPS. **So the 2.3 loader's double count
is still unobserved either way**: what answers it is a session in which `UserSettings.json` says
`ResolutionScaling = FSR3` afterwards.
- **The first start was lost to the transient this file recorded an hour earlier — in a real session this time.**
10:05:20 the game appeared; the Overlay went in at 10:05:23; 0.47 s later it was told to stop, and the Agent's
log says why: `SafetyUnhook; Discarded (tier 1, exit=UnhookedSafety, frames=0); guard=ModuleScanFailed/a module
list came back incomplete`. The Overlay's log shows the four patches restored within 0.75 s. The game ran on
unrecorded for two minutes until the owner restarted it. **It is not new and not rare**: the Agent's logs kept on
this PC (2026-11-05 onwards) hold five such ends — Phantom Blade Zero three times on 2026-11-05 (two safety
unhooks and one refusal before injection), Crown & Coin on 2026-11-10, Cyberpunk today — beside the two test
runs. Each is a module list read while the target was still loading modules, at a launch. **The question for the
owner is no longer hypothetical**: a list that cannot be read is not a finding, and rule 2 treats it as a refusal
so that an unreadable game is never hooked; reading it again a bounded number of times before refusing would
keep that — a list that stays unreadable still refuses — and stop losing sessions to a moment of loading. It
changes what the guard does on a check, so it is the owner's decision, and it is not made here. *(Made the same
day: D123, §NEXT item 1b.)*
### NEXT
1. ~~**The owner runs item 40** — above all **one session of Cyberpunk 2077 with FSR upscaling** on beta.42, then
quits the game the ordinary way. Its `logs\overlay-<pid>-….log` is what beta.43 waits for.~~ **Run 2026-11-12;
the section above is what it showed.** What is left of item 40 is (d), a session that changes upscaler, and
the owner's word on the rest.
1a. ~~**Before beta.43's plan: one session of Cyberpunk 2077 with Resolution Scaling = FSR 3, frame generation
off** (the second bullet above), and a second with it on. It says whether FrameLedger names FSR 3 there —
the route through the loader that D121 was first taken to be about — and whether the 2.3 loader counts an
UPSCALE twice. *(Tried 2026-11-12 10:08 and 10:12: the game was still on FSR 2 — the section above. The check
that the right thing ran is the file: `ResolutionScaling = FSR3`.)*~~
**It cannot be run, the owner said the same day: Cyberpunk 2077 has FSR 2.1 as its only FSR upscaler and
FSR 3.1 as frame generation only — two separate settings, not a pair; there is no FSR 3 under Resolution
Scaling.** So D121 is closed for good — every Cyberpunk session upscaling with FSR reads "unknown", by the
limit `LIMITATIONS.md` states — and **no title run so far upscales through a 2.3 loader**. The double
count stays unobserved. What IS measured is that this loader hands a frame-generation dispatch to the leaf's
export; an UPSCALE through the same `ffxDispatch` would take the same path. beta.43's plan therefore counts
an UPSCALE at the first hooked module that sees it (as `fl::adv::Owns` does) as a precaution, with a fixture
whose loader forwards to the leaf's export — rather than wait for a session that cannot be had.
1b. ~~**The owner's decision on the guard's module-list read** (the section above): refuse at the first incomplete
list, as now, or read again a bounded number of times first. If the second, it is a pull request of its own
in the guard (`FrameLedger.Injector`), with `19_SAFETY` amended in it, before or with beta.43.~~ **Decided
2026-11-12 — read again (D123) — and built the same day**: `Collected::kUnsettled`, up to three re-reads,
`19_SAFETY` amended. Not released: it ships with the next pre-release, and until then a launch can still be
lost this way on beta.42. What the owner then checks is the Agent's log: no `guard=ModuleScanFailed` end at a
game's launch, and if one comes its signal now says which kind — *kept changing while it was read* (four reads
were not enough) or *came back incomplete* (more modules than the guard's buffer holds).
2. **0.1.0-beta.43 — planned and approved 2026-11-12 (D123–D125), and under way.** The guard's re-read (D123,
#413) ships with it and not on its own (D124). Five pull requests after it: (1) an UPSCALE is counted at the
first source that saw one (D125) — the fixture's loader bound through the leaves' exports read K = 1 as 2.0
before it; (2) `slSetConstants`; (3) `ffxConfigure` on the four ffx modules; (4) the Agent, the App and the
Privacy Policy 2.17, whose wording the plan carried and the owner approved with it; (5) the release, owner-only
item 41. The design is the one below, as the review of 2026-11-12's first plan left it; nothing in the logs
changed it except D125.
~~**Read that log, then plan 0.1.0-beta.43**~~ — `slSetConstants` and `ffxConfigure`, and the fix for D121 if the
log shows the route. What to look for: which `HOOK_INSTALLED` lines there are (which of the four ffx modules and
the FSR 3.0 host were patched); the `FFX_DISPATCH` lines — is `b=0x10001` (UPSCALE) on any module, or only
`0x20004` / `0x2000c` / `0x20003`; an `UPSCALE_ROUTE` line; `PATCH_FAILED`; the last `RUNTIME_CENSUS` word.
**No UPSCALE type anywhere and no route line means the upscale does not come through any export the Overlay
patches** — statically linked, or a module the inventory does not name — and then the fix is not a new arm in
a detour. The design for the two hooks, as the review left it, is the plan of 2026-11-12 (moved with the
section above) and these points: the new rows are gated at the top of `InstallByFamily`, **before**
`ResolveScoped`, and installed only once the process was ever asked; hook families 13 and 14 with latches of
their own; `slSetConstants` checks the struct's GUID and `structVersion ≥ 1` on every call and reads only
`jitterOffset`, `mvecScale`, `cameraNear` … `cameraAspectRatio` and the seven Booleans — never bytes 368..423,
pinned by `offsetof` of the allowed members; summaries from the first viewport seen; `ffxConfigure` has an
owner slot of its own and reads `frameGenerationEnabled`, `allowAsyncWorkloads`, `flags`,
`onlyPresentGenerated`, `generationRect` and nothing else; the detours also consult `MayObserve()`;
`overlay-fields-check` gains three parameter names, `structType` among the shared members and an `offsetof` per
listed `sl::Constants` member. The registry holds 48 and the worst case becomes 25
(`kPatchSitesOutsideTheInventory` stays 7; the inventory's row count goes from 13 to 18 and its
`static_assert` says so).
3. **0.1.0-beta.44** — `slGetFeatureVersion` and `slGetFeatureRequirements` — when the owner says beta.43 passed.
4. **Trains C and D** (beta.45, beta.46) each begin with a spike and end in the owner's go or no.
### Left open by this session
- ~~**This release's own facts** — the tag's run, the digests, the delta — are not in any file yet: the release is cut
after this text. Record them in the next pull request.~~ **Recorded 2026-11-12: 0.1.0-beta.42 was released
2026-11-12T02:31:07Z** (09:31 in the owner's time zone) from the signed tag on `a708ae8` (#410), by run
43139775713 — green at the first attempt, one run for the one tag push. Eight assets; the seven digests of
`SHA256SUMS.txt` equal the ones GitHub computed; the four shipped natives carry `FL_BUILD_ID v0.1.0-beta.42`. The
delta from beta.41 is 710,943 bytes beside a full package of 110,716,228 — "Delta processed 0452 files. 0023
patched, 0429 unchanged". The wiki was published by run 43142009098. The rehearsal on the release branch (run
43137520796) had made a delta of 735,485 bytes with the same file counts.
- **No real game was run on this build.** The four changes were tested with the harness and the cost measured on
the headers. Item 40 is the first real session.
- **Whether the missing plane of Lies of P, Clair Obscur and Dying Light is `FLT_MAX`** is still the reading their
small `cameraFar` values point to, not a measurement. Item 40 (c).
- **A flake with a cause now, and a question in it for the owner.**
`ShmDrainIntegrationTests.TheGuardInjectsTheOverlayAndTheReaderDrainsRealFrames` was red once in this release's
local gate (and once on 2026-11-11, when the assertion did not yet print the verdict): the supervisor's first
re-scan, 0.8 s after the injection, came back `ModuleScanFailed` — *a module list came back incomplete* — while
the harness was still loading modules. The same gate was green on the same code before and after. In the test
it is a re-run. **In a real session the same answer is a safety unhook**: a re-scan that cannot read the module
list of a game that is still running stops the session (`19_SAFETY` §During a session; D48 covers only a game
that has exited). Whether the guard should read the list a second time before refusing is a change to rule 2's
checks and is the owner's to decide; nothing was changed. **A second one within the hour, in the gate of the pull
request that records the release's facts:**
`ToolhelpProcessSnapshotSourceTests.ThisProcessIsInTheSnapshotWithItsNormalisedImagePathAndACreationTime` got an
empty snapshot — `ToolhelpProcessSnapshotSource.Take` returns an empty list when the snapshot cannot be taken or
walked, and says nothing. Green on the run after. Both are Windows refusing, for a moment, to enumerate something
on a PC that was building, testing and running FrameLedger itself at once; what an empty snapshot does to the
watcher's tick in a real session was not looked into.
- ~~**SonarCloud has not answered for #406–#409**: `main`'s `sonarcloud` job was cancelled by the next merge each
time. It runs to its end on this release's commit; read it then.~~ **It answered on `a708ae8`: the quality gate
passed, and one issue was open on `main`** — `cpp:S5813`, a `strlen` in the helper the new log case of
`guard_test.cpp` reads lines with (#408). Fixed in the pull request that records these facts: the helper takes
strings. **`csharpsquid:S3869` on `ParentDump.cs` is no longer open** — SonarCloud shows it accepted at
2026-11-11T21:13Z (04:13 on the 12th, the owner's time), which is before the texts that still called it open
were written; they were not checked against SonarCloud then. **Qodana's two reports are green on the release's
commit**; the native one was red from #407 to #408 on seven problems in test code, answered in #409.
- **`LIMITATIONS.md` and the accuracy statement still say the processor's, the memory's and the motherboard's
sensors "have never been read on real hardware"** — the owner's to reword. ~~**SonarCloud's `csharpsquid:S3869` on
`ParentDump.cs`** is the owner's to accept.~~ *(Done — the line above.)* **Items 36 (d) and 37 are still open.** The alpha line still rests
(D98).
**Owner-only:** item 40.
+154
View File
@@ -0,0 +1,154 @@
# HANDOFF history — 0.1.0-beta.43
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.44 was cut, 2026-11-12 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" mean HANDOFF.md as it stood then, and a path it writes is relative to `docs/`. **Its §NEXT item 2 says 0.1.0-beta.44 is planned**: it was released the same day, and what it built and decided is HANDOFF.md's section for it.*
## **START HERE** — 2026-11-12, 0.1.0-beta.43: two hooks installed only where asked for, the guard reads a moving list again, an UPSCALE counted once
*Status is `docs/changelog/0.1.0-beta.43.md`; this is what no other file carries.* The owner ran beta.42 the morning
it was released; seven sessions, a copy of the ledger and the logs answered D121 (Cyberpunk 2077's FSR is 2.1, built
into the game), showed the guard losing launches to a module list that moved while it was read, and showed the
FidelityFX 2.3 loader handing a call on to the leaf's export. The owner decided D123–D125 and approved the plan the
same morning, Privacy Policy 2.17's wording with it. Five pull requests and this one: #413 (the guard reads again,
D123), #414 (an UPSCALE is counted at the first source that saw one, D125; D124), #415 (`slSetConstants`), #416
(`ffxConfigure` on the four ffx-api modules), #417 (the Agent, the App, Privacy Policy 2.17). **What the owner's
sessions on beta.42 showed, and the design as planned, are
[`handoff/history/0.1.0-beta.42.md`](handoff/history/0.1.0-beta.42.md)**; what each pull request built is
[`19_SAFETY_AND_ANTICHEAT.md`](19_SAFETY_AND_ANTICHEAT.md) §Pre-injection checks,
[`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) §Hook inventory (the two rows, with their measured cost) and
[`18_GPU_VENDOR_APIS.md`](18_GPU_VENDOR_APIS.md) §Train B.
### What this release decided, beyond D123–D125
- **A hook that exists only for Advanced metrics is not put into a game that was never asked.** The two rows are
gated at the top of `InstallByFamily`, before the symbol is resolved (resolving holds the module). Once a
session with the option on has started in a process, the patch goes in on that watchdog tick and **stays for the
life of the process**: a later session with the option off finds the detour there, forwarding without looking.
Removing a patch between sessions would be a second patch event in a running game for nothing gained. So "off
means off" (D111) is, for these two: nothing read, nothing published — and, in a game no session ever asked,
nothing patched. Privacy Policy 2.17 §4 says it that way.
- **Privacy Policy 2.17, not 2.16 stretched.** beta.40's plan had 2.16 stand "once for the three releases"; its
text then listed DLSS's and FSR's parameters by name, and neither list holds Streamline's constants or the
frame-generation configuration. The plan of beta.43 carried the new sentences and the owner approved them with it.
**beta.44 reads feature versions and requirements — check 2.17's lists the same way before assuming it covers
them.**
- **For each of the two calls a session says which of three things happened** (`AdvancedInGameCall`): read; hooked
and the game never called; not hooked. "Not hooked" is three causes the session does not tell apart — the game
did not load the library, a Streamline 1.x interposer (refused), a patch the registry refused — and the Overlay's
log does: a `HOOK_INSTALLED` line naming the function, or a `PATCH_FAILED`.
- **A count is not part of what makes a session's facts new.** `sl.constants.resets` grows all session; the
recorder's context would be rewritten each second. `InGameAdvancedSampler.Conclude` brings it up to date once, at
the end. A session recovered after a crash holds the count as of the last time some other field moved — a lower
bound.
- **Streamline's summaries are the first viewport's**, and the configure count has an owner slot of its own (the
2.3 loader would otherwise bring one configure to two modules, as D125's dispatch).
- **The accuracy statement no longer says nothing of what a game tells its upscaler was read from a real game.**
FSR's upscaling values were (beta.41, beta.42: Lies of P, Dying Light: The Beast, Kingdom Come: Deliverance II).
The DLSS options, Streamline's constants and the frame-generation configuration are still unconfirmed, and the
three copies say so.
### Traps this train left
- **An unpatched export may already begin with a jump.** The loader stub's `ffxConfigure` starts with `E9` in the
file: "the first byte is not a jump" is not a test of "not patched". `ReadTargetExportBytes` compares the target's
bytes with the file's own (`inFile`).
- **A branch stacked on a pull request that is then squashed**: `git rebase --onto origin/main <the old tip>`, and
`git diff <old tip> <squash>` empty says the gate that ran still stands.
- **`mcp__ccd_pr__set_auto_merge` says "not bound" for a pull request opened from a script**: `gh pr merge <n>
--auto --squash`. A run's artifacts while it is still in progress: `gh api
repos/…/actions/artifacts/<id>/zip`.
- **clang-format re-wraps what an edit script wrote**, so a second script's anchors must be read from the formatted
file; a multi-file script that fails part-way has already written the earlier files.
- **One local gate printed 871 App tests where every other printed 872**, green. Not looked into.
### What the owner's nine sessions on beta.43 showed (2026-11-12)
Run 15:42–16:21 in the owner's time zone, read the same afternoon from a copy of the ledger (sessions 171–179), the
Agent's log, the nine overlay logs and Windows' application log. Advanced metrics was on for the first eight and off
for the last.
| # | Game | What it showed |
|---|---|---|
| 171 | Phantom Blade Zero, 649 s, DLSS frame generation ×3.0 | Streamline 2.14.1: **read** — jitter ≤ 0.47, motion-vector scale 0.0009 / 0.0016, near 0.01 and far 75,000 with depth inverted, field of view 0.6545–1.3612 rad, aspect 1.7767, 1 reset. FSR frame generation: hooked on the loader and both leaves, the game never called |
| 172 | Lies of P, 35 s, exit code 3 | 542 frames, nothing evaluated. **The owner: the game crashed after a shader failed to compile.** The crash policy counted it and turned the game's hooking off (below) |
| 173 | Lies of P, 130 s | Tier 2 — hooking was off; the owner switched it on again at 16:02 |
| 174 | Lies of P, 94 s, FSR 3 + FSR frame generation ×2.0 | **`ffxConfigure` read** on the one-module `amd_fidelityfx_dx12.dll`: frame generation on and off, not asynchronous, generated frames not presented alone, 2560 × 1440 at 0, 0; the log has `FFX_CONFIGURE` types `0x10007` and `0x20002`. Streamline: not hooked (the game has none) |
| 175 | Cyberpunk 2077, 72 s, no upscaler named, no frame generation | Streamline 2.14.1: **read** — jitter ≤ 0.5, motion-vector scale 1 / 1, near 0.02 and far 16,000 inverted, aspect 1.7778, **field of view 51.0055–90**, 2,575 resets |
| 176 | Cyberpunk 2077, 145 s, DLSS + DLSS frame generation ×2.0 | the same values; 1,821 resets. FSR frame generation: hooked on the loader and both leaves, never called |
| 177 | Kingdom Come: Deliverance II, 135 s, FSR | Streamline: not hooked. `ffxConfigure` hooked on the loader and the upscaler, never called — the game ships no frame generation |
| 178 | Hogwarts Legacy, 158 s, DLSS frame generation ×4.0 | Streamline 2.14.16: **read** — jitter ≤ 0.47, field of view 0.8872–2.0071 rad, aspect 1.7763, near 0.01 and far 75,000 inverted, 11 resets. `ffxConfigure` hooked on `amd_fidelityfx_dx12.dll`, never called |
| 179 | Lies of P, 129 s, **Advanced metrics off**, a new Agent, the game started afresh | no Advanced row; bits 13 and 14 clear in `hooks_installed_mask`; the log has `ffxDispatch` and `ffxQuery` and **no `ffxConfigure` line** |
- **The two hooks did what they were built to do on four real games**, three Streamline builds apart (2.14.1 twice,
2.14.16) and one FSR library. No `PATCH_FAILED`, no fault counted, in nine logs. `legal_acceptance` holds Privacy
Policy 2.17 accepted once, four seconds after the update; no session since the update ended with
`guard=ModuleScanFailed` (the day's one is beta.42's, at 10:05).
- **Cyberpunk 2077 gives Streamline its field of view in degrees.** The vendor's header says radians; the game
passes 51–90. Every other field of the same struct is sane (the aspect ratio beside it is 1.7778), so the layout
is not in question — the game's unit is. The page prints `51.0055 – 90 rad (2922.4° – 5156.6°)`: **a defect of
the label, not of the reading**, and beta.44's first pull request. The two stored sessions keep the string they
were stored with.
- **A resets count has no denominator.** 2,575 in a 72 s session that was mostly menus and 1,821 in 145 s on
Cyberpunk, beside 1 and 11 on the two Unreal games. It is what the game said (`reset == eTrue`, the first
viewport's calls); the page does not say out of how many calls.
- **A frame-generation configuration with no flag set has no flags row**, where an upscale with none says `none`.
- **Lies of P's 35 s end turned its hooking off, and one such end is now enough.** `hook_crash_count` is never set
back: the game's two ends of 2026-10-19/20 (`19_SAFETY` §Crash & stability safety, the hand-off to Steam) had
brought it to 2, the owner had switched hooking on again, and today's single early end made 3 — at or over
`CrashesToDisable`, so hooking went off at once, under a reason that says *twice*. Whether switching hooking back
on starts the count again is the owner's decision; it is asked with beta.44's plan.
- **Hogwarts Legacy faults in the driver's `_nvngx.dll` as it exits, hooked or not.** Windows' application log has
the same fault (0xc0000005 at +0x6aa85, `_nvngx.dll` 32.0.16.2114) six times since 2026-11-06, each at the end
of one of the game's seven recorded sessions — the first of them session 131, which nothing was injected into.
That one reads `crashed`; the five hooked ones, today's 178 among them, read `normal` with exit code 0, the
fault logged in the second the session was saved. **Why a hooked session does not see the crash event that an
unhooked one does was not looked into.**
- **Frame rates as before**, where the settings were: Lies of P 59 → 118 (beta.42: 58.9 → 118.0), Kingdom Come 59.3
(59.4), Hogwarts Legacy 58.8 → 235.8 at ×4 (alpha.3: 56.1 → 225.1). Phantom Blade Zero's factor moves between
sessions under the driver's dynamic mode (×2.9 to ×4.1 since 2026-11-05) and Cyberpunk was run with other settings.
- **Not exercised**: a configure through the FidelityFX 2.3 loader (Cyberpunk 2077 with FSR frame generation) — the
configure count's owner slot has not met a real game; a game with neither library; Dying Light: The Beast.
Phantom Blade Zero and Hogwarts Legacy name no upscaler beside DLSS frame generation, as on every release before.
### NEXT
1. ~~**The owner runs item 41**~~ **Run and read 2026-11-12** (§What the owner's nine sessions on beta.43 showed).
The owner's word was to go on if it passed, and it is judged passed: both hooks read real games, nothing
failed to patch, off meant off. What was not exercised is listed there and stays open.
2. **0.1.0-beta.44** — first the field of view a game gives in degrees (and what else the nine sessions found),
then `slGetFeatureVersion` and `slGetFeatureRequirements`. Both are calls a game makes while starting, so most
sessions will have missed them: plan what "not seen" says. ~~**Planned with the owner before any code.**~~ **The
plan was approved 2026-11-12 with three decisions, D126–D128** (the count of early abnormal ends starts again
at a grant; the fault at exit is written down only; a field of view over π is shown as given), and with Privacy
Policy 2.18's wording. Four pull requests: the fixes; the two hooks in the Overlay; the Agent, the App and the
policy; the release.
3. **Trains C and D** (beta.45, beta.46) each begin with a spike and end in the owner's go or no.
### Left open by this session
- ~~**This release's own facts** — the tag's run, the digests, the delta — are not in any file yet: the release is cut
after this text. Record them in the next pull request, with what SonarCloud and Qodana said of #413–#417 (the
`sonarcloud` job on `main` is cancelled by the next merge, so it answers on the release's commit).~~ **Recorded
2026-11-12: 0.1.0-beta.43 was released 2026-11-12T06:57:57Z** (13:57 in the owner's time zone) from the signed
tag on `6c7ba74` (#418), by run 43169675460 — green at the first attempt, one run for the one tag push. Eight
assets; the seven digests of `SHA256SUMS.txt` equal the ones GitHub computed; the four shipped natives carry
`FL_BUILD_ID v0.1.0-beta.43`. The delta from beta.42 is 1,934,264 bytes beside a full package of 110,736,398 —
"Delta processed 0452 files. 0025 patched, 0427 unchanged". The wiki was published by run 43171842051. The
rehearsal on the release branch (run 43167388933, the same tree before it was rebased onto #417's squash) had
made a delta of 1,944,086 bytes with the same file counts. **SonarCloud answered on `6c7ba74`: the quality gate
passed and no issue is open on `main`. Qodana's two reports are green on that commit**, and were on #417's.
- ~~**No real game was run on this build.** Two new patch sites, tested with the harness and the stubs; their cost
measured on the headers. Whether a real `sl.interposer.dll` 2.x lays `sl::Constants` out as the vendored header
does is checked on every call by the struct's GUID and version, not by a real game yet.~~ **Nine sessions on five
games, 2026-11-12** (§What the owner's nine sessions on beta.43 showed): interposers 2.14.1 and 2.14.16 lay the
struct out as the header does. **The accuracy statement's three copies and `LIMITATIONS.md` still say Streamline's
constants and the frame-generation configuration "have not been confirmed" on a real game** — reworded with
beta.44's first pull request. **`docs/LIST_GAME_TESTED.md` is as of 2026-11-06**: refreshing it is a new copy and
the owner's review.
- **Item 40 (d)** — a session that changes upscaler — was not exercised, and the owner has not said item 40 passed.
**Items 36 (d) and 37 are still open.**
- **What an empty process snapshot does to the watcher's tick in a real session** was not looked into
(`ToolhelpProcessSnapshotSource.Take` returns an empty list and says nothing; seen once in a test on 2026-11-12).
- **`LIMITATIONS.md` and the accuracy statement still say the processor's, the memory's and the motherboard's
sensors "have never been read on real hardware"** — the owner's to reword. The alpha line still rests (D98).
**Owner-only:** what item 41 left unexercised — (d) through the FidelityFX 2.3 loader, (e) a game with neither library; item 40 (d).
+17
View File
@@ -63,6 +63,23 @@ are kept because they record what each version changed and why (owner decision D
>
> Version 2.5 (2026-09-27, 0.1.0-beta.10) adds how a tracked game's window is shown — read from Windows — and the engine build name read from an Unreal Engine game's executable. It is also the first version to say two things the software already did: it reads the **content** of a library game's executable (markers in its first 8 MB and its import table, since the detection of engines and features; and, when a session starts, the graphics-library markers in the whole file), and it reads the processor load and the memory in use (since 0.1.0-beta.3). Nothing here leaves your device, as before.
### What version 2.18 of the Privacy Policy changed (0.1.0-beta.44)
**Two more calls read inside the game, only while Advanced metrics is on** (train B's third step, owner decisions
D126–D128 beside it; the wording approved with the plan of 0.1.0-beta.44). Version 2.17 named Streamline's per-frame
constants and the frame-generation configuration, and "two further calls"; this release reads what Streamline
**answers** when the game asks about a feature, which is in neither list, so the version moves. §1's item on
Advanced metrics gains **which features the game asked about, the version of each and of its NGX model, and what
each requires** — the graphics APIs it supports, whether V-Sync must be off and hardware-accelerated GPU scheduling
on, how many processor threads, viewports and buffers, and the versions of Windows and of the graphics driver that
Streamline found beside the ones the feature needs. It also says what of that answer is never read: **the lists it
points to** — the buffers' names, the names of Vulkan extensions and features — which a check in the build holds
(the count of required buffers is read; its list is not). §4's "two further calls" is four, and its list of what is
stored names the versions and requirements. The versions of Windows and of the driver are the ones Streamline
reports to the game; FrameLedger already stores the driver's version with a session's hardware. The accuracy
block's item says what these are — Streamline's answers, not a check of the PC — and that a game asks while it
starts, so most sessions have none. The Disclaimer stays 2.15. §2 is unchanged: nothing is sent.
### What version 2.17 of the Privacy Policy changed (0.1.0-beta.43)
**Two more calls read inside the game, only while Advanced metrics is on** (train B's second step, owner decisions
+1 -1
View File
@@ -32,7 +32,7 @@ While the game runs, a notice may say *hooking refused*.
| The game runs in an app container, or Windows protects it in a way the component can neither load into nor hook. | Nothing: an older Microsoft Store app (UWP), or a game under code protection, is recorded, not measured ([Limitations](../LIMITATIONS.md#xbox-app-and-microsoft-store-games)). |
| **Disable all hooking** is on. | Switch it off in Settings ▸ Capture. |
| The game was already running when FrameLedger was updated. | Close the game and start it again. |
| Hooking was switched off after the game crashed twice soon after it started. | Switch it on again in the game's page if the cause may be gone — after a driver update, for example. |
| Hooking was switched off after the game crashed twice soon after it started. | Switch it on again in the game's page if the cause may be gone — after a driver update, for example. The count starts again when you do (since 0.1.0-beta.44). |
| Hooking was switched off after **Play** started the game directly twice, and each time the game handed itself to Steam or closed at once. | Switch it on again, and set Settings ▸ Games ▸ **Play button** to *Through the store*: some Steam games will not start any other way. |
| The game's file is gone. | If only its drive letter changed, FrameLedger follows it within about 15 seconds; otherwise **Change executable…** on the game's page. |
| The component could not be loaded into the game. | [Report a problem](#report-a-problem). |
+18 -2
View File
@@ -55,11 +55,20 @@ also keeps what the game itself handed to DLSS and FSR:
in. A setting the game changed during the session reads *on and off*. This is what the game **asked for**; how
many frames were generated is in the session's summary, as before.
- **Streamline's features** (since 0.1.0-beta.44) — what Streamline answered when the game asked about a feature:
which version it is (Streamline's own, and the DLSS model's), and what it requires — the graphics APIs it works
with, whether V-Sync must be off, whether hardware-accelerated GPU scheduling must be on, how many threads,
viewports and buffers, and the Windows and driver versions Streamline found beside the ones the feature needs.
The features carry NVIDIA's own names: `kFeatureDLSS` is DLSS, `kFeatureDLSS_G` DLSS frame generation,
`kFeatureDLSS_RR` ray reconstruction, `kFeatureReflex` Reflex. **A game asks these while it starts**, usually
before FrameLedger is in it, so most sessions show none and the line under the session says *hooked — the game
asks this while it starts, and did not ask again*.
These are the game's own words to the upscaler, shown in the vendor's notation (`preExposure`, preset `K`).
FrameLedger does not check what the upscaler did with them.
The last two are read from calls FrameLedger hooks **only for Advanced metrics**: in a game where no session has
been recorded with the option on since it started, those two hooks are not there. The line under the session says,
The last three are read from calls FrameLedger hooks **only for Advanced metrics** — four calls in all: in a game
where no session has been recorded with the option on since it started, those hooks are not there. The line under the session says,
for each of the two, whether it was *read*, *hooked — the game did not make the call*, or *not hooked — the game did
not load the library that has the call*.
@@ -71,6 +80,13 @@ It never means the game uses no upscaler; the session's summary still names the
**Where the camera is, which way it looks and its matrices are never read.** The field of view is kept as a lowest
and a highest value, never as a line over time.
**A game may use a unit of its own.** NVIDIA's and AMD's libraries expect the field of view in radians, and
FrameLedger shows it that way with the degrees beside it. Some games give degrees instead (Cyberpunk 2077 does, to
Streamline): a value too large to be radians is shown as the game gave it, with a line that says *Not radians*, and
is not converted — FrameLedger shows what the game said, not what it may have meant. The number of **resets** is
the number of calls in which the game told the upscaler to drop its history; menus and loading screens raise it. A
frame-generation configuration with no flag set says *None*.
A session's summary has an **Advanced metrics…** button that opens that session here.
## Sources
+9 -3
View File
@@ -12,7 +12,7 @@
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-11-11.** The software is a beta; its latest
> **beta is `0.1.0-beta.42`** (2026-11-12), an unsigned installer built from that tag with its
> **beta is `0.1.0-beta.44`** (2026-11-12), an unsigned installer built from that tag with its
> checksums published beside it (alphas — experimental builds that try a newer .NET — are published apart). The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -116,8 +116,14 @@
> later through AMD's own library. Since beta.43 also what a game tells NVIDIA Streamline about each frame (jitter,
> motion-vector scale, depth range, field-of-view range, how often it reset the upscaler's history — for the first
> viewport that called, where a game has several) and how it configures FSR frame generation (the settings it asked
> for, not whether frames were generated). FSR's upscaling values have been read from real games; the DLSS options,
> Streamline's constants and the frame-generation configuration have not been confirmed on one yet.
> for, not whether frames were generated). Since beta.44 also what Streamline answers when a game asks about a
> feature — its version, and what it requires (graphics APIs, V-Sync, GPU scheduling, Windows and driver versions):
> Streamline's answer as the game received it, not a check of the PC, and a game asks while it starts, so a
> session that attached later usually has none and says so. FSR's upscaling values, Streamline's constants (three
> games) and the
> frame-generation configuration (one game) have been read from real games; the DLSS options have not been
> confirmed on one yet. A game may give a value in a unit of its own: one gives Streamline its field of view in
> degrees, and it is shown as given.
> - **Safety:** every pre-injection check runs before injection, including the signed-by-a-known-vendor
> half of the suspicious-module rule. During every capture the Agent re-runs the checks every 30 s and
> stops capturing on a refusal: a Direct3D or OpenGL game's hooks are removed, and the Vulkan layer
+9 -3
View File
@@ -121,7 +121,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-11-11.** The software is a beta; its latest
> **beta is `0.1.0-beta.42`** (2026-11-12), an unsigned installer built from that tag with its
> **beta is `0.1.0-beta.44`** (2026-11-12), an unsigned installer built from that tag with its
> checksums published beside it (alphas — experimental builds that try a newer .NET — are published apart). The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -225,8 +225,14 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> later through AMD's own library. Since beta.43 also what a game tells NVIDIA Streamline about each frame (jitter,
> motion-vector scale, depth range, field-of-view range, how often it reset the upscaler's history — for the first
> viewport that called, where a game has several) and how it configures FSR frame generation (the settings it asked
> for, not whether frames were generated). FSR's upscaling values have been read from real games; the DLSS options,
> Streamline's constants and the frame-generation configuration have not been confirmed on one yet.
> for, not whether frames were generated). Since beta.44 also what Streamline answers when a game asks about a
> feature — its version, and what it requires (graphics APIs, V-Sync, GPU scheduling, Windows and driver versions):
> Streamline's answer as the game received it, not a check of the PC, and a game asks while it starts, so a
> session that attached later usually has none and says so. FSR's upscaling values, Streamline's constants (three
> games) and the
> frame-generation configuration (one game) have been read from real games; the DLSS options have not been
> confirmed on one yet. A game may give a value in a unit of its own: one gives Streamline its field of view in
> degrees, and it is shown as given.
> - **Safety:** every pre-injection check runs before injection, including the signed-by-a-known-vendor
> half of the suspicious-module rule. During every capture the Agent re-runs the checks every 30 s and
> stops capturing on a refusal: a Direct3D or OpenGL game's hooks are removed, and the Vulkan layer
+3 -3
View File
@@ -1,6 +1,6 @@
# FrameLedger — Privacy Policy
**Version:** 2.17 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.18 · **Effective:** {{RELEASE_DATE}}
**Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.**
@@ -11,7 +11,7 @@ Stored in `%LOCALAPPDATA%\FrameLedger` on your device:
- Your game library entries (names, executable paths, metadata you or the app filled in, and whether each one is recorded).
- Images you choose for a game (Edit…), copied into the `covers` folder; choosing the store's image again, or removing the game together with its sessions, deletes the copy. Artwork a store's app keeps on your PC, or a game ships in its own folder, is shown from where it is and not copied.
- Performance sessions: frame timing series, computed statistics, hardware sensor series (temperatures, load, power, memory usage, and the graphics card's clock speeds, fan speed, memory temperature and whether its power limit or heat held it back), the game's own memory use (its dedicated and shared video memory, private working set, working set and commit, once a second), session duration, crash flags, the graphics driver's settings the game ran under (NVIDIA only), how the game's window was shown (full-screen, borderless or windowed, for how long, its size and the monitor's), tags and notes you write.
- **Only while Settings ▸ Advanced metrics is on** (it is off unless you switch it on), with each session: more hardware sensor series — the graphics card's memory use in detail, its load by part, its clocks, voltages, currents, power, each fan and its video encoder's use; and, when the capture agent runs as administrator with PawnIO installed, the processor's temperatures, load, clocks, power and voltages by core, the memory in use and its modules' temperatures, and the motherboard's temperatures, fans and voltages — and a description of the hardware: the graphics card's firmware version, architecture, bus and memory sizes, the graphics driver's package and the chipset it names, the motherboard's and the memory modules' model names, what each connected display can do (the HDR formats it accepts, its brightness range, variable refresh), whether variable refresh was in use on the display the game ran on and the colour space the game presented in, and the graphics driver's settings — its global ones and the ones it holds for the game (NVIDIA only). For a game FrameLedger injects into, a session then also stores what the game itself passed to its upscaler in the calls FrameLedger intercepts: the output size, the model presets and the exposure values it gave DLSS, whether it said its colour buffers are HDR, auto-exposure and alpha upscaling; and the sharpening, the size of the jitter, the exposure, the depth range, the lowest and highest field of view and the flags it gave FSR, the frame time it reported to FSR, and FSR's own video memory when the game asked for it; what the game told NVIDIA Streamline about each frame — the size of the jitter, the motion-vector scale, the depth range and whether depth is inverted, the lowest and highest field of view, the aspect ratio, whether the projection is orthographic, how its motion vectors are stored and how often it reset the upscaler's history; and how it configured FSR frame generation — on or off, whether it may run asynchronously, its flags, whether only generated frames are presented, and the rectangle it generates in — never where the game's camera is, which way it looks, or its matrices. No serial number, no display identification data (EDID) and no list of other programs is read or stored. Switching the option off stops the reading, inside a game as well; what earlier sessions stored stays with them until you delete those sessions.
- **Only while Settings ▸ Advanced metrics is on** (it is off unless you switch it on), with each session: more hardware sensor series — the graphics card's memory use in detail, its load by part, its clocks, voltages, currents, power, each fan and its video encoder's use; and, when the capture agent runs as administrator with PawnIO installed, the processor's temperatures, load, clocks, power and voltages by core, the memory in use and its modules' temperatures, and the motherboard's temperatures, fans and voltages — and a description of the hardware: the graphics card's firmware version, architecture, bus and memory sizes, the graphics driver's package and the chipset it names, the motherboard's and the memory modules' model names, what each connected display can do (the HDR formats it accepts, its brightness range, variable refresh), whether variable refresh was in use on the display the game ran on and the colour space the game presented in, and the graphics driver's settings — its global ones and the ones it holds for the game (NVIDIA only). For a game FrameLedger injects into, a session then also stores what the game itself passed to its upscaler in the calls FrameLedger intercepts: the output size, the model presets and the exposure values it gave DLSS, whether it said its colour buffers are HDR, auto-exposure and alpha upscaling; and the sharpening, the size of the jitter, the exposure, the depth range, the lowest and highest field of view and the flags it gave FSR, the frame time it reported to FSR, and FSR's own video memory when the game asked for it; what the game told NVIDIA Streamline about each frame — the size of the jitter, the motion-vector scale, the depth range and whether depth is inverted, the lowest and highest field of view, the aspect ratio, whether the projection is orthographic, how its motion vectors are stored and how often it reset the upscaler's history; and how it configured FSR frame generation — on or off, whether it may run asynchronously, its flags, whether only generated frames are presented, and the rectangle it generates in; and what NVIDIA Streamline answered when the game asked it about a feature — which features the game asked about, the version of each and of its NGX model, and what each requires: the graphics APIs it supports, whether V-Sync must be off and hardware-accelerated GPU scheduling on, how many processor threads, viewports and buffers, and the versions of Windows and of the graphics driver that Streamline found beside the ones the feature needs — never the lists that answer points to (the buffers' names, the names of Vulkan extensions and features), and never where the game's camera is, which way it looks, or its matrices. No serial number, no display identification data (EDID) and no list of other programs is read or stored. Switching the option off stops the reading, inside a game as well; what earlier sessions stored stays with them until you delete those sessions.
- A hardware snapshot per session (CPU/GPU model, driver version, RAM size, OS build, display mode) used for the "what changed between sessions" feature.
- App settings, logs (rotated daily — the app keeps 7 days, the capture agent 14 — including the logs written by the component loaded into games), and, after a crash of the app itself, crash dump files.
- Which games you enabled code injection for, and when you consented.
@@ -43,7 +43,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) — and, only while Advanced metrics is on, more of the parameters of the upscaling calls, and the parameters of two further calls it begins to intercept in a game only once a session with that option on has started there (the constants the game gives NVIDIA Streamline for each frame, and the game's configuration of FSR frame generation), which are then stored with the session (sizes, presets, exposure, sharpening, the jitter's size, the motion-vector scale, the depth range, the range of the field of view, flags, the reported frame time, the upscaler's own memory, how frame generation is configured), never the camera's position, direction or matrices; 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; and — only while Advanced metrics is on — that driver's description of the graphics card and of each connected display, what it reports about the display a tracked game's window is on, its settings for a tracked game and its global ones (read only), and, when the capture agent runs as administrator with PawnIO installed, the sensors and model names of the processor, the memory and the motherboard (never a drive's), all of which are also read with no game running while the Advanced page is open, to show them there, and are not stored then; 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) — and, only while Advanced metrics is on, more of the parameters of the upscaling calls, and the parameters of four further calls it begins to intercept in a game only once a session with that option on has started there (the constants the game gives NVIDIA Streamline for each frame, the game's configuration of FSR frame generation, and Streamline's answers to the game's two questions about a feature — which version it is, and what it requires), which are then stored with the session (sizes, presets, exposure, sharpening, the jitter's size, the motion-vector scale, the depth range, the range of the field of view, flags, the reported frame time, the upscaler's own memory, how frame generation is configured, the versions and requirements of Streamline's features), never the camera's position, direction or matrices; 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; and — only while Advanced metrics is on — that driver's description of the graphics card and of each connected display, what it reports about the display a tracked game's window is on, its settings for a tracked game and its global ones (read only), and, when the capture agent runs as administrator with PawnIO installed, the sensors and model names of the processor, the memory and the motherboard (never a drive's), all of which are also read with no game running while the Advanced page is open, to show them there, and are not stored then; 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 Line truncated
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.
+9
View File
@@ -261,6 +261,7 @@ public static class Strings
nameof(Advanced_Facts_Header),
nameof(Advanced_Header),
nameof(Advanced_InGameCallsLine),
nameof(Advanced_InGameFeatureCallsLine),
nameof(Advanced_InGameLine),
nameof(Advanced_Machine_Intro),
nameof(Advanced_Max),
@@ -304,6 +305,7 @@ public static class Strings
nameof(AdvInGame_Reading),
nameof(AdvInGame_Unknown),
nameof(AdvInGameCall_NeverCalled),
nameof(AdvInGameCall_NotAskedAgain),
nameof(AdvInGameCall_NotHooked),
nameof(AdvInGameCall_Read),
nameof(AdvInGameCall_Unknown),
@@ -349,6 +351,7 @@ public static class Strings
nameof(AdvToken_non_linear_color_srgb),
nameof(AdvToken_none),
nameof(AdvToken_not_a_number),
nameof(AdvToken_not_radians),
nameof(AdvToken_not_supported),
nameof(AdvToken_off),
nameof(AdvToken_on),
@@ -1995,6 +1998,8 @@ public static class Strings
public static string Advanced_InGameCallsLine => ResourceManager.GetString(nameof(Advanced_InGameCallsLine), Culture) ?? nameof(Advanced_InGameCallsLine);
public static string Advanced_InGameFeatureCallsLine => ResourceManager.GetString(nameof(Advanced_InGameFeatureCallsLine), Culture) ?? nameof(Advanced_InGameFeatureCallsLine);
public static string Advanced_InGameLine => ResourceManager.GetString(nameof(Advanced_InGameLine), Culture) ?? nameof(Advanced_InGameLine);
public static string Advanced_Machine_Intro => ResourceManager.GetString(nameof(Advanced_Machine_Intro), Culture) ?? nameof(Advanced_Machine_Intro);
@@ -2081,6 +2086,8 @@ public static class Strings
public static string AdvInGameCall_NeverCalled => ResourceManager.GetString(nameof(AdvInGameCall_NeverCalled), Culture) ?? nameof(AdvInGameCall_NeverCalled);
public static string AdvInGameCall_NotAskedAgain => ResourceManager.GetString(nameof(AdvInGameCall_NotAskedAgain), Culture) ?? nameof(AdvInGameCall_NotAskedAgain);
public static string AdvInGameCall_NotHooked => ResourceManager.GetString(nameof(AdvInGameCall_NotHooked), Culture) ?? nameof(AdvInGameCall_NotHooked);
public static string AdvInGameCall_Read => ResourceManager.GetString(nameof(AdvInGameCall_Read), Culture) ?? nameof(AdvInGameCall_Read);
@@ -2171,6 +2178,8 @@ public static class Strings
public static string AdvToken_not_a_number => ResourceManager.GetString(nameof(AdvToken_not_a_number), Culture) ?? nameof(AdvToken_not_a_number);
public static string AdvToken_not_radians => ResourceManager.GetString(nameof(AdvToken_not_radians), Culture) ?? nameof(AdvToken_not_radians);
public static string AdvToken_not_supported => ResourceManager.GetString(nameof(AdvToken_not_supported), Culture) ?? nameof(AdvToken_not_supported);
public static string AdvToken_off => ResourceManager.GetString(nameof(AdvToken_off), Culture) ?? nameof(AdvToken_off);
+12
View File
@@ -657,6 +657,10 @@
<value>ゲームが毎フレーム Streamline に伝える内容: {0}。FSR フレーム生成の設定方法: {1}。</value>
<comment>review</comment>
</data>
<data name="Advanced_InGameFeatureCallsLine" xml:space="preserve">
<value>各 Streamline 機能のバージョン: {0}。各機能の要件: {1}。</value>
<comment>review</comment>
</data>
<data name="Advanced_InGameLine" xml:space="preserve">
<value>ゲーム内: {0}。</value>
<comment>review</comment>
@@ -829,6 +833,10 @@
<value>フック済み - ゲームはこの呼び出しを行いませんでした</value>
<comment>review</comment>
</data>
<data name="AdvInGameCall_NotAskedAgain" xml:space="preserve">
<value>フック済み - ゲームは起動時にこれを問い合わせ、FrameLedger の接続後は再度問い合わせませんでした</value>
<comment>review</comment>
</data>
<data name="AdvInGameCall_NotHooked" xml:space="preserve">
<value>未フック - この呼び出しを持つライブラリをゲームが読み込みませんでした</value>
<comment>review</comment>
@@ -1009,6 +1017,10 @@
<value>数値ではない</value>
<comment>review</comment>
</data>
<data name="AdvToken_not_radians" xml:space="preserve">
<value>ラジアンではありません: 値が π より大きいためです。ゲームはおそらく度で渡しています。</value>
<comment>review</comment>
</data>
<data name="AdvToken_not_supported" xml:space="preserve">
<value>非対応</value>
<comment>review</comment>
+9
View File
@@ -498,6 +498,9 @@
<data name="Advanced_InGameCallsLine" xml:space="preserve">
<value>What the game tells Streamline each frame: {0}. How it configures FSR frame generation: {1}.</value>
</data>
<data name="Advanced_InGameFeatureCallsLine" xml:space="preserve">
<value>Which version each Streamline feature is: {0}. What each requires: {1}.</value>
</data>
<data name="Advanced_InGameLine" xml:space="preserve">
<value>Inside the game: {0}.</value>
</data>
@@ -627,6 +630,9 @@
<data name="AdvInGameCall_NeverCalled" xml:space="preserve">
<value>hooked - the game did not make the call</value>
</data>
<data name="AdvInGameCall_NotAskedAgain" xml:space="preserve">
<value>hooked - the game asks this while it starts, and did not ask again after FrameLedger attached</value>
</data>
<data name="AdvInGameCall_NotHooked" xml:space="preserve">
<value>not hooked - the game did not load the library that has the call</value>
</data>
@@ -762,6 +768,9 @@
<data name="AdvToken_not_a_number" xml:space="preserve">
<value>Not a number</value>
</data>
<data name="AdvToken_not_radians" xml:space="preserve">
<value>Not radians: the value is larger than π. The game probably gives degrees.</value>
</data>
<data name="AdvToken_not_supported" xml:space="preserve">
<value>Not supported</value>
</data>
+9
View File
@@ -493,6 +493,9 @@
<data name="Advanced_InGameCallsLine" xml:space="preserve">
<value>Những gì game báo cho Streamline mỗi khung hình: {0}. Cách game cấu hình frame generation của FSR: {1}.</value>
</data>
<data name="Advanced_InGameFeatureCallsLine" xml:space="preserve">
<value>Mỗi tính năng Streamline là phiên bản nào: {0}. Mỗi tính năng cần gì: {1}.</value>
</data>
<data name="Advanced_InGameLine" xml:space="preserve">
<value>Bên trong game: {0}.</value>
</data>
@@ -622,6 +625,9 @@
<data name="AdvInGameCall_NeverCalled" xml:space="preserve">
<value>đã hook - game không thực hiện lời gọi</value>
</data>
<data name="AdvInGameCall_NotAskedAgain" xml:space="preserve">
<value>đã hook - game hỏi điều này lúc khởi động và không hỏi lại sau khi FrameLedger gắn vào</value>
</data>
<data name="AdvInGameCall_NotHooked" xml:space="preserve">
<value>chưa hook - game không nạp thư viện chứa lời gọi này</value>
</data>
@@ -757,6 +763,9 @@
<data name="AdvToken_not_a_number" xml:space="preserve">
<value>Không phải số</value>
</data>
<data name="AdvToken_not_radians" xml:space="preserve">
<value>Không phải radian: giá trị lớn hơn π. Có lẽ game đưa giá trị bằng độ.</value>
</data>
<data name="AdvToken_not_supported" xml:space="preserve">
<value>Không hỗ trợ</value>
</data>
@@ -53,6 +53,13 @@ public static class AdvancedLabels
/// <summary>What became of one call hooked only for Advanced metrics, in a session (0.1.0-beta.43).</summary>
public static string InGameCall(AdvancedInGameCall call) => Lookup("AdvInGameCall_" + call) ?? call.ToString();
/// <summary>
/// The same for a call a game makes while it starts (0.1.0-beta.44): hooked and not seen is then "the game did not
/// ask again after FrameLedger attached" - the usual case, and not a finding about the game.
/// </summary>
public static string InGameStartupCall(AdvancedInGameCall call) =>
call == AdvancedInGameCall.NeverCalled ? Strings.AdvInGameCall_NotAskedAgain : InGameCall(call);
/// <summary>A token the driver's answer was mapped to; the token itself where this build has no word for it.</summary>
public static string Token(string token) => Lookup("AdvToken_" + token) ?? token;
@@ -205,6 +205,17 @@ public static class AdvancedPresenter
AdvancedLabels.InGameCall(frameGeneration));
}
// The two questions about a feature (0.1.0-beta.44), worded for calls a game makes while it starts. A row
// stored before carries neither.
if (sources.StreamlineFeatureVersion is { } version && sources.StreamlineFeatureRequirements is { } requirements)
{
line += " " + string.Format(
CultureInfo.CurrentCulture,
Strings.Advanced_InGameFeatureCallsLine,
AdvancedLabels.InGameStartupCall(version),
AdvancedLabels.InGameStartupCall(requirements));
}
return line;
}
@@ -170,9 +170,11 @@ public static class AdvancedMetricCatalog
Session("sl.constants.resets", Streamline, Game, Count, Upscaling, "How often the game reset the upscaler's history"),
Session("ffx.framegen.config", FidelityFx, Game, Table, FrameGeneration, "The game's FSR frame-generation configuration"),
// ---- Inside the game: two more hooks of their own (0.1.0-beta.44) - what Streamline answers about a feature
Session("sl.feature.versions", Streamline, Game, Table, Upscaling, "Each Streamline feature's version and its NGX model version"),
Session("sl.feature.requirements", Streamline, Game, Table, Upscaling, "What each Streamline feature requires: operating system, driver, buffers"),
// ---- Inside the game: hooks that are not built ----------------------------------------------------------
Session("sl.feature.versions", Streamline, NewHook, Table, Upscaling, "Each Streamline feature's version and its NGX model version"),
Session("sl.feature.requirements", Streamline, NewHook, Table, Upscaling, "What each Streamline feature requires: operating system, driver, buffers"),
Session("sl.init.preferences", Streamline, NewHook, Text, Upscaling, "The preferences the game started Streamline with"),
Session("sl.constants.camera", Streamline, PlayerState, Text, Upscaling, "Camera position, axes and matrices"),
@@ -32,6 +32,16 @@ public sealed record AdvancedSources(
/// <summary>The same for how the game configures FSR frame generation (<c>ffxConfigure</c>, <c>ffx.framegen.config</c>).</summary>
public AdvancedInGameCall? FsrFrameGeneration { get; init; }
/// <summary>
/// The same for which version each Streamline feature is (<c>slGetFeatureVersion</c>, <c>sl.feature.versions</c>;
/// 0.1.0-beta.44). A game asks while it starts: <see cref="AdvancedInGameCall.NeverCalled"/> is what a session
/// attached after that says, and it means "not asked again", not "never asked".
/// </summary>
public AdvancedInGameCall? StreamlineFeatureVersion { get; init; }
/// <summary>The same for what each feature requires (<c>slGetFeatureRequirements</c>, <c>sl.feature.requirements</c>).</summary>
public AdvancedInGameCall? StreamlineFeatureRequirements { get; init; }
/// <summary>Nothing asked yet.</summary>
public static AdvancedSources Unknown { get; } = new(AdvancedSourceStatus.Unknown, NvapiCode: null, AdvancedSourceStatus.Unknown, AdvancedSourceStatus.Unknown);
}
@@ -40,11 +40,20 @@ public sealed class InGameAdvancedSampler
private const double _mebibyte = 1024.0 * 1024.0;
// What the second row of a field of view over pi says (owner decision D128).
private const string _notRadians = "not_radians";
private static readonly string[] _presetModes = ["DLAA", "Quality", "Balanced", "Performance", "Ultra Performance", "Ultra Quality"];
// FfxApiDispatchUpscaleFlags (ffx_upscale.h), by bit.
private static readonly string[] _flagTokens = ["draw_debug_view", "non_linear_color_srgb", "non_linear_color_pq"];
// sl::FeatureRequirementFlags (sl_core_types.h), by bit: the vendor's own names, shown as they are.
private static readonly string[] _requirementFlags =
[
"eD3D11Supported", "eD3D12Supported", "eVulkanSupported", "eVSyncOffRequired", "eHardwareSchedulingRequired",
];
// FfxApiDispatchFramegenerationFlags (ffx_framegeneration.h), by bit: the vendor's own names, shown as they are.
private static readonly string[] _frameGenerationFlags =
[
@@ -53,16 +62,17 @@ public sealed class InGameAdvancedSampler
/// <summary>
/// Every word a fact made here may carry for the App to translate (<c>AdvToken_*</c>): the three states of a
/// switch seen over a session, the flags of the dispatch that have a name, and "none". A flag bit nobody named
/// is <c>bit_N</c> and is shown as it is.
/// switch seen over a session, the flags of the dispatch that have a name, "none", and what a field of view
/// that cannot be radians is said to be (D128). A flag bit nobody named is <c>bit_N</c> and is shown as it is.
/// </summary>
public static IReadOnlyList<string> Tokens { get; } = ["on", "off", "on_and_off", "none", .. _flagTokens];
public static IReadOnlyList<string> Tokens { get; } = ["on", "off", "on_and_off", "none", _notRadians, .. _flagTokens];
private InGameAdvanced? _last;
private uint _memoryQueries;
private FactKey _key;
private uint _builtResets;
private FlAdvancedValid _everValid;
private uint _featureAnswers;
/// <summary>The session facts as of the last publication taken; empty until the game made a call they are read from.</summary>
public IReadOnlyList<AdvancedFact> Facts { get; private set; } = [];
@@ -82,6 +92,16 @@ public sealed class InGameAdvancedSampler
public AdvancedInGameCall Call(FlAdvancedValid group, bool hookedIn) =>
(_everValid & group) != FlAdvancedValid.None ? AdvancedInGameCall.Read : hookedIn ? AdvancedInGameCall.NeverCalled : AdvancedInGameCall.NotHooked;
/// <summary>
/// The same for one of the two questions a game asks Streamline about a feature (0.1.0-beta.44; one bit of the
/// mask covers both, so the question is told by what the slots carry): <paramref name="question"/> is
/// <see cref="FlAdvancedState.FeatureVersionAnswered"/> or <see cref="FlAdvancedState.FeatureRequirementsAnswered"/>.
/// A game asks while it starts, so <see cref="AdvancedInGameCall.NeverCalled"/> here is the usual answer of a
/// session attached later, and the App words it that way.
/// </summary>
public AdvancedInGameCall FeatureCall(uint question, bool hookedIn) =>
(_featureAnswers & question) != 0 ? AdvancedInGameCall.Read : hookedIn ? AdvancedInGameCall.NeverCalled : AdvancedInGameCall.NotHooked;
/// <summary>
/// The session is ending: the facts are brought up to the last publication where they carry a COUNT. A count
/// is not part of what decides a rebuild while the session runs - it would rewrite the session's context every
@@ -118,6 +138,14 @@ public sealed class InGameAdvancedSampler
SawAnything = true;
_everValid |= s.ValidMask;
if (s.ValidMask.HasFlag(FlAdvancedValid.SlFeatures))
{
for (int slot = 0; slot < FlAdvancedState.FeatureSlots && s.FeatureWordAt(slot, 0) != 0; slot++)
{
_featureAnswers |= s.FeatureWordAt(slot, 1);
}
}
FactKey key = FactKey.Of(published);
if (key != _key || Facts.Count == 0)
{
@@ -167,9 +195,108 @@ public sealed class InGameAdvancedSampler
AddStreamlineConstants(published, facts);
}
if (published.State.ValidMask.HasFlag(FlAdvancedValid.SlFeatures))
{
AddStreamlineFeatures(published, facts);
}
return facts;
}
// What Streamline answered when the game asked about a feature (slGetFeatureVersion, slGetFeatureRequirements;
// 0.1.0-beta.44): a slot per feature in the order the game first asked, the vendor's own names throughout. A
// version of all zeros is the vendor's "none" - a feature that uses no NGX model has no versionNGX, a requirement
// nobody stated has no row - except versionSL, which an answer always carries. The counts are said as they are:
// 0 threads is "it creates none".
private static void AddStreamlineFeatures(InGameAdvanced published, List<AdvancedFact> facts)
{
ref readonly FlAdvancedState s = ref published.State;
var versions = new List<AdvancedRow>(8);
var requirements = new List<AdvancedRow>(16);
for (int slot = 0; slot < FlAdvancedState.FeatureSlots; slot++)
{
uint id = s.FeatureWordAt(slot, 0);
if (id == 0)
{
break;
}
string feature = FeatureName(id - 1);
uint answered = s.FeatureWordAt(slot, 1);
if ((answered & FlAdvancedState.FeatureVersionAnswered) != 0)
{
versions.Add(new AdvancedRow(feature + " · versionSL", VersionText(published, slot, 2)));
AddVersion(versions, feature, "versionNGX", published, slot, 5);
}
if ((answered & FlAdvancedState.FeatureRequirementsAnswered) != 0)
{
uint flags = s.FeatureWordAt(slot, 8);
var names = new List<string>(5);
for (int bit = 0; bit < 32; bit++)
{
if ((flags & (1u << bit)) != 0)
{
names.Add(bit < _requirementFlags.Length ? _requirementFlags[bit] : string.Create(CultureInfo.InvariantCulture, $"bit {bit}"));
}
}
requirements.Add(names.Count == 0 ? new AdvancedRow(feature + " · flags", "none", "none") : new AdvancedRow(feature + " · flags", string.Join(", ", names)));
requirements.Add(new AdvancedRow(feature + " · maxNumCPUThreads", s.FeatureWordAt(slot, 9).ToString(CultureInfo.InvariantCulture)));
requirements.Add(new AdvancedRow(feature + " · maxNumViewports", s.FeatureWordAt(slot, 10).ToString(CultureInfo.InvariantCulture)));
requirements.Add(new AdvancedRow(feature + " · numRequiredTags", s.FeatureWordAt(slot, 11).ToString(CultureInfo.InvariantCulture)));
AddVersion(requirements, feature, "osVersionDetected", published, slot, 12);
AddVersion(requirements, feature, "osVersionRequired", published, slot, 15);
AddVersion(requirements, feature, "driverVersionDetected", published, slot, 18);
AddVersion(requirements, feature, "driverVersionRequired", published, slot, 21);
}
}
if (versions.Count > 0)
{
facts.Add(Fact("sl.feature.versions", AdvancedValue.OfRows(versions)));
}
if (requirements.Count > 0)
{
facts.Add(Fact("sl.feature.requirements", AdvancedValue.OfRows(requirements)));
}
}
private static string VersionText(InGameAdvanced published, int slot, int word)
{
ref readonly FlAdvancedState s = ref published.State;
return string.Create(CultureInfo.InvariantCulture, $"{s.FeatureWordAt(slot, word)}.{s.FeatureWordAt(slot, word + 1)}.{s.FeatureWordAt(slot, word + 2)}");
}
private static void AddVersion(List<AdvancedRow> rows, string feature, string member, InGameAdvanced published, int slot, int word)
{
ref readonly FlAdvancedState s = ref published.State;
if ((s.FeatureWordAt(slot, word) | s.FeatureWordAt(slot, word + 1) | s.FeatureWordAt(slot, word + 2)) != 0)
{
rows.Add(new AdvancedRow(feature + " · " + member, VersionText(published, slot, word)));
}
}
// sl::Feature by the vendor's own constant (sl_core_types.h); an id this build has no name for is its number.
private static string FeatureName(uint feature) => feature switch
{
0 => "kFeatureDLSS",
1 => "kFeatureNRD_INVALID",
2 => "kFeatureNIS",
3 => "kFeatureReflex",
4 => "kFeaturePCL",
5 => "kFeatureDeepDVC",
6 => "kFeatureLatewarp",
1000 => "kFeatureDLSS_G",
1001 => "kFeatureDLSS_RR",
1002 => "kFeatureNvPerf",
1003 => "kFeatureDirectSR",
1004 => "kFeatureDLSS_NR",
9999 => "kFeatureImGUI",
_ => string.Create(CultureInfo.InvariantCulture, $"feature {feature}"),
};
// How the game configures FSR frame generation (ffxConfigure, 0.1.0-beta.43): three switches as seen over the
// session, the flags any configure carried, and the last rectangle it generates in.
private static void AddFrameGeneration(InGameAdvanced published, List<AdvancedFact> facts)
@@ -179,20 +306,19 @@ public sealed class InGameAdvancedSampler
AddSwitch(rows, "frameGenerationEnabled", s.FfxFgEnabledSeen);
AddSwitch(rows, "allowAsyncWorkloads", s.FfxFgAsyncSeen);
AddSwitch(rows, "onlyPresentGenerated", s.FfxFgOnlyGeneratedSeen);
if (s.FfxFgFlagsSeen != 0)
var names = new List<string>(4);
for (int bit = 0; bit < 32; bit++)
{
var names = new List<string>(4);
for (int bit = 0; bit < 32; bit++)
if ((s.FfxFgFlagsSeen & (1u << bit)) != 0)
{
if ((s.FfxFgFlagsSeen & (1u << bit)) != 0)
{
names.Add(bit < _frameGenerationFlags.Length ? _frameGenerationFlags[bit] : string.Create(CultureInfo.InvariantCulture, $"bit {bit}"));
}
names.Add(bit < _frameGenerationFlags.Length ? _frameGenerationFlags[bit] : string.Create(CultureInfo.InvariantCulture, $"bit {bit}"));
}
rows.Add(new AdvancedRow("flags", string.Join(", ", names)));
}
// This is reached only once a configure was read, so no flag seen is "the game set none" - said, as an
// upscale that set none says it (0.1.0-beta.44: Lies of P's session of 2026-11-12 had no row at all).
rows.Add(names.Count == 0 ? new AdvancedRow("flags", "none", "none") : new AdvancedRow("flags", string.Join(", ", names)));
// left, top, width, height. A rectangle with no area is one the game did not give; four -1 is one the capture
// side could not state (a side that is negative or past 32,767).
int left = s.FfxFgRectAt(0);
@@ -246,15 +372,8 @@ public sealed class InGameAdvancedSampler
facts.Add(Fact("sl.constants.depth", AdvancedValue.OfRows(depth)));
}
var projection = new List<AdvancedRow>(3);
// A range, lowest to highest - never a series, which would say when the player aimed (D114).
if (Number(s.SlFovMinBits) is double low && Number(s.SlFovMaxBits) is double high)
{
projection.Add(new AdvancedRow("cameraFOV", s.SlFovMinBits == s.SlFovMaxBits
? string.Create(CultureInfo.InvariantCulture, $"{low:0.####} rad ({Degrees(low):0.#}°)")
: string.Create(CultureInfo.InvariantCulture, $"{low:0.####} – {high:0.####} rad ({Degrees(low):0.#}° – {Degrees(high):0.#}°)")));
}
var projection = new List<AdvancedRow>(4);
AddFieldOfView(projection, "cameraFOV", s.SlFovMinBits, s.SlFovMaxBits);
AddNumber(projection, "cameraAspectRatio", s.SlAspectBits);
AddSwitch(projection, "orthographicProjection", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 4));
if (projection.Count > 0)
@@ -347,15 +466,7 @@ public sealed class InGameAdvancedSampler
var depth = new List<AdvancedRow>(3);
AddDepthPlane(depth, "cameraNear", s.FfxNearBits);
AddDepthPlane(depth, "cameraFar", s.FfxFarBits);
// A range, lowest to highest - never a series, which would say when the player aimed (D114).
if (Number(s.FfxFovMinBits) is double low && Number(s.FfxFovMaxBits) is double high)
{
// One value or two: told by the bits, which is what "the same float" means (and what csharpsquid:S1244 asks).
depth.Add(new AdvancedRow("cameraFovAngleVertical", s.FfxFovMinBits == s.FfxFovMaxBits
? string.Create(CultureInfo.InvariantCulture, $"{low:0.####} rad ({Degrees(low):0.#}°)")
: string.Create(CultureInfo.InvariantCulture, $"{low:0.####} – {high:0.####} rad ({Degrees(low):0.#}° – {Degrees(high):0.#}°)")));
}
AddFieldOfView(depth, "cameraFovAngleVertical", s.FfxFovMinBits, s.FfxFovMaxBits);
if (depth.Count > 0)
{
facts.Add(Fact("ffx.upscale.depth", AdvancedValue.OfRows(depth)));
@@ -421,6 +532,32 @@ public sealed class InGameAdvancedSampler
}
}
// A field of view as the game gave it: a range, lowest to highest - never a series, which would say when the
// player aimed (D114). Both vendors' headers say radians, and a value over pi cannot be one: Cyberpunk 2077 gives
// Streamline 51 to 90 (the owner's sessions of 2026-11-12, where this printed "51.0055 - 90 rad (2922.4 deg ...)").
// Such a value is said as it was given, and a second row says what it is not. It is never converted: which unit
// the game meant is this project's guess, and the row would then carry the guess as the game's word (D128).
private static void AddFieldOfView(List<AdvancedRow> rows, string member, uint minBits, uint maxBits)
{
if (Number(minBits) is not double low || Number(maxBits) is not double high)
{
return;
}
// One value or two: told by the bits, which is what "the same float" means (and what csharpsquid:S1244 asks).
bool one = minBits == maxBits;
if (high > Math.PI)
{
rows.Add(new AdvancedRow(member, one ? Text(low) : Text(low) + " – " + Text(high)));
rows.Add(new AdvancedRow(member + " unit", _notRadians, _notRadians));
return;
}
rows.Add(new AdvancedRow(member, one
? string.Create(CultureInfo.InvariantCulture, $"{low:0.####} rad ({Degrees(low):0.#}°)")
: string.Create(CultureInfo.InvariantCulture, $"{low:0.####} – {high:0.####} rad ({Degrees(low):0.#}° – {Degrees(high):0.#}°)")));
}
private static string? Range(uint minBits, uint maxBits) =>
Number(minBits) is double low && Number(maxBits) is double high
? minBits == maxBits ? Text(low) : Text(low) + " – " + Text(high)
@@ -488,7 +625,8 @@ public sealed class InGameAdvancedSampler
ulong SlDepth,
ulong SlFov,
uint SlAspect,
ulong SlFlags)
ulong SlFlags,
ulong SlFeatures)
{
public static FactKey Of(InGameAdvanced published)
{
@@ -500,7 +638,7 @@ public sealed class InGameAdvancedSampler
}
return new FactKey(
s.ValidMask & (FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxFgConfig | FlAdvancedValid.SlConstants),
s.ValidMask & (FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxFgConfig | FlAdvancedValid.SlConstants | FlAdvancedValid.SlFeatures),
s.DlssOutputWidth,
s.DlssOutputHeight,
s.DlssPreExposureBits,
@@ -528,7 +666,30 @@ public sealed class InGameAdvancedSampler
Pair(s.SlNearBits, s.SlFarBits),
Pair(s.SlFovMinBits, s.SlFovMaxBits),
s.SlAspectBits,
Pair(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse));
Pair(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse),
FeaturesHash(published));
}
// The feature slots as one number (FNV-1a over the words of the slots in use): an answer that arrives, or one
// that changes, makes the facts new; 0 where the group was not published.
private static ulong FeaturesHash(InGameAdvanced published)
{
ref readonly FlAdvancedState s = ref published.State;
if (!s.ValidMask.HasFlag(FlAdvancedValid.SlFeatures))
{
return 0;
}
ulong hash = 14695981039346656037UL;
for (int slot = 0; slot < FlAdvancedState.FeatureSlots && s.FeatureWordAt(slot, 0) != 0; slot++)
{
for (int word = 0; word < FlAdvancedState.FeatureWords; word++)
{
hash = (hash ^ s.FeatureWordAt(slot, word)) * 1099511628211UL;
}
}
return hash;
}
}
}
@@ -22,6 +22,11 @@ namespace FrameLedger.Application.Recording;
/// (<c>19_SAFETY</c>: re-enabling silently would mean a rules feed or a policy can switch injection on
/// for a game without anyone looking).
/// </para>
/// <para>
/// <b>The count starts again when the user switches hooking on</b> (owner decision D126, 0.1.0-beta.44): the consent
/// grant sets <c>hook_crash_count</c> to 0. Until then the count only ever grew, so once a game had been switched off,
/// every single early abnormal end after its user switched it on again switched it off - the reason still saying "twice".
/// </para>
/// </remarks>
public sealed class CrashAutoDisablePolicy
{
@@ -2,6 +2,7 @@
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Runtime.InteropServices;
using FrameLedger.Application.Advanced;
using FrameLedger.Application.Capture;
using FrameLedger.Application.Persistence;
@@ -191,8 +192,8 @@ public sealed class SessionRecorder : ISessionRecorder
return DriverProfileRecord.Serialize(await read.WaitAsync(DriverProfileBudget).ConfigureAwait(false));
}
catch (Exception ex) when (ex is TimeoutException or InvalidOperationException or ArgumentException
or System.Runtime.InteropServices.ExternalException or DllNotFoundException or EntryPointNotFoundException
or BadImageFormatException or System.Runtime.InteropServices.MarshalDirectiveException)
or ExternalException or DllNotFoundException or EntryPointNotFoundException
or BadImageFormatException or MarshalDirectiveException)
{
return null;
}
@@ -374,8 +375,8 @@ public sealed class SessionRecorder : ISessionRecorder
// records Advanced metrics - the same condition the shared reader is held under.
private readonly InGameAdvancedSampler? _inGame = advanced is null ? null : new InGameAdvancedSampler();
private IReadOnlyList<AdvancedReading>? _inGamePending;
private (IReadOnlyList<AdvancedFact> Facts, AdvancedInGameStatus Status, AdvancedInGameCall? Streamline, AdvancedInGameCall? FrameGeneration) _inGameContext =
([], AdvancedInGameStatus.Unknown, null, null);
private (IReadOnlyList<AdvancedFact> Facts, AdvancedInGameStatus Status, InGameCallStates Calls) _inGameContext =
([], AdvancedInGameStatus.Unknown, default);
private IReadOnlyList<AdvancedFact> _sessionWithGame = [];
/// <summary>A session that records Advanced metrics asks the Overlay for what the game tells its upscaler (D111).</summary>
@@ -486,10 +487,9 @@ public sealed class SessionRecorder : ISessionRecorder
IReadOnlyList<AdvancedFact>? session = _sessionFacts;
IReadOnlyList<AdvancedFact> game = _inGame?.Facts ?? [];
AdvancedInGameStatus status = InGameStatus();
(AdvancedInGameCall? streamline, AdvancedInGameCall? frameGeneration) = InGameCalls();
InGameCallStates calls = InGameCalls();
(IReadOnlyList<AdvancedFact>?, IReadOnlyList<AdvancedSeriesInfo>?, AdvancedSources?, IReadOnlyList<AdvancedFact>?) now = (snapshot?.MachineFacts, snapshot?.Series, snapshot?.Sources, session);
bool sameGame = ReferenceEquals(game, _inGameContext.Facts) && status == _inGameContext.Status
&& streamline == _inGameContext.Streamline && frameGeneration == _inGameContext.FrameGeneration;
bool sameGame = ReferenceEquals(game, _inGameContext.Facts) && status == _inGameContext.Status && calls == _inGameContext.Calls;
if ((snapshot is null && session is null && game.Count == 0)
|| (sameGame && ReferenceEquals(now.Item1, _context.Machine) && ReferenceEquals(now.Item2, _context.Series) && Equals(now.Item3, _context.Sources) && ReferenceEquals(now.Item4, _context.Session)))
{
@@ -503,33 +503,50 @@ public sealed class SessionRecorder : ISessionRecorder
}
_context = now;
_inGameContext = (game, status, streamline, frameGeneration);
_inGameContext = (game, status, calls);
writer.SetAdvancedContext(new AdvancedSessionData(
snapshot?.MachineFacts ?? [],
_sessionWithGame,
snapshot?.Series ?? [],
(snapshot?.Sources ?? AdvancedSources.Unknown) with { InGame = status, StreamlineConstants = streamline, FsrFrameGeneration = frameGeneration }));
(snapshot?.Sources ?? AdvancedSources.Unknown) with
{
InGame = status,
StreamlineConstants = calls.Streamline,
FsrFrameGeneration = calls.FrameGeneration,
StreamlineFeatureVersion = calls.FeatureVersion,
StreamlineFeatureRequirements = calls.FeatureRequirements,
}));
}
/// <summary>
/// What became of the two calls hooked only for Advanced metrics (0.1.0-beta.43), for a session measured
/// inside the game: read, hooked and never called, or not hooked - from the hook families the capture side
/// last published and from what its publications carried. Null for a session not measured inside the game:
/// <see cref="AdvancedInGameStatus.NotHooked"/> already says so.
/// What became of the calls hooked only for Advanced metrics (two since 0.1.0-beta.43, four since
/// 0.1.0-beta.44), for a session measured inside the game: read, hooked and never called, or not hooked - from
/// the hook families the capture side last published and from what its publications carried. All null for a
/// session not measured inside the game: <see cref="AdvancedInGameStatus.NotHooked"/> already says so.
/// </summary>
private (AdvancedInGameCall? Streamline, AdvancedInGameCall? FrameGeneration) InGameCalls()
private InGameCallStates InGameCalls()
{
if (_inGame is null || AttachedAt is null)
{
return (null, null);
return default;
}
var hooks = (FlHookFamily)(_last?.WriterState.HooksInstalledMask ?? 0u);
return (
return new InGameCallStates(
_inGame.Call(FlAdvancedValid.SlConstants, hooks.HasFlag(FlHookFamily.SlConstants)),
_inGame.Call(FlAdvancedValid.FfxFgConfig, hooks.HasFlag(FlHookFamily.FfxConfigure)));
_inGame.Call(FlAdvancedValid.FfxFgConfig, hooks.HasFlag(FlHookFamily.FfxConfigure)),
_inGame.FeatureCall(FlAdvancedState.FeatureVersionAnswered, hooks.HasFlag(FlHookFamily.SlFeatureVersion)),
_inGame.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hooks.HasFlag(FlHookFamily.SlFeatureRequirements)));
}
/// <summary>The four calls' states, compared as one value when deciding whether the session's context moved.</summary>
[StructLayout(LayoutKind.Auto)]
private readonly record struct InGameCallStates(
AdvancedInGameCall? Streamline,
AdvancedInGameCall? FrameGeneration,
AdvancedInGameCall? FeatureVersion,
AdvancedInGameCall? FeatureRequirements);
/// <summary>
/// What the row says of the entries read inside the game: read, measured inside the game with none of their
/// calls seen, or not measured inside the game at all.
@@ -35,4 +35,10 @@ public enum HookFamilies
/// <summary><c>ffxConfigure</c> is hooked (0.1.0-beta.43) - only where Advanced metrics was ever asked for.</summary>
FfxConfigure = 1 << 14,
/// <summary><c>slGetFeatureVersion</c> is hooked (0.1.0-beta.44) - only where Advanced metrics was ever asked for.</summary>
SlFeatureVersion = 1 << 15,
/// <summary><c>slGetFeatureRequirements</c> is hooked (0.1.0-beta.44) - only where Advanced metrics was ever asked for.</summary>
SlFeatureRequirements = 1 << 16,
}
@@ -51,9 +51,14 @@ public sealed class SqliteGameConsentStore : IGameConsentStore
+ "VALUES (@name, @path, @size, @mtime, 1, @at, @provenance, @disclosure, @at, @at)";
// The block columns are NOT in the SET list: that is the merge-forward, expressed as an omission.
// hook_crash_count = 0 IS (owner decision D126, 0.1.0-beta.44): the count of early abnormal ends was never set back,
// so a game switched off after two, and switched on again by its user, was switched off by the next single one -
// under a reason that says "twice" (Lies of P, 2026-11-12: two ends in October, one more today). A grant is the only
// statement that turns hooking on, and it is the user's act; the count starts again there. What the row says of the
// last time (hook_autodisabled_reason, hook_autodisabled_at) stays - the App shows it only while hooking is off.
private const string _updateGrant =
"UPDATE games SET exe_size_bytes = @size, exe_mtime_ms = @mtime, hook_enabled = 1, hook_consent_at = @at, "
+ "hook_consent_provenance = @provenance, hook_consent_disclosure_version = @disclosure, updated_at = @at "
+ "hook_consent_provenance = @provenance, hook_consent_disclosure_version = @disclosure, hook_crash_count = 0, updated_at = @at "
+ "WHERE exe_path = @path";
private const string _revoke =
+30
View File
@@ -292,6 +292,16 @@ public enum FlHookFamily : uint
/// was asked for Advanced metrics at least once; it entitles no frame field.
/// </summary>
FfxConfigure = 1u << 14,
/// <summary>
/// <c>slGetFeatureVersion</c> is hooked (0.1.0-beta.44, Advanced metrics train B). Only in a process that was asked
/// for Advanced metrics at least once. A game asks while it starts, so the bit beside a feature with no version means
/// "hooked, and the game did not ask again"; it entitles no frame field.
/// </summary>
SlFeatureVersion = 1u << 15,
/// <summary><c>slGetFeatureRequirements</c> is hooked (0.1.0-beta.44), under the same conditions.</summary>
SlFeatureRequirements = 1u << 16,
}
/// <summary>
@@ -972,6 +982,26 @@ public unsafe struct FlAdvancedState
/// <summary><see cref="FeatureSlots"/> slots of <see cref="FeatureWords"/> words each (0.1.0-beta.44).</summary>
public fixed uint Features[FeatureSlots * FeatureWords];
/// <summary>Word 1 of a slot: <c>slGetFeatureVersion</c> answered for this feature.</summary>
public const uint FeatureVersionAnswered = 1u << 0;
/// <summary>Word 1 of a slot: <c>slGetFeatureRequirements</c> answered for this feature.</summary>
public const uint FeatureRequirementsAnswered = 1u << 1;
/// <summary>
/// One word of one feature slot, as <c>fl_shm.h</c> lays them out: 0 the <c>sl::Feature</c> id plus one (0 = an
/// empty slot; slots fill from 0), 1 which question was answered, 2..7 the two versions, 8 the flags, 9..11 three
/// counts, 12..23 four versions.
/// </summary>
public readonly uint FeatureWordAt(int slot, int word)
{
ArgumentOutOfRangeException.ThrowIfNegative(slot);
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(slot, FeatureSlots);
ArgumentOutOfRangeException.ThrowIfNegative(word);
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(word, FeatureWords);
return Features[(slot * FeatureWords) + word];
}
}
/// <summary>Region 6 — the ring. Exactly 64 bytes, no implicit padding.</summary>
@@ -188,8 +188,16 @@ struct Accumulators {
std::atomic<uint32_t> slAspectBits{FL_ADV_FLOAT_NONE};
std::atomic<uint32_t> slFlagsSeenTrue{0u};
std::atomic<uint32_t> slFlagsSeenFalse{0u};
// What Streamline answered about each feature the game asked about (0.1.0-beta.44): FL_ADV_FEATURE_SLOTS slots
// of FL_ADV_FEATURE_WORDS words, laid out as the region's `features` (fl_shm.h). Kept across a new request.
std::atomic<uint32_t> features[FL_ADV_FEATURE_SLOTS * FL_ADV_FEATURE_WORDS]{};
};
// Word 1 of a feature slot: which of the two questions has an answer in it.
inline constexpr uint32_t kFeatureVersionAnswered = 1u << 0;
inline constexpr uint32_t kFeatureRequirementsAnswered = 1u << 1;
// Whether `leaf` is the module whose calls a summary counts: the first one seen, and
// from then on only it. A title that goes through the loader has the same call
// arrive at two hooked modules; a count is a count of calls and not of hooks.
@@ -461,15 +469,85 @@ inline void ObserveSlConstants(const sl::Constants& k, uint32_t viewport, Accumu
NoteBits(a.validMask, FL_ADV_VALID_SL_CONSTANTS);
}
// The slot of `feature`: the one that holds it already, else the first empty one, claimed here. nullptr when every
// slot holds another feature -- a thirteenth is not kept -- and for the one id that cannot be stored plus one.
// Slots fill from 0 and are never emptied, so the first empty slot ends the search.
inline std::atomic<uint32_t>* FeatureSlot(uint32_t feature, Accumulators& a) noexcept {
const uint32_t id = feature + 1u;
if (id == 0u) {
return nullptr;
}
for (uint32_t i = 0; i < FL_ADV_FEATURE_SLOTS; ++i) {
std::atomic<uint32_t>* slot = &a.features[i * FL_ADV_FEATURE_WORDS];
uint32_t held = slot[0].load(std::memory_order_relaxed);
if (held == 0u && slot[0].compare_exchange_strong(held, id, std::memory_order_relaxed)) {
return slot;
}
if (held == id) { // it was there, or another thread asking about the same feature claimed it just now
return slot;
}
}
return nullptr;
}
// Three words of a slot from one sl::Version: major, minor, build.
inline void PutVersion(std::atomic<uint32_t>* words, const sl::Version& number) noexcept {
words[0].store(number.major, std::memory_order_relaxed);
words[1].store(number.minor, std::memory_order_relaxed);
words[2].store(number.build, std::memory_order_relaxed);
}
// What slGetFeatureVersion ANSWERED (0.1.0-beta.44): the caller is the detour, after the original returned OK and
// the struct's GUID and version were checked. Both members are version 1's (17_HOOK_ENGINE "Which struct version
// carries which field"). A feature asked about again overwrites its own slot: the last answer is the one kept.
inline void ObserveSlFeatureVersion(uint32_t feature, const sl::FeatureVersion& fv, Accumulators& a) noexcept {
std::atomic<uint32_t>* slot = FeatureSlot(feature, a);
if (slot == nullptr) {
return;
}
PutVersion(slot + 2, fv.versionSL);
PutVersion(slot + 5, fv.versionNGX);
NoteBits(slot[1], kFeatureVersionAnswered);
NoteBits(a.validMask, FL_ADV_VALID_SL_FEATURES);
}
// What slGetFeatureRequirements ANSWERED (0.1.0-beta.44), under the same conditions. WHAT IS READ: the flags, three
// counts, the number of required buffer tags, and four versions -- every one a member of struct version 1, the last
// of them `driverVersionRequired`. WHAT IS NOT, EVER: `requiredTags`, the pointer the count belongs to, and every
// member after the versions -- the Vulkan queue counts and the pointers to the names of extensions and features.
// Nothing here follows a pointer of the game's.
inline void ObserveSlFeatureRequirements(uint32_t feature, const sl::FeatureRequirements& fr,
Accumulators& a) noexcept {
std::atomic<uint32_t>* slot = FeatureSlot(feature, a);
if (slot == nullptr) {
return;
}
slot[8].store(static_cast<uint32_t>(fr.flags), std::memory_order_relaxed);
slot[9].store(fr.maxNumCPUThreads, std::memory_order_relaxed);
slot[10].store(fr.maxNumViewports, std::memory_order_relaxed);
slot[11].store(fr.numRequiredTags, std::memory_order_relaxed);
PutVersion(slot + 12, fr.osVersionDetected);
PutVersion(slot + 15, fr.osVersionRequired);
PutVersion(slot + 18, fr.driverVersionDetected);
PutVersion(slot + 21, fr.driverVersionRequired);
NoteBits(slot[1], kFeatureRequirementsAnswered);
NoteBits(a.validMask, FL_ADV_VALID_SL_FEATURES);
}
// A NEW REQUEST: the summaries start afresh, so a session's ranges, masks and
// counts are its own and not those of the session before it in the same game.
// THE WATCHDOG'S. A detour running beside it loses nothing that matters: what it
// stores is of the call it is in, which belongs to the request that is starting.
// The two owners stay - which module's calls are counted is a fact about the
// process, not about a session.
// process, not about a session. SO DO THE FEATURE SLOTS (0.1.0-beta.44): what
// version a feature is and what it requires do not change while the game runs,
// and a game asks once, while it starts -- a second session of the same process
// would otherwise have nothing where the first had the answer. Their bit of the
// mask is therefore kept with them.
inline void Reset(Accumulators& a) noexcept {
const auto relaxed = std::memory_order_relaxed;
a.validMask.store(0u, relaxed);
a.validMask.store(a.features[0].load(relaxed) != 0u ? static_cast<uint32_t>(FL_ADV_VALID_SL_FEATURES) : 0u,
relaxed);
a.dlssStructVersion.store(0u, relaxed);
a.dlssOptionsSeen.store(0u, relaxed);
a.dlssOutputWidth.store(0u, relaxed);
@@ -609,6 +687,10 @@ inline void Publish(Accumulators& a, FlAdvancedState* region, uint32_t request,
put32(region->slFlagsSeenTrue, a.slFlagsSeenTrue.load(relaxed));
put32(region->slFlagsSeenFalse, a.slFlagsSeenFalse.load(relaxed));
for (uint32_t i = 0; i < FL_ADV_FEATURE_SLOTS * FL_ADV_FEATURE_WORDS; ++i) {
put32(region->features[i], a.features[i].load(relaxed));
}
std::atomic_ref<uint32_t> samples{region->samples};
samples.store(samples.load(relaxed) + 1u, relaxed);
seq.store(odd + 1u, std::memory_order_release);
@@ -125,7 +125,8 @@ inline constexpr uint32_t kFamiliesEvaluateFeatureDoesNotImplement =
static_cast<uint32_t>(fl::FL_HOOK_PSO) | static_cast<uint32_t>(fl::FL_HOOK_COLOR_SPACE) |
static_cast<uint32_t>(fl::FL_HOOK_REFLEX) | static_cast<uint32_t>(fl::FL_HOOK_VRAM) |
static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_QUALITY) | static_cast<uint32_t>(fl::FL_HOOK_SL_CONSTANTS) |
static_cast<uint32_t>(fl::FL_HOOK_FFX_CONFIGURE);
static_cast<uint32_t>(fl::FL_HOOK_FFX_CONFIGURE) | static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_VERSION) |
static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_REQUIREMENTS);
static_assert((kFamilyEvaluateFeature & kFamiliesEvaluateFeatureDoesNotImplement) == 0u,
"the slEvaluateFeature row claims a family its detour does not implement -- hookinventory-check "
@@ -209,7 +210,8 @@ inline constexpr uint32_t kFamiliesFfxDispatchDoesNotImplement =
static_cast<uint32_t>(fl::FL_HOOK_PSO) | static_cast<uint32_t>(fl::FL_HOOK_COLOR_SPACE) |
static_cast<uint32_t>(fl::FL_HOOK_REFLEX) | static_cast<uint32_t>(fl::FL_HOOK_VRAM) |
static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_QUALITY) | static_cast<uint32_t>(fl::FL_HOOK_SL_NEURAL_RENDERING) |
static_cast<uint32_t>(fl::FL_HOOK_SL_CONSTANTS) | static_cast<uint32_t>(fl::FL_HOOK_FFX_CONFIGURE);
static_cast<uint32_t>(fl::FL_HOOK_SL_CONSTANTS) | static_cast<uint32_t>(fl::FL_HOOK_FFX_CONFIGURE) |
static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_VERSION) | static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_REQUIREMENTS);
static_assert((kFamilyFfxDispatch & kFamiliesFfxDispatchDoesNotImplement) == 0u,
"the ffxDispatch rows claim a family their detour does not implement -- hookinventory-check reads "
@@ -303,6 +305,37 @@ static_assert(kFamilySlConstants != kFamilyEvaluateFeature && kFamilySlConstants
"InstallByFamily binds a row by EQUALITY on this value -- a collision would hand slSetConstants' "
"detour to another export, or another's to it");
// --- Streamline: slGetFeatureVersion and slGetFeatureRequirements (0.1.0-beta.44, train B's third step) ---
//
// THE TWO QUESTIONS A GAME ASKS STREAMLINE ABOUT A FEATURE: which version it is (Streamline's own, and the NGX
// model's), and what it requires -- the graphics APIs, V-Sync off, hardware-accelerated GPU scheduling, how many
// threads and viewports, how many buffers, and the versions of Windows and of the driver it found beside the ones it
// needs. THE ANSWER IS WHAT IS READ: the detour calls the original first and reads the struct the game passed only
// when the original said OK. The pointers the same answer carries -- the list of required buffer tags, the names of
// Vulkan extensions and features -- are never followed (fl_adv_fields.h; tools/overlay-fields-check.ps1).
//
// INSTALLED ONLY WHERE ASKED FOR, as slSetConstants is (D111), a row and a bit each. THEY ARE THE FIRST ROWS OF THE
// TABLE because a game asks while it starts: the watchdog patches the rows in the table's order, each patch stops
// the game's threads for a moment, and in a process that was asked these two are the ones that cannot wait. In a
// process never asked they are passed over before anything is resolved, and the order changes nothing.
inline constexpr uint32_t kFamilySlFeatureVersion = static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_VERSION);
inline constexpr uint32_t kFamilySlFeatureRequirements = static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_REQUIREMENTS);
static_assert(kFamilySlFeatureVersion != kFamilySlFeatureRequirements &&
kFamilySlFeatureVersion != kFamilyEvaluateFeature && kFamilySlFeatureVersion != kFamilyFfxDispatch &&
kFamilySlFeatureVersion != kFamilyFfxQuery && kFamilySlFeatureVersion != kFamilySlConstants &&
kFamilySlFeatureVersion != static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_PARAMS) &&
kFamilySlFeatureVersion != static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS),
"InstallByFamily binds a row by EQUALITY on this value -- a collision would hand slGetFeatureVersion's "
"detour to another export, or another's to it");
static_assert(kFamilySlFeatureRequirements != kFamilyEvaluateFeature &&
kFamilySlFeatureRequirements != kFamilyFfxDispatch &&
kFamilySlFeatureRequirements != kFamilyFfxQuery &&
kFamilySlFeatureRequirements != kFamilySlConstants &&
kFamilySlFeatureRequirements != static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_PARAMS) &&
kFamilySlFeatureRequirements != static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS),
"InstallByFamily binds a row by EQUALITY on this value -- a collision would hand "
"slGetFeatureRequirements' detour to another export, or another's to it");
// --- AMD FidelityFX: ffxConfigure on the same four modules (0.1.0-beta.43, Advanced metrics train B) ---
//
// HOW THE GAME CONFIGURES FRAME GENERATION: a title calls ffxConfigure with a frame-generation descriptor, usually
@@ -319,6 +352,8 @@ static_assert(kFamilySlConstants != kFamilyEvaluateFeature && kFamilySlConstants
inline constexpr uint32_t kFamilyFfxConfigure = static_cast<uint32_t>(fl::FL_HOOK_FFX_CONFIGURE);
static_assert(kFamilyFfxConfigure != kFamilyEvaluateFeature && kFamilyFfxConfigure != kFamilyFfxDispatch &&
kFamilyFfxConfigure != kFamilyFfxQuery && kFamilyFfxConfigure != kFamilySlConstants &&
kFamilyFfxConfigure != kFamilySlFeatureVersion &&
kFamilyFfxConfigure != kFamilySlFeatureRequirements &&
kFamilyFfxConfigure != static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_PARAMS) &&
kFamilyFfxConfigure != static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS),
"InstallByFamily binds a row by EQUALITY on this value -- a collision would hand ffxConfigure's detour "
@@ -415,6 +450,8 @@ inline int FfxLeafOf(const wchar_t* moduleName) noexcept {
// first, it entitled records the second row was not yet producing (measured 38 of
// 41 on the frame-based fixture), which is the ffx leaves' defect from #110 again.
#define FL_HOOK_INVENTORY(X) \
X(L"sl.interposer.dll", "slGetFeatureVersion", fl::inventory::kFamilySlFeatureVersion) \
X(L"sl.interposer.dll", "slGetFeatureRequirements", fl::inventory::kFamilySlFeatureRequirements) \
X(L"sl.interposer.dll", "slEvaluateFeature", fl::inventory::kFamilyEvaluateFeature) \
X(L"sl.interposer.dll", "slSetTag", fl::FL_HOOK_UPSCALER_PARAMS) \
X(L"sl.interposer.dll", "slSetTagForFrame", fl::FL_HOOK_UPSCALER_PARAMS) \
@@ -439,7 +476,7 @@ inline int FfxLeafOf(const wchar_t* moduleName) noexcept {
#define FL_COUNT_ROW(mod, sym, family) +1u
inline constexpr uint32_t kRowCount = 0u FL_HOOK_INVENTORY(FL_COUNT_ROW);
#undef FL_COUNT_ROW
static_assert(kRowCount == 18u, "a row was added or removed: say so here, and in 17_HOOK_ENGINE §Hook inventory");
static_assert(kRowCount == 20u, "a row was added or removed: say so here, and in 17_HOOK_ENGINE §Hook inventory");
// A row's "module!symbol", for the native log, built at compile time from the row's own two spellings -- so an
// install line names the module it patched, and no second list of names exists to drift from the table
+55 -1
View File
@@ -1175,7 +1175,16 @@ std::atomic<uint32_t> g_frameTokensLive{0};
using PFN_SlSetConstants = ::PFun_slSetConstants*;
PFN_SlSetConstants g_origSlSetConstants = nullptr;
std::atomic<uint32_t> g_slConstantsLive{0};
std::atomic<uint32_t> g_frameTokens{0};
// slGetFeatureVersion and slGetFeatureRequirements (0.1.0-beta.44, Advanced metrics): patched only in a process that
// was asked for Advanced metrics at least once, as slSetConstants is. A patch, a trampoline and a latch each.
using PFN_SlGetFeatureVersion = ::PFun_slGetFeatureVersion*;
using PFN_SlGetFeatureRequirements = ::PFun_slGetFeatureRequirements*;
PFN_SlGetFeatureVersion g_origSlGetFeatureVersion = nullptr;
PFN_SlGetFeatureRequirements g_origSlGetFeatureRequirements = nullptr;
std::atomic<uint32_t> g_slFeatureVersionLive{0};
std::atomic<uint32_t> g_slFeatureRequirementsLive{0};
std::atomic<uint32_t> g_frameTokens{0};
// The HIGHEST frame index seen so far, tagged in bit 32 so that index 0 is
// distinct from "no frame yet". Measured 2026-09-03 on Cyberpunk 2077
// (20_OPEN_QUESTIONS §S31, row P4): the title asks for a token 3 to 4.6 times per
@@ -1760,6 +1769,37 @@ sl::Result STDMETHODCALLTYPE Hook_SlSetConstants(const sl::Constants& values, co
return g_origSlSetConstants(values, frame, viewport);
}
// What Streamline answers when the game asks which version a feature is (0.1.0-beta.44). THE ORIGINAL RUNS FIRST,
// exactly once, on every path, with both arguments forwarded untouched: what is read is its ANSWER, in the struct the
// game passed, and only when it said OK -- a refusal leaves the struct as the game made it, which is not an answer.
// Then the same three conditions as slSetConstants: the Agent is asking, observing has not stopped, and the struct is
// the one these headers describe (its GUID and a version of at least 1, checked on this call). The read itself is in
// fl_adv_fields.h.
sl::Result STDMETHODCALLTYPE Hook_SlGetFeatureVersion(sl::Feature feature, sl::FeatureVersion& version) {
const sl::Result result = g_origSlGetFeatureVersion(feature, version);
FL_HOOK_GUARD({
if (result == sl::Result::eOk && g_advancedRequested.load(std::memory_order_relaxed) != 0u && MayObserve() &&
fl::slinputs::IsReadable<sl::FeatureVersion>(&version)) {
fl::adv::ObserveSlFeatureVersion(static_cast<uint32_t>(feature), version, g_adv);
}
})
return result;
}
// What Streamline answers when the game asks what a feature requires (0.1.0-beta.44): the same shape. The answer
// carries pointers -- the required buffer tags, the names of Vulkan extensions and features -- and fl_adv_fields.h
// follows none of them.
sl::Result STDMETHODCALLTYPE Hook_SlGetFeatureRequirements(sl::Feature feature, sl::FeatureRequirements& requirements) {
const sl::Result result = g_origSlGetFeatureRequirements(feature, requirements);
FL_HOOK_GUARD({
if (result == sl::Result::eOk && g_advancedRequested.load(std::memory_order_relaxed) != 0u && MayObserve() &&
fl::slinputs::IsReadable<sl::FeatureRequirements>(&requirements)) {
fl::adv::ObserveSlFeatureRequirements(static_cast<uint32_t>(feature), requirements, g_adv);
}
})
return result;
}
// slSetTagForFrame: the FrameToken first, then the same list slSetTag takes. The
// token is not read -- the frame count comes from slGetNewFrameToken -- and the tag
// list is handed to the same NoteTags, because a per-frame tag and a viewport tag
@@ -2514,6 +2554,20 @@ bool InstallByFamily(const wchar_t* moduleName, const char* symbol, uint32_t fam
return InstallRow(moduleName, symbol, family, reinterpret_cast<void*>(&Hook_SlSetConstants),
reinterpret_cast<void**>(&g_origSlSetConstants), g_slConstantsLive, name);
}
if (family == fl::inventory::kFamilySlFeatureVersion) {
if (g_advancedSeen == 0u) {
return false;
}
return InstallRow(moduleName, symbol, family, reinterpret_cast<void*>(&Hook_SlGetFeatureVersion),
reinterpret_cast<void**>(&g_origSlGetFeatureVersion), g_slFeatureVersionLive, name);
}
if (family == fl::inventory::kFamilySlFeatureRequirements) {
if (g_advancedSeen == 0u) {
return false;
}
return InstallRow(moduleName, symbol, family, reinterpret_cast<void*>(&Hook_SlGetFeatureRequirements),
reinterpret_cast<void**>(&g_origSlGetFeatureRequirements), g_slFeatureRequirementsLive, name);
}
if (family == fl::inventory::kFamilyFfxConfigure) {
if (g_advancedSeen == 0u) {
return false;
@@ -415,6 +415,13 @@ enum FlHookFamily : uint32_t {
// dispatch and query families are. Beside a zero ffxFgConfigures it says "hooked, and the game never configured
// frame generation"; it entitles no measured field of a frame record.
FL_HOOK_FFX_CONFIGURE = 1u << 14,
// Advanced metrics, train B's third step (0.1.0-beta.44): slGetFeatureVersion and slGetFeatureRequirements are
// hooked -- a bit each, because a patch each. Published only in a process that was asked for Advanced metrics at
// least once, as the two above. A GAME ASKS THESE WHILE IT STARTS, so the usual reading of a bit beside a slot
// that has no answer of that kind is "hooked, and the game did not ask again"; neither entitles a measured field
// of a frame record.
FL_HOOK_SL_FEATURE_VERSION = 1u << 15,
FL_HOOK_SL_FEATURE_REQUIREMENTS = 1u << 16,
};
// FlWriterState::runtimeCensus -- which vendor RUNTIME MODULES the loader reported
@@ -966,6 +973,9 @@ enum FlAdvancedValid : uint32_t {
#define FL_ADV_FLOAT_INFINITE 0x7F800000u
// Feature slots (0.1.0-beta.44): FL_ADV_FEATURE_SLOTS slots of FL_ADV_FEATURE_WORDS uint32 each, in `features`.
// Filled in the order the game first asked about each feature, from slot 0, and NOT emptied by a new request: what
// version a feature is and what it requires are facts about the process, and a game asks once, while it starts. A
// thirteenth feature is not kept.
// [0] sl::Feature id PLUS ONE; 0 = an empty slot
// [1] bit 0: slGetFeatureVersion answered; bit 1: slGetFeatureRequirements answered
// [2..4] versionSL major, minor, build [5..7] versionNGX
+88 -17
View File
@@ -6969,6 +6969,17 @@ constexpr float kAdvSlFar = 4000.0f;
constexpr float kAdvSlFovLow = 0.8f;
constexpr float kAdvSlFovHigh = 1.2f;
constexpr float kAdvSlAspect = 1.75f;
// ...and asks the stub interposer about DLSS and DLSS frame generation every sixteenth frame (0.1.0-beta.44). What
// the stub answers (stub_sl_interposer.cpp), as a slot's words 2..23: the two versions, the flags, three counts,
// Windows found and required, the driver found and required.
constexpr uint32_t kAdvFeatureDlss[22] = {2u, 14u, 1u, 310u, 4u, 0u, 7u, 2u, 32u, 3u, 10u,
0u, 26100u, 10u, 0u, 19041u, 591u, 44u, 0u, 512u, 15u, 0u};
constexpr uint32_t kAdvFeatureDlssG[22] = {2u, 14u, 1u, 310u, 4u, 1u, 26u, 1u, 1u, 4u, 10u,
0u, 26100u, 10u, 0u, 19041u, 591u, 44u, 0u, 551u, 23u, 0u};
constexpr uint32_t kFeatureIdDlss = 0u;
constexpr uint32_t kFeatureIdNis = 2u;
constexpr uint32_t kFeatureIdPcl = 4u;
constexpr uint32_t kFeatureIdDlssG = 1000u;
// ...and hands ffxConfigure a frame-generation configuration before each frame's dispatches (0.1.0-beta.43).
constexpr uint32_t kAdvFfxFgFlags = 1u << 4; // FFX_FRAMEGENERATION_FLAG_DRAW_DEBUG_PACING_LINES
constexpr int32_t kAdvFfxFgRectWidth = 1920;
@@ -7031,16 +7042,35 @@ uint32_t BitsOf(float v) {
return std::bit_cast<uint32_t>(v);
}
// What later releases fill: declared, written by nothing yet. (The sl::Constants and the ffxConfigure groups left
// this list with 0.1.0-beta.43, which fills them; the two helpers below are for a target that makes neither call.)
bool LaterGroupsAreZero(const fl::FlAdvancedState& a) {
bool zero = true;
// The feature slots of a target that asks Streamline nothing about a feature: every word zero, and no bit of the
// mask. (Filled since 0.1.0-beta.44 by a target that asks; until then this was "what later releases fill".)
bool FeatureSlotsAreEmpty(const fl::FlAdvancedState& a) {
bool zero = (a.validMask & fl::FL_ADV_VALID_SL_FEATURES) == 0u;
for (uint32_t i = 0; i < FL_ADV_FEATURE_SLOTS * FL_ADV_FEATURE_WORDS; ++i) {
zero = zero && a.features[i] == 0u;
}
return zero;
}
// The slot region 5 holds for `feature` (the id plus one in its first word), or nullptr.
const uint32_t* FeatureSlotOf(const fl::FlAdvancedState& a, uint32_t feature) {
for (uint32_t i = 0; i < FL_ADV_FEATURE_SLOTS; ++i) {
const uint32_t* slot = &a.features[static_cast<size_t>(i) * FL_ADV_FEATURE_WORDS];
if (slot[0] == feature + 1u) {
return slot;
}
}
return nullptr;
}
// A slot's words 1..23 against "both questions answered" and the stub's numbers.
bool FeatureSlotIs(const uint32_t* slot, const uint32_t (&expected)[22]) {
if (slot == nullptr || slot[1] != 3u) {
return false;
}
return std::memcmp(slot + 2, expected, sizeof(expected)) == 0;
}
bool FfxFgConfigIsUnread(const fl::FlAdvancedState& a) {
return a.ffxFgConfigures == 0u && a.ffxFgEnabledSeen == 0u && a.ffxFgAsyncSeen == 0u &&
a.ffxFgOnlyGeneratedSeen == 0u && a.ffxFgFlagsSeen == 0u && a.ffxFgRect[2] == 0 && a.ffxFgRect[3] == 0 &&
@@ -7193,7 +7223,7 @@ TEST_CASE("region 5 stays empty until the Agent asks, then carries what an FSR t
CHECK(SlConstantsAreUnread(a)); // an FSR title with no Streamline: nothing calls slSetConstants
CHECK(a.ffxMemoryQueries != 0u);
CHECK(a.ffxMemoryQueries <= a.ffxDispatches + 2u);
CHECK(LaterGroupsAreZero(a));
CHECK(FeatureSlotsAreEmpty(a));
// How the target configures frame generation: one configure a frame, counted ONCE though the loader hands it on
// to the leaf's export and both are hooked (twice would be past the dispatches), and the key-value configure
// beside it not at all. On, never asynchronous, never generated-only, one flag, the whole 1920x1080.
@@ -7297,12 +7327,13 @@ TEST_CASE("FSR's plane at infinity (beta.42, D119): a far plane of FLT_MAX reach
CHECK(r.st->status == fl::FL_STATUS_READY);
}
TEST_CASE("region 5 carries what a Streamline title chains into its evaluation and tells slSetConstants, and "
"slSetConstants is patched only once the Agent has asked",
TEST_CASE("region 5 carries what a Streamline title chains into its evaluation, tells slSetConstants and is "
"answered about a feature, and the three calls are patched only once the Agent has asked",
"[guard][inject][shm][advanced]") {
// ONE TARGET, FOUR STRETCHES: never asked -> asked -> no longer asked -> stopped. The target does the same thing
// throughout: it chains an sl::DLSSOptions into every evaluation and calls slSetConstants for two viewports every
// frame, with the matrices and the camera's position and axes set to loud, changing values.
// frame, with the matrices and the camera's position and axes set to loud, changing values; and every sixteenth
// frame it asks Streamline which version four features are and what three of them require (0.1.0-beta.44).
Child child;
REQUIRE(StartHarness(child, L"--real --advanced --hold-presenting-upscaled 60"));
@@ -7317,7 +7348,12 @@ TEST_CASE("region 5 carries what a Streamline title chains into its evaluation a
return; // not reached after the REQUIRE; said in the form a static analyser follows (cpp:S2259)
}
REQUIRE(WaitForIdentityHook(r.st));
const auto slConstants = static_cast<uint32_t>(fl::FL_HOOK_SL_CONSTANTS);
const auto slConstants = static_cast<uint32_t>(fl::FL_HOOK_SL_CONSTANTS);
const auto slFeatures = static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_VERSION) |
static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_REQUIREMENTS);
const char* const featureExports[2] = {"slGetFeatureVersion", "slGetFeatureRequirements"};
unsigned char featurePristine[2][16]{};
unsigned char featureNow[16]{};
// ---- 1. NEVER ASKED (owner decision D111): the evaluation is hooked, the game calls slSetConstants every frame,
// and that export is not patched -- its first bytes in the target are the file's -- nor is anything kept.
@@ -7331,26 +7367,54 @@ TEST_CASE("region 5 carries what a Streamline title chains into its evaluation a
REQUIRE(r.st->writeIndex > atHooks + 30u);
CHECK(RegionFiveIsZero(r));
CHECK((r.st->hooksInstalledMask & slConstants) == 0u);
CHECK((r.st->hooksInstalledMask & slFeatures) == 0u);
REQUIRE(ReadTargetExportBytes(child.pi.dwProcessId, FL_STUB_SL_INTERPOSER, "slSetConstants", now));
CHECK(std::memcmp(pristine, now, sizeof(now)) == 0);
for (int i = 0; i < 2; ++i) {
unsigned char featureInFile[16]{};
REQUIRE(ReadTargetExportBytes(child.pi.dwProcessId, FL_STUB_SL_INTERPOSER, featureExports[i],
featurePristine[i], featureInFile));
CHECK(std::memcmp(featurePristine[i], featureInFile, sizeof(featureInFile)) == 0); // the file's bytes
}
// ---- 2. ASKED: the patch goes in on the tick that sees the request, and the next publications carry both groups.
// ---- 2. ASKED: the patches go in on the tick that sees the request, and the next publications carry the groups.
SetAdvancedRequest(r, 1u);
REQUIRE(WaitForHookFamily(r.st, slConstants));
REQUIRE(WaitForHookFamily(r.st, static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_VERSION)));
REQUIRE(WaitForHookFamily(r.st, static_cast<uint32_t>(fl::FL_HOOK_SL_FEATURE_REQUIREMENTS)));
REQUIRE(ReadTargetExportBytes(child.pi.dwProcessId, FL_STUB_SL_INTERPOSER, "slSetConstants", now));
CHECK(std::memcmp(pristine, now, sizeof(now)) != 0); // patched now
for (int i = 0; i < 2; ++i) {
REQUIRE(ReadTargetExportBytes(child.pi.dwProcessId, FL_STUB_SL_INTERPOSER, featureExports[i], featureNow));
CHECK(std::memcmp(featurePristine[i], featureNow, sizeof(featureNow)) != 0);
}
const auto wanted = fl::FL_ADV_VALID_DLSS_OPTIONS | fl::FL_ADV_VALID_SL_CONSTANTS | fl::FL_ADV_VALID_SL_FEATURES;
fl::FlAdvancedState a{};
REQUIRE(ReadAdvanced(r, 1u, a, 0u, fl::FL_ADV_VALID_DLSS_OPTIONS | fl::FL_ADV_VALID_SL_CONSTANTS));
// A reset arrives on one frame in sixty-four and both halves of each alternation within two: read on until the
// summaries hold all of them (bounded by ReadAdvanced's own wait, a few publications).
for (int i = 0; i < 8 && (a.slResets == 0u || a.slFovMinBits == a.slFovMaxBits); ++i) {
REQUIRE(ReadAdvanced(r, 1u, a, a.samples, fl::FL_ADV_VALID_DLSS_OPTIONS | fl::FL_ADV_VALID_SL_CONSTANTS));
REQUIRE(ReadAdvanced(r, 1u, a, 0u, wanted));
// A reset arrives on one frame in sixty-four, both halves of each alternation within two, and the questions about
// a feature on one frame in sixteen: read on until the summaries hold all of them (bounded by ReadAdvanced's own
// wait, a few publications).
for (int i = 0; i < 8 && (a.slResets == 0u || a.slFovMinBits == a.slFovMaxBits ||
!FeatureSlotIs(FeatureSlotOf(a, kFeatureIdDlssG), kAdvFeatureDlssG));
++i) {
REQUIRE(ReadAdvanced(r, 1u, a, a.samples, wanted));
}
INFO("mask 0x" << std::hex << a.validMask << " true 0x" << a.slFlagsSeenTrue << " false 0x" << a.slFlagsSeenFalse
<< std::dec << " calls " << a.slConstantsCalls << " resets " << a.slResets << " version "
<< a.dlssStructVersion << " output " << a.dlssOutputWidth << "x" << a.dlssOutputHeight);
CHECK(a.validMask == static_cast<uint32_t>(fl::FL_ADV_VALID_DLSS_OPTIONS | fl::FL_ADV_VALID_SL_CONSTANTS));
CHECK(a.validMask == static_cast<uint32_t>(wanted));
// What Streamline answered about a feature: a slot for each of the two it answered for, in the order asked, with
// exactly the stub's numbers and both questions marked as answered. NOT the one it refused -- its struct came
// back full of 99s -- and NOT the one asked about with a struct whose GUID was broken, which it did answer.
CHECK(FeatureSlotIs(FeatureSlotOf(a, kFeatureIdDlss), kAdvFeatureDlss));
CHECK(FeatureSlotIs(FeatureSlotOf(a, kFeatureIdDlssG), kAdvFeatureDlssG));
CHECK(FeatureSlotOf(a, kFeatureIdNis) == nullptr);
CHECK(FeatureSlotOf(a, kFeatureIdPcl) == nullptr);
CHECK(a.features[0] == kFeatureIdDlss + 1u);
CHECK(a.features[FL_ADV_FEATURE_WORDS] == kFeatureIdDlssG + 1u);
CHECK(a.features[size_t{2} * FL_ADV_FEATURE_WORDS] == 0u); // two features, two slots
// The options chained into the evaluation, as before.
CHECK(a.dlssStructVersion == 3u); // the version these headers declare, which is what entitles the tail
@@ -7395,7 +7459,6 @@ TEST_CASE("region 5 carries what a Streamline title chains into its evaluation a
CHECK(a.ffxSharpnessMinBits == FL_ADV_FLOAT_NONE); // a float nobody saw is "none", never 0.0
CHECK(a.ffxMemoryQueries == 0u);
CHECK(FfxFgConfigIsUnread(a)); // a Streamline title with no FidelityFX: nothing calls ffxConfigure
CHECK(LaterGroupsAreZero(a));
// ---- 3. NO LONGER ASKED: the detour forwards without looking, the region is as it was left, and the patch stays
// (it is never taken out mid-session).
@@ -7406,9 +7469,11 @@ TEST_CASE("region 5 carries what a Streamline title chains into its evaluation a
TickFor(r, 2500);
CHECK(std::memcmp(&held, RegionFive(r), sizeof(held)) == 0);
CHECK((r.st->hooksInstalledMask & slConstants) != 0u);
CHECK((r.st->hooksInstalledMask & slFeatures) == slFeatures);
REQUIRE(ReadTargetExportBytes(child.pi.dwProcessId, FL_STUB_SL_INTERPOSER, "slSetConstants", now));
CHECK(std::memcmp(pristine, now, sizeof(now)) != 0);
// The stub's answers carry wild pointers (the tag list, the Vulkan extension names): followed, they would fault.
CHECK(r.st->faultCount == 0u);
CHECK(r.st->status == fl::FL_STATUS_READY);
@@ -7435,6 +7500,12 @@ TEST_CASE("region 5 carries what a Streamline title chains into its evaluation a
CHECK(std::memcmp(pristine, now, sizeof(now)) == 0);
CHECK(text.find("HOOK_INSTALLED sl.interposer.dll!slSetConstants") != std::string::npos);
CHECK(text.find("UNHOOK_RESTORED sl.interposer.dll!slSetConstants") != std::string::npos);
for (int i = 0; i < 2; ++i) {
REQUIRE(ReadTargetExportBytes(child.pi.dwProcessId, FL_STUB_SL_INTERPOSER, featureExports[i], featureNow));
CHECK(std::memcmp(featurePristine[i], featureNow, sizeof(featureNow)) == 0);
CHECK(text.find(std::string("HOOK_INSTALLED sl.interposer.dll!") + featureExports[i]) != std::string::npos);
CHECK(text.find(std::string("UNHOOK_RESTORED sl.interposer.dll!") + featureExports[i]) != std::string::npos);
}
CHECK(text.find("UNHOOK_DECLINED") == std::string::npos);
CHECK(text.find("PATCH_FAILED") == std::string::npos);
}
+169 -2
View File
@@ -121,7 +121,12 @@
// the camera's position and axes - which the Overlay never reads - set to loud, changing values;
// and the ffx hold calls ffxConfigure every frame with a frame-generation configuration
// (kAdvFfxFg*) and with a key-value one, the swapchain, the contexts, the HUD-less resource and
// the frame id - never read either - loud and changing
// the frame id - never read either - loud and changing.
// Since 0.1.0-beta.44 the upscaled hold also asks the stub slGetFeatureVersion and
// slGetFeatureRequirements every sixteenth frame - a real game asks while it starts; this one asks
// again so that a hook installed later sees an answer - about DLSS and DLSS frame generation
// (answered), NIS (refused, with loud numbers left in the struct) and PCL with a struct whose GUID
// is broken (answered, and not to be kept)
// --churn-module <dll>
// load and free the module in a loop on a thread of its own, for the life of the process: a
// module list that keeps changing under whoever reads it (the guard's D123, 2026-11-12)
@@ -2019,6 +2024,26 @@ bool ObserveSlConstantsFaults(const void* constants, fl::adv::Accumulators& a) {
}
}
// The same for the two answers about a feature (0.1.0-beta.44).
bool ObserveSlFeatureRequirementsFaults(const void* requirements, fl::adv::Accumulators& a) {
__try {
fl::adv::ObserveSlFeatureRequirements(sl::kFeatureDLSS,
*static_cast<const sl::FeatureRequirements*>(requirements), a);
return false;
} __except (EXCEPTION_EXECUTE_HANDLER) {
return true;
}
}
bool ObserveSlFeatureVersionFaults(const void* version, fl::adv::Accumulators& a) {
__try {
fl::adv::ObserveSlFeatureVersion(sl::kFeatureDLSS, *static_cast<const sl::FeatureVersion*>(version), a);
return false;
} __except (EXCEPTION_EXECUTE_HANDLER) {
return true;
}
}
bool ProbeAdvFields() {
g_failures = 0;
const auto bitsOf = [](float v) { return std::bit_cast<uint32_t>(v); };
@@ -2315,7 +2340,7 @@ bool ProbeAdvFields() {
for (uint32_t i = 0; i < FL_ADV_FEATURE_SLOTS * FL_ADV_FEATURE_WORDS; ++i) {
untouched = untouched && region->features[i] == 0u;
}
Check(untouched, "what a later release fills stays zero");
Check(untouched, "what no call wrote stays zero: the configure, the constants, every feature slot");
// A NEW REQUEST: a second session of a game that kept running. Its summaries are its own.
fl::adv::Reset(a);
@@ -2463,6 +2488,125 @@ bool ProbeAdvFields() {
}
}
// --- slGetFeatureVersion and slGetFeatureRequirements: Streamline's answers about a feature (0.1.0-beta.44) -----
{
fl::adv::Accumulators a;
sl::FeatureVersion v;
v.versionSL = sl::Version(2, 14, 1);
v.versionNGX = sl::Version(310, 4, 0);
fl::adv::ObserveSlFeatureVersion(sl::kFeatureDLSS, v, a);
sl::FeatureRequirements r;
r.flags = sl::FeatureRequirementFlags::eD3D12Supported | sl::FeatureRequirementFlags::eVSyncOffRequired;
r.maxNumCPUThreads = 2;
r.maxNumViewports = 32;
r.numRequiredTags = 3;
r.osVersionDetected = sl::Version(10, 0, 26100);
r.osVersionRequired = sl::Version(10, 0, 19041);
r.driverVersionDetected = sl::Version(591, 44, 0);
r.driverVersionRequired = sl::Version(512, 15, 0);
fl::adv::ObserveSlFeatureRequirements(sl::kFeatureDLSS_G, r, a);
fl::adv::ObserveSlFeatureRequirements(sl::kFeatureDLSS, r, a);
const auto word = [&a](uint32_t slot, uint32_t i) {
return a.features[static_cast<size_t>(slot) * FL_ADV_FEATURE_WORDS + i].load();
};
Check(word(0, 0) == sl::kFeatureDLSS + 1u && word(1, 0) == sl::kFeatureDLSS_G + 1u && word(2, 0) == 0u,
"a slot per feature, in the order first asked about, the id plus one; the next slot is empty");
Check(word(0, 1) == (fl::adv::kFeatureVersionAnswered | fl::adv::kFeatureRequirementsAnswered) &&
word(1, 1) == fl::adv::kFeatureRequirementsAnswered,
"word 1 says which question has an answer: both for DLSS, the requirements alone for frame generation");
Check(word(0, 2) == 2u && word(0, 3) == 14u && word(0, 4) == 1u && word(0, 5) == 310u && word(0, 6) == 4u &&
word(0, 7) == 0u,
"the two versions: major, minor, build");
Check(word(1, 2) == 0u && word(1, 5) == 0u, "a version nobody asked for is not there");
Check(word(1, 8) == 10u && word(1, 9) == 2u && word(1, 10) == 32u && word(1, 11) == 3u,
"the flags (D3D12 | V-Sync off required), the threads, the viewports, the number of required tags");
Check(word(1, 12) == 10u && word(1, 14) == 26100u && word(1, 15) == 10u && word(1, 17) == 19041u &&
word(1, 18) == 591u && word(1, 19) == 44u && word(1, 21) == 512u && word(1, 22) == 15u,
"Windows and the driver: what was found, then what is required");
Check((a.validMask.load() & fl::FL_ADV_VALID_SL_FEATURES) != 0u, "and the group is marked as read");
// The last answer about a feature is the one kept, in the slot it already has.
v.versionNGX = sl::Version(310, 5, 2);
fl::adv::ObserveSlFeatureVersion(sl::kFeatureDLSS, v, a);
Check(word(0, 6) == 5u && word(0, 7) == 2u && word(2, 0) == 0u, "asked again: the same slot, the newer answer");
// A NEW REQUEST KEEPS THEM: a fact about the process, and a game asks once.
fl::adv::Reset(a);
auto* region = new fl::FlAdvancedState{};
fl::adv::Publish(a, region, 9u, 1u);
Check(region->features[0] == sl::kFeatureDLSS + 1u && region->features[FL_ADV_FEATURE_WORDS + 8u] == 10u &&
region->validMask == static_cast<uint32_t>(fl::FL_ADV_VALID_SL_FEATURES),
"a new request publishes the slots as they were, and their bit of the mask with them - alone");
delete region;
// TWELVE SLOTS: a thirteenth feature is not kept, and the id that cannot be stored plus one is refused.
fl::adv::Accumulators full;
for (uint32_t f = 0; f < FL_ADV_FEATURE_SLOTS + 1u; ++f) {
fl::adv::ObserveSlFeatureVersion(100u + f, v, full);
}
fl::adv::ObserveSlFeatureVersion(0xFFFFFFFFu, v, full);
bool twelve = true;
for (uint32_t i = 0; i < FL_ADV_FEATURE_SLOTS; ++i) {
twelve = twelve && full.features[static_cast<size_t>(i) * FL_ADV_FEATURE_WORDS].load() == 101u + i;
}
Check(twelve,
"twelve features fill the twelve slots in order; the thirteenth and feature 0xFFFFFFFF are dropped");
// WHERE THE MEMBERS ARE, by this build's own struct: everything read lies before the Vulkan members, and the
// pointer to the tag list sits between two members that are read.
const auto at = [&r](const void* member) {
return static_cast<size_t>(static_cast<const unsigned char*>(member) -
reinterpret_cast<const unsigned char*>(&r));
};
Check(at(&r.flags) == 32u && at(&r.numRequiredTags) == 44u && at(&r.requiredTags) == 48u &&
at(&r.osVersionDetected) == 56u && at(&r.driverVersionRequired) == 92u &&
at(&r.vkNumComputeQueuesRequired) == 104u,
"the flags at 32, the tag count at 44, its pointer at 48, the four versions at 56..103, Vulkan from 104");
// NOTHING OF THE POINTERS OR THE VULKAN MEMBERS REACHES WHAT IS PUBLISHED: two structs alike in what is read
// and different in every byte that is not come out the same.
sl::FeatureRequirements p = r;
sl::FeatureRequirements q = r;
std::memset(reinterpret_cast<unsigned char*>(&p) + 48u, 0x11, 8u);
std::memset(reinterpret_cast<unsigned char*>(&q) + 48u, 0xEE, 8u);
std::memset(reinterpret_cast<unsigned char*>(&p) + 104u, 0x11, sizeof(p) - 104u);
std::memset(reinterpret_cast<unsigned char*>(&q) + 104u, 0xEE, sizeof(q) - 104u);
auto* regionP = new fl::FlAdvancedState{};
auto* regionQ = new fl::FlAdvancedState{};
fl::adv::Accumulators ap;
fl::adv::Accumulators aq;
fl::adv::ObserveSlFeatureRequirements(sl::kFeatureDLSS, p, ap);
fl::adv::ObserveSlFeatureRequirements(sl::kFeatureDLSS, q, aq);
fl::adv::Publish(ap, regionP, 5u, 1u);
fl::adv::Publish(aq, regionQ, 5u, 1u);
Check(std::memcmp(regionP, regionQ, sizeof(fl::FlAdvancedState)) == 0 && regionP->features[11] == 3u,
"two answers that differ only in the pointers and the Vulkan members publish the same bytes");
delete regionP;
delete regionQ;
// A STRUCT CUT OFF RIGHT AFTER THE LAST MEMBER READ, against a page that cannot be read: read whole, no fault.
auto* pages =
static_cast<unsigned char*>(VirtualAlloc(nullptr, 8192, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE));
DWORD old = 0;
if (pages == nullptr || !VirtualProtect(pages + 4096, 4096, PAGE_NOACCESS, &old)) {
Check(false, "two pages, the second unreadable, for the cut-off answers");
} else {
unsigned char* cut = pages + 4096 - 104u;
std::memcpy(cut, &r, 104u);
fl::adv::Accumulators edge;
Check(!ObserveSlFeatureRequirementsFaults(cut, edge) && edge.features[21].load() == 512u,
"requirements that end where the Vulkan members begin are read without a fault, to the last member");
const size_t versionSize = sizeof(sl::FeatureVersion);
unsigned char* whole = pages + 4096 - versionSize;
std::memcpy(whole, &v, versionSize);
fl::adv::Accumulators edgeVersion;
Check(!ObserveSlFeatureVersionFaults(whole, edgeVersion) && edgeVersion.features[2].load() == 2u,
"a version answer at the end of readable memory is read without a fault");
VirtualFree(pages, 0, MEM_RELEASE);
}
}
// --- ffxConfigure with a frame-generation descriptor (0.1.0-beta.43) -------------------------------------------
{
fl::adv::Accumulators a;
@@ -3133,6 +3277,17 @@ int HoldPresentingUpscaled(Gfx& g, int seconds, bool real, sl::Feature feature,
Check(false, "the stub exports slSetConstants");
return 1;
}
// --advanced, 0.1.0-beta.44: the two questions about a feature, through the stub's exports.
using StubGetFeatureVersionFn = sl::Result(STDMETHODCALLTYPE*)(sl::Feature, sl::FeatureVersion&);
using StubGetFeatureRequirementsFn = sl::Result(STDMETHODCALLTYPE*)(sl::Feature, sl::FeatureRequirements&);
auto getFeatureVersion =
reinterpret_cast<StubGetFeatureVersionFn>(reinterpret_cast<void*>(GetProcAddress(stub, "slGetFeatureVersion")));
auto getFeatureRequirements = reinterpret_cast<StubGetFeatureRequirementsFn>(
reinterpret_cast<void*>(GetProcAddress(stub, "slGetFeatureRequirements")));
if (advanced && (getFeatureVersion == nullptr || getFeatureRequirements == nullptr)) {
Check(false, "the stub exports slGetFeatureVersion and slGetFeatureRequirements");
return 1;
}
sl::Constants constants;
sl::Constants otherConstants;
sl::ViewportHandle otherViewport{kAdvSlOtherViewport};
@@ -3188,6 +3343,18 @@ int HoldPresentingUpscaled(Gfx& g, int seconds, bool real, sl::Feature feature,
constants.cameraFwd = {loud + 19.0f, loud + 20.0f, loud + 21.0f};
setConstants(constants, g_dummyFrameToken, viewport);
setConstants(otherConstants, g_dummyFrameToken, otherViewport);
if ((evaluated % 16) == 3) {
for (const sl::Feature asked : {sl::kFeatureDLSS, sl::kFeatureDLSS_G, sl::kFeatureNIS}) {
sl::FeatureVersion version;
sl::FeatureRequirements requirements;
getFeatureVersion(asked, version);
getFeatureRequirements(asked, requirements);
}
// A struct that is not the one the headers describe: the stub answers, and nothing may be kept.
sl::FeatureVersion broken;
broken.structType = sl::StructType{};
getFeatureVersion(sl::kFeaturePCL, broken);
}
}
// ONE EVALUATION PER PRESENT, which is what a real upscaled title does
// and what makes the drained record's identity checkable frame by frame.
@@ -62,6 +62,9 @@ StubFrameToken g_tokenPool[8];
static_assert(fl::stub::InventoryHas("slGetNewFrameToken"),
"fl_hook_inventory.h no longer contains \"slGetNewFrameToken\", so the frame-token fixture would "
"exercise a row the Overlay does not install.");
static_assert(fl::stub::InventoryHas("slGetFeatureVersion") && fl::stub::InventoryHas("slGetFeatureRequirements"),
"fl_hook_inventory.h no longer contains \"slGetFeatureVersion\" or \"slGetFeatureRequirements\", so the "
"feature fixture would exercise a row the Overlay does not install.");
static_assert(fl::stub::InventoryHas("slSetConstants"),
"fl_hook_inventory.h no longer contains \"slSetConstants\", so the constants fixture would exercise a "
"row the Overlay does not install.");
@@ -157,6 +160,72 @@ SL_API sl::Result slSetConstants(const sl::Constants& values, const sl::FrameTok
return sl::Result::eOk;
}
// The two questions a game asks about a feature (0.1.0-beta.44). Signatures from the vendored header. The stub
// ANSWERS for DLSS and for DLSS frame generation with fixed numbers the injected case mirrors (guard_test.cpp
// kAdvFeature*), answers for PCL too -- the harness asks about that one with a struct whose GUID it has broken, which
// the Overlay must not keep -- and REFUSES every other feature after writing loud numbers into the struct, as a
// refusal that leaves rubbish behind: a detour that kept a refused answer would publish 99s.
SL_API sl::Result slGetFeatureVersion(sl::Feature feature, sl::FeatureVersion& version) {
if (feature == sl::kFeatureDLSS) {
version.versionSL = sl::Version(2, 14, 1);
version.versionNGX = sl::Version(310, 4, 0);
return sl::Result::eOk;
}
if (feature == sl::kFeatureDLSS_G) {
version.versionSL = sl::Version(2, 14, 1);
version.versionNGX = sl::Version(310, 4, 1);
return sl::Result::eOk;
}
if (feature == sl::kFeaturePCL) {
version.versionSL = sl::Version(7, 7, 7);
version.versionNGX = sl::Version(7, 7, 7);
return sl::Result::eOk;
}
version.versionSL = sl::Version(99, 99, 99);
version.versionNGX = sl::Version(99, 99, 99);
return sl::Result::eErrorFeatureMissing;
}
// THE POINTERS ARE WILD ON PURPOSE: the Overlay keeps the count of required tags and never the list, and nothing of
// the Vulkan members. An address of 1 is not readable in any process; a detour that followed either would fault, and
// the injected case asserts that none was counted.
SL_API sl::Result slGetFeatureRequirements(sl::Feature feature, sl::FeatureRequirements& requirements) {
requirements.requiredTags = reinterpret_cast<const sl::BufferType*>(static_cast<uintptr_t>(1));
requirements.vkNumDeviceExtensions = 3;
requirements.vkDeviceExtensions = reinterpret_cast<const char**>(static_cast<uintptr_t>(1));
requirements.vkNumInstanceExtensions = 2;
requirements.vkInstanceExtensions = reinterpret_cast<const char**>(static_cast<uintptr_t>(1));
requirements.osVersionDetected = sl::Version(10, 0, 26100);
requirements.osVersionRequired = sl::Version(10, 0, 19041);
requirements.driverVersionDetected = sl::Version(591, 44, 0);
if (feature == sl::kFeatureDLSS) {
requirements.flags = sl::FeatureRequirementFlags::eD3D11Supported |
sl::FeatureRequirementFlags::eD3D12Supported |
sl::FeatureRequirementFlags::eVulkanSupported;
requirements.maxNumCPUThreads = 2;
requirements.maxNumViewports = 32;
requirements.numRequiredTags = 3;
requirements.driverVersionRequired = sl::Version(512, 15, 0);
return sl::Result::eOk;
}
if (feature == sl::kFeatureDLSS_G) {
requirements.flags = sl::FeatureRequirementFlags::eD3D12Supported |
sl::FeatureRequirementFlags::eVSyncOffRequired |
sl::FeatureRequirementFlags::eHardwareSchedulingRequired;
requirements.maxNumCPUThreads = 1;
requirements.maxNumViewports = 1;
requirements.numRequiredTags = 4;
requirements.driverVersionRequired = sl::Version(551, 23, 0);
return sl::Result::eOk;
}
requirements.flags = sl::FeatureRequirementFlags::eAll;
requirements.maxNumCPUThreads = 99;
requirements.maxNumViewports = 99;
requirements.numRequiredTags = 99;
requirements.driverVersionRequired = sl::Version(99, 99, 99);
return sl::Result::eErrorFeatureMissing;
}
SL_API sl::Result slGetNewFrameToken(sl::FrameToken*& token, const uint32_t* frameIndex) {
// The vendor's contract in miniature: an explicit index returns THAT frame's
// token (the same object on a re-request), no index advances to a new one.
@@ -289,6 +289,85 @@ public sealed class AgentEndToEndTests : IDisposable
}
}
[Fact]
public async Task WhatTheGameTellsStreamlineAndIsAnsweredAboutAFeatureIsStoredByASessionThatRecordsAdvancedMetrics()
{
// The Streamline side of the same road, end to end (0.1.0-beta.44; until then no Agent test ran a Streamline
// target): the shipped Agent, the real Overlay, and a target that chains its DLSS options into every
// evaluation, calls slSetConstants every frame and asks the stub interposer about a feature every sixteenth -
// which is what lets a session that attached after the game's start still see an answer. Three calls hooked
// only because this session asked.
(await GrantConsentAsync()).Should().Be(ConsentWriteOutcome.Written);
Process harness = await StartHarnessAsync("--real --advanced --hold-presenting-upscaled 90");
try
{
await SetAdvancedMetricsAsync(on: true);
using (Process on = StartAgent("capture", "--exe", ConsentedExecutable, "--seconds", "10"))
{
(string output, int exit) = await FinishAsync(on);
exit.Should().Be(0, output);
}
LedgerDatabase db = await LedgerDatabase.OpenAsync(Ledger, ct: TestContext.Current.CancellationToken).ConfigureAwait(true);
await using (db.ConfigureAwait(true))
{
var sessions = new SqliteSessionRepository(db);
SessionRow session = (await sessions.ListRecentAsync(1, TestContext.Current.CancellationToken).ConfigureAwait(true)).Should().ContainSingle().Subject;
session.Tier.Should().Be(CaptureTier.Hooked);
AdvancedSessionRow row = (await sessions.FindAdvancedAsync(session.Id, TestContext.Current.CancellationToken).ConfigureAwait(true)).Should().BeOfType<AdvancedSessionRow>().Subject;
AssertWhatTheHarnessToldStreamline(row);
}
}
finally
{
Kill(harness);
}
}
/// <summary>The stored row of a session that asked, against what <c>hook-harness --advanced</c> tells Streamline and the stub interposer answers.</summary>
private static void AssertWhatTheHarnessToldStreamline(AdvancedSessionRow row)
{
(IReadOnlyList<AdvancedFact> facts, AdvancedSources sources) = AdvancedJson.ParseSession(row.FactsJson);
string[] Rows(string id) => [.. facts.Single(f => string.Equals(f.Id, id, StringComparison.Ordinal)).Value.Rows!.Select(static r => r.Name + "=" + r.Value)];
// What the harness tells slSetConstants for its first viewport (main.cpp, kAdvSl*).
Rows("sl.constants.jitter").Should().Equal("jitterOffset.x=≤ 0.3125", "jitterOffset.y=≤ 0.4375");
Rows("sl.constants.depth").Should().Equal("cameraNear=0.25", "cameraFar=4000", "depthInverted=on");
Rows("sl.constants.projection").Should().Equal("cameraFOV=0.8 – 1.2 rad (45.8° – 68.8°)", "cameraAspectRatio=1.75", "orthographicProjection=off");
// What the stub interposer answers about the two features it knows (stub_sl_interposer.cpp), and
// nothing of the one it refuses or of the one asked about with a struct that is not the headers'.
Rows("sl.feature.versions").Should().Equal(
"kFeatureDLSS · versionSL=2.14.1",
"kFeatureDLSS · versionNGX=310.4.0",
"kFeatureDLSS_G · versionSL=2.14.1",
"kFeatureDLSS_G · versionNGX=310.4.1");
Rows("sl.feature.requirements").Should().Equal(
"kFeatureDLSS · flags=eD3D11Supported, eD3D12Supported, eVulkanSupported",
"kFeatureDLSS · maxNumCPUThreads=2",
"kFeatureDLSS · maxNumViewports=32",
"kFeatureDLSS · numRequiredTags=3",
"kFeatureDLSS · osVersionDetected=10.0.26100",
"kFeatureDLSS · osVersionRequired=10.0.19041",
"kFeatureDLSS · driverVersionDetected=591.44.0",
"kFeatureDLSS · driverVersionRequired=512.15.0",
"kFeatureDLSS_G · flags=eD3D12Supported, eVSyncOffRequired, eHardwareSchedulingRequired",
"kFeatureDLSS_G · maxNumCPUThreads=1",
"kFeatureDLSS_G · maxNumViewports=1",
"kFeatureDLSS_G · numRequiredTags=4",
"kFeatureDLSS_G · osVersionDetected=10.0.26100",
"kFeatureDLSS_G · osVersionRequired=10.0.19041",
"kFeatureDLSS_G · driverVersionDetected=591.44.0",
"kFeatureDLSS_G · driverVersionRequired=551.23.0");
sources.InGame.Should().Be(AdvancedInGameStatus.Reading, row.FactsJson);
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineFeatureVersion.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineFeatureRequirements.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.FsrFrameGeneration.Should().Be(AdvancedInGameCall.NotHooked, "this target loads no FidelityFX library: " + row.FactsJson);
}
/// <summary>The stored row of a session that asked, against what <c>hook-harness --advanced --ffx-memory-query</c> sends and the FSR stub answers.</summary>
private static void AssertWhatTheHarnessToldFsr(AdvancedSessionRow row)
{
@@ -314,6 +393,8 @@ public sealed class AgentEndToEndTests : IDisposable
"generationRect=1920 × 1080 at 0, 0");
sources.FsrFrameGeneration.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
sources.StreamlineFeatureVersion.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
sources.StreamlineFeatureRequirements.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats = AdvancedJson.ParseStats(row.StatsJson);
stats.Should().ContainKey(InGameAdvancedSampler.FrameTimeSeries, row.StatsJson);
@@ -241,7 +241,7 @@ public sealed class AdvancedPresenterTests
At(live, id).Status.Should().Be(Strings.Advanced_Status_InGame);
}
At(live, "sl.feature.versions").Status.Should().Be(AdvancedLabels.Reach(AdvancedReach.NewHook), "a hook that is not built is still a later release");
At(live, "sl.init.preferences").Status.Should().Be(AdvancedLabels.Reach(AdvancedReach.NewHook), "a hook that is not built is still a later release");
live.Where(static r => r.IsRead).Should().HaveCount(AdvancedMetricCatalog.All.Count(static m => m.IsRead));
}
@@ -311,6 +311,39 @@ public sealed class AdvancedPresenterTests
AdvancedLabels.InGameCall(AdvancedInGameCall.NeverCalled).Should().NotBe(AdvancedLabels.InGameCall(AdvancedInGameCall.NotHooked), "the two reasons a value is absent are not one");
}
[Fact]
public void ASessionsSourcesLineSaysOfTheTwoQuestionsAboutAFeatureThatAGameAsksThemWhileItStarts()
{
// 0.1.0-beta.44. A game asks which version a feature is and what it requires while it starts; a session that
// attached later finds the hook in and the call not made. That is said in words of its own - "did not ask
// again" - and not as the finding "the game did not make the call" is for a call made every frame.
AdvancedSources beta43 = AdvancedFixtures.Sources with
{
InGame = AdvancedInGameStatus.Reading,
StreamlineConstants = AdvancedInGameCall.Read,
FsrFrameGeneration = AdvancedInGameCall.NotHooked,
};
string before = AdvancedPresenter.SourcesLine(beta43);
before.Should().NotContain(Strings.AdvInGameCall_NotAskedAgain, "a row stored before says nothing of the two");
string line = AdvancedPresenter.SourcesLine(beta43 with
{
StreamlineFeatureVersion = AdvancedInGameCall.Read,
StreamlineFeatureRequirements = AdvancedInGameCall.NeverCalled,
});
line.Should().StartWith(before, "what was said before is said as before");
line.Should().EndWith(string.Format(
CultureInfo.CurrentCulture,
Strings.Advanced_InGameFeatureCallsLine,
AdvancedLabels.InGameCall(AdvancedInGameCall.Read),
Strings.AdvInGameCall_NotAskedAgain));
AdvancedLabels.InGameStartupCall(AdvancedInGameCall.NeverCalled).Should().NotBe(AdvancedLabels.InGameCall(AdvancedInGameCall.NeverCalled));
AdvancedLabels.InGameStartupCall(AdvancedInGameCall.NotHooked).Should().Be(AdvancedLabels.InGameCall(AdvancedInGameCall.NotHooked), "not hooked is not hooked, whenever the call is made");
AdvancedLabels.InGameStartupCall(AdvancedInGameCall.Read).Should().Be(AdvancedLabels.InGameCall(AdvancedInGameCall.Read));
}
[Fact]
public void AValueIsShownInItsUnitAndAFlagAsYesOrNo()
{
@@ -145,7 +145,7 @@ public sealed class AdvancedJsonTests
new("nvapi.gpu.board_serial", Instance: null, AdvancedValue.OfText("0123456789")),
new("nvapi.display.edid", "1", AdvancedValue.OfText("00ffffffffffff00")),
new("sl.constants.camera", Instance: null, AdvancedValue.OfText("1.0 2.0 3.0")),
new("sl.feature.versions", Instance: null, AdvancedValue.OfText("DLSS 3.7.0")),
new("sl.init.preferences", Instance: null, AdvancedValue.OfText("eDisableCLStateTracking")),
new("sl.dlss.presets", Instance: null, AdvancedValue.OfRows([new AdvancedRow("DLAA", "K")])),
new("no.such.metric", Instance: null, AdvancedValue.Of(1)),
new("lhm.board.model", Instance: null, AdvancedValue.OfText("ASUS ROG STRIX Z790-E")),
@@ -195,6 +195,32 @@ public sealed class AdvancedJsonTests
older.FsrFrameGeneration.Should().BeNull();
}
[Fact]
public void WhatBecameOfTheTwoQuestionsAboutAFeatureSurvivesTheLedgerAndAnOlderRowSaysNothingOfThem()
{
AdvancedSources written = AdvancedSources.Unknown with
{
InGame = AdvancedInGameStatus.Reading,
StreamlineConstants = AdvancedInGameCall.Read,
FsrFrameGeneration = AdvancedInGameCall.NotHooked,
StreamlineFeatureVersion = AdvancedInGameCall.Read,
StreamlineFeatureRequirements = AdvancedInGameCall.NeverCalled,
};
string json = AdvancedJson.OfSession([], written);
(_, AdvancedSources read) = AdvancedJson.ParseSession(json);
json.Should().Contain("\"streamlineFeatureVersion\":\"Read\"").And.Contain("\"streamlineFeatureRequirements\":\"NeverCalled\"");
read.Should().Be(written);
// 0.1.0-beta.43 wrote exactly this: the two calls of that release and neither of these.
const string beta43 = """{"facts":[],"sources":{"nvapi":"Reading","sensors":"Reading","elevatedSensors":"Reading","inGame":"Reading","streamlineConstants":"Read","fsrFrameGeneration":"NeverCalled"}}""";
(_, AdvancedSources older) = AdvancedJson.ParseSession(beta43);
older.StreamlineConstants.Should().Be(AdvancedInGameCall.Read);
older.StreamlineFeatureVersion.Should().BeNull("a row that never said is not a row that said the hook was not in");
older.StreamlineFeatureRequirements.Should().BeNull();
}
[Theory]
[InlineData(AdvancedInGameStatus.Reading)]
[InlineData(AdvancedInGameStatus.NothingSeen)]
@@ -107,6 +107,7 @@ public sealed partial class AdvancedMetricCatalogTests
// Train B, 0.1.0-beta.40: thirteen entries, each a member of a call the Overlay already hooked - and each
// matched by a name on tools/overlay-allowed-fields.txt, which a build gate holds to the Overlay's own code.
// 0.1.0-beta.43: six more, from the two calls hooked only for Advanced metrics (slSetConstants, ffxConfigure).
// 0.1.0-beta.44: two more, what Streamline answers about a feature (slGetFeatureVersion, slGetFeatureRequirements).
// Everything else of Streamline and FidelityFX is still named, not read; NGX and XeSS are never read.
string[] inGame = [.. _all.Where(static m => m.Reach == AdvancedReach.Game).Select(static m => m.Id)];
inGame.Should().Equal(
@@ -114,7 +115,10 @@ public sealed partial class AdvancedMetricCatalogTests
"ffx.upscale.sharpening", "ffx.upscale.jitter", "ffx.upscale.exposure", "ffx.upscale.depth", "ffx.upscale.flags",
"ffx.upscale.frame_time_delta", "ffx.memory_usage",
"sl.constants.jitter", "sl.constants.motion_vectors", "sl.constants.depth", "sl.constants.projection", "sl.constants.resets",
"ffx.framegen.config");
"ffx.framegen.config",
"sl.feature.versions", "sl.feature.requirements");
// What a game starts Streamline with is still not read (D112: slInit is not hooked).
AdvancedMetricCatalog.Find("sl.init.preferences")!.Reach.Should().Be(AdvancedReach.NewHook);
// The camera's position, axes and matrices are in the same struct as the constants read, and are the player's.
AdvancedMetricCatalog.Find("sl.constants.camera")!.Reach.Should().Be(AdvancedReach.PlayerState);
@@ -152,7 +152,7 @@ public sealed class InGameAdvancedSamplerTests
sampler.Take(new InGameAdvanced(s));
Rows(Fact(sampler, "ffx.upscale.sharpening")).Should().Equal("enableSharpening=on_and_off", "sharpness=0.2 – 0.35");
InGameAdvancedSampler.Tokens.Should().Contain(["on", "off", "on_and_off", "none", "draw_debug_view", "non_linear_color_srgb", "non_linear_color_pq"],
InGameAdvancedSampler.Tokens.Should().Contain(["on", "off", "on_and_off", "none", "not_radians", "draw_debug_view", "non_linear_color_srgb", "non_linear_color_pq"],
"each is a word the App has in three languages; a test there holds it to this list");
Fact(sampler, "ffx.upscale.exposure").Value.Text.Should().Be("1.25 – 2");
Rows(Fact(sampler, "ffx.upscale.depth")).Should().Contain("cameraFovAngleVertical=0.9 rad (51.6°)", "one value is said once");
@@ -277,10 +277,138 @@ public sealed class InGameAdvancedSamplerTests
Rows(Fact(other, "ffx.framegen.config")).Should().Equal(
"frameGenerationEnabled=on_and_off", "onlyPresentGenerated=off", "flags=DRAW_DEBUG_TEAR_LINES, bit 9");
// A rectangle with no area is one the game did not give.
// A rectangle with no area is one the game did not give. A configure that set no flag says so, as an upscale
// does (0.1.0-beta.44): the row was missing, and "no row" read as "not read".
var none = new InGameAdvancedSampler();
none.Take(new InGameAdvanced(InGameStates.WithRect(InGameStates.FrameGeneration() with { FfxFgFlagsSeen = 0 }, 0, 0, 0, 0)));
Rows(Fact(none, "ffx.framegen.config")).Should().Equal("frameGenerationEnabled=on", "allowAsyncWorkloads=off", "onlyPresentGenerated=off");
AdvancedFact noFlags = Fact(none, "ffx.framegen.config");
Rows(noFlags).Should().Equal("frameGenerationEnabled=on", "allowAsyncWorkloads=off", "onlyPresentGenerated=off", "flags=none");
noFlags.Value.Rows![3].Token.Should().Be("none", "the App translates the word");
}
[Fact]
public void AFieldOfViewOverPiIsSaidAsTheGameGaveItAndNeverConverted()
{
// D128. Cyberpunk 2077 gives Streamline its field of view in degrees - 51.0055 to 90 on 2026-11-12 - where the
// vendor's header says radians, and the row read "51.0055 - 90 rad (2922.4 deg - 5156.6 deg)". A value over pi
// cannot be radians: it is said as given, a second row says what it is not, and nothing is converted.
var sampler = new InGameAdvancedSampler();
sampler.Take(new InGameAdvanced(InGameStates.Streamline() with { SlFovMinBits = InGameStates.Bits(51.0055f), SlFovMaxBits = InGameStates.Bits(90f) }));
AdvancedFact projection = Fact(sampler, "sl.constants.projection");
Rows(projection).Should().Equal("cameraFOV=51.0055 – 90", "cameraFOV unit=not_radians", "cameraAspectRatio=1.75", "orthographicProjection=off");
projection.Value.Rows![0].Token.Should().BeNull("the number is the game's");
projection.Value.Rows![1].Token.Should().Be("not_radians", "the App says it in three languages");
// One value, and FSR's field the same way; a range that only ends over pi is not half radians.
var one = new InGameAdvancedSampler();
one.Take(new InGameAdvanced(InGameStates.Ffx() with { FfxFovMinBits = InGameStates.Bits(75f), FfxFovMaxBits = InGameStates.Bits(75f) }));
Rows(Fact(one, "ffx.upscale.depth")).Should().ContainInOrder("cameraFovAngleVertical=75", "cameraFovAngleVertical unit=not_radians");
var mixed = new InGameAdvancedSampler();
mixed.Take(new InGameAdvanced(InGameStates.Streamline() with { SlFovMinBits = InGameStates.Bits(1.2f), SlFovMaxBits = InGameStates.Bits(3.5f) }));
Rows(Fact(mixed, "sl.constants.projection")).Take(2).Should().Equal("cameraFOV=1.2 – 3.5", "cameraFOV unit=not_radians");
// Pi itself is a radian: a half-turn, which no game renders, and still not this rule's to refuse.
var edge = new InGameAdvancedSampler();
edge.Take(new InGameAdvanced(InGameStates.Streamline() with { SlFovMinBits = InGameStates.Bits(3.0f), SlFovMaxBits = InGameStates.Bits(3.0f) }));
Rows(Fact(edge, "sl.constants.projection")).Take(2).Should().Equal("cameraFOV=3 rad (171.9°)", "cameraAspectRatio=1.75");
}
[Fact]
public void WhatStreamlineAnsweredAboutEachFeatureIsTwoFactsInTheVendorsOwnNames()
{
// 0.1.0-beta.44: slGetFeatureVersion and slGetFeatureRequirements. A slot per feature in the order the game
// first asked, every name the vendor's - the feature's constant, the struct's member, the flag's enumerator.
var sampler = new InGameAdvancedSampler();
sampler.Take(new InGameAdvanced(InGameStates.Features()));
Rows(Fact(sampler, "sl.feature.versions")).Should().Equal(
"kFeatureDLSS · versionSL=2.14.1",
"kFeatureDLSS · versionNGX=310.4.0",
"kFeatureDLSS_G · versionSL=2.14.1",
"kFeatureDLSS_G · versionNGX=310.4.1");
Rows(Fact(sampler, "sl.feature.requirements")).Should().Equal(
"kFeatureDLSS · flags=eD3D11Supported, eD3D12Supported, eVulkanSupported",
"kFeatureDLSS · maxNumCPUThreads=2",
"kFeatureDLSS · maxNumViewports=32",
"kFeatureDLSS · numRequiredTags=3",
"kFeatureDLSS · osVersionDetected=10.0.26100",
"kFeatureDLSS · osVersionRequired=10.0.19041",
"kFeatureDLSS · driverVersionDetected=591.44.0",
"kFeatureDLSS · driverVersionRequired=512.15.0",
"kFeatureDLSS_G · flags=eD3D12Supported, eVSyncOffRequired, eHardwareSchedulingRequired",
"kFeatureDLSS_G · maxNumCPUThreads=1",
"kFeatureDLSS_G · maxNumViewports=1",
"kFeatureDLSS_G · numRequiredTags=4",
"kFeatureDLSS_G · osVersionDetected=10.0.26100",
"kFeatureDLSS_G · osVersionRequired=10.0.19041",
"kFeatureDLSS_G · driverVersionDetected=591.44.0",
"kFeatureDLSS_G · driverVersionRequired=551.23.0");
sampler.Facts.Should().Contain(static f => string.Equals(f.Id, "sl.constants.jitter", StringComparison.Ordinal), "the constants of the same game stay beside them");
}
[Fact]
public void AFeatureAnsweredInPartAnIdWithNoNameAndAVersionNobodyStatedAreSaidAsTheyAre()
{
// Slot 0: only the version, of a feature with no NGX model - no versionNGX row. Slot 1: only the requirements,
// of an id this build has no name for, two flag bits the header does not name, counts of 0 that are counts, and
// one version stated out of four. Slot 2: a feature that requires nothing says so. Slot 4 is past an empty slot:
// slots fill from 0, so it is not a slot.
FlAdvancedState s = InGameStates.WithFeature(InGameStates.Empty(), 0, 3, FlAdvancedState.FeatureVersionAnswered, 2, 14, 1);
s = InGameStates.WithFeature(s, 1, 4242, FlAdvancedState.FeatureRequirementsAnswered, 0, 0, 0, 0, 0, 0, 0x120, 0, 1, 0, 0, 0, 0, 10, 0, 22000);
s = InGameStates.WithFeature(s, 2, 2, FlAdvancedState.FeatureRequirementsAnswered);
s = InGameStates.WithFeature(s, 4, 5, FlAdvancedState.FeatureVersionAnswered, 9, 9, 9);
var sampler = new InGameAdvancedSampler();
sampler.Take(new InGameAdvanced(s));
Rows(Fact(sampler, "sl.feature.versions")).Should().Equal("kFeatureReflex · versionSL=2.14.1");
AdvancedFact requirements = Fact(sampler, "sl.feature.requirements");
Rows(requirements).Should().Equal(
"feature 4242 · flags=bit 5, bit 8",
"feature 4242 · maxNumCPUThreads=0",
"feature 4242 · maxNumViewports=1",
"feature 4242 · numRequiredTags=0",
"feature 4242 · osVersionRequired=10.0.22000",
"kFeatureNIS · flags=none",
"kFeatureNIS · maxNumCPUThreads=0",
"kFeatureNIS · maxNumViewports=0",
"kFeatureNIS · numRequiredTags=0");
requirements.Value.Rows![5].Token.Should().Be("none", "the App translates the word");
// A publication with the group's bit and no slot in use makes neither fact.
var none = new InGameAdvancedSampler();
none.Take(new InGameAdvanced(InGameStates.Empty() with { ValidMask = FlAdvancedValid.SlFeatures }));
none.Facts.Should().BeEmpty();
}
[Fact]
public void AnAnswerAboutAFeatureThatArrivesLaterMakesTheFactsNewAndEachQuestionIsItsOwn()
{
var sampler = new InGameAdvancedSampler();
sampler.FeatureCall(FlAdvancedState.FeatureVersionAnswered, hookedIn: false).Should().Be(AdvancedInGameCall.NotHooked);
sampler.FeatureCall(FlAdvancedState.FeatureVersionAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled, "hooked, and the game did not ask again");
sampler.Take(new InGameAdvanced(InGameStates.Streamline()));
IReadOnlyList<AdvancedFact> before = sampler.Facts;
before.Should().NotContain(static f => f.Id.StartsWith("sl.feature.", StringComparison.Ordinal));
sampler.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
// The version of one feature is answered: the list is new, that question is read, the other is not.
FlAdvancedState versionOnly = InGameStates.WithFeature(InGameStates.Streamline(2), 0, 0, FlAdvancedState.FeatureVersionAnswered, 2, 14, 1, 310, 4, 0);
sampler.Take(new InGameAdvanced(versionOnly));
sampler.Facts.Should().NotBeSameAs(before);
Rows(Fact(sampler, "sl.feature.versions")).Should().Equal("kFeatureDLSS · versionSL=2.14.1", "kFeatureDLSS · versionNGX=310.4.0");
sampler.FeatureCall(FlAdvancedState.FeatureVersionAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.Read);
sampler.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
sampler.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hookedIn: false).Should().Be(AdvancedInGameCall.NotHooked);
// The same slots again: the same list. Both questions answered: a new one, and both read.
IReadOnlyList<AdvancedFact> held = sampler.Facts;
sampler.Take(new InGameAdvanced(InGameStates.WithFeature(InGameStates.Streamline(3), 0, 0, FlAdvancedState.FeatureVersionAnswered, 2, 14, 1, 310, 4, 0)));
sampler.Facts.Should().BeSameAs(held, "nothing a fact is made of moved");
sampler.Take(new InGameAdvanced(InGameStates.Features(4)));
sampler.Facts.Should().NotBeSameAs(held);
sampler.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hookedIn: false).Should().Be(AdvancedInGameCall.Read, "a publication that carried it is the proof");
}
[Fact]
@@ -347,10 +475,13 @@ public sealed class InGameAdvancedSamplerTests
DlssColorBuffersHdr = 2,
};
both = InGameStates.WithFeature(both, 0, 0, FlAdvancedState.FeatureVersionAnswered | FlAdvancedState.FeatureRequirementsAnswered, 2, 14, 1, 310, 4, 0, 7, 2, 32, 3);
IReadOnlyList<AdvancedReading> readings = sampler.Take(new InGameAdvanced(both))!;
sampler.Facts.Should().OnlyContain(static f => AdvancedMetricCatalog.Find(f.Id)!.Reach == AdvancedReach.Game);
sampler.Facts.Select(static f => f.Id).Should().Contain(["sl.constants.jitter", "sl.constants.resets", "ffx.framegen.config", "ffx.upscale.flags", "sl.dlss.presets"]);
sampler.Facts.Select(static f => f.Id).Should().Contain(
["sl.constants.jitter", "sl.constants.resets", "ffx.framegen.config", "ffx.upscale.flags", "sl.dlss.presets", "sl.feature.versions", "sl.feature.requirements"]);
AdvancedJson.Storable(sampler.Facts).Should().HaveCount(sampler.Facts.Count, "what the game said may be stored");
readings.Select(static r => AdvancedMetricCatalog.Find(r.Series[AdvancedMetric.SeriesPrefix.Length..])!.Reach).Should().OnlyContain(static reach => reach == AdvancedReach.Game);
}
@@ -126,6 +126,32 @@ internal static class InGameStates
1920,
1080);
/// <summary>
/// What the stub interposer answers <c>hook-harness --advanced</c> about DLSS and DLSS frame generation
/// (0.1.0-beta.44), beside what the same target tells Streamline each frame: slots 0 and 1, both questions answered.
/// </summary>
public static FlAdvancedState Features(uint samples = 1) => WithFeature(
WithFeature(Streamline(samples), 0, 0, 3, 2, 14, 1, 310, 4, 0, 7, 2, 32, 3, 10, 0, 26100, 10, 0, 19041, 591, 44, 0, 512, 15, 0),
1, 1000, 3, 2, 14, 1, 310, 4, 1, 26, 1, 1, 4, 10, 0, 26100, 10, 0, 19041, 591, 44, 0, 551, 23, 0);
/// <summary>
/// One feature slot, set through the struct's bytes: the <c>sl::Feature</c> id, which questions were answered, and
/// the slot's words from 2 on - versionSL, versionNGX, the flags, three counts, then Windows found and required and
/// the driver found and required (three words a version). The group's bit of the mask goes on with it.
/// </summary>
public static FlAdvancedState WithFeature(FlAdvancedState state, int slot, uint feature, uint answered, params ReadOnlySpan<uint> from2)
{
int at = (int)Marshal.OffsetOf<FlAdvancedState>(nameof(FlAdvancedState.Features)) + (slot * FlAdvancedState.FeatureWords * sizeof(uint));
Span<uint> words = MemoryMarshal.Cast<byte, uint>(
MemoryMarshal.AsBytes(new Span<FlAdvancedState>(ref state)).Slice(at, FlAdvancedState.FeatureWords * sizeof(uint)));
words.Clear();
words[0] = feature + 1;
words[1] = answered;
from2.CopyTo(words[2..]);
state.ValidMask |= FlAdvancedValid.SlFeatures;
return state;
}
/// <summary>The generation rectangle - left, top, width, height: a fixed buffer, set through the struct's bytes.</summary>
public static FlAdvancedState WithRect(FlAdvancedState state, int left, int top, int width, int height)
{
@@ -1004,8 +1004,10 @@ public sealed class SessionRecorderTests : IAsyncDisposable
InGame = AdvancedInGameStatus.NothingSeen,
StreamlineConstants = AdvancedInGameCall.NotHooked,
FsrFrameGeneration = AdvancedInGameCall.NotHooked,
StreamlineFeatureVersion = AdvancedInGameCall.NotHooked,
StreamlineFeatureRequirements = AdvancedInGameCall.NotHooked,
},
"the Agent's sources never answered; the game was measured from inside, made none of the calls, and the capture side published neither of the two hooks that are installed only for Advanced metrics");
"the Agent's sources never answered; the game was measured from inside, made none of the calls, and the capture side published none of the four hooks that are installed only for Advanced metrics");
hub.Released.Should().Be(1);
}
@@ -223,6 +223,32 @@ public sealed class SqliteGameConsentStoreTests
(await store.FindAsync(Fingerprint().ExePath, Ct)).Fingerprint.SizeBytes.Should().Be(12345);
}
[Fact]
public async Task AGrantStartsTheCountOfEarlyAbnormalEndsAgain()
{
// Owner decision D126 (2026-11-12). The count was never set back: Lies of P had two early ends in October, its
// user switched hooking on again, and one more - the game's own crash - switched it off at once, under a reason
// that says "twice". The grant is the user's act and the only statement that turns hooking on.
await using LedgerFixture f = await LedgerFixture.OpenAsync();
var store = new SqliteGameConsentStore(f.Db);
var games = new SqliteGameRepository(f.Db);
ExecutableFingerprint fp = Fingerprint();
await store.RecordOperatorAcknowledgementAsync(Ack(fp), Ct);
GameRow row = (await games.FindAsync(fp.ExePath, Ct))!;
(await games.RecordCrashAsync(row.Id, Ct)).Should().Be(1);
(await games.RecordCrashAsync(row.Id, Ct)).Should().Be(2);
(await games.AutoDisableHookAsync(row.Id, "ended abnormally twice", DateTimeOffset.UnixEpoch.AddSeconds(9), Ct)).Should().BeTrue();
(await games.FindAsync(fp.ExePath, Ct))!.HookEnabled.Should().BeFalse();
(await store.RecordOperatorAcknowledgementAsync(Ack(fp), Ct)).Should().Be(ConsentWriteOutcome.Written);
GameRow again = (await games.FindAsync(fp.ExePath, Ct))!;
again.HookEnabled.Should().BeTrue();
again.HookCrashCount.Should().Be(0, "two more are needed before hooking goes off again");
again.HookAutoDisabledReason.Should().Be("ended abnormally twice", "what happened the last time stays on the row");
(await games.RecordCrashAsync(row.Id, Ct)).Should().Be(1, "one early end after the grant is one, not three");
}
[Fact]
public async Task AStoreWhoseTableIsGoneRefusesEveryWriteAndConsentsToNothing()
{
+16
View File
@@ -61,6 +61,22 @@ sl::Constants::orthographicProjection
sl::Constants::motionVectorsDilated
sl::Constants::motionVectorsJittered
# sl::FeatureVersion and sl::FeatureRequirements, what Streamline ANSWERS when the game asks about a feature
# (parameters `fv` and `fr`; 0.1.0-beta.44) - read after the original call said OK. The two versions; the flags,
# three counts and four versions of the requirements. The count of required buffer tags is read and its pointer,
# `requiredTags`, is not; nothing after `driverVersionRequired` is - the Vulkan queue counts and the pointers to
# the names of extensions and features.
sl::FeatureVersion::versionSL
sl::FeatureVersion::versionNGX
sl::FeatureRequirements::flags
sl::FeatureRequirements::maxNumCPUThreads
sl::FeatureRequirements::maxNumViewports
sl::FeatureRequirements::numRequiredTags
sl::FeatureRequirements::osVersionDetected
sl::FeatureRequirements::osVersionRequired
sl::FeatureRequirements::driverVersionDetected
sl::FeatureRequirements::driverVersionRequired
# ffxConfigureDescFrameGeneration, how the game configures FSR frame generation (parameter `g`; 0.1.0-beta.43):
# on or off, asynchronous or not, the flags, generated frames only or not, the rectangle generated in. The swapchain,
# the two callbacks and their contexts, the HUD-less resource and the frame id in the same descriptor are not read.
+6 -1
View File
@@ -58,6 +58,8 @@ $script:Parameter = [ordered]@{
q = 'ffxQueryDescUpscaleGetGPUMemoryUsage'
k = 'sl::Constants'
g = 'ffxConfigureDescFrameGeneration'
fv = 'sl::FeatureVersion'
fr = 'sl::FeatureRequirements'
desc = 'ffxQueryDescHeader'
}
@@ -106,7 +108,7 @@ function Get-HeaderRead([string]$Code) {
$reads = [System.Collections.Generic.SortedSet[string]]::new([StringComparer]::Ordinal)
$problems = [System.Collections.Generic.List[string]]::new()
foreach ($m in [regex]::Matches($Code, '(?<![\w.>:])(o|d|m|q|k|g)\b(\s*\.\s*([A-Za-z_]\w*))?')) {
foreach ($m in [regex]::Matches($Code, '(?<![\w.>:])(o|d|m|q|k|g|fv|fr)\b(\s*\.\s*([A-Za-z_]\w*))?')) {
$name = $m.Groups[1].Value
if ($m.Groups[3].Success) {
[void]$reads.Add("$($script:Parameter[$name])::$($m.Groups[3].Value)")
@@ -219,6 +221,9 @@ inline void Publish(Accumulators& a, FlAdvancedState* region) noexcept { region-
@{ Name = 'the sl::Constants parameter handed on whole FAILS'; Header = $goodHeader + "`ninline void ObserveK(const sl::Constants& k, Accumulators& a) noexcept { a.n.store(k.cameraNear); Other(k); }"; List = $goodList + "sl::Constants::cameraNear`n"; Other = $goodOther; Expect = 1 },
@{ Name = 'the frame-generation configuration read through its parameter, each member on the list, passes'; Header = $goodHeader + "`ninline void ObserveG(const ffxConfigureDescHeader* desc, Accumulators& a) noexcept { const auto& g = *reinterpret_cast<const ffxConfigureDescFrameGeneration*>(desc); a.n.store(g.flags + g.generationRect.left); }"; List = $goodList + "ffxConfigureDescFrameGeneration::flags`nffxConfigureDescFrameGeneration::generationRect`n"; Other = $goodOther; Expect = 0 },
@{ Name = 'a member of the frame-generation configuration the list does not allow FAILS'; Header = $goodHeader + "`ninline void ObserveG(const ffxConfigureDescHeader* desc, Accumulators& a) noexcept { const auto& g = *reinterpret_cast<const ffxConfigureDescFrameGeneration*>(desc); a.n.store(g.flags); Keep(g.swapChain); }"; List = $goodList + "ffxConfigureDescFrameGeneration::flags`n"; Other = $goodOther; Expect = 1 },
@{ Name = 'the answers about a feature read through their parameters, each member on the list, pass'; Header = $goodHeader + "`ninline void ObserveV(uint32_t feature, const sl::FeatureVersion& fv, Accumulators& a) noexcept { Put(a.f, fv.versionSL); }`ninline void ObserveR(uint32_t feature, const sl::FeatureRequirements& fr, Accumulators& a) noexcept { a.n.store(fr.numRequiredTags); Put(a.f, fr.osVersionDetected); }"; List = $goodList + "sl::FeatureVersion::versionSL`nsl::FeatureRequirements::numRequiredTags`nsl::FeatureRequirements::osVersionDetected`n"; Other = $goodOther; Expect = 0 },
@{ Name = 'the list of required tags, a pointer of the game''s, FAILS when it is not on the list'; Header = $goodHeader + "`ninline void ObserveR(uint32_t feature, const sl::FeatureRequirements& fr, Accumulators& a) noexcept { a.n.store(fr.numRequiredTags); Keep(fr.requiredTags[0]); }"; List = $goodList + "sl::FeatureRequirements::numRequiredTags`n"; Other = $goodOther; Expect = 1 },
@{ Name = 'a member of the answer read outside the header FAILS'; Header = $goodHeader + "`ninline void ObserveR(uint32_t feature, const sl::FeatureRequirements& fr, Accumulators& a) noexcept { a.n.store(fr.numRequiredTags); }"; List = $goodList + "sl::FeatureRequirements::numRequiredTags`n"; Other = @{ 'dllmain.cpp' = 'void Hook(sl::FeatureRequirements& requirements) { Keep(requirements.numRequiredTags); }' }; Expect = 1 },
@{ Name = 'a header with no read at all FAILS'; Header = '// o.outputWidth is somewhere else'; List = "# nothing`n"; Other = $goodOther; Expect = 1 }
)
foreach ($c in $cases) {