Compare commits

...
Author SHA1 Message Date
poli0981andClaude Fable 5.2 51b687cc46 feat(advanced): a session shows whether each Streamline feature is supported and loaded, and what the game did with it - two facts from six calls, one sentence for their states, Privacy Policy 2.19 (beta.45 PR-3; D129-D131)
The Agent and the App read what the six hooks of this release keep.

- InGameAdvancedSampler: sl.feature.support (<feature> · slIsFeatureSupported as NVIDIA's own sl::Result
  name, a refusal included; <feature> · slIsFeatureLoaded on or off) and sl.feature.lifecycle
  (<feature> · slSetFeatureLoaded on, off or both; slAllocateResources and slFreeResources as counts,
  ">= 15" where the four bits stopped; a row slShutdown). A feature with nothing to say has no row.
- AdvancedSources: one member a call (Read / NeverCalled / NotHooked), null in every row written before.
  The page says the six in one sentence, each call by its name under what became of it.
- sl.init.preferences has reach BeforeAttach (D129): the game makes the call once, before FrameLedger is
  inside it. No catalog entry waits for a hook any more.
- Privacy Policy 2.19 (wording approved with the plan): what is read for each feature, and two more
  things never read - what identifies the graphics card a game hands over with its question, and the
  content of a graphics resource. "Four further calls" is ten. The Disclaimer stays 2.15.
- Strings in en, vi, ja. LIMITATIONS, the guide, docs 06/08/18, the accuracy block (three copies),
  CLAUDE.md, the changelog.

No native change, no layout change (5), no schema change (23). The Agent's end-to-end test on the
harness's Streamline target stores both facts and all six calls as Read; the FSR target stores NotHooked.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 22:21:07 +07:00
29 changed files with 614 additions and 44 deletions

No files matched your search

+15 -1
View File
@@ -51,7 +51,16 @@ numeric core and does not move; the heading is the full version — corrected 20
call the original, and run nothing after it. Six new calls in all in this release, each patched only where a
session asked.
- **`slInit` is not hooked, and will not be** (D129). A game starts Streamline once, before FrameLedger can be in
it — also when FrameLedger starts the game itself — so a hook there would be a patch that reads nothing.
it — also when FrameLedger starts the game itself — so a hook there would be a patch that reads nothing. The
Advanced page's entry for what a game started Streamline with now gives that reason instead of "a later release".
- **A session shows whether each Streamline feature is supported and loaded, and what the game did with it**
(Advanced metrics). Two catalog entries are read from the six calls above: `sl.feature.support` — Streamline's
answer by NVIDIA's own name (`kFeatureDLSS_G · slIsFeatureSupported` = `eOk`; a refusal is named, and it is an
answer) and whether the feature is loaded — and `sl.feature.lifecycle` — the game switching a feature on, off or
both, how many times it allocated and freed the feature's resources (`≥ 15` past fifteen), and how many times it
shut Streamline down. The line under the session names the six calls in one sentence: read; hooked, the game did
not make the call; not hooked. They begin when FrameLedger is in the game — what a game did while it started is
not there — and they are calls the game made, not a statement that a feature ran. Not confirmed on a real game.
### Fixed
@@ -62,6 +71,11 @@ numeric core and does not move; the heading is the full version — corrected 20
### Changed
- **Privacy Policy 2.19**: it names, for each Streamline feature a game asks about or controls, whether Streamline
says it is supported and loaded, the game switching it on or off, and how many times its resources were allocated
and freed, and how many times the game shut Streamline down — and two more things that are never read: what
identifies the graphics card a game hands over with its question, and the content of a graphics resource. "Four
further calls" is ten. The terms window shows once after the update. The Disclaimer stays 2.15.
- **The limitations, the accuracy statement and the user guide no longer say that most sessions will show nothing
of what Streamline answers about a feature.** 0.1.0-beta.44's notes expected that, because a game asks while it
starts. The first real sessions (2026-11-12, five games) read both answers in every Streamline session: the
+6 -1
View File
@@ -127,7 +127,12 @@ src/
# 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.
# way; ~~a game asks while it starts, so "never called" is the usual answer there~~
# (the games run since ask again later, and are read).
# Since 0.1.0-beta.45 also whether Streamline says a feature is supported and
# loaded, the game switching it, its resources allocated and freed and Streamline
# shut down, from six more calls hooked the same way (D130); slInit is not hooked
# and its entry says why (AdvancedReach.BeforeAttach, D129).
FrameLedger.Infrastructure/ # SQLite, shm reader, vendor APIs, injector interop, parsers,
# and Capture/ (PR-C): ShmRingAttacher/ShmCaptureSink over the
# reader, HeldProcessLivenessSource, TargetResolver (path only,
+13
View File
@@ -220,6 +220,19 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
generation while shipping an older plugin; which file that newer one is was not looked into. The games run so
far do not ask Streamline about DLSS upscaling unless they upscale through it, so a game can list frame
generation here and no upscaler.
- **Whether each Streamline feature is supported and loaded, and what the game did with it** (since
0.1.0-beta.45) come from six more calls, hooked the same way — only once a session with Advanced metrics on has
started in that game. **What the game did before that is not seen**: a feature it switched on while it started
has no "switched" row, and resources it allocated then are not counted. The counts are **calls the game made**,
not resources, and each stops at fifteen (shown as `≥ 15`); they and the switching start again with each
session, while the two answers are kept from an earlier session of a game that kept running. "Supported" is
Streamline's answer for the graphics card the game asked about; which card that was is never read, so on a PC
with two cards the row does not say. A refusal is shown by NVIDIA's own name for it
(`eErrorFeatureNotSupported`), and it is the game that was refused, not FrameLedger. None of this says a
feature ran or drew anything. **Not confirmed on a real game yet.**
- **What a game started Streamline with is not read, and will not be**: the game makes that call once, before
FrameLedger can be inside it — also when FrameLedger starts the game itself. The Advanced page lists the entry
with that reason.
- **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
+7 -4
View File
@@ -120,11 +120,14 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
> 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. A game that asks only while it starts has
> none and the session says so; the Unreal Engine games run so far ask again later, and were read. FSR's upscaling
> none and the session says so; the Unreal Engine games run so far ask again later, and were read. Since beta.45
> also whether Streamline says each feature is supported and whether it is loaded, and what the game did with it
> after FrameLedger attached — switched it on or off, allocated and freed its resources (counted to fifteen), shut
> Streamline down: calls the game made, not a statement that a feature ran or produced anything. FSR's upscaling
> values, Streamline's constants (six games), its answers about a feature (five 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.
> frame-generation configuration (one game) have been read from real games; the DLSS options and the six calls
> of beta.45 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
+6 -1
View File
@@ -767,7 +767,12 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
> 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
> `sl.feature.versions` and `sl.feature.requirements`, rows named `<feature> · <member>` in the vendor's words.
> **Since 0.1.0-beta.45** six more keys, the same three values each — `streamlineFeatureSupported`,
> `streamlineFeatureLoaded`, `streamlineSetFeatureLoaded`, `streamlineAllocateResources`, `streamlineFreeResources`,
> `streamlineShutdown`, absent in every row written before — and the facts `sl.feature.support` and
> `sl.feature.lifecycle`, rows named `<feature> · <call>` (`slShutdown` alone for the shutdowns); a count that
> reached its ceiling is the text `≥ 15`. 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;
+6
View File
@@ -881,6 +881,12 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
> 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.
> **Since 0.1.0-beta.45** one more, and one only for six calls (`Advanced_InGameMoreCallsLine`,
> `AdvancedPresenter.MoreCalls`): *Streamline's other calls - read: …; hooked, the game did not make the call: …;
> not hooked: …*, each call under its own name (`slIsFeatureSupported`, a function's name and so not translated)
> in the group that is true of it, and the word for "none" where a group is empty. A session stored before has
> none of the six and no such sentence. The catalog's `sl.init.preferences` carries a reason of its own
> (`AdvReach_BeforeAttach`): *Not read: the game makes this call once, before FrameLedger is inside it*.
>
> **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
+24 -3
View File
@@ -753,7 +753,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, twenty-one since 0.1.0-beta.44), 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, twenty-three since 0.1.0-beta.45), 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
@@ -797,6 +797,20 @@ planning, the design reviewed against the code before it was approved.
starts**~~ *(not the usual case: measured 2026-11-12, six of six Streamline sessions on five games read both, bar
Cyberpunk 2077's version question)*, and the page words it as "did not ask again"; 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).
**The fourth step, 2026-11-12 (0.1.0-beta.45).** Two more entries have reach `Game`, from six calls
(`17_HOOK_ENGINE` §Hook inventory): `sl.feature.support` — `<feature> · slIsFeatureSupported`, the `sl::Result`
by NVIDIA's enumerator (`eOk`, `eErrorFeatureNotSupported`; `result 40` for a number past the forty this build
names, `result 255` for a code a byte could not carry), and `<feature> · slIsFeatureLoaded`, `on` or `off` — and
`sl.feature.lifecycle` — `<feature> · slSetFeatureLoaded` (`on`, `off`, `on_and_off`: what the game asked for
during the session, not the state it left), `· slAllocateResources` and `· slFreeResources` (a count; `≥ 15`
where the four bits stopped), and a row `slShutdown` with the number of shutdowns. All of it is word 1 of the
twelve feature slots and one word that was reserved (layout 5 and schema 23 as they were). A feature with nothing
to say has no row and a fact with no row is not stored. `AdvancedSources` has one member a call
(`StreamlineFeatureSupported`, `…Loaded`, `StreamlineSetFeatureLoaded`, `StreamlineAllocateResources`,
`StreamlineFreeResources`, `StreamlineShutdown`), `Read` / `NeverCalled` / `NotHooked` as before and null in a
row written before; the page says the six in one sentence. The switching and the counts are a session's — the
capture side clears them at a new request — so, unlike the answers, a second session does not inherit them.
`sl.init.preferences` now has reach `BeforeAttach` (D129): not a later release, never.
- **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
@@ -847,6 +861,10 @@ planning, the design reviewed against the code before it was approved.
- **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.19** at beta.45 (approved with that release's plan): 2.18 named two of Streamline's answers
about a feature; whether it is supported and loaded, the game switching it, allocating and freeing its resources
and shutting Streamline down are in neither list, so they are named — with two more things never read: what
identifies the graphics card a game hands over with its question, and the content of a graphics resource.
- **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.
@@ -876,7 +894,8 @@ the catalog differ in either direction. **Reach** is where a value can be read f
(the Agent's own process), `AgentElevated` (the same, as administrator with PawnIO), `Game` (read inside a game
FrameLedger measures, from the arguments of a call the Overlay hooks, while the session records Advanced metrics —
since 0.1.0-beta.40), `HookedCall` (an argument of a call the Overlay already hooks, not read yet), `NewHook` (a hook
that is not built — Train B), `Spike` (Trains C and D), `Refused`, `Deferred`, `Identifier` (D104), `PlayerState`
that is not built — Train B; no entry carries it since 0.1.0-beta.45), `BeforeAttach` (a call the game makes once,
before FrameLedger is inside it, so no hook could read it — D129), `Spike` (Trains C and D), `Refused`, `Deferred`, `Identifier` (D104), `PlayerState`
(rule 4), `Licence`, `NotInHeaders`. ~~Only the first two are read by a build of Train A.~~ The first three are read
(`AdvancedMetric.IsRead`).
@@ -1047,7 +1066,9 @@ that is not built — Train B), `Spike` (Trains C and D), `Refused`, `Deferred`,
| `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 | 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.feature.support` | Whether Streamline says each feature is supported, and loaded | SessionFact | Streamline | Game | Table |
| `sl.feature.lifecycle` | Each feature switched on or off, its resources allocated and freed, Streamline shut down | SessionFact | Streamline | Game | Table |
| `sl.init.preferences` | The preferences the game started Streamline with | SessionFact | Streamline | BeforeAttach | Text |
| `sl.constants.camera` | Camera position, axes and matrices | SessionFact | Streamline | PlayerState | Text |
**Inside the game: routes a spike decides**
+19
View File
@@ -63,6 +63,25 @@ 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.19 of the Privacy Policy changed (0.1.0-beta.45)
**Six more calls read inside the game, only while Advanced metrics is on** (train B's fourth step, owner decisions
D129–D131; the wording approved with the plan of 0.1.0-beta.45). Version 2.18 named Streamline's answers to two
questions about a feature — its version, what it requires — and "four further calls". This release reads two more
answers and four things the game does, none of which is in that list, so the version moves. §1's item on Advanced
metrics gains, **for each Streamline feature the game asks about or controls: whether Streamline answers that it is
supported, whether it is loaded, whether the game switched it on or off while it ran, and how many times its
resources were allocated and freed; and whether the game shut Streamline down, and how many times**. It also says
two more things that are never read: **what identifies the graphics card that the game hands over with its
question** — `slIsFeatureSupported` takes an `sl::AdapterInfo`, the adapter's LUID or a Vulkan physical device,
which D131 forbids and a check in the build refuses by name — and **the content of a graphics resource**: the two
resource calls take a command buffer and a viewport, forwarded and never looked at. §4's "four further calls" is
ten, its "two questions" are four, and its list of what is stored names the new facts and repeats that what
identifies the card is not among them. What the game started Streamline with (`slInit`) is not in the policy
because it is not read, and will not be (D129). The accuracy block's item says what the new rows are — calls the
game made, counted to fifteen, not a statement that a feature ran. The Disclaimer stays 2.15. §2 is unchanged:
nothing is sent.
### 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
+14 -4
View File
@@ -64,14 +64,22 @@ also keeps what the game itself handed to DLSS and FSR:
again later, and then they are read. Where a game asks only at its start, the line under the session says
*hooked — the game asks this while it starts, and did not ask again*. The version shown is the one Streamline
reports, which can be newer than the file in the game's folder.
- **Whether a feature is supported and loaded, and what the game did with it** (since 0.1.0-beta.45) — two more
tables, one row for each feature and call. `kFeatureDLSS_G · slIsFeatureSupported` is Streamline's answer in
NVIDIA's own word: `eOk` is yes, and a refusal is named (`eErrorFeatureNotSupported`, `eErrorFeatureMissing`).
`· slIsFeatureLoaded` is *on* or *off*. `· slSetFeatureLoaded` says whether the game switched the feature *on*,
*off* or *on and off* during the session; `· slAllocateResources` and `· slFreeResources` count how many times it
set up and released what the feature needs (up to 15, then `≥ 15`); `slShutdown` counts how many times it shut
Streamline down. These begin when FrameLedger is in the game: what the game did while it started is not there.
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 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*.
The last four are read from calls FrameLedger hooks **only for Advanced metrics** — ten 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 call, 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*; the six calls of 0.1.0-beta.45 are named in one sentence,
under which of the three happened to each.
**Many games will show nothing here**, and the line under the session says why: *the game made none of the calls
these are read from* — most games set their DLSS options through a call FrameLedger cannot see, and only games that
@@ -101,6 +109,8 @@ comes from, and whether it is read. Where it is not, the reason is written out:
- **not present on this PC** — the driver's own figures exist on NVIDIA cards only;
- **read inside a game FrameLedger measures, when the game makes the call** — what the game tells DLSS and FSR
(above). Some further readings inside the game **come with a later release**;
- **the game makes this call once, before FrameLedger is inside it** — what the game started Streamline with. It is
not read, and no later release will read it;
- **never read** — a serial number, a display's identification data, which other programs are encoding, the camera's
position in the game. FrameLedger does not read these at all.
+7 -4
View File
@@ -119,11 +119,14 @@
> 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. A game that asks only while it starts has
> none and the session says so; the Unreal Engine games run so far ask again later, and were read. FSR's upscaling
> none and the session says so; the Unreal Engine games run so far ask again later, and were read. Since beta.45
> also whether Streamline says each feature is supported and whether it is loaded, and what the game did with it
> after FrameLedger attached — switched it on or off, allocated and freed its resources (counted to fifteen), shut
> Streamline down: calls the game made, not a statement that a feature ran or produced anything. FSR's upscaling
> values, Streamline's constants (six games), its answers about a feature (five 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.
> frame-generation configuration (one game) have been read from real games; the DLSS options and the six calls
> of beta.45 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
+7 -4
View File
@@ -228,11 +228,14 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> 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. A game that asks only while it starts has
> none and the session says so; the Unreal Engine games run so far ask again later, and were read. FSR's upscaling
> none and the session says so; the Unreal Engine games run so far ask again later, and were read. Since beta.45
> also whether Streamline says each feature is supported and whether it is loaded, and what the game did with it
> after FrameLedger attached — switched it on or off, allocated and freed its resources (counted to fifteen), shut
> Streamline down: calls the game made, not a statement that a feature ran or produced anything. FSR's upscaling
> values, Streamline's constants (six games), its answers about a feature (five 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.
> frame-generation configuration (one game) have been read from real games; the DLSS options and the six calls
> of beta.45 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.18 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.19 · **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; 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.
- **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 ; and, for each Streamline feature the game asks about or controls: whether Streamline answers that it is supported, whether it is loaded, whether the game switched it on or off while it ran, and how many times its resources were allocated and freed; and whether the game shut Streamline down, and how many times — never the lists Streamline's answer points to (the buffers' names, the names of Vulkan extensions and features), never what identifies the graphics card that the game hands over with its question, never the content of a graphics resource, 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 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
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 ten 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, Streamline's answers to the game's four questions about a feature — which version it is, what it requires, whether it is supported and whether it is loaded — and the game switching a feature on or off, allocating and freeing its resources, and shutting Streamline down), 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, whether each is supported and loaded, and how often the game switched it, allocated and freed its resources and shut Streamline down), never the camera's position, direction or matrices, and never what identifies the graphics card; 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 areLine 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.
+12
View File
@@ -235,7 +235,9 @@ public static class Strings
nameof(Adv_sl_dlssg_options),
nameof(Adv_sl_dlssg_state),
nameof(Adv_sl_dlssg_vram_estimate),
nameof(Adv_sl_feature_lifecycle),
nameof(Adv_sl_feature_requirements),
nameof(Adv_sl_feature_support),
nameof(Adv_sl_feature_versions),
nameof(Adv_sl_init_preferences),
nameof(Adv_sl_nis_options),
@@ -263,6 +265,7 @@ public static class Strings
nameof(Advanced_InGameCallsLine),
nameof(Advanced_InGameFeatureCallsLine),
nameof(Advanced_InGameLine),
nameof(Advanced_InGameMoreCallsLine),
nameof(Advanced_Machine_Intro),
nameof(Advanced_Max),
nameof(Advanced_Mean),
@@ -309,6 +312,7 @@ public static class Strings
nameof(AdvInGameCall_NotHooked),
nameof(AdvInGameCall_Read),
nameof(AdvInGameCall_Unknown),
nameof(AdvReach_BeforeAttach),
nameof(AdvReach_Deferred),
nameof(AdvReach_Game),
nameof(AdvReach_HookedCall),
@@ -1946,8 +1950,12 @@ public static class Strings
public static string Adv_sl_dlssg_vram_estimate => ResourceManager.GetString(nameof(Adv_sl_dlssg_vram_estimate), Culture) ?? nameof(Adv_sl_dlssg_vram_estimate);
public static string Adv_sl_feature_lifecycle => ResourceManager.GetString(nameof(Adv_sl_feature_lifecycle), Culture) ?? nameof(Adv_sl_feature_lifecycle);
public static string Adv_sl_feature_requirements => ResourceManager.GetString(nameof(Adv_sl_feature_requirements), Culture) ?? nameof(Adv_sl_feature_requirements);
public static string Adv_sl_feature_support => ResourceManager.GetString(nameof(Adv_sl_feature_support), Culture) ?? nameof(Adv_sl_feature_support);
public static string Adv_sl_feature_versions => ResourceManager.GetString(nameof(Adv_sl_feature_versions), Culture) ?? nameof(Adv_sl_feature_versions);
public static string Adv_sl_init_preferences => ResourceManager.GetString(nameof(Adv_sl_init_preferences), Culture) ?? nameof(Adv_sl_init_preferences);
@@ -2002,6 +2010,8 @@ public static class Strings
public static string Advanced_InGameLine => ResourceManager.GetString(nameof(Advanced_InGameLine), Culture) ?? nameof(Advanced_InGameLine);
public static string Advanced_InGameMoreCallsLine => ResourceManager.GetString(nameof(Advanced_InGameMoreCallsLine), Culture) ?? nameof(Advanced_InGameMoreCallsLine);
public static string Advanced_Machine_Intro => ResourceManager.GetString(nameof(Advanced_Machine_Intro), Culture) ?? nameof(Advanced_Machine_Intro);
public static string Advanced_Max => ResourceManager.GetString(nameof(Advanced_Max), Culture) ?? nameof(Advanced_Max);
@@ -2094,6 +2104,8 @@ public static class Strings
public static string AdvInGameCall_Unknown => ResourceManager.GetString(nameof(AdvInGameCall_Unknown), Culture) ?? nameof(AdvInGameCall_Unknown);
public static string AdvReach_BeforeAttach => ResourceManager.GetString(nameof(AdvReach_BeforeAttach), Culture) ?? nameof(AdvReach_BeforeAttach);
public static string AdvReach_Deferred => ResourceManager.GetString(nameof(AdvReach_Deferred), Culture) ?? nameof(AdvReach_Deferred);
public static string AdvReach_Game => ResourceManager.GetString(nameof(AdvReach_Game), Culture) ?? nameof(AdvReach_Game);
+16
View File
@@ -557,6 +557,14 @@
<value>各 Streamline 機能の要件: OS、ドライバー、バッファー</value>
<comment>review</comment>
</data>
<data name="Adv_sl_feature_lifecycle" xml:space="preserve">
<value>各機能のオン/オフ、リソースの割り当てと解放、Streamline のシャットダウン</value>
<comment>review</comment>
</data>
<data name="Adv_sl_feature_support" xml:space="preserve">
<value>Streamline が各機能をサポートしているか、読み込み済みか</value>
<comment>review</comment>
</data>
<data name="Adv_sl_feature_versions" xml:space="preserve">
<value>各 Streamline 機能のバージョンとその NGX モデル バージョン</value>
<comment>review</comment>
@@ -661,6 +669,10 @@
<value>各 Streamline 機能のバージョン: {0}。各機能の要件: {1}。</value>
<comment>review</comment>
</data>
<data name="Advanced_InGameMoreCallsLine" xml:space="preserve">
<value>Streamline のその他の呼び出し - 読み取り済み: {0}。フック済みでゲームが呼び出さなかったもの: {1}。未フック: {2}。</value>
<comment>review</comment>
</data>
<data name="Advanced_InGameLine" xml:space="preserve">
<value>ゲーム内: {0}。</value>
<comment>review</comment>
@@ -873,6 +885,10 @@
<value>ゲーム内 (新しいフックが必要) - 今後のリリースで対応</value>
<comment>review</comment>
</data>
<data name="AdvReach_BeforeAttach" xml:space="preserve">
<value>読み取らない: ゲームはこの呼び出しを FrameLedger がゲーム内に入る前に一度だけ行います</value>
<comment>review</comment>
</data>
<data name="AdvReach_NotInHeaders" xml:space="preserve">
<value>このインターフェイスでは提供されない</value>
<comment>review</comment>
+12
View File
@@ -423,6 +423,12 @@
<data name="Adv_sl_feature_requirements" xml:space="preserve">
<value>What each Streamline feature requires: operating system, driver, buffers</value>
</data>
<data name="Adv_sl_feature_lifecycle" xml:space="preserve">
<value>Each feature switched on or off, its resources allocated and freed, Streamline shut down</value>
</data>
<data name="Adv_sl_feature_support" xml:space="preserve">
<value>Whether Streamline says each feature is supported, and loaded</value>
</data>
<data name="Adv_sl_feature_versions" xml:space="preserve">
<value>Each Streamline feature's version and its NGX model version</value>
</data>
@@ -501,6 +507,9 @@
<data name="Advanced_InGameFeatureCallsLine" xml:space="preserve">
<value>Which version each Streamline feature is: {0}. What each requires: {1}.</value>
</data>
<data name="Advanced_InGameMoreCallsLine" xml:space="preserve">
<value>Streamline's other calls - read: {0}; hooked, the game did not make the call: {1}; not hooked: {2}.</value>
</data>
<data name="Advanced_InGameLine" xml:space="preserve">
<value>Inside the game: {0}.</value>
</data>
@@ -660,6 +669,9 @@
<data name="AdvReach_NewHook" xml:space="preserve">
<value>Inside the game, with a new hook - comes with a later release</value>
</data>
<data name="AdvReach_BeforeAttach" xml:space="preserve">
<value>Not read: the game makes this call once, before FrameLedger is inside it</value>
</data>
<data name="AdvReach_NotInHeaders" xml:space="preserve">
<value>Not offered by this interface</value>
</data>
+12
View File
@@ -418,6 +418,12 @@
<data name="Adv_sl_feature_requirements" xml:space="preserve">
<value>Yêu cầu của từng tính năng Streamline: hệ điều hành, driver, bộ đệm</value>
</data>
<data name="Adv_sl_feature_lifecycle" xml:space="preserve">
<value>Từng tính năng được bật hay tắt, tài nguyên được cấp và giải phóng, Streamline bị đóng</value>
</data>
<data name="Adv_sl_feature_support" xml:space="preserve">
<value>Streamline nói từng tính năng có được hỗ trợ không, và có đang nạp không</value>
</data>
<data name="Adv_sl_feature_versions" xml:space="preserve">
<value>Phiên bản từng tính năng Streamline và phiên bản mô hình NGX của nó</value>
</data>
@@ -496,6 +502,9 @@
<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_InGameMoreCallsLine" xml:space="preserve">
<value>Các lời gọi khác của Streamline - đã đọc: {0}; đã hook, game không gọi: {1}; chưa hook: {2}.</value>
</data>
<data name="Advanced_InGameLine" xml:space="preserve">
<value>Bên trong game: {0}.</value>
</data>
@@ -655,6 +664,9 @@
<data name="AdvReach_NewHook" xml:space="preserve">
<value>Bên trong game, cần hook mới - sẽ có ở bản phát hành sau</value>
</data>
<data name="AdvReach_BeforeAttach" xml:space="preserve">
<value>Không đọc: game gọi lời gọi này một lần, trước khi FrameLedger vào trong game</value>
</data>
<data name="AdvReach_NotInHeaders" xml:space="preserve">
<value>Giao diện này không cung cấp</value>
</data>
@@ -216,9 +216,46 @@ public static class AdvancedPresenter
AdvancedLabels.InGameStartupCall(requirements));
}
// The six calls of 0.1.0-beta.45, in one sentence: each by its own name, under which of the three things
// happened to it. A row stored before carries none of the six.
if (MoreCalls(sources) is { } more)
{
line += " " + more;
}
return line;
}
private static string? MoreCalls(AdvancedSources sources)
{
(string Name, AdvancedInGameCall? State)[] calls =
[
("slIsFeatureSupported", sources.StreamlineFeatureSupported),
("slIsFeatureLoaded", sources.StreamlineFeatureLoaded),
("slSetFeatureLoaded", sources.StreamlineSetFeatureLoaded),
("slAllocateResources", sources.StreamlineAllocateResources),
("slFreeResources", sources.StreamlineFreeResources),
("slShutdown", sources.StreamlineShutdown),
];
if (calls.Any(static c => c.State is null))
{
return null;
}
string Names(AdvancedInGameCall state)
{
string[] names = [.. calls.Where(c => c.State == state).Select(static c => c.Name)];
return names.Length == 0 ? AdvancedLabels.Token("none") : string.Join(", ", names);
}
return string.Format(
CultureInfo.CurrentCulture,
Strings.Advanced_InGameMoreCallsLine,
Names(AdvancedInGameCall.Read),
Names(AdvancedInGameCall.NeverCalled),
Names(AdvancedInGameCall.NotHooked));
}
private static string StatusOf(AdvancedMetric metric, AdvancedSources? now)
{
if (!metric.IsRead)
@@ -174,8 +174,12 @@ public static class AdvancedMetricCatalog
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.init.preferences", Streamline, NewHook, Text, Upscaling, "The preferences the game started Streamline with"),
// ---- Inside the game: six more hooks of their own (0.1.0-beta.45) - a feature's support, and what the game does with it
Session("sl.feature.support", Streamline, Game, Table, Upscaling, "Whether Streamline says each feature is supported, and loaded"),
Session("sl.feature.lifecycle", Streamline, Game, Table, Upscaling, "Each feature switched on or off, its resources allocated and freed, Streamline shut down"),
// ---- Inside the game: a call no hook can see (owner decision D129) ------------------------------------------
Session("sl.init.preferences", Streamline, BeforeAttach, Text, Upscaling, "The preferences the game started Streamline with"),
Session("sl.constants.camera", Streamline, PlayerState, Text, Upscaling, "Camera position, axes and matrices"),
// ---- Inside the game: routes a spike decides ------------------------------------------------------------
@@ -22,7 +22,7 @@ public enum AdvancedReach
/// <summary>An argument of a call the Overlay already hooks; not read yet.</summary>
HookedCall = 3,
/// <summary>Needs a hook on a function its module exports; the hook is not built.</summary>
/// <summary>Needs a hook on a function its module exports; the hook is not built. No entry carries it since 0.1.0-beta.45.</summary>
NewHook = 4,
/// <summary>A route nobody has proven safe: a spike decides, and the owner says go or no.</summary>
@@ -51,4 +51,10 @@ public enum AdvancedReach
/// records Advanced metrics (train B, owner decision D111) — and only when the game makes that call.
/// </summary>
Game = 12,
/// <summary>
/// The game makes the call once, before FrameLedger is inside it: no shipped mode injects before a game's first
/// instruction, and no hook is ever installed on a game's thread. Never read (owner decision D129).
/// </summary>
BeforeAttach = 13,
}
@@ -42,6 +42,23 @@ public sealed record AdvancedSources(
/// <summary>The same for what each feature requires (<c>slGetFeatureRequirements</c>, <c>sl.feature.requirements</c>).</summary>
public AdvancedInGameCall? StreamlineFeatureRequirements { get; init; }
/// <summary>
/// The same for the six calls of 0.1.0-beta.45, one member a call: <c>slIsFeatureSupported</c> and
/// <c>slIsFeatureLoaded</c> (<c>sl.feature.support</c>), <c>slSetFeatureLoaded</c>, <c>slAllocateResources</c>,
/// <c>slFreeResources</c> and <c>slShutdown</c> (<c>sl.feature.lifecycle</c>). Null in every row stored before.
/// </summary>
public AdvancedInGameCall? StreamlineFeatureSupported { get; init; }
public AdvancedInGameCall? StreamlineFeatureLoaded { get; init; }
public AdvancedInGameCall? StreamlineSetFeatureLoaded { get; init; }
public AdvancedInGameCall? StreamlineAllocateResources { get; init; }
public AdvancedInGameCall? StreamlineFreeResources { get; init; }
public AdvancedInGameCall? StreamlineShutdown { get; init; }
/// <summary>Nothing asked yet.</summary>
public static AdvancedSources Unknown { get; } = new(AdvancedSourceStatus.Unknown, NvapiCode: null, AdvancedSourceStatus.Unknown, AdvancedSourceStatus.Unknown);
}
@@ -48,6 +48,20 @@ public sealed class InGameAdvancedSampler
// FfxApiDispatchUpscaleFlags (ffx_upscale.h), by bit.
private static readonly string[] _flagTokens = ["draw_debug_view", "non_linear_color_srgb", "non_linear_color_pq"];
// sl::Result (sl_result.h), by value.
private static readonly string[] _results =
[
"eOk", "eErrorIO", "eErrorDriverOutOfDate", "eErrorOSOutOfDate", "eErrorOSDisabledHWS", "eErrorDeviceNotCreated",
"eErrorNoSupportedAdapterFound", "eErrorAdapterNotSupported", "eErrorNoPlugins", "eErrorVulkanAPI", "eErrorDXGIAPI",
"eErrorD3DAPI", "eErrorNRDAPI", "eErrorNVAPI", "eErrorReflexAPI", "eErrorNGXFailed", "eErrorJSONParsing",
"eErrorMissingProxy", "eErrorMissingResourceState", "eErrorInvalidIntegration", "eErrorMissingInputParameter",
"eErrorNotInitialized", "eErrorComputeFailed", "eErrorInitNotCalled", "eErrorExceptionHandler", "eErrorInvalidParameter",
"eErrorMissingConstants", "eErrorDuplicatedConstants", "eErrorMissingOrInvalidAPI", "eErrorCommonConstantsMissing",
"eErrorUnsupportedInterface", "eErrorFeatureMissing", "eErrorFeatureNotSupported", "eErrorFeatureMissingHooks",
"eErrorFeatureFailedToLoad", "eErrorFeatureWrongPriority", "eErrorFeatureMissingDependency",
"eErrorFeatureManagerInvalidState", "eErrorInvalidState", "eWarnOutOfVRAM",
];
// sl::FeatureRequirementFlags (sl_core_types.h), by bit: the vendor's own names, shown as they are.
private static readonly string[] _requirementFlags =
[
@@ -97,11 +111,22 @@ public sealed class InGameAdvancedSampler
/// 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.
/// session attached later, and the App words it that way. Since 0.1.0-beta.45 <paramref name="question"/> may be
/// any bits of a slot's word 1 that one call writes: the answer bit of <c>slIsFeatureSupported</c> or
/// <c>slIsFeatureLoaded</c>, the two switch bits of <c>slSetFeatureLoaded</c>, a count's four bits.
/// </summary>
public AdvancedInGameCall FeatureCall(uint question, bool hookedIn) =>
(_featureAnswers & question) != 0 ? AdvancedInGameCall.Read : hookedIn ? AdvancedInGameCall.NeverCalled : AdvancedInGameCall.NotHooked;
/// <summary>What a word 1 carries when the game switched a feature through <c>slSetFeatureLoaded</c>, either way.</summary>
public const uint FeatureSwitched = FlAdvancedState.FeatureSwitchedOff | FlAdvancedState.FeatureSwitchedOn;
/// <summary>The four bits of a word 1 that count <c>slAllocateResources</c> calls.</summary>
public const uint FeatureAllocated = FlAdvancedState.FeatureCountMask << FlAdvancedState.FeatureAllocShift;
/// <summary>The four bits of a word 1 that count <c>slFreeResources</c> calls.</summary>
public const uint FeatureFreed = FlAdvancedState.FeatureCountMask << FlAdvancedState.FeatureFreeShift;
/// <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
@@ -200,9 +225,82 @@ public sealed class InGameAdvancedSampler
AddStreamlineFeatures(published, facts);
}
if ((published.State.ValidMask & (FlAdvancedValid.SlFeatures | FlAdvancedValid.SlShutdown)) != FlAdvancedValid.None)
{
AddStreamlineFeatureState(published, facts);
}
return facts;
}
// Whether Streamline says each feature is supported and loaded, and what the game did with it while the session
// watched (0.1.0-beta.45): two facts, rows named as the versions' are. A refusal is the answer to "is it
// supported", so the result is said by the vendor's own name whatever it is. A count that reached 15 stopped there.
private static void AddStreamlineFeatureState(InGameAdvanced published, List<AdvancedFact> facts)
{
ref readonly FlAdvancedState s = ref published.State;
var support = new List<AdvancedRow>(8);
var lifecycle = new List<AdvancedRow>(8);
for (int slot = 0; slot < FlAdvancedState.FeatureSlots && s.ValidMask.HasFlag(FlAdvancedValid.SlFeatures); slot++)
{
uint id = s.FeatureWordAt(slot, 0);
if (id == 0)
{
break;
}
string feature = FeatureName(id - 1);
uint word = s.FeatureWordAt(slot, 1);
if ((word & FlAdvancedState.FeatureSupportAnswered) != 0)
{
support.Add(new AdvancedRow(feature + " · slIsFeatureSupported", ResultName((word >> FlAdvancedState.FeatureSupportResultShift) & 0xFFu)));
}
if ((word & FlAdvancedState.FeatureLoadedAnswered) != 0)
{
string loaded = (word & FlAdvancedState.FeatureLoadedValue) != 0 ? "on" : "off";
support.Add(new AdvancedRow(feature + " · slIsFeatureLoaded", loaded, loaded));
}
// Bit 0 seen off, bit 1 seen on: the two bits AddSwitch reads.
uint switched = ((word & FlAdvancedState.FeatureSwitchedOff) != 0 ? 1u : 0u) | ((word & FlAdvancedState.FeatureSwitchedOn) != 0 ? 2u : 0u);
AddSwitch(lifecycle, feature + " · slSetFeatureLoaded", switched);
AddCount(lifecycle, feature + " · slAllocateResources", (word >> FlAdvancedState.FeatureAllocShift) & FlAdvancedState.FeatureCountMask);
AddCount(lifecycle, feature + " · slFreeResources", (word >> FlAdvancedState.FeatureFreeShift) & FlAdvancedState.FeatureCountMask);
}
if (s.ValidMask.HasFlag(FlAdvancedValid.SlShutdown))
{
lifecycle.Add(new AdvancedRow("slShutdown", s.SlShutdowns.ToString(CultureInfo.InvariantCulture)));
}
if (support.Count > 0)
{
facts.Add(Fact("sl.feature.support", AdvancedValue.OfRows(support)));
}
if (lifecycle.Count > 0)
{
facts.Add(Fact("sl.feature.lifecycle", AdvancedValue.OfRows(lifecycle)));
}
}
// A four-bit count of calls: nothing where the game made none, the number, or "15 or more" in signs no language
// needs translated - the count stops at 15.
private static void AddCount(List<AdvancedRow> rows, string name, uint count)
{
if (count != 0)
{
rows.Add(new AdvancedRow(name, count >= FlAdvancedState.FeatureCountMask ? "≥ 15" : count.ToString(CultureInfo.InvariantCulture)));
}
}
// sl::Result by the vendor's own name (sl_result.h): forty codes, the same ones in the same order at every
// Streamline tag from v2.0.0 to v2.14.16 (17_HOOK_ENGINE, the row of slIsFeatureSupported). A number past the list
// is said as a number; 0xFF is what the capture side writes for a code a byte could not carry.
private static string ResultName(uint code) =>
code < (uint)_results.Length ? _results[code] : string.Create(CultureInfo.InvariantCulture, $"result {code}");
// 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
@@ -638,7 +736,7 @@ public sealed class InGameAdvancedSampler
}
return new FactKey(
s.ValidMask & (FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxFgConfig | FlAdvancedValid.SlConstants | FlAdvancedValid.SlFeatures),
s.ValidMask & (FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxFgConfig | FlAdvancedValid.SlConstants | FlAdvancedValid.SlFeatures | FlAdvancedValid.SlShutdown),
s.DlssOutputWidth,
s.DlssOutputHeight,
s.DlssPreExposureBits,
@@ -675,13 +773,14 @@ public sealed class InGameAdvancedSampler
private static ulong FeaturesHash(InGameAdvanced published)
{
ref readonly FlAdvancedState s = ref published.State;
if (!s.ValidMask.HasFlag(FlAdvancedValid.SlFeatures))
if ((s.ValidMask & (FlAdvancedValid.SlFeatures | FlAdvancedValid.SlShutdown)) == FlAdvancedValid.None)
{
return 0;
}
ulong hash = 14695981039346656037UL;
for (int slot = 0; slot < FlAdvancedState.FeatureSlots && s.FeatureWordAt(slot, 0) != 0; slot++)
// The shutdowns first (0.1.0-beta.45): a count, but one that moves a handful of times in a session at most.
ulong hash = (14695981039346656037UL ^ s.SlShutdowns) * 1099511628211UL;
for (int slot = 0; slot < FlAdvancedState.FeatureSlots && s.ValidMask.HasFlag(FlAdvancedValid.SlFeatures) && s.FeatureWordAt(slot, 0) != 0; slot++)
{
for (int word = 0; word < FlAdvancedState.FeatureWords; word++)
{
@@ -515,12 +515,18 @@ public sealed class SessionRecorder : ISessionRecorder
FsrFrameGeneration = calls.FrameGeneration,
StreamlineFeatureVersion = calls.FeatureVersion,
StreamlineFeatureRequirements = calls.FeatureRequirements,
StreamlineFeatureSupported = calls.FeatureSupported,
StreamlineFeatureLoaded = calls.FeatureLoaded,
StreamlineSetFeatureLoaded = calls.SetFeatureLoaded,
StreamlineAllocateResources = calls.AllocateResources,
StreamlineFreeResources = calls.FreeResources,
StreamlineShutdown = calls.Shutdown,
}));
}
/// <summary>
/// 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
/// 0.1.0-beta.44, ten since 0.1.0-beta.45), 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>
@@ -536,16 +542,28 @@ public sealed class SessionRecorder : ISessionRecorder
_inGame.Call(FlAdvancedValid.SlConstants, hooks.HasFlag(FlHookFamily.SlConstants)),
_inGame.Call(FlAdvancedValid.FfxFgConfig, hooks.HasFlag(FlHookFamily.FfxConfigure)),
_inGame.FeatureCall(FlAdvancedState.FeatureVersionAnswered, hooks.HasFlag(FlHookFamily.SlFeatureVersion)),
_inGame.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hooks.HasFlag(FlHookFamily.SlFeatureRequirements)));
_inGame.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hooks.HasFlag(FlHookFamily.SlFeatureRequirements)),
_inGame.FeatureCall(FlAdvancedState.FeatureSupportAnswered, hooks.HasFlag(FlHookFamily.SlFeatureSupported)),
_inGame.FeatureCall(FlAdvancedState.FeatureLoadedAnswered, hooks.HasFlag(FlHookFamily.SlFeatureLoaded)),
_inGame.FeatureCall(InGameAdvancedSampler.FeatureSwitched, hooks.HasFlag(FlHookFamily.SlSetFeatureLoaded)),
_inGame.FeatureCall(InGameAdvancedSampler.FeatureAllocated, hooks.HasFlag(FlHookFamily.SlAllocateResources)),
_inGame.FeatureCall(InGameAdvancedSampler.FeatureFreed, hooks.HasFlag(FlHookFamily.SlFreeResources)),
_inGame.Call(FlAdvancedValid.SlShutdown, hooks.HasFlag(FlHookFamily.SlShutdown)));
}
/// <summary>The four calls' states, compared as one value when deciding whether the session's context moved.</summary>
/// <summary>The ten 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);
AdvancedInGameCall? FeatureRequirements,
AdvancedInGameCall? FeatureSupported,
AdvancedInGameCall? FeatureLoaded,
AdvancedInGameCall? SetFeatureLoaded,
AdvancedInGameCall? AllocateResources,
AdvancedInGameCall? FreeResources,
AdvancedInGameCall? Shutdown);
/// <summary>
/// What the row says of the entries read inside the game: read, measured inside the game with none of their
+26
View File
@@ -1016,6 +1016,32 @@ public unsafe struct FlAdvancedState
/// <summary>Word 1 of a slot: <c>slGetFeatureRequirements</c> answered for this feature.</summary>
public const uint FeatureRequirementsAnswered = 1u << 1;
/// <summary>Word 1 (0.1.0-beta.45): <c>slIsFeatureSupported</c> answered; its <c>sl::Result</c> is in bits 8..15.</summary>
public const uint FeatureSupportAnswered = 1u << 2;
/// <summary>Word 1: <c>slIsFeatureLoaded</c> answered, and <see cref="FeatureLoadedValue"/> is what it said.</summary>
public const uint FeatureLoadedAnswered = 1u << 3;
public const uint FeatureLoadedValue = 1u << 4;
/// <summary>Word 1: the game was seen to switch the feature off through <c>slSetFeatureLoaded</c>. A session's.</summary>
public const uint FeatureSwitchedOff = 1u << 5;
/// <summary>Word 1: the game was seen to switch it on. A session's.</summary>
public const uint FeatureSwitchedOn = 1u << 6;
/// <summary>Word 1: where the result of <c>slIsFeatureSupported</c> starts; eight bits, 0xFF a code a byte cannot carry.</summary>
public const int FeatureSupportResultShift = 8;
/// <summary>Word 1: where the count of <c>slAllocateResources</c> calls starts; four bits, stopping at 15. A session's.</summary>
public const int FeatureAllocShift = 16;
/// <summary>Word 1: the same for <c>slFreeResources</c>.</summary>
public const int FeatureFreeShift = 20;
/// <summary>A four-bit count's mask, and the value at which it stopped counting.</summary>
public const uint FeatureCountMask = 0xFu;
/// <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
@@ -366,6 +366,38 @@ public sealed class AgentEndToEndTests : IDisposable
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);
AssertWhatTheHarnessDidWithStreamlinesFeatures(row);
}
/// <summary>
/// 0.1.0-beta.45: whether each feature is supported and loaded, as the stub says - a refusal is the answer and is
/// named - and what the harness does with two of them every sixteenth frame. The counts depend on how long the
/// session ran; that they are there, and for the right feature, does not.
/// </summary>
private static void AssertWhatTheHarnessDidWithStreamlinesFeatures(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)];
Rows("sl.feature.support").Should().Equal(
"kFeatureDLSS · slIsFeatureSupported=eOk",
"kFeatureDLSS · slIsFeatureLoaded=on",
"kFeatureDLSS_G · slIsFeatureSupported=eOk",
"kFeatureNIS · slIsFeatureSupported=eErrorFeatureNotSupported",
"kFeatureReflex · slIsFeatureSupported=eErrorFeatureMissing",
"kFeaturePCL · slIsFeatureLoaded=off");
string[] lifecycle = Rows("sl.feature.lifecycle");
lifecycle.Should().Contain("kFeatureDLSS · slSetFeatureLoaded=on").And.Contain("kFeatureDLSS_G · slSetFeatureLoaded=on_and_off");
lifecycle.Should().Contain(static r => r.StartsWith("kFeatureDLSS · slAllocateResources=", StringComparison.Ordinal))
.And.Contain(static r => r.StartsWith("kFeatureDLSS_G · slFreeResources=", StringComparison.Ordinal))
.And.Contain(static r => r.StartsWith("slShutdown=", StringComparison.Ordinal))
.And.NotContain(static r => r.StartsWith("kFeatureDLSS_G · slAllocateResources=", StringComparison.Ordinal));
sources.StreamlineFeatureSupported.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineFeatureLoaded.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineSetFeatureLoaded.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineAllocateResources.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineFreeResources.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
sources.StreamlineShutdown.Should().Be(AdvancedInGameCall.Read, 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>
@@ -395,6 +427,8 @@ public sealed class AgentEndToEndTests : IDisposable
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
sources.StreamlineFeatureVersion.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
sources.StreamlineFeatureRequirements.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
sources.StreamlineFeatureSupported.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
sources.StreamlineShutdown.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,8 @@ public sealed class AdvancedPresenterTests
At(live, id).Status.Should().Be(Strings.Advanced_Status_InGame);
}
At(live, "sl.init.preferences").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.BeforeAttach), "a call made before FrameLedger is in the game is never read, and the page says why (D129)");
AdvancedLabels.Reach(AdvancedReach.BeforeAttach).Should().NotBe(nameof(AdvancedReach.BeforeAttach), "the reason has words of its own in every language");
live.Where(static r => r.IsRead).Should().HaveCount(AdvancedMetricCatalog.All.Count(static m => m.IsRead));
}
@@ -311,6 +312,44 @@ 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 ASessionsSourcesLineNamesTheSixCallsOfBeta45UnderWhatBecameOfEach()
{
// 0.1.0-beta.45: six calls would be six sentences; they are one, each call by its own name under which of the
// three things happened to it, and "none" where a group is empty. A row stored before has none of the six.
AdvancedSources beta44 = AdvancedFixtures.Sources with
{
InGame = AdvancedInGameStatus.Reading,
StreamlineConstants = AdvancedInGameCall.Read,
FsrFrameGeneration = AdvancedInGameCall.NotHooked,
StreamlineFeatureVersion = AdvancedInGameCall.Read,
StreamlineFeatureRequirements = AdvancedInGameCall.Read,
};
string before = AdvancedPresenter.SourcesLine(beta44);
before.Should().NotContain("slIsFeatureSupported");
AdvancedSources all = beta44 with
{
StreamlineFeatureSupported = AdvancedInGameCall.Read,
StreamlineFeatureLoaded = AdvancedInGameCall.Read,
StreamlineSetFeatureLoaded = AdvancedInGameCall.NeverCalled,
StreamlineAllocateResources = AdvancedInGameCall.Read,
StreamlineFreeResources = AdvancedInGameCall.NeverCalled,
StreamlineShutdown = AdvancedInGameCall.NeverCalled,
};
string line = AdvancedPresenter.SourcesLine(all);
line.Should().StartWith(before, "what was said before is said as before");
line.Should().EndWith(string.Format(
CultureInfo.CurrentCulture,
Strings.Advanced_InGameMoreCallsLine,
"slIsFeatureSupported, slIsFeatureLoaded, slAllocateResources",
"slSetFeatureLoaded, slFreeResources, slShutdown",
AdvancedLabels.Token("none")));
// One of the six missing - a row no build writes - and the sentence is not there at all.
AdvancedPresenter.SourcesLine(all with { StreamlineShutdown = null }).Should().Be(before);
}
[Fact]
public void ASessionsSourcesLineSaysOfTheTwoQuestionsAboutAFeatureThatAGameAsksThemWhileItStarts()
{
@@ -221,6 +221,35 @@ public sealed class AdvancedJsonTests
older.StreamlineFeatureRequirements.Should().BeNull();
}
[Fact]
public void WhatBecameOfTheSixCallsOfBeta45SurvivesTheLedgerAndAnOlderRowSaysNothingOfThem()
{
AdvancedSources written = AdvancedSources.Unknown with
{
InGame = AdvancedInGameStatus.Reading,
StreamlineFeatureSupported = AdvancedInGameCall.Read,
StreamlineFeatureLoaded = AdvancedInGameCall.NeverCalled,
StreamlineSetFeatureLoaded = AdvancedInGameCall.NeverCalled,
StreamlineAllocateResources = AdvancedInGameCall.Read,
StreamlineFreeResources = AdvancedInGameCall.NotHooked,
StreamlineShutdown = AdvancedInGameCall.NeverCalled,
};
string json = AdvancedJson.OfSession([], written);
(_, AdvancedSources read) = AdvancedJson.ParseSession(json);
json.Should().Contain("\"streamlineFeatureSupported\":\"Read\"").And.Contain("\"streamlineFreeResources\":\"NotHooked\"")
.And.Contain("\"streamlineShutdown\":\"NeverCalled\"");
read.Should().Be(written);
// 0.1.0-beta.44 wrote exactly this: the four calls of the two releases before and none of these six.
const string beta44 = """{"facts":[],"sources":{"nvapi":"Reading","sensors":"Reading","elevatedSensors":"Reading","inGame":"Reading","streamlineConstants":"Read","fsrFrameGeneration":"NeverCalled","streamlineFeatureVersion":"Read","streamlineFeatureRequirements":"Read"}}""";
(_, AdvancedSources older) = AdvancedJson.ParseSession(beta44);
older.StreamlineFeatureRequirements.Should().Be(AdvancedInGameCall.Read);
older.StreamlineFeatureSupported.Should().BeNull("a row that never said is not a row that said the hook was not in");
older.StreamlineShutdown.Should().BeNull();
}
[Theory]
[InlineData(AdvancedInGameStatus.Reading)]
[InlineData(AdvancedInGameStatus.NothingSeen)]
@@ -108,6 +108,7 @@ public sealed partial class AdvancedMetricCatalogTests
// 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).
// 0.1.0-beta.45: two more, from six calls - whether a feature is supported and loaded, and what the game does with it.
// 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(
@@ -116,9 +117,13 @@ public sealed partial class AdvancedMetricCatalogTests
"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",
"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);
"sl.feature.versions", "sl.feature.requirements",
"sl.feature.support", "sl.feature.lifecycle");
// What a game starts Streamline with is not read and will not be (D129): the call is made before FrameLedger is
// inside the game. No entry waits for a hook any more.
AdvancedMetricCatalog.Find("sl.init.preferences")!.Reach.Should().Be(AdvancedReach.BeforeAttach);
AdvancedMetricCatalog.Find("sl.init.preferences")!.IsRead.Should().BeFalse();
_all.Should().NotContain(static m => m.Reach == 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);
@@ -411,6 +411,101 @@ public sealed class InGameAdvancedSamplerTests
sampler.FeatureCall(FlAdvancedState.FeatureRequirementsAnswered, hookedIn: false).Should().Be(AdvancedInGameCall.Read, "a publication that carried it is the proof");
}
[Fact]
public void WhetherAFeatureIsSupportedAndLoadedAndWhatTheGameDidWithItAreTwoFacts()
{
// 0.1.0-beta.45: six more calls, all kept in word 1 of a feature's slot but the shutdowns. DLSS - supported,
// loaded, switched on, its resources allocated three times; frame generation - supported, switched off and
// on, freed fifteen times or more (the count stops there); NIS - refused, and the refusal is the answer; PCL -
// asked only whether it is loaded, and it is not. Streamline shut down twice.
const uint dlss = FlAdvancedState.FeatureSupportAnswered | FlAdvancedState.FeatureLoadedAnswered | FlAdvancedState.FeatureLoadedValue
| FlAdvancedState.FeatureSwitchedOn | (3u << FlAdvancedState.FeatureAllocShift);
const uint frameGeneration = FlAdvancedState.FeatureSupportAnswered | FlAdvancedState.FeatureSwitchedOff | FlAdvancedState.FeatureSwitchedOn
| (15u << FlAdvancedState.FeatureFreeShift);
const uint nis = FlAdvancedState.FeatureSupportAnswered | (32u << FlAdvancedState.FeatureSupportResultShift);
FlAdvancedState s = InGameStates.WithFeature(InGameStates.Empty(), 0, 0, dlss);
s = InGameStates.WithFeature(s, 1, 1000, frameGeneration);
s = InGameStates.WithFeature(s, 2, 2, nis);
s = InGameStates.WithFeature(s, 3, 4, FlAdvancedState.FeatureLoadedAnswered);
s = s with { SlShutdowns = 2, ValidMask = s.ValidMask | FlAdvancedValid.SlShutdown };
var sampler = new InGameAdvancedSampler();
sampler.Take(new InGameAdvanced(s));
AdvancedFact support = Fact(sampler, "sl.feature.support");
Rows(support).Should().Equal(
"kFeatureDLSS · slIsFeatureSupported=eOk",
"kFeatureDLSS · slIsFeatureLoaded=on",
"kFeatureDLSS_G · slIsFeatureSupported=eOk",
"kFeatureNIS · slIsFeatureSupported=eErrorFeatureNotSupported",
"kFeaturePCL · slIsFeatureLoaded=off");
support.Value.Rows![1].Token.Should().Be("on", "the App translates the word");
support.Value.Rows![0].Token.Should().BeNull("a result is the vendor's own name");
Rows(Fact(sampler, "sl.feature.lifecycle")).Should().Equal(
"kFeatureDLSS · slSetFeatureLoaded=on",
"kFeatureDLSS · slAllocateResources=3",
"kFeatureDLSS_G · slSetFeatureLoaded=on_and_off",
"kFeatureDLSS_G · slFreeResources=≥ 15",
"slShutdown=2");
sampler.Facts.Should().NotContain(static f => f.Id == "sl.feature.versions" || f.Id == "sl.feature.requirements", "neither question of beta.44 was answered");
}
[Fact]
public void AResultWithNoNameAShutdownAloneAndAFeatureNobodyTouchedAreSaidAsTheyAre()
{
// The last code the vendor names, the first number past its list, and what the capture side writes for a code
// a byte could not carry. A slot with nothing of this release in word 1 adds no row.
FlAdvancedState s = InGameStates.WithFeature(InGameStates.Empty(), 0, 0, FlAdvancedState.FeatureSupportAnswered | (39u << FlAdvancedState.FeatureSupportResultShift));
s = InGameStates.WithFeature(s, 1, 3, FlAdvancedState.FeatureSupportAnswered | (40u << FlAdvancedState.FeatureSupportResultShift));
s = InGameStates.WithFeature(s, 2, 5, FlAdvancedState.FeatureSupportAnswered | (0xFFu << FlAdvancedState.FeatureSupportResultShift));
s = InGameStates.WithFeature(s, 3, 1001, FlAdvancedState.FeatureVersionAnswered, 2, 14, 1);
var sampler = new InGameAdvancedSampler();
sampler.Take(new InGameAdvanced(s));
Rows(Fact(sampler, "sl.feature.support")).Should().Equal(
"kFeatureDLSS · slIsFeatureSupported=eWarnOutOfVRAM",
"kFeatureReflex · slIsFeatureSupported=result 40",
"kFeatureDeepDVC · slIsFeatureSupported=result 255");
sampler.Facts.Should().NotContain(static f => string.Equals(f.Id, "sl.feature.lifecycle", StringComparison.Ordinal), "the game switched, allocated, freed and shut down nothing");
// Streamline shut down in a game that asked about no feature: one row, and no other fact.
var shutdown = new InGameAdvancedSampler();
shutdown.Take(new InGameAdvanced(InGameStates.Empty() with { ValidMask = FlAdvancedValid.SlShutdown, SlShutdowns = 1 }));
Rows(Fact(shutdown, "sl.feature.lifecycle")).Should().Equal("slShutdown=1");
shutdown.Facts.Should().ContainSingle();
}
[Fact]
public void EachOfTheSixCallsOfBeta45IsItsOwnQuestionAndACountThatMovesMakesTheFactsNew()
{
var sampler = new InGameAdvancedSampler();
sampler.FeatureCall(FlAdvancedState.FeatureSupportAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
sampler.Call(FlAdvancedValid.SlShutdown, hookedIn: false).Should().Be(AdvancedInGameCall.NotHooked);
// Supported and one allocation: those two are read; loaded, switched, freed and shut down are not.
const uint first = FlAdvancedState.FeatureSupportAnswered | (1u << FlAdvancedState.FeatureAllocShift);
sampler.Take(new InGameAdvanced(InGameStates.WithFeature(InGameStates.Empty(), 0, 0, first)));
IReadOnlyList<AdvancedFact> one = sampler.Facts;
sampler.FeatureCall(FlAdvancedState.FeatureSupportAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.Read);
sampler.FeatureCall(InGameAdvancedSampler.FeatureAllocated, hookedIn: true).Should().Be(AdvancedInGameCall.Read);
sampler.FeatureCall(FlAdvancedState.FeatureLoadedAnswered, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
sampler.FeatureCall(InGameAdvancedSampler.FeatureSwitched, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
sampler.FeatureCall(InGameAdvancedSampler.FeatureFreed, hookedIn: false).Should().Be(AdvancedInGameCall.NotHooked);
sampler.Call(FlAdvancedValid.SlShutdown, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
// The same word again: the same list. A second allocation: a new one. A shutdown: a new one, and read.
sampler.Take(new InGameAdvanced(InGameStates.WithFeature(InGameStates.Empty(2), 0, 0, first)));
sampler.Facts.Should().BeSameAs(one, "nothing a fact is made of moved");
const uint second = FlAdvancedState.FeatureSupportAnswered | (2u << FlAdvancedState.FeatureAllocShift);
sampler.Take(new InGameAdvanced(InGameStates.WithFeature(InGameStates.Empty(3), 0, 0, second)));
IReadOnlyList<AdvancedFact> two = sampler.Facts;
two.Should().NotBeSameAs(one);
Rows(Fact(sampler, "sl.feature.lifecycle")).Should().Equal("kFeatureDLSS · slAllocateResources=2");
FlAdvancedState withShutdown = InGameStates.WithFeature(InGameStates.Empty(4), 0, 0, second);
sampler.Take(new InGameAdvanced(withShutdown with { SlShutdowns = 1, ValidMask = withShutdown.ValidMask | FlAdvancedValid.SlShutdown }));
sampler.Facts.Should().NotBeSameAs(two);
sampler.Call(FlAdvancedValid.SlShutdown, hookedIn: true).Should().Be(AdvancedInGameCall.Read);
}
[Fact]
public void ACountDoesNotRebuildTheFactsWhileTheSessionRunsAndIsExactOnceItConcludes()
{
@@ -475,13 +570,14 @@ 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);
both = InGameStates.WithFeature(
both, 0, 0, FlAdvancedState.FeatureVersionAnswered | FlAdvancedState.FeatureRequirementsAnswered | FlAdvancedState.FeatureSupportAnswered | FlAdvancedState.FeatureSwitchedOn, 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", "sl.feature.versions", "sl.feature.requirements"]);
["sl.constants.jitter", "sl.constants.resets", "ffx.framegen.config", "ffx.upscale.flags", "sl.dlss.presets", "sl.feature.versions", "sl.feature.requirements", "sl.feature.support", "sl.feature.lifecycle"]);
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);
}
@@ -1006,8 +1006,14 @@ public sealed class SessionRecorderTests : IAsyncDisposable
FsrFrameGeneration = AdvancedInGameCall.NotHooked,
StreamlineFeatureVersion = AdvancedInGameCall.NotHooked,
StreamlineFeatureRequirements = AdvancedInGameCall.NotHooked,
StreamlineFeatureSupported = AdvancedInGameCall.NotHooked,
StreamlineFeatureLoaded = AdvancedInGameCall.NotHooked,
StreamlineSetFeatureLoaded = AdvancedInGameCall.NotHooked,
StreamlineAllocateResources = AdvancedInGameCall.NotHooked,
StreamlineFreeResources = AdvancedInGameCall.NotHooked,
StreamlineShutdown = AdvancedInGameCall.NotHooked,
},
"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");
"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 ten hooks that are installed only for Advanced metrics");
hub.Released.Should().Be(1);
}