Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19c4938df3 |
No files matched your search
@@ -37,6 +37,23 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
### Added
|
||||
|
||||
- **Advanced metrics: a session now shows what the game told Streamline each frame and how it configured FSR frame
|
||||
generation.** For a game FrameLedger measures from inside, a session recorded with **Advanced metrics** on keeps
|
||||
— beside what the game told DLSS and FSR — the largest jitter offset, the motion-vector scale and how motion
|
||||
vectors are stored, the near and far planes and whether depth is inverted, the range of the field of view, the
|
||||
aspect ratio, whether the projection is orthographic and how often the game reset the upscaler's history
|
||||
(Streamline); and whether FSR frame generation was configured on, whether it may run asynchronously, its flags,
|
||||
whether only generated frames are presented, and the part of the picture it generates in. A setting the game
|
||||
changed during the session reads *on and off*. The line under the session now also says, for each of the two,
|
||||
whether it was read, hooked and never called by the game, or not hooked because the game did not load the
|
||||
library — so an empty page says which it is. These are what the game asked for, not a check of what happened;
|
||||
neither has been confirmed on a real game yet. Never read: where the camera is, which way it looks, its
|
||||
matrices.
|
||||
|
||||
- **The terms are shown once after this update: Privacy Policy 2.17.** It names the two new readings above and says
|
||||
that the two calls they come from are intercepted in a game only once a session with Advanced metrics on has
|
||||
started there. Nothing is sent anywhere, as before.
|
||||
|
||||
- **Advanced metrics, inside the game: how the game configures FSR frame generation** (the part inside the game;
|
||||
what a session shows of it comes with the same release). With **Advanced metrics** on, FrameLedger now also
|
||||
reads, from the call a game makes to configure AMD's frame generation, whether generation is on, whether it may
|
||||
|
||||
@@ -122,6 +122,9 @@ src/
|
||||
# memory's region 5 - what a hooked game told DLSS and FSR, read by the Overlay
|
||||
# only while the session asks (ICaptureObserver.WantsInGameAdvanced) - into session
|
||||
# facts and two adv.* series; reach `Game` in the catalog; no schema change.
|
||||
# Since 0.1.0-beta.43 also what the game tells Streamline each frame and how it
|
||||
# configures FSR frame generation, from two calls hooked only once Advanced has been
|
||||
# asked for; AdvancedInGameCall says of each: read, never called, or not hooked.
|
||||
FrameLedger.Infrastructure/ # SQLite, shm reader, vendor APIs, injector interop, parsers,
|
||||
# and Capture/ (PR-C): ShmRingAttacher/ShmCaptureSink over the
|
||||
# reader, HeldProcessLivenessSource, TargetResolver (path only,
|
||||
|
||||
+11
-1
@@ -184,7 +184,17 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
|
||||
library. The session says which it was — nothing seen, or not measured inside the game — and neither means the
|
||||
game uses no upscaler. They are the game's words, not a check of what the upscaler did; the field of view is a
|
||||
lowest and highest value, never a line over time; FSR's memory is a point where the game asked, so most sessions
|
||||
have none. **None of it has been read from a real game yet.**
|
||||
have none. FSR's upscaling values have been read from real games; **the DLSS options have not been confirmed on
|
||||
one yet.**
|
||||
- **What a game tells Streamline each frame, and how it configures FSR frame generation** (since 0.1.0-beta.43)
|
||||
are read from two calls FrameLedger hooks **only once a session with Advanced metrics on has started in that
|
||||
game** — a session recorded with the option off puts neither hook in. Streamline's values are those of **the
|
||||
first viewport that called**: a game with several (split screen, a picture-in-picture view) shows one, and the
|
||||
count of calls covers all. The frame-generation rows are **what the game asked for** — a game that asks for
|
||||
generation and gets none still reads "on", and the session's summary is where what was generated is measured. A
|
||||
setting the game changed during the session reads "on and off". The session's line says, for each of the two,
|
||||
whether it was read, hooked and never called by the game, or not hooked (the game did not load the library).
|
||||
Streamline 1.x is not read. **Neither has been confirmed on a real game yet.**
|
||||
- **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
|
||||
|
||||
@@ -114,7 +114,11 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
|
||||
> range, field-of-view range, flags and frame time it hands FSR, are read from the arguments of the calls
|
||||
> FrameLedger intercepts and shown as the game stated them — not checked against what the upscaler did. Most games
|
||||
> set their DLSS options through a call that cannot be intercepted and show none; the FSR values need FSR 3.1 or
|
||||
> later through AMD's own library. None of it has been read from a real game yet.
|
||||
> later through AMD's own library. Since beta.43 also what a game tells NVIDIA Streamline about each frame (jitter,
|
||||
> motion-vector scale, depth range, field-of-view range, how often it reset the upscaler's history — for the first
|
||||
> viewport that called, where a game has several) and how it configures FSR frame generation (the settings it asked
|
||||
> for, not whether frames were generated). FSR's upscaling values have been read from real games; the DLSS options,
|
||||
> Streamline's constants and the frame-generation configuration have not been confirmed on one yet.
|
||||
> - **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
|
||||
|
||||
@@ -761,7 +761,10 @@ Sequential embedded SQL (`Migrations/0001_init.sql`, `0002_*.sql`, …), applied
|
||||
> 0.1.0-beta.40 (train B) the same row holds what the game told its upscaler** — the session facts of the entries
|
||||
> whose reach is `Game`, after the driver's, and `sources.inGame` (`Reading`, `NothingSeen`, `NotHooked`; absent in
|
||||
> a row beta.39 wrote, which reads as "not said") — and its two series are `adv.ffx.upscale.frame_time_delta` and
|
||||
> `adv.ffx.memory_usage` in `sensor_blobs`. No column and no script: schema 23 as it was. A session deleted
|
||||
> `adv.ffx.memory_usage` in `sensor_blobs`. **Since 0.1.0-beta.43** `sources` may also hold `streamlineConstants`
|
||||
> and `fsrFrameGeneration` (`Read`, `NeverCalled`, `NotHooked`; `Application.Advanced.AdvancedInGameCall`) — what
|
||||
> became, in that session, of the two calls hooked only for Advanced metrics; both absent in a row written before,
|
||||
> and in a session not measured inside the game. No column and no script: schema 23 as it was. A session deleted
|
||||
> 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;
|
||||
|
||||
+4
-1
@@ -873,7 +873,10 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
|
||||
> call* (`Advanced_Status_InGame`): it is not a state of the PC. What became of those entries in one session is in
|
||||
> that session's sources line on the Session tab (`Advanced_InGameLine` with `AdvInGame_*`): read, the game made none
|
||||
> of the calls, or the session was not measured inside the game; a session stored before beta.40 has no such
|
||||
> sentence.
|
||||
> sentence. **Since 0.1.0-beta.43** a session measured inside the game has one more
|
||||
> (`Advanced_InGameCallsLine` with `AdvInGameCall_*`): for what the game tells Streamline each frame and for how it
|
||||
> configures FSR frame generation, each *read*, *hooked - the game did not make the call*, or *not hooked - the
|
||||
> game did not load the library that has the call*. "Nothing here" then says which of the two it is.
|
||||
>
|
||||
> **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
|
||||
|
||||
@@ -752,7 +752,7 @@ planning, the design reviewed against the code before it was approved.
|
||||
`ICaptureObserver.WantsInGameAdvanced`; `CaptureSession` writes the word either way as the ring is attached, before
|
||||
its first guard result, and from then on carries each publication of region 5 on `CaptureProgress.InGameAdvanced`
|
||||
— one instance a publication, the same one on the ten ticks between two. `Application.Capture.InGameAdvancedSampler`
|
||||
turns a publication into what a session stores: the session facts of the thirteen `Game` entries below, 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), 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
|
||||
@@ -764,6 +764,20 @@ planning, the design reviewed against the code before it was approved.
|
||||
`NotHooked`. The page says it in the session's sources line and, on Sources, that such an entry is read inside a
|
||||
game FrameLedger measures when the game makes the call. The aliasable part of FSR's memory is published and not
|
||||
shown: the catalog has one memory entry.
|
||||
**The second step, 2026-11-12 (0.1.0-beta.43, PR-4).** Six more entries have reach `Game`: `sl.constants.jitter`,
|
||||
`.motion_vectors`, `.depth`, `.projection`, `.resets` and `ffx.framegen.config`, from the two calls hooked only
|
||||
for Advanced metrics (`17_HOOK_ENGINE` §Hook inventory, `slSetConstants` and `ffxConfigure`). The sampler makes
|
||||
them from members region 5 already had (layout 5 as it was; schema 23 as it was): a switch is `on`, `off` or
|
||||
`on_and_off` from the two words of what was seen, the flags are AMD's own names, the rectangle is the last one
|
||||
the game gave and is left out where the capture side could not state it, the field of view is a range (D114).
|
||||
**A count is not part of what makes the facts new** — `sl.constants.resets` grows all session, and a context
|
||||
rewritten on each would be one a second — so `InGameAdvancedSampler.Conclude` brings it up to the last
|
||||
publication once, when the session ends. `AdvancedSources.StreamlineConstants` and `.FsrFrameGeneration`
|
||||
(`AdvancedInGameCall`; null in every row written before, and in a session not measured inside the game) say for
|
||||
each call which of three things happened: `Read`; `NeverCalled` — the capture side published the hook's family
|
||||
(`FlHookFamily.SlConstants`, `.FfxConfigure` in the writer state's mask) and no publication carried the group; or
|
||||
`NotHooked` — the family was never published, which is a game that did not load the library, a Streamline 1.x
|
||||
interposer, or a patch that was refused. The page says it in one more sentence of the session's sources line.
|
||||
- **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
|
||||
@@ -799,6 +813,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.17** at beta.43 (approved with that release's plan): 2.16 listed DLSS's and FSR's upscaling
|
||||
parameters by name, and Streamline's per-frame constants and the frame-generation configuration are in neither
|
||||
list, so they are named — and §4 says the two calls are intercepted only once a session with the option on has
|
||||
started in the game.
|
||||
- **Privacy Policy 2.16** at beta.40, once for the three releases: with Advanced metrics on, for a game FrameLedger
|
||||
injects into, the parameters the game gives its upscaler and frame generation through the intercepted calls are
|
||||
*stored* — sizes, presets, exposure, sharpening, the jitter's, the depth's and the field of view's ranges, flags,
|
||||
@@ -984,15 +1002,15 @@ that is not built — Train B), `Spike` (Trains C and D), `Refused`, `Deferred`,
|
||||
|
||||
| Id | What it is | Scope | Source | Reach | Unit |
|
||||
|---|---|---|---|---|---|
|
||||
| `sl.constants.jitter` | The jitter offsets the game gave Streamline | SessionFact | Streamline | NewHook | Text |
|
||||
| `sl.constants.motion_vectors` | Motion-vector scale, and whether they are 3D, dilated, jittered | SessionFact | Streamline | NewHook | Text |
|
||||
| `sl.constants.depth` | Near and far planes, and whether depth is inverted | SessionFact | Streamline | NewHook | Text |
|
||||
| `sl.constants.projection` | Field of view, aspect ratio, orthographic or not | SessionFact | Streamline | NewHook | Text |
|
||||
| `sl.constants.resets` | How often the game reset the upscaler's history | SessionFact | Streamline | NewHook | Count |
|
||||
| `sl.constants.jitter` | The jitter offsets the game gave Streamline | SessionFact | Streamline | Game | Table |
|
||||
| `sl.constants.motion_vectors` | Motion-vector scale, and whether they are 3D, dilated, jittered | SessionFact | Streamline | Game | Table |
|
||||
| `sl.constants.depth` | Near and far planes, and whether depth is inverted | SessionFact | Streamline | Game | Table |
|
||||
| `sl.constants.projection` | Field of view, aspect ratio, orthographic or not | SessionFact | Streamline | Game | Table |
|
||||
| `sl.constants.resets` | How often the game reset the upscaler's history | SessionFact | Streamline | Game | Count |
|
||||
| `ffx.framegen.config` | The game's FSR frame-generation configuration | SessionFact | FidelityFx | Game | Table |
|
||||
| `sl.feature.versions` | Each Streamline feature's version and its NGX model version | SessionFact | Streamline | NewHook | Table |
|
||||
| `sl.feature.requirements` | What each Streamline feature requires: operating system, driver, buffers | SessionFact | Streamline | NewHook | Table |
|
||||
| `sl.init.preferences` | The preferences the game started Streamline with | SessionFact | Streamline | NewHook | Text |
|
||||
| `ffx.framegen.config` | The game's FSR frame-generation configuration | SessionFact | FidelityFx | NewHook | Text |
|
||||
| `sl.constants.camera` | Camera position, axes and matrices | SessionFact | Streamline | PlayerState | Text |
|
||||
|
||||
**Inside the game: routes a spike decides**
|
||||
|
||||
@@ -63,6 +63,24 @@ 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.17 of the Privacy Policy changed (0.1.0-beta.43)
|
||||
|
||||
**Two more calls read inside the game, only while Advanced metrics is on** (train B's second step, owner decisions
|
||||
D122–D125; the wording approved with the plan of 0.1.0-beta.43). Version 2.16 named what a session stores of DLSS and
|
||||
of FSR's upscaling item by item, and neither list holds what this release reads, so the version moves rather than
|
||||
the words being stretched. §1's item on Advanced metrics gains **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. The sentence on what is never read (where the camera is, which way it looks, its matrices) stands as
|
||||
it was: those sit in the same data as Streamline's constants, and a check in the build refuses code that names them.
|
||||
§4 says what is new about *how*: until now every parameter read was of a call FrameLedger intercepted anyway; these
|
||||
two calls are intercepted in a game **only once a session with the option on has started there**, and with the
|
||||
option off nothing in the game is touched for them. The accuracy block's item on what a game tells its upscaler
|
||||
names the two, and no longer says none of it was read from a real game — FSR's upscaling values were, on
|
||||
0.1.0-beta.41 and beta.42. The Disclaimer stays 2.15, as before. §2 is unchanged: nothing is sent.
|
||||
|
||||
### What version 2.16 of the Privacy Policy changed (0.1.0-beta.40)
|
||||
|
||||
**Advanced metrics inside the game** (train B, owner decisions D111–D116; the content approved with the plan, once
|
||||
|
||||
@@ -45,10 +45,24 @@ also keeps what the game itself handed to DLSS and FSR:
|
||||
- **FSR** — sharpening (on or off, and how strong), the largest jitter offset, the exposure, the near and far planes,
|
||||
the **range** of the field of view over the session, the flags of the call, the frame time the game reported, and
|
||||
FSR's own video memory at the moments the game asked for it.
|
||||
- **Streamline** (NVIDIA's library that games use for DLSS; since 0.1.0-beta.43) — what the game tells it about
|
||||
each frame: the largest jitter offset, the motion-vector scale and how the motion vectors are stored, the near and
|
||||
far planes and whether depth is inverted, the **range** of the field of view, the aspect ratio, whether the
|
||||
projection is orthographic, and how many times the game reset the upscaler's history (a camera cut, a loading
|
||||
screen). Where a game draws several views, these are the first view's.
|
||||
- **FSR frame generation** (since 0.1.0-beta.43) — how the game configured it: on or off, whether it may run
|
||||
asynchronously, its flags, whether only generated frames are presented, and the part of the picture it generates
|
||||
in. A setting the game changed during the session reads *on and off*. This is what the game **asked for**; how
|
||||
many frames were generated is in the session's summary, as before.
|
||||
|
||||
These are the game's own words to the upscaler, shown in the vendor's notation (`preExposure`, preset `K`).
|
||||
FrameLedger does not check what the upscaler did with them.
|
||||
|
||||
The last two are read from calls FrameLedger hooks **only for Advanced metrics**: in a game where no session has
|
||||
been recorded with the option on since it started, those two hooks are not there. The line under the session says,
|
||||
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*.
|
||||
|
||||
**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
|
||||
use FSR 3.1 or later through AMD's own library show the FSR rows — or *the session was not measured inside the game*.
|
||||
|
||||
+5
-1
@@ -113,7 +113,11 @@
|
||||
> range, field-of-view range, flags and frame time it hands FSR, are read from the arguments of the calls
|
||||
> FrameLedger intercepts and shown as the game stated them — not checked against what the upscaler did. Most games
|
||||
> set their DLSS options through a call that cannot be intercepted and show none; the FSR values need FSR 3.1 or
|
||||
> later through AMD's own library. None of it has been read from a real game yet.
|
||||
> later through AMD's own library. Since beta.43 also what a game tells NVIDIA Streamline about each frame (jitter,
|
||||
> motion-vector scale, depth range, field-of-view range, how often it reset the upscaler's history — for the first
|
||||
> viewport that called, where a game has several) and how it configures FSR frame generation (the settings it asked
|
||||
> for, not whether frames were generated). FSR's upscaling values have been read from real games; the DLSS options,
|
||||
> Streamline's constants and the frame-generation configuration have not been confirmed on one yet.
|
||||
> - **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
|
||||
|
||||
+5
-1
@@ -222,7 +222,11 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
> range, field-of-view range, flags and frame time it hands FSR, are read from the arguments of the calls
|
||||
> FrameLedger intercepts and shown as the game stated them — not checked against what the upscaler did. Most games
|
||||
> set their DLSS options through a call that cannot be intercepted and show none; the FSR values need FSR 3.1 or
|
||||
> later through AMD's own library. None of it has been read from a real game yet.
|
||||
> later through AMD's own library. Since beta.43 also what a game tells NVIDIA Streamline about each frame (jitter,
|
||||
> motion-vector scale, depth range, field-of-view range, how often it reset the upscaler's history — for the first
|
||||
> viewport that called, where a game has several) and how it configures FSR frame generation (the settings it asked
|
||||
> for, not whether frames were generated). FSR's upscaling values have been read from real games; the DLSS options,
|
||||
> Streamline's constants and the frame-generation configuration have not been confirmed on one yet.
|
||||
> - **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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# FrameLedger — Privacy Policy
|
||||
|
||||
**Version:** 2.16 · **Effective:** {{RELEASE_DATE}}
|
||||
**Version:** 2.17 · **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 — 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 — 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, which are then stored with the session (sizes, presets, exposure, sharpening, the jitter's size, the depth range, the range of the field of view, flags, the reported frame time, the upscaler's own memory), never the camera's position, direction or matrices; the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling, frame-generation and neural-rendering libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling and neural-rendering libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) and, for a game the Xbox app or the Microsoft Store installed, the package files in its install folder that describe it (`MicrosoftGame.config` and `appxmanifest.xml`) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed, the folders the Xbox app installs games into on each drive (named by the `.GamingRoot` file at the drive's root) with each game's package files, and Windows' answer to whether that game's package is installed for you — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library and the logo and splash-screen images a game from the Xbox app ships in its own folder — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; and — only while Advanced metrics is on — that driver's description of the graphics card and of each connected display, what it reports about the display a tracked game's window is on, its settings for a tracked game and its global ones (read only), and, when the capture agent runs as administrator with PawnIO installed, the sensors and model names of the processor, the memory and the motherboard (never a drive's), all of which are also read with no game running while the Advanced page is open, to show them there, and are not stored then; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised.
|
||||
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; whether a game you enabled hooking for runs in an app container, and which of Windows' code-protection settings it runs under (for example, accepting only Microsoft-signed code), read from Windows before any injection; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation) — and, only while Advanced metrics is on, more of the parameters of the upscaling calls, and the parameters of two further calls it begins to intercept in a game only once a session with that option on has started there (the constants the game gives NVIDIA Streamline for each frame, and the game's configuration of FSR frame generation), which are then stored with the session (sizes, presets, exposure, sharpening, the jitter's size, the motion-vector scale, the depth range, the range of the field of view, flags, the reported frame time, the upscaler's own memory, how frame generation is configured), never the camera's position, direction or matrices; the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured, the version information of its upscaling, frame-generation and neural-rendering libraries, and whether each was loaded from the game's folder or from the graphics driver's own copy (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling and neural-rendering libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) and, for a game the Xbox app or the Microsoft Store installed, the package files in its install folder that describe it (`MicrosoftGame.config` and `appxmanifest.xml`) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed, the folders the Xbox app installs games into on each drive (named by the `.GamingRoot` file at the drive's root) with each game's package files, and Windows' answer to whether that game's package is installed for you — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app — Steam's and GOG GALAXY's also when you open a game's page, to find the artwork their apps keep for it; the cover and banner images that the Steam and GOG GALAXY apps keep on your disk for a game in your library and the logo and splash-screen images a game from the Xbox app ships in its own folder — read to show them on its page, never copied or sent anywhere; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; and — only while Advanced metrics is on — that driver's description of the graphics card and of each connected display, what it reports about the display a tracked game's window is on, its settings for a tracked game and its global ones (read only), and, when the capture agent runs as administrator with PawnIO installed, the sensors and model names of the processor, the memory and the motherboard (never a drive's), all of which are also read with no game running while the Advanced page is open, to show them there, and are not stored then; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Generated
+15
@@ -260,6 +260,7 @@ public static class Strings
|
||||
nameof(Advanced_Elevation_Hint),
|
||||
nameof(Advanced_Facts_Header),
|
||||
nameof(Advanced_Header),
|
||||
nameof(Advanced_InGameCallsLine),
|
||||
nameof(Advanced_InGameLine),
|
||||
nameof(Advanced_Machine_Intro),
|
||||
nameof(Advanced_Max),
|
||||
@@ -302,6 +303,10 @@ public static class Strings
|
||||
nameof(AdvInGame_NotHooked),
|
||||
nameof(AdvInGame_Reading),
|
||||
nameof(AdvInGame_Unknown),
|
||||
nameof(AdvInGameCall_NeverCalled),
|
||||
nameof(AdvInGameCall_NotHooked),
|
||||
nameof(AdvInGameCall_Read),
|
||||
nameof(AdvInGameCall_Unknown),
|
||||
nameof(AdvReach_Deferred),
|
||||
nameof(AdvReach_Game),
|
||||
nameof(AdvReach_HookedCall),
|
||||
@@ -1988,6 +1993,8 @@ public static class Strings
|
||||
|
||||
public static string Advanced_Header => ResourceManager.GetString(nameof(Advanced_Header), Culture) ?? nameof(Advanced_Header);
|
||||
|
||||
public static string Advanced_InGameCallsLine => ResourceManager.GetString(nameof(Advanced_InGameCallsLine), Culture) ?? nameof(Advanced_InGameCallsLine);
|
||||
|
||||
public static string Advanced_InGameLine => ResourceManager.GetString(nameof(Advanced_InGameLine), Culture) ?? nameof(Advanced_InGameLine);
|
||||
|
||||
public static string Advanced_Machine_Intro => ResourceManager.GetString(nameof(Advanced_Machine_Intro), Culture) ?? nameof(Advanced_Machine_Intro);
|
||||
@@ -2072,6 +2079,14 @@ public static class Strings
|
||||
|
||||
public static string AdvInGame_Unknown => ResourceManager.GetString(nameof(AdvInGame_Unknown), Culture) ?? nameof(AdvInGame_Unknown);
|
||||
|
||||
public static string AdvInGameCall_NeverCalled => ResourceManager.GetString(nameof(AdvInGameCall_NeverCalled), Culture) ?? nameof(AdvInGameCall_NeverCalled);
|
||||
|
||||
public static string AdvInGameCall_NotHooked => ResourceManager.GetString(nameof(AdvInGameCall_NotHooked), Culture) ?? nameof(AdvInGameCall_NotHooked);
|
||||
|
||||
public static string AdvInGameCall_Read => ResourceManager.GetString(nameof(AdvInGameCall_Read), Culture) ?? nameof(AdvInGameCall_Read);
|
||||
|
||||
public static string AdvInGameCall_Unknown => ResourceManager.GetString(nameof(AdvInGameCall_Unknown), Culture) ?? nameof(AdvInGameCall_Unknown);
|
||||
|
||||
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);
|
||||
|
||||
@@ -653,6 +653,10 @@
|
||||
<value>詳細メトリクス</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Advanced_InGameCallsLine" xml:space="preserve">
|
||||
<value>ゲームが毎フレーム Streamline に伝える内容: {0}。FSR フレーム生成の設定方法: {1}。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Advanced_InGameLine" xml:space="preserve">
|
||||
<value>ゲーム内: {0}。</value>
|
||||
<comment>review</comment>
|
||||
@@ -821,6 +825,22 @@
|
||||
<value>不明</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="AdvInGameCall_NeverCalled" xml:space="preserve">
|
||||
<value>フック済み - ゲームはこの呼び出しを行いませんでした</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="AdvInGameCall_NotHooked" xml:space="preserve">
|
||||
<value>未フック - この呼び出しを持つライブラリをゲームが読み込みませんでした</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="AdvInGameCall_Read" xml:space="preserve">
|
||||
<value>読み取りました</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="AdvInGameCall_Unknown" xml:space="preserve">
|
||||
<value>不明</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="AdvReach_Deferred" xml:space="preserve">
|
||||
<value>このリリースでは読み取らない</value>
|
||||
<comment>review</comment>
|
||||
@@ -1438,7 +1458,7 @@
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Advanced_Body" xml:space="preserve">
|
||||
<value>セッション中にグラフィックス ドライバーとハードウェア センサーからさらに多くを読み取り、セッションと一緒に保存します - グラフィックス カードのメモリと負荷の詳細、各ファンと電圧、ディスプレイの対応機能、ゲームに対するドライバーの設定など。FrameLedger が内部から計測するゲームでは、ゲームが DLSS と FSR に渡す内容 (サイズ、プリセット、シャープニング、露出) も読み取ります - カメラの位置は決して読み取りません。オフ: ゲーム内も含め、追加の読み取りも保存も行いません。次のセッションから適用され、オフの間に記録したセッションが後から補われることはありません。</value>
|
||||
<value>セッション中にグラフィックス ドライバーとハードウェア センサーからさらに多くを読み取り、セッションと一緒に保存します - グラフィックス カードのメモリと負荷の詳細、各ファンと電圧、ディスプレイの対応機能、ゲームに対するドライバーの設定など。FrameLedger が内部から計測するゲームでは、ゲームが DLSS、Streamline、FSR に渡す内容 (サイズ、プリセット、シャープニング、露出、深度範囲、フレーム生成の設定) も読み取ります - カメラの位置は決して読み取りません。オフ: ゲーム内も含め、追加の読み取りも保存も行いません。次のセッションから適用され、オフの間に記録したセッションが後から補われることはありません。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Advanced_Label" xml:space="preserve">
|
||||
|
||||
@@ -495,6 +495,9 @@
|
||||
<data name="Advanced_Header" xml:space="preserve">
|
||||
<value>Advanced metrics</value>
|
||||
</data>
|
||||
<data name="Advanced_InGameCallsLine" xml:space="preserve">
|
||||
<value>What the game tells Streamline each frame: {0}. How it configures FSR frame generation: {1}.</value>
|
||||
</data>
|
||||
<data name="Advanced_InGameLine" xml:space="preserve">
|
||||
<value>Inside the game: {0}.</value>
|
||||
</data>
|
||||
@@ -621,6 +624,18 @@
|
||||
<data name="AdvInGame_Unknown" xml:space="preserve">
|
||||
<value>not known</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_NeverCalled" xml:space="preserve">
|
||||
<value>hooked - the game did not make the call</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_NotHooked" xml:space="preserve">
|
||||
<value>not hooked - the game did not load the library that has the call</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_Read" xml:space="preserve">
|
||||
<value>read</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_Unknown" xml:space="preserve">
|
||||
<value>not known</value>
|
||||
</data>
|
||||
<data name="AdvReach_Deferred" xml:space="preserve">
|
||||
<value>Not read in this release</value>
|
||||
</data>
|
||||
@@ -1084,7 +1099,7 @@
|
||||
<value>The agent did not answer the rules update.</value>
|
||||
</data>
|
||||
<data name="Settings_Advanced_Body" xml:space="preserve">
|
||||
<value>Read more from the graphics driver and the hardware sensors during a session - the graphics card's memory and load in detail, each fan and voltage, what your display can do, the driver's settings for the game - and, in a game FrameLedger measures from inside, what the game tells DLSS and FSR (sizes, presets, sharpening, exposure - never where the camera is). All of it is stored with the session. Off: nothing more is read or stored, inside a game either. It applies from the next session, and a session recorded while it was off is not filled in later.</value>
|
||||
<value>Read more from the graphics driver and the hardware sensors during a session - the graphics card's memory and load in detail, each fan and voltage, what your display can do, the driver's settings for the game - and, in a game FrameLedger measures from inside, what the game tells DLSS, Streamline and FSR (sizes, presets, sharpening, exposure, the depth range, how frame generation is configured - never where the camera is). All of it is stored with the session. Off: nothing more is read or stored, inside a game either. It applies from the next session, and a session recorded while it was off is not filled in later.</value>
|
||||
</data>
|
||||
<data name="Settings_Advanced_Label" xml:space="preserve">
|
||||
<value>Advanced metrics</value>
|
||||
|
||||
@@ -490,6 +490,9 @@
|
||||
<data name="Advanced_Header" xml:space="preserve">
|
||||
<value>Thông số nâng cao</value>
|
||||
</data>
|
||||
<data name="Advanced_InGameCallsLine" xml:space="preserve">
|
||||
<value>Những gì game báo cho Streamline mỗi khung hình: {0}. Cách game cấu hình frame generation của FSR: {1}.</value>
|
||||
</data>
|
||||
<data name="Advanced_InGameLine" xml:space="preserve">
|
||||
<value>Bên trong game: {0}.</value>
|
||||
</data>
|
||||
@@ -616,6 +619,18 @@
|
||||
<data name="AdvInGame_Unknown" xml:space="preserve">
|
||||
<value>không rõ</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_NeverCalled" xml:space="preserve">
|
||||
<value>đã hook - game không thực hiện lời gọi</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_NotHooked" xml:space="preserve">
|
||||
<value>chưa hook - game không nạp thư viện chứa lời gọi này</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_Read" xml:space="preserve">
|
||||
<value>đã đọc</value>
|
||||
</data>
|
||||
<data name="AdvInGameCall_Unknown" xml:space="preserve">
|
||||
<value>không rõ</value>
|
||||
</data>
|
||||
<data name="AdvReach_Deferred" xml:space="preserve">
|
||||
<value>Không đọc trong bản phát hành này</value>
|
||||
</data>
|
||||
@@ -1079,7 +1094,7 @@
|
||||
<value>Agent không phản hồi yêu cầu cập nhật quy tắc.</value>
|
||||
</data>
|
||||
<data name="Settings_Advanced_Body" xml:space="preserve">
|
||||
<value>Đọc thêm từ driver đồ hoạ và các cảm biến phần cứng trong lúc ghi phiên - bộ nhớ và tải của card đồ hoạ ở mức chi tiết, từng quạt và điện áp, khả năng của màn hình, thiết lập của driver cho game - và, với game mà FrameLedger đo từ bên trong, những gì game đưa cho DLSS và FSR (kích thước, preset, làm nét, phơi sáng - không bao giờ là vị trí camera). Tất cả được lưu cùng phiên. Tắt: không đọc và không lưu thêm gì, kể cả bên trong game. Áp dụng từ phiên kế tiếp; phiên đã ghi lúc tắt sẽ không được bổ sung về sau.</value>
|
||||
<value>Đọc thêm từ driver đồ hoạ và các cảm biến phần cứng trong lúc ghi phiên - bộ nhớ và tải của card đồ hoạ ở mức chi tiết, từng quạt và điện áp, khả năng của màn hình, thiết lập của driver cho game - và, với game mà FrameLedger đo từ bên trong, những gì game đưa cho DLSS, Streamline và FSR (kích thước, preset, làm nét, phơi sáng, khoảng độ sâu, cách cấu hình frame generation - không bao giờ là vị trí camera). Tất cả được lưu cùng phiên. Tắt: không đọc và không lưu thêm gì, kể cả bên trong game. Áp dụng từ phiên kế tiếp; phiên đã ghi lúc tắt sẽ không được bổ sung về sau.</value>
|
||||
</data>
|
||||
<data name="Settings_Advanced_Label" xml:space="preserve">
|
||||
<value>Thông số nâng cao</value>
|
||||
|
||||
@@ -50,6 +50,9 @@ public static class AdvancedLabels
|
||||
/// <summary>What became, in one session, of the entries read inside the game (0.1.0-beta.40).</summary>
|
||||
public static string InGame(AdvancedInGameStatus status) => Lookup("AdvInGame_" + status) ?? status.ToString();
|
||||
|
||||
/// <summary>What became of one call hooked only for Advanced metrics, in a session (0.1.0-beta.43).</summary>
|
||||
public static string InGameCall(AdvancedInGameCall call) => Lookup("AdvInGameCall_" + call) ?? call.ToString();
|
||||
|
||||
/// <summary>A token the driver's answer was mapped to; the token itself where this build has no word for it.</summary>
|
||||
public static string Token(string token) => Lookup("AdvToken_" + token) ?? token;
|
||||
|
||||
|
||||
@@ -188,9 +188,24 @@ public static class AdvancedPresenter
|
||||
|
||||
// A session's row also says what became of the entries read inside the game; the machine's live state and a
|
||||
// row stored before 0.1.0-beta.40 do not, and then the sentence is not there.
|
||||
return sources.InGame is { } inGame
|
||||
? line + " " + string.Format(CultureInfo.CurrentCulture, Strings.Advanced_InGameLine, AdvancedLabels.InGame(inGame))
|
||||
: line;
|
||||
if (sources.InGame is { } inGame)
|
||||
{
|
||||
line += " " + string.Format(CultureInfo.CurrentCulture, Strings.Advanced_InGameLine, AdvancedLabels.InGame(inGame));
|
||||
}
|
||||
|
||||
// The two calls hooked only for Advanced metrics (0.1.0-beta.43): for each, whether it was read, hooked and
|
||||
// never made, or not hooked - so that "nothing here" says which of the two it is. A row stored before, and a
|
||||
// session not measured inside the game, carry neither.
|
||||
if (sources.StreamlineConstants is { } streamline && sources.FsrFrameGeneration is { } frameGeneration)
|
||||
{
|
||||
line += " " + string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
Strings.Advanced_InGameCallsLine,
|
||||
AdvancedLabels.InGameCall(streamline),
|
||||
AdvancedLabels.InGameCall(frameGeneration));
|
||||
}
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
private static string StatusOf(AdvancedMetric metric, AdvancedSources? now)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Advanced;
|
||||
|
||||
/// <summary>
|
||||
/// What became, in one session, of the entries read from ONE call that FrameLedger hooks only for Advanced metrics
|
||||
/// (0.1.0-beta.43: <c>slSetConstants</c>, <c>ffxConfigure</c>). Beside <see cref="AdvancedInGameStatus"/>, which
|
||||
/// speaks for the session as a whole, this tells "the hook was in and the game never made the call" from "the hook
|
||||
/// was not in" - two different reasons a value is absent, and only the first says something about the game.
|
||||
/// </summary>
|
||||
public enum AdvancedInGameCall
|
||||
{
|
||||
/// <summary>Not stated: a row stored before 0.1.0-beta.43.</summary>
|
||||
Unknown = 0,
|
||||
|
||||
/// <summary>The game made the call and what it passed was read.</summary>
|
||||
Read = 1,
|
||||
|
||||
/// <summary>The hook was in for the session and the game did not make the call where it could be seen.</summary>
|
||||
NeverCalled = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The hook was not in: the game did not load the library that exports the call (it does not use Streamline, or
|
||||
/// FSR through AMD's libraries), or the library is of a generation FrameLedger does not read.
|
||||
/// </summary>
|
||||
NotHooked = 3,
|
||||
}
|
||||
@@ -162,16 +162,18 @@ public static class AdvancedMetricCatalog
|
||||
Sampled("ffx.upscale.frame_time_delta", FidelityFx, Game, Milliseconds, Upscaling, "The frame time the game reported to FSR"),
|
||||
Sampled("ffx.memory_usage", FidelityFx, Game, Mebibytes, Upscaling, "FSR's own video memory, when the game asks it"),
|
||||
|
||||
// ---- Inside the game: two hooks of their own (0.1.0-beta.43), installed only where Advanced metrics was asked for
|
||||
Session("sl.constants.jitter", Streamline, Game, Table, Upscaling, "The jitter offsets the game gave Streamline"),
|
||||
Session("sl.constants.motion_vectors", Streamline, Game, Table, Upscaling, "Motion-vector scale, and whether they are 3D, dilated, jittered"),
|
||||
Session("sl.constants.depth", Streamline, Game, Table, Upscaling, "Near and far planes, and whether depth is inverted"),
|
||||
Session("sl.constants.projection", Streamline, Game, Table, Upscaling, "Field of view, aspect ratio, orthographic or not"),
|
||||
Session("sl.constants.resets", Streamline, Game, Count, Upscaling, "How often the game reset the upscaler's history"),
|
||||
Session("ffx.framegen.config", FidelityFx, Game, Table, FrameGeneration, "The game's FSR frame-generation configuration"),
|
||||
|
||||
// ---- Inside the game: hooks that are not built ----------------------------------------------------------
|
||||
Session("sl.constants.jitter", Streamline, NewHook, Text, Upscaling, "The jitter offsets the game gave Streamline"),
|
||||
Session("sl.constants.motion_vectors", Streamline, NewHook, Text, Upscaling, "Motion-vector scale, and whether they are 3D, dilated, jittered"),
|
||||
Session("sl.constants.depth", Streamline, NewHook, Text, Upscaling, "Near and far planes, and whether depth is inverted"),
|
||||
Session("sl.constants.projection", Streamline, NewHook, Text, Upscaling, "Field of view, aspect ratio, orthographic or not"),
|
||||
Session("sl.constants.resets", Streamline, NewHook, Count, Upscaling, "How often the game reset the upscaler's history"),
|
||||
Session("sl.feature.versions", Streamline, NewHook, Table, Upscaling, "Each Streamline feature's version and its NGX model version"),
|
||||
Session("sl.feature.requirements", Streamline, NewHook, Table, Upscaling, "What each Streamline feature requires: operating system, driver, buffers"),
|
||||
Session("sl.init.preferences", Streamline, NewHook, Text, Upscaling, "The preferences the game started Streamline with"),
|
||||
Session("ffx.framegen.config", FidelityFx, NewHook, Text, FrameGeneration, "The game's FSR frame-generation configuration"),
|
||||
Session("sl.constants.camera", Streamline, PlayerState, Text, Upscaling, "Camera position, axes and matrices"),
|
||||
|
||||
// ---- Inside the game: routes a spike decides ------------------------------------------------------------
|
||||
|
||||
@@ -22,6 +22,16 @@ public sealed record AdvancedSources(
|
||||
/// </summary>
|
||||
public AdvancedInGameStatus? InGame { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// What became of what the game tells Streamline about each frame (<c>slSetConstants</c>, the
|
||||
/// <c>sl.constants.</c> entries) in the session this describes (0.1.0-beta.43); null where that is not a
|
||||
/// question - the machine's live state, a session not measured inside the game - and in every row stored before.
|
||||
/// </summary>
|
||||
public AdvancedInGameCall? StreamlineConstants { get; init; }
|
||||
|
||||
/// <summary>The same for how the game configures FSR frame generation (<c>ffxConfigure</c>, <c>ffx.framegen.config</c>).</summary>
|
||||
public AdvancedInGameCall? FsrFrameGeneration { get; init; }
|
||||
|
||||
/// <summary>Nothing asked yet.</summary>
|
||||
public static AdvancedSources Unknown { get; } = new(AdvancedSourceStatus.Unknown, NvapiCode: null, AdvancedSourceStatus.Unknown, AdvancedSourceStatus.Unknown);
|
||||
}
|
||||
@@ -45,6 +45,12 @@ 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"];
|
||||
|
||||
// FfxApiDispatchFramegenerationFlags (ffx_framegeneration.h), by bit: the vendor's own names, shown as they are.
|
||||
private static readonly string[] _frameGenerationFlags =
|
||||
[
|
||||
"DRAW_DEBUG_TEAR_LINES", "DRAW_DEBUG_RESET_INDICATORS", "DRAW_DEBUG_VIEW", "NO_SWAPCHAIN_CONTEXT_NOTIFY", "DRAW_DEBUG_PACING_LINES",
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Every word a fact made here may carry for the App to translate (<c>AdvToken_*</c>): the three states of a
|
||||
/// switch seen over a session, the flags of the dispatch that have a name, and "none". A flag bit nobody named
|
||||
@@ -55,6 +61,8 @@ public sealed class InGameAdvancedSampler
|
||||
private InGameAdvanced? _last;
|
||||
private uint _memoryQueries;
|
||||
private FactKey _key;
|
||||
private uint _builtResets;
|
||||
private FlAdvancedValid _everValid;
|
||||
|
||||
/// <summary>The session facts as of the last publication taken; empty until the game made a call they are read from.</summary>
|
||||
public IReadOnlyList<AdvancedFact> Facts { get; private set; } = [];
|
||||
@@ -66,6 +74,29 @@ public sealed class InGameAdvancedSampler
|
||||
public AdvancedInGameStatus Status(bool hooked) =>
|
||||
!hooked ? AdvancedInGameStatus.NotHooked : SawAnything ? AdvancedInGameStatus.Reading : AdvancedInGameStatus.NothingSeen;
|
||||
|
||||
/// <summary>
|
||||
/// What became of the entries read from one call hooked only for Advanced metrics (0.1.0-beta.43):
|
||||
/// <paramref name="group"/> is the bit a publication carries once the call was read, <paramref name="hookedIn"/>
|
||||
/// whether the capture side said its hook was in. Read wins over the hook's bit: a publication is the proof.
|
||||
/// </summary>
|
||||
public AdvancedInGameCall Call(FlAdvancedValid group, bool hookedIn) =>
|
||||
(_everValid & group) != FlAdvancedValid.None ? AdvancedInGameCall.Read : hookedIn ? AdvancedInGameCall.NeverCalled : AdvancedInGameCall.NotHooked;
|
||||
|
||||
/// <summary>
|
||||
/// The session is ending: the facts are brought up to the last publication where they carry a COUNT. A count
|
||||
/// is not part of what decides a rebuild while the session runs - it would rewrite the session's context every
|
||||
/// second for a number that only matters at the end - so the one fact that is a count
|
||||
/// (<c>sl.constants.resets</c>) is as of the last rebuild until this is called.
|
||||
/// </summary>
|
||||
public void Conclude()
|
||||
{
|
||||
if (_last is not null && Facts.Count != 0 && _last.State.SlResets != _builtResets)
|
||||
{
|
||||
Facts = Build(_last);
|
||||
_builtResets = _last.State.SlResets;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Takes a publication. Returns the readings it carries when it is one not taken before and it carries any;
|
||||
/// null otherwise — nothing published, the same publication as last time, or a second in which the game neither
|
||||
@@ -86,11 +117,13 @@ public sealed class InGameAdvancedSampler
|
||||
}
|
||||
|
||||
SawAnything = true;
|
||||
_everValid |= s.ValidMask;
|
||||
FactKey key = FactKey.Of(published);
|
||||
if (key != _key || Facts.Count == 0)
|
||||
{
|
||||
_key = key;
|
||||
Facts = Build(published);
|
||||
_builtResets = s.SlResets;
|
||||
}
|
||||
|
||||
var readings = new List<AdvancedReading>(2);
|
||||
@@ -124,9 +157,128 @@ public sealed class InGameAdvancedSampler
|
||||
AddFfx(published, facts);
|
||||
}
|
||||
|
||||
if (published.State.ValidMask.HasFlag(FlAdvancedValid.FfxFgConfig))
|
||||
{
|
||||
AddFrameGeneration(published, facts);
|
||||
}
|
||||
|
||||
if (published.State.ValidMask.HasFlag(FlAdvancedValid.SlConstants))
|
||||
{
|
||||
AddStreamlineConstants(published, facts);
|
||||
}
|
||||
|
||||
return facts;
|
||||
}
|
||||
|
||||
// How the game configures FSR frame generation (ffxConfigure, 0.1.0-beta.43): three switches as seen over the
|
||||
// session, the flags any configure carried, and the last rectangle it generates in.
|
||||
private static void AddFrameGeneration(InGameAdvanced published, List<AdvancedFact> facts)
|
||||
{
|
||||
ref readonly FlAdvancedState s = ref published.State;
|
||||
var rows = new List<AdvancedRow>(5);
|
||||
AddSwitch(rows, "frameGenerationEnabled", s.FfxFgEnabledSeen);
|
||||
AddSwitch(rows, "allowAsyncWorkloads", s.FfxFgAsyncSeen);
|
||||
AddSwitch(rows, "onlyPresentGenerated", s.FfxFgOnlyGeneratedSeen);
|
||||
if (s.FfxFgFlagsSeen != 0)
|
||||
{
|
||||
var names = new List<string>(4);
|
||||
for (int bit = 0; bit < 32; bit++)
|
||||
{
|
||||
if ((s.FfxFgFlagsSeen & (1u << bit)) != 0)
|
||||
{
|
||||
names.Add(bit < _frameGenerationFlags.Length ? _frameGenerationFlags[bit] : string.Create(CultureInfo.InvariantCulture, $"bit {bit}"));
|
||||
}
|
||||
}
|
||||
|
||||
rows.Add(new AdvancedRow("flags", string.Join(", ", names)));
|
||||
}
|
||||
|
||||
// left, top, width, height. A rectangle with no area is one the game did not give; four -1 is one the capture
|
||||
// side could not state (a side that is negative or past 32,767).
|
||||
int left = s.FfxFgRectAt(0);
|
||||
int top = s.FfxFgRectAt(1);
|
||||
int width = s.FfxFgRectAt(2);
|
||||
int height = s.FfxFgRectAt(3);
|
||||
if (width > 0 && height > 0 && left >= 0 && top >= 0)
|
||||
{
|
||||
rows.Add(new AdvancedRow("generationRect", string.Create(CultureInfo.InvariantCulture, $"{width} × {height} at {left}, {top}")));
|
||||
}
|
||||
|
||||
if (rows.Count > 0)
|
||||
{
|
||||
facts.Add(Fact("ffx.framegen.config", AdvancedValue.OfRows(rows)));
|
||||
}
|
||||
}
|
||||
|
||||
// What the game told Streamline about each frame (slSetConstants, 0.1.0-beta.43), for the first viewport that
|
||||
// called. FLT_MAX is Streamline's "not set" and never reaches here; a plane at infinity is FSR's convention (D119).
|
||||
private static void AddStreamlineConstants(InGameAdvanced published, List<AdvancedFact> facts)
|
||||
{
|
||||
ref readonly FlAdvancedState s = ref published.State;
|
||||
var jitter = new List<AdvancedRow>(2);
|
||||
AddUpTo(jitter, "jitterOffset.x", s.SlJitterMaxXBits);
|
||||
AddUpTo(jitter, "jitterOffset.y", s.SlJitterMaxYBits);
|
||||
if (jitter.Count > 0)
|
||||
{
|
||||
facts.Add(Fact("sl.constants.jitter", AdvancedValue.OfRows(jitter)));
|
||||
}
|
||||
|
||||
// Bits in the vendor header's order: depthInverted 0, cameraMotionIncluded 1, motionVectors3D 2, reset 3,
|
||||
// orthographicProjection 4, motionVectorsDilated 5, motionVectorsJittered 6.
|
||||
var motion = new List<AdvancedRow>(6);
|
||||
AddNumber(motion, "mvecScale.x", s.SlMvecScaleXBits);
|
||||
AddNumber(motion, "mvecScale.y", s.SlMvecScaleYBits);
|
||||
AddSwitch(motion, "cameraMotionIncluded", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 1));
|
||||
AddSwitch(motion, "motionVectors3D", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 2));
|
||||
AddSwitch(motion, "motionVectorsDilated", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 5));
|
||||
AddSwitch(motion, "motionVectorsJittered", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 6));
|
||||
if (motion.Count > 0)
|
||||
{
|
||||
facts.Add(Fact("sl.constants.motion_vectors", AdvancedValue.OfRows(motion)));
|
||||
}
|
||||
|
||||
var depth = new List<AdvancedRow>(3);
|
||||
AddNumber(depth, "cameraNear", s.SlNearBits);
|
||||
AddNumber(depth, "cameraFar", s.SlFarBits);
|
||||
AddSwitch(depth, "depthInverted", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 0));
|
||||
if (depth.Count > 0)
|
||||
{
|
||||
facts.Add(Fact("sl.constants.depth", AdvancedValue.OfRows(depth)));
|
||||
}
|
||||
|
||||
var projection = new List<AdvancedRow>(3);
|
||||
// A range, lowest to highest - never a series, which would say when the player aimed (D114).
|
||||
if (Number(s.SlFovMinBits) is double low && Number(s.SlFovMaxBits) is double high)
|
||||
{
|
||||
projection.Add(new AdvancedRow("cameraFOV", s.SlFovMinBits == s.SlFovMaxBits
|
||||
? string.Create(CultureInfo.InvariantCulture, $"{low:0.####} rad ({Degrees(low):0.#}°)")
|
||||
: string.Create(CultureInfo.InvariantCulture, $"{low:0.####} – {high:0.####} rad ({Degrees(low):0.#}° – {Degrees(high):0.#}°)")));
|
||||
}
|
||||
|
||||
AddNumber(projection, "cameraAspectRatio", s.SlAspectBits);
|
||||
AddSwitch(projection, "orthographicProjection", SwitchOf(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse, 4));
|
||||
if (projection.Count > 0)
|
||||
{
|
||||
facts.Add(Fact("sl.constants.projection", AdvancedValue.OfRows(projection)));
|
||||
}
|
||||
|
||||
// A count, of the first viewport's calls: 0 is "the game never reset the history", which is a fact.
|
||||
facts.Add(Fact("sl.constants.resets", AdvancedValue.Of(s.SlResets)));
|
||||
}
|
||||
|
||||
// The two bits a switch seen over a session leaves: bit 0 seen off, bit 1 seen on.
|
||||
private static uint SwitchOf(uint seenTrue, uint seenFalse, int bit) =>
|
||||
((seenFalse >> bit) & 1u) | (((seenTrue >> bit) & 1u) << 1);
|
||||
|
||||
private static void AddSwitch(List<AdvancedRow> rows, string member, uint seen)
|
||||
{
|
||||
string? state = (seen & 3u) switch { 1u => "off", 2u => "on", 3u => "on_and_off", _ => null };
|
||||
if (state is not null)
|
||||
{
|
||||
rows.Add(new AdvancedRow(member, state, state));
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddDlss(InGameAdvanced published, List<AdvancedFact> facts)
|
||||
{
|
||||
ref readonly FlAdvancedState s = ref published.State;
|
||||
@@ -298,7 +450,14 @@ public sealed class InGameAdvancedSampler
|
||||
_ => preset.ToString(CultureInfo.InvariantCulture),
|
||||
};
|
||||
|
||||
/// <summary>The fields the facts are made of, and nothing that moves every second: no count, no frame time, no clock.</summary>
|
||||
private static ulong Pair(uint low, uint high) => low | ((ulong)high << 32);
|
||||
|
||||
private static ulong Pair(int low, int high) => Pair(unchecked((uint)low), unchecked((uint)high));
|
||||
|
||||
/// <summary>
|
||||
/// The fields the facts are made of, and nothing that moves every second: no count, no frame time, no clock. The
|
||||
/// one fact that IS a count - the resets told to Streamline - is brought up to date by <see cref="Conclude"/>.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
private readonly record struct FactKey(
|
||||
FlAdvancedValid Valid,
|
||||
@@ -319,7 +478,17 @@ public sealed class InGameAdvancedSampler
|
||||
uint Far,
|
||||
uint FovMin,
|
||||
uint FovMax,
|
||||
uint Flags)
|
||||
uint Flags,
|
||||
ulong FrameGenerationSwitches,
|
||||
uint FrameGenerationFlags,
|
||||
ulong FrameGenerationRectLow,
|
||||
ulong FrameGenerationRectHigh,
|
||||
ulong SlJitter,
|
||||
ulong SlMvecScale,
|
||||
ulong SlDepth,
|
||||
ulong SlFov,
|
||||
uint SlAspect,
|
||||
ulong SlFlags)
|
||||
{
|
||||
public static FactKey Of(InGameAdvanced published)
|
||||
{
|
||||
@@ -331,7 +500,7 @@ public sealed class InGameAdvancedSampler
|
||||
}
|
||||
|
||||
return new FactKey(
|
||||
s.ValidMask & (FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale),
|
||||
s.ValidMask & (FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxFgConfig | FlAdvancedValid.SlConstants),
|
||||
s.DlssOutputWidth,
|
||||
s.DlssOutputHeight,
|
||||
s.DlssPreExposureBits,
|
||||
@@ -349,7 +518,17 @@ public sealed class InGameAdvancedSampler
|
||||
s.FfxFarBits,
|
||||
s.FfxFovMinBits,
|
||||
s.FfxFovMaxBits,
|
||||
s.FfxFlagsSeen);
|
||||
s.FfxFlagsSeen,
|
||||
s.FfxFgEnabledSeen | ((ulong)s.FfxFgAsyncSeen << 8) | ((ulong)s.FfxFgOnlyGeneratedSeen << 16),
|
||||
s.FfxFgFlagsSeen,
|
||||
Pair(s.FfxFgRectAt(0), s.FfxFgRectAt(1)),
|
||||
Pair(s.FfxFgRectAt(2), s.FfxFgRectAt(3)),
|
||||
Pair(s.SlJitterMaxXBits, s.SlJitterMaxYBits),
|
||||
Pair(s.SlMvecScaleXBits, s.SlMvecScaleYBits),
|
||||
Pair(s.SlNearBits, s.SlFarBits),
|
||||
Pair(s.SlFovMinBits, s.SlFovMaxBits),
|
||||
s.SlAspectBits,
|
||||
Pair(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,8 @@ public sealed class SessionRecorder : ISessionRecorder
|
||||
// records Advanced metrics - the same condition the shared reader is held under.
|
||||
private readonly InGameAdvancedSampler? _inGame = advanced is null ? null : new InGameAdvancedSampler();
|
||||
private IReadOnlyList<AdvancedReading>? _inGamePending;
|
||||
private (IReadOnlyList<AdvancedFact> Facts, AdvancedInGameStatus Status) _inGameContext = ([], AdvancedInGameStatus.Unknown);
|
||||
private (IReadOnlyList<AdvancedFact> Facts, AdvancedInGameStatus Status, AdvancedInGameCall? Streamline, AdvancedInGameCall? FrameGeneration) _inGameContext =
|
||||
([], AdvancedInGameStatus.Unknown, null, null);
|
||||
private IReadOnlyList<AdvancedFact> _sessionWithGame = [];
|
||||
|
||||
/// <summary>A session that records Advanced metrics asks the Overlay for what the game tells its upscaler (D111).</summary>
|
||||
@@ -475,12 +476,20 @@ public sealed class SessionRecorder : ISessionRecorder
|
||||
_sessionFactsRead = Task.Run(() => _sessionFacts = ReadSessionFacts(advanced, target));
|
||||
}
|
||||
|
||||
if (atEnd)
|
||||
{
|
||||
// The one fact that is a count is brought up to the last publication (InGameAdvancedSampler.Conclude).
|
||||
_inGame?.Conclude();
|
||||
}
|
||||
|
||||
AdvancedSnapshot? snapshot = advanced.Latest;
|
||||
IReadOnlyList<AdvancedFact>? session = _sessionFacts;
|
||||
IReadOnlyList<AdvancedFact> game = _inGame?.Facts ?? [];
|
||||
AdvancedInGameStatus status = InGameStatus();
|
||||
(AdvancedInGameCall? streamline, AdvancedInGameCall? frameGeneration) = InGameCalls();
|
||||
(IReadOnlyList<AdvancedFact>?, IReadOnlyList<AdvancedSeriesInfo>?, AdvancedSources?, IReadOnlyList<AdvancedFact>?) now = (snapshot?.MachineFacts, snapshot?.Series, snapshot?.Sources, session);
|
||||
bool sameGame = ReferenceEquals(game, _inGameContext.Facts) && status == _inGameContext.Status;
|
||||
bool sameGame = ReferenceEquals(game, _inGameContext.Facts) && status == _inGameContext.Status
|
||||
&& streamline == _inGameContext.Streamline && frameGeneration == _inGameContext.FrameGeneration;
|
||||
if ((snapshot is null && session is null && game.Count == 0)
|
||||
|| (sameGame && ReferenceEquals(now.Item1, _context.Machine) && ReferenceEquals(now.Item2, _context.Series) && Equals(now.Item3, _context.Sources) && ReferenceEquals(now.Item4, _context.Session)))
|
||||
{
|
||||
@@ -494,12 +503,31 @@ public sealed class SessionRecorder : ISessionRecorder
|
||||
}
|
||||
|
||||
_context = now;
|
||||
_inGameContext = (game, status);
|
||||
_inGameContext = (game, status, streamline, frameGeneration);
|
||||
writer.SetAdvancedContext(new AdvancedSessionData(
|
||||
snapshot?.MachineFacts ?? [],
|
||||
_sessionWithGame,
|
||||
snapshot?.Series ?? [],
|
||||
(snapshot?.Sources ?? AdvancedSources.Unknown) with { InGame = status }));
|
||||
(snapshot?.Sources ?? AdvancedSources.Unknown) with { InGame = status, StreamlineConstants = streamline, FsrFrameGeneration = frameGeneration }));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// What became of the two calls hooked only for Advanced metrics (0.1.0-beta.43), for a session measured
|
||||
/// inside the game: read, hooked and never called, or not hooked - from the hook families the capture side
|
||||
/// last published and from what its publications carried. Null for a session not measured inside the game:
|
||||
/// <see cref="AdvancedInGameStatus.NotHooked"/> already says so.
|
||||
/// </summary>
|
||||
private (AdvancedInGameCall? Streamline, AdvancedInGameCall? FrameGeneration) InGameCalls()
|
||||
{
|
||||
if (_inGame is null || AttachedAt is null)
|
||||
{
|
||||
return (null, null);
|
||||
}
|
||||
|
||||
var hooks = (FlHookFamily)(_last?.WriterState.HooksInstalledMask ?? 0u);
|
||||
return (
|
||||
_inGame.Call(FlAdvancedValid.SlConstants, hooks.HasFlag(FlHookFamily.SlConstants)),
|
||||
_inGame.Call(FlAdvancedValid.FfxFgConfig, hooks.HasFlag(FlHookFamily.FfxConfigure)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -929,6 +929,14 @@ public unsafe struct FlAdvancedState
|
||||
/// <summary>left, top, width, height.</summary>
|
||||
public fixed int FfxFgRect[4];
|
||||
|
||||
/// <summary>One side of <see cref="FfxFgRect"/>: 0 left, 1 top, 2 width, 3 height. Four -1 is a rectangle the capture side could not state.</summary>
|
||||
public readonly int FfxFgRectAt(int side)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(side);
|
||||
ArgumentOutOfRangeException.ThrowIfGreaterThan(side, 3);
|
||||
return FfxFgRect[side];
|
||||
}
|
||||
|
||||
/// <summary>Must be zero.</summary>
|
||||
public fixed uint ReservedFfx[2];
|
||||
|
||||
|
||||
@@ -302,6 +302,19 @@ public sealed class AgentEndToEndTests : IDisposable
|
||||
facts.Single(static f => string.Equals(f.Id, "ffx.upscale.flags", StringComparison.Ordinal)).Value.Tokens.Should().Equal("non_linear_color_pq");
|
||||
facts.Should().NotContain(static f => f.Id.StartsWith("sl.", StringComparison.Ordinal), "this target chains no DLSS options");
|
||||
|
||||
// 0.1.0-beta.43: the frame-generation configuration the harness sends through ffxConfigure before each frame
|
||||
// (kAdvFfxFg*), read by a hook that was not in the game during the first session - nothing had asked - and
|
||||
// was installed when this one did. Streamline's library is not in this target at all, and the row says that
|
||||
// rather than "the game never called".
|
||||
Rows("ffx.framegen.config").Should().Equal(
|
||||
"frameGenerationEnabled=on",
|
||||
"allowAsyncWorkloads=off",
|
||||
"onlyPresentGenerated=off",
|
||||
"flags=DRAW_DEBUG_PACING_LINES",
|
||||
"generationRect=1920 × 1080 at 0, 0");
|
||||
sources.FsrFrameGeneration.Should().Be(AdvancedInGameCall.Read, row.FactsJson);
|
||||
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.NotHooked, row.FactsJson);
|
||||
|
||||
IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats = AdvancedJson.ParseStats(row.StatsJson);
|
||||
stats.Should().ContainKey(InGameAdvancedSampler.FrameTimeSeries, row.StatsJson);
|
||||
stats[InGameAdvancedSampler.FrameTimeSeries].Mean.Should().BeApproximately(16.0, 0.01, "every dispatch states 16 ms");
|
||||
|
||||
@@ -241,7 +241,7 @@ public sealed class AdvancedPresenterTests
|
||||
At(live, id).Status.Should().Be(Strings.Advanced_Status_InGame);
|
||||
}
|
||||
|
||||
At(live, "ffx.framegen.config").Status.Should().Be(AdvancedLabels.Reach(AdvancedReach.NewHook), "a hook that is not built is still a later release");
|
||||
At(live, "sl.feature.versions").Status.Should().Be(AdvancedLabels.Reach(AdvancedReach.NewHook), "a hook that is not built is still a later release");
|
||||
live.Where(static r => r.IsRead).Should().HaveCount(AdvancedMetricCatalog.All.Count(static m => m.IsRead));
|
||||
}
|
||||
|
||||
@@ -281,6 +281,36 @@ public sealed class AdvancedPresenterTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ASessionsSourcesLineSaysForEachCallHookedOnlyForAdvancedMetricsWhichOfThreeThingsHappened()
|
||||
{
|
||||
// 0.1.0-beta.43: read, hooked and never made by the game, or not hooked. A row stored before has neither
|
||||
// member, and a session not measured inside the game has none to speak of: the sentence is not there.
|
||||
AdvancedSources hooked = AdvancedFixtures.Sources with { InGame = AdvancedInGameStatus.Reading };
|
||||
string before = AdvancedPresenter.SourcesLine(hooked);
|
||||
before.Should().NotContain(AdvancedLabels.InGameCall(AdvancedInGameCall.NeverCalled)).And.NotContain(AdvancedLabels.InGameCall(AdvancedInGameCall.NotHooked));
|
||||
|
||||
string line = AdvancedPresenter.SourcesLine(hooked with
|
||||
{
|
||||
StreamlineConstants = AdvancedInGameCall.NeverCalled,
|
||||
FsrFrameGeneration = AdvancedInGameCall.Read,
|
||||
});
|
||||
|
||||
line.Should().StartWith(before, "what was said before is said as before");
|
||||
line.Should().EndWith(string.Format(
|
||||
CultureInfo.CurrentCulture,
|
||||
Strings.Advanced_InGameCallsLine,
|
||||
AdvancedLabels.InGameCall(AdvancedInGameCall.NeverCalled),
|
||||
AdvancedLabels.InGameCall(AdvancedInGameCall.Read)));
|
||||
|
||||
foreach (AdvancedInGameCall call in Enum.GetValues<AdvancedInGameCall>())
|
||||
{
|
||||
AdvancedLabels.InGameCall(call).Should().NotBe(call.ToString(), "every state has words of its own in every language");
|
||||
}
|
||||
|
||||
AdvancedLabels.InGameCall(AdvancedInGameCall.NeverCalled).Should().NotBe(AdvancedLabels.InGameCall(AdvancedInGameCall.NotHooked), "the two reasons a value is absent are not one");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AValueIsShownInItsUnitAndAFlagAsYesOrNo()
|
||||
{
|
||||
|
||||
@@ -145,7 +145,7 @@ public sealed class AdvancedJsonTests
|
||||
new("nvapi.gpu.board_serial", Instance: null, AdvancedValue.OfText("0123456789")),
|
||||
new("nvapi.display.edid", "1", AdvancedValue.OfText("00ffffffffffff00")),
|
||||
new("sl.constants.camera", Instance: null, AdvancedValue.OfText("1.0 2.0 3.0")),
|
||||
new("sl.constants.jitter", Instance: null, AdvancedValue.OfText("0.25 0.25")),
|
||||
new("sl.feature.versions", Instance: null, AdvancedValue.OfText("DLSS 3.7.0")),
|
||||
new("sl.dlss.presets", Instance: null, AdvancedValue.OfRows([new AdvancedRow("DLAA", "K")])),
|
||||
new("no.such.metric", Instance: null, AdvancedValue.Of(1)),
|
||||
new("lhm.board.model", Instance: null, AdvancedValue.OfText("ASUS ROG STRIX Z790-E")),
|
||||
@@ -171,6 +171,30 @@ public sealed class AdvancedJsonTests
|
||||
sources.InGame.Should().BeNull("a row that never said is not a row that said no");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WhatBecameOfTheTwoCallsHookedOnlyForAdvancedMetricsSurvivesTheLedgerAndAnOlderRowSaysNothingOfThem()
|
||||
{
|
||||
AdvancedSources written = AdvancedSources.Unknown with
|
||||
{
|
||||
InGame = AdvancedInGameStatus.Reading,
|
||||
StreamlineConstants = AdvancedInGameCall.NeverCalled,
|
||||
FsrFrameGeneration = AdvancedInGameCall.Read,
|
||||
};
|
||||
|
||||
string json = AdvancedJson.OfSession([], written);
|
||||
(_, AdvancedSources read) = AdvancedJson.ParseSession(json);
|
||||
|
||||
json.Should().Contain("\"streamlineConstants\":\"NeverCalled\"").And.Contain("\"fsrFrameGeneration\":\"Read\"");
|
||||
read.Should().Be(written);
|
||||
|
||||
// 0.1.0-beta.42 wrote exactly this: the in-game state and neither of the two.
|
||||
const string beta42 = """{"facts":[],"sources":{"nvapi":"Reading","sensors":"Reading","elevatedSensors":"Reading","inGame":"Reading"}}""";
|
||||
(_, AdvancedSources older) = AdvancedJson.ParseSession(beta42);
|
||||
older.InGame.Should().Be(AdvancedInGameStatus.Reading);
|
||||
older.StreamlineConstants.Should().BeNull("a row that never said is not a row that said the hook was not in");
|
||||
older.FsrFrameGeneration.Should().BeNull();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(AdvancedInGameStatus.Reading)]
|
||||
[InlineData(AdvancedInGameStatus.NothingSeen)]
|
||||
|
||||
@@ -106,12 +106,17 @@ public sealed partial class AdvancedMetricCatalogTests
|
||||
{
|
||||
// Train B, 0.1.0-beta.40: thirteen entries, each a member of a call the Overlay already hooked - and each
|
||||
// matched by a name on tools/overlay-allowed-fields.txt, which a build gate holds to the Overlay's own code.
|
||||
// 0.1.0-beta.43: six more, from the two calls hooked only for Advanced metrics (slSetConstants, ffxConfigure).
|
||||
// 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(
|
||||
"sl.dlss.output_size", "sl.dlss.presets", "sl.dlss.hdr_input", "sl.dlss.auto_exposure", "sl.dlss.alpha_upscaling", "sl.dlss.exposure",
|
||||
"ffx.upscale.sharpening", "ffx.upscale.jitter", "ffx.upscale.exposure", "ffx.upscale.depth", "ffx.upscale.flags",
|
||||
"ffx.upscale.frame_time_delta", "ffx.memory_usage");
|
||||
"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");
|
||||
// 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);
|
||||
|
||||
_all.Where(static m => m.Reach == AdvancedReach.Game).Should().OnlyContain(static m => m.Source == AdvancedSource.Streamline || m.Source == AdvancedSource.FidelityFx);
|
||||
_all.Where(static m => m.Reach == AdvancedReach.Game).Should().OnlyContain(static m => m.Scope != AdvancedScope.MachineFact, "what a game says is of a session, never of the PC");
|
||||
|
||||
@@ -215,13 +215,133 @@ public sealed class InGameAdvancedSamplerTests
|
||||
Rows(Fact(sampler, "ffx.upscale.depth")).Should().Contain("cameraFovAngleVertical=0.9 – 1.3 rad (51.6° – 74.5°)");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WhatTheGameTellsStreamlineEachFrameBecomesFiveFactsOfTheFirstViewport()
|
||||
{
|
||||
// 0.1.0-beta.43: slSetConstants. The jitter as its largest magnitude, the field of view as a range, each
|
||||
// Boolean as what it was seen to be over the session - and nothing of the camera's position, axes or
|
||||
// matrices, which the capture side never reads.
|
||||
var sampler = new InGameAdvancedSampler();
|
||||
sampler.Take(new InGameAdvanced(InGameStates.Streamline()));
|
||||
|
||||
Rows(Fact(sampler, "sl.constants.jitter")).Should().Equal("jitterOffset.x=≤ 0.3125", "jitterOffset.y=≤ 0.4375");
|
||||
AdvancedFact motion = Fact(sampler, "sl.constants.motion_vectors");
|
||||
Rows(motion).Should().Equal(
|
||||
"mvecScale.x=0.5", "mvecScale.y=0.25", "cameraMotionIncluded=on", "motionVectors3D=off", "motionVectorsDilated=off", "motionVectorsJittered=on");
|
||||
motion.Value.Rows![2].Token.Should().Be("on", "the App translates the word");
|
||||
Rows(Fact(sampler, "sl.constants.depth")).Should().Equal("cameraNear=0.25", "cameraFar=4000", "depthInverted=on");
|
||||
Rows(Fact(sampler, "sl.constants.projection")).Should().Equal(
|
||||
"cameraFOV=0.8 – 1.2 rad (45.8° – 68.8°)", "cameraAspectRatio=1.75", "orthographicProjection=off");
|
||||
Fact(sampler, "sl.constants.resets").Value.Number.Should().Be(1);
|
||||
sampler.Facts.Should().NotContain(static f => string.Equals(f.Id, "sl.constants.camera", StringComparison.Ordinal));
|
||||
sampler.Facts.Should().Contain(static f => string.Equals(f.Id, "sl.dlss.presets", StringComparison.Ordinal), "the options of the same game stay beside them");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AStreamlineConstantNobodySetIsAbsentAndAPlaneAtInfinityIsNotStreamlines()
|
||||
{
|
||||
// FLT_MAX is Streamline's "not set" and never reaches the Agent; if the pattern D119 gives FSR's planes turned up
|
||||
// here it would still be no value. A Boolean seen neither way has no row; a reset never seen is a count of 0.
|
||||
var sampler = new InGameAdvancedSampler();
|
||||
sampler.Take(new InGameAdvanced(InGameStates.Empty() with
|
||||
{
|
||||
ValidMask = FlAdvancedValid.SlConstants,
|
||||
SlConstantsCalls = 60,
|
||||
SlNearBits = FlAdvancedState.FloatInfinite,
|
||||
SlFarBits = BitConverter.SingleToUInt32Bits(500f),
|
||||
SlFlagsSeenFalse = 1u << 4,
|
||||
}));
|
||||
|
||||
Rows(Fact(sampler, "sl.constants.depth")).Should().Equal("cameraFar=500");
|
||||
Rows(Fact(sampler, "sl.constants.projection")).Should().Equal("orthographicProjection=off");
|
||||
Fact(sampler, "sl.constants.resets").Value.Number.Should().Be(0, "the game called and never reset the history: that is a fact");
|
||||
sampler.Facts.Should().NotContain(static f => f.Id == "sl.constants.jitter" || f.Id == "sl.constants.motion_vectors");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HowTheGameConfiguresFsrFrameGenerationIsOneFactOfSwitchesFlagsAndTheRectangle()
|
||||
{
|
||||
var sampler = new InGameAdvancedSampler();
|
||||
sampler.Take(new InGameAdvanced(InGameStates.FrameGeneration()));
|
||||
|
||||
AdvancedFact config = Fact(sampler, "ffx.framegen.config");
|
||||
Rows(config).Should().Equal(
|
||||
"frameGenerationEnabled=on", "allowAsyncWorkloads=off", "onlyPresentGenerated=off", "flags=DRAW_DEBUG_PACING_LINES", "generationRect=1920 × 1080 at 0, 0");
|
||||
config.Value.Rows![0].Token.Should().Be("on");
|
||||
|
||||
// Switched off in the menu part-way, a flag the vendor's header does not name, and a rectangle the capture side
|
||||
// could not state (four -1): both states are said, the bit is shown as it is, and there is no rectangle row.
|
||||
var other = new InGameAdvancedSampler();
|
||||
other.Take(new InGameAdvanced(InGameStates.WithRect(
|
||||
InGameStates.FrameGeneration() with { FfxFgEnabledSeen = 3, FfxFgFlagsSeen = (1u << 0) | (1u << 9), FfxFgAsyncSeen = 0 }, -1, -1, -1, -1)));
|
||||
Rows(Fact(other, "ffx.framegen.config")).Should().Equal(
|
||||
"frameGenerationEnabled=on_and_off", "onlyPresentGenerated=off", "flags=DRAW_DEBUG_TEAR_LINES, bit 9");
|
||||
|
||||
// A rectangle with no area is one the game did not give.
|
||||
var none = new InGameAdvancedSampler();
|
||||
none.Take(new InGameAdvanced(InGameStates.WithRect(InGameStates.FrameGeneration() with { FfxFgFlagsSeen = 0 }, 0, 0, 0, 0)));
|
||||
Rows(Fact(none, "ffx.framegen.config")).Should().Equal("frameGenerationEnabled=on", "allowAsyncWorkloads=off", "onlyPresentGenerated=off");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ACountDoesNotRebuildTheFactsWhileTheSessionRunsAndIsExactOnceItConcludes()
|
||||
{
|
||||
// The resets told to Streamline are a count. While the session runs the list is rebuilt only when a value a
|
||||
// fact is made of moves - the session's context is rewritten on every new list - so the count is as of the
|
||||
// last rebuild; Conclude brings it to the last publication, once.
|
||||
var sampler = new InGameAdvancedSampler();
|
||||
sampler.Take(new InGameAdvanced(InGameStates.Streamline(1, resets: 1)));
|
||||
IReadOnlyList<AdvancedFact> first = sampler.Facts;
|
||||
|
||||
sampler.Take(new InGameAdvanced(InGameStates.Streamline(2, resets: 5)));
|
||||
sampler.Facts.Should().BeSameAs(first, "a count alone rebuilds nothing");
|
||||
Fact(sampler, "sl.constants.resets").Value.Number.Should().Be(1);
|
||||
|
||||
sampler.Conclude();
|
||||
sampler.Facts.Should().NotBeSameAs(first);
|
||||
Fact(sampler, "sl.constants.resets").Value.Number.Should().Be(5);
|
||||
|
||||
IReadOnlyList<AdvancedFact> concluded = sampler.Facts;
|
||||
sampler.Conclude();
|
||||
sampler.Facts.Should().BeSameAs(concluded, "nothing moved since");
|
||||
|
||||
var empty = new InGameAdvancedSampler();
|
||||
empty.Conclude();
|
||||
empty.Facts.Should().BeEmpty("a session that read nothing has nothing to bring up to date");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ACallHookedOnlyForAdvancedMetricsIsReadOrHookedAndNeverMadeOrNotHooked()
|
||||
{
|
||||
var sampler = new InGameAdvancedSampler();
|
||||
sampler.Call(FlAdvancedValid.SlConstants, hookedIn: false).Should().Be(AdvancedInGameCall.NotHooked);
|
||||
sampler.Call(FlAdvancedValid.SlConstants, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled);
|
||||
|
||||
sampler.Take(new InGameAdvanced(InGameStates.Streamline()));
|
||||
sampler.Call(FlAdvancedValid.SlConstants, hookedIn: true).Should().Be(AdvancedInGameCall.Read);
|
||||
sampler.Call(FlAdvancedValid.SlConstants, hookedIn: false).Should().Be(AdvancedInGameCall.Read, "a publication that carried it is the proof, whatever the hook word says");
|
||||
sampler.Call(FlAdvancedValid.FfxFgConfig, hookedIn: true).Should().Be(AdvancedInGameCall.NeverCalled, "the other call is its own question");
|
||||
|
||||
// Read once is read for the session, though a later publication - a new request's - does not carry it.
|
||||
sampler.Take(new InGameAdvanced(InGameStates.Ffx(2)));
|
||||
sampler.Call(FlAdvancedValid.SlConstants, hookedIn: true).Should().Be(AdvancedInGameCall.Read);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EveryFactItMakesIsAnEntryTheCatalogSaysIsReadInsideAGame()
|
||||
{
|
||||
var sampler = new InGameAdvancedSampler();
|
||||
FlAdvancedState both = InGameStates.Ffx() with
|
||||
FlAdvancedState both = InGameStates.WithRect(InGameStates.Streamline(), 0, 0, 2560, 1440) with
|
||||
{
|
||||
ValidMask = FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxMemory,
|
||||
FfxFgConfigures = 60,
|
||||
FfxFgEnabledSeen = 2,
|
||||
FfxSharpenSeen = 2,
|
||||
FfxFlagsSeen = 1u << 2,
|
||||
FfxFrameTimeCount = 60,
|
||||
FfxFrameTimeSumUs = 60 * 16_000,
|
||||
FfxMemoryTotalBytes = 256UL * 1024 * 1024,
|
||||
FfxMemoryQueries = 60,
|
||||
ValidMask = FlAdvancedValid.DlssOptions | FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxMemory | FlAdvancedValid.FfxFgConfig | FlAdvancedValid.SlConstants,
|
||||
DlssOutputWidth = 3840,
|
||||
DlssOutputHeight = 2160,
|
||||
DlssColorBuffersHdr = 2,
|
||||
@@ -230,6 +350,7 @@ public sealed class InGameAdvancedSamplerTests
|
||||
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"]);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,15 @@ internal static class InGameStates
|
||||
FfxFarBits = FlAdvancedState.FloatNone,
|
||||
FfxFovMinBits = FlAdvancedState.FloatNone,
|
||||
FfxFovMaxBits = FlAdvancedState.FloatNone,
|
||||
SlJitterMaxXBits = FlAdvancedState.FloatNone,
|
||||
SlJitterMaxYBits = FlAdvancedState.FloatNone,
|
||||
SlMvecScaleXBits = FlAdvancedState.FloatNone,
|
||||
SlMvecScaleYBits = FlAdvancedState.FloatNone,
|
||||
SlNearBits = FlAdvancedState.FloatNone,
|
||||
SlFarBits = FlAdvancedState.FloatNone,
|
||||
SlFovMinBits = FlAdvancedState.FloatNone,
|
||||
SlFovMaxBits = FlAdvancedState.FloatNone,
|
||||
SlAspectBits = FlAdvancedState.FloatNone,
|
||||
};
|
||||
|
||||
/// <summary>The DLSS options <c>hook-harness --advanced</c> chains into its evaluation, as the vendor's values plus one.</summary>
|
||||
@@ -78,6 +87,57 @@ internal static class InGameStates
|
||||
FfxMemoryQueries = 60 * samples,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// What <c>hook-harness --advanced</c> hands <c>slSetConstants</c> for its first viewport (0.1.0-beta.43), beside the
|
||||
/// DLSS options of the same target. Bits in the vendor header's order: depthInverted 0, cameraMotionIncluded 1,
|
||||
/// motionVectors3D 2, reset 3, orthographicProjection 4, motionVectorsDilated 5, motionVectorsJittered 6.
|
||||
/// </summary>
|
||||
public static FlAdvancedState Streamline(uint samples = 1, uint resets = 1) => Dlss(samples) with
|
||||
{
|
||||
ValidMask = FlAdvancedValid.DlssOptions | FlAdvancedValid.SlConstants,
|
||||
SlConstantsCalls = 120 * samples,
|
||||
SlResets = resets,
|
||||
SlJitterMaxXBits = Bits(0.3125f),
|
||||
SlJitterMaxYBits = Bits(0.4375f),
|
||||
SlMvecScaleXBits = Bits(0.5f),
|
||||
SlMvecScaleYBits = Bits(0.25f),
|
||||
SlNearBits = Bits(0.25f),
|
||||
SlFarBits = Bits(4000f),
|
||||
SlFovMinBits = Bits(0.8f),
|
||||
SlFovMaxBits = Bits(1.2f),
|
||||
SlAspectBits = Bits(1.75f),
|
||||
SlFlagsSeenTrue = (1u << 0) | (1u << 1) | (1u << 3) | (1u << 6),
|
||||
SlFlagsSeenFalse = (1u << 2) | (1u << 3) | (1u << 4) | (1u << 5),
|
||||
};
|
||||
|
||||
/// <summary>The frame-generation configuration the same harness hands <c>ffxConfigure</c> (0.1.0-beta.43), beside its FSR dispatch.</summary>
|
||||
public static FlAdvancedState FrameGeneration(uint samples = 1) => WithRect(
|
||||
Ffx(samples) with
|
||||
{
|
||||
ValidMask = FlAdvancedValid.FfxUpscale | FlAdvancedValid.FfxMemory | FlAdvancedValid.FfxFgConfig,
|
||||
FfxFgConfigures = 60 * samples,
|
||||
FfxFgEnabledSeen = 2,
|
||||
FfxFgAsyncSeen = 1,
|
||||
FfxFgOnlyGeneratedSeen = 1,
|
||||
FfxFgFlagsSeen = 1u << 4,
|
||||
},
|
||||
0,
|
||||
0,
|
||||
1920,
|
||||
1080);
|
||||
|
||||
/// <summary>The generation rectangle - left, top, width, height: a fixed buffer, set through the struct's bytes.</summary>
|
||||
public static FlAdvancedState WithRect(FlAdvancedState state, int left, int top, int width, int height)
|
||||
{
|
||||
int at = (int)Marshal.OffsetOf<FlAdvancedState>(nameof(FlAdvancedState.FfxFgRect));
|
||||
Span<int> sides = MemoryMarshal.Cast<byte, int>(MemoryMarshal.AsBytes(new Span<FlAdvancedState>(ref state)).Slice(at, 16));
|
||||
sides[0] = left;
|
||||
sides[1] = top;
|
||||
sides[2] = width;
|
||||
sides[3] = height;
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>The six preset bytes, DLAA first: a fixed buffer, set through the struct's bytes so no test needs unsafe code.</summary>
|
||||
public static FlAdvancedState WithPresets(FlAdvancedState state, params ReadOnlySpan<byte> plusOne)
|
||||
{
|
||||
|
||||
@@ -105,8 +105,14 @@ public sealed class SessionRecorderTests : IAsyncDisposable
|
||||
/// <summary>What each publication carries; null publishes nothing. The count of publications goes in.</summary>
|
||||
public Func<uint, FlAdvancedState>? Publish { get; init; }
|
||||
|
||||
/// <summary>The hook families the capture side says are in: the present hook alone unless a test says more.</summary>
|
||||
public FlHookFamily Hooks { get; init; } = FlHookFamily.Present;
|
||||
|
||||
public List<bool> Asked { get; } = [];
|
||||
|
||||
/// <summary>How many publications were handed out.</summary>
|
||||
public uint Published => _published;
|
||||
|
||||
/// <summary>A new publication on every read, as if the watchdog ticked as often as the test's loop.</summary>
|
||||
public FlAdvancedState? Next() => Publish?.Invoke(++_published);
|
||||
}
|
||||
@@ -119,7 +125,7 @@ public sealed class SessionRecorderTests : IAsyncDisposable
|
||||
|
||||
public void SetAdvancedRequested(bool requested) => inGame?.Asked.Add(requested);
|
||||
|
||||
public FlWriterState WriterState => new() { Status = (uint)FlStatus.Ready, HooksInstalledMask = 1, RuntimeCensus = 0x8000_0000 };
|
||||
public FlWriterState WriterState => new() { Status = (uint)FlStatus.Ready, HooksInstalledMask = (uint)(inGame?.Hooks ?? FlHookFamily.Present), RuntimeCensus = 0x8000_0000 };
|
||||
|
||||
public FlShmHandshake Handshake => new() { AdapterLuid = adapterLuid };
|
||||
|
||||
@@ -876,6 +882,10 @@ public sealed class SessionRecorderTests : IAsyncDisposable
|
||||
facts.Single(static f => string.Equals(f.Id, "ffx.upscale.depth", StringComparison.Ordinal)).Value.Rows!.Select(static x => x.Value).Should().Contain("0.9 – 1.1 rad (51.6° – 63°)");
|
||||
sources.InGame.Should().Be(AdvancedInGameStatus.Reading);
|
||||
sources.Nvapi.Should().Be(AdvancedSourceStatus.Reading, "the Agent's own sources are said as before");
|
||||
// The two calls hooked only for Advanced metrics: this game made neither, and the capture side said neither
|
||||
// hook was in - "not hooked", which is not "the game never called".
|
||||
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.NotHooked);
|
||||
sources.FsrFrameGeneration.Should().Be(AdvancedInGameCall.NotHooked);
|
||||
|
||||
// The two series, beside whatever the Agent's own reader gave the same tick.
|
||||
stored.Sensors.Select(static b => b.Series).Should().Contain([InGameAdvancedSampler.FrameTimeSeries, InGameAdvancedSampler.MemorySeries]);
|
||||
@@ -887,6 +897,56 @@ public sealed class SessionRecorderTests : IAsyncDisposable
|
||||
r.Row.Tier.Should().Be(CaptureTier.Hooked);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task TheTwoCallsHookedOnlyForAdvancedMetricsAreEachReadOrHookedAndNeverMade()
|
||||
{
|
||||
// 0.1.0-beta.43. A game that configures FSR frame generation and does not use Streamline's constants, with
|
||||
// both hooks in: the configuration is read and stored; of slSetConstants the row says the hook was in and
|
||||
// the game never made the call - which says something about the game, where "not hooked" would not.
|
||||
var script = new InGameScript
|
||||
{
|
||||
Publish = static n => InGameStates.FrameGeneration(n),
|
||||
Hooks = FlHookFamily.Present | FlHookFamily.SlConstants | FlHookFamily.FfxConfigure,
|
||||
};
|
||||
Harness h = await MakeAsync(advanced: new FakeAdvanced { Latest = FakeAdvanced.Snapshot() }, advancedOn: true, inGame: script);
|
||||
|
||||
await h.Recorder.RecordAsync(Request(), TestContext.Current.CancellationToken);
|
||||
|
||||
AdvancedSessionRow row = h.Sessions.Stored.Single().Advanced.Should().BeOfType<AdvancedSessionRow>().Subject;
|
||||
(IReadOnlyList<AdvancedFact> facts, AdvancedSources sources) = AdvancedJson.ParseSession(row.FactsJson);
|
||||
sources.InGame.Should().Be(AdvancedInGameStatus.Reading);
|
||||
sources.FsrFrameGeneration.Should().Be(AdvancedInGameCall.Read);
|
||||
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.NeverCalled);
|
||||
facts.Single(static f => string.Equals(f.Id, "ffx.framegen.config", StringComparison.Ordinal)).Value.Rows!
|
||||
.Select(static x => x.Name + "=" + x.Value)
|
||||
.Should().Contain(["frameGenerationEnabled=on", "generationRect=1920 × 1080 at 0, 0"]);
|
||||
facts.Should().NotContain(static f => f.Id.StartsWith("sl.constants.", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task WhatTheGameToldStreamlineIsStoredWithItsCountAsOfTheEndOfTheSession()
|
||||
{
|
||||
// The resets are a count, and a count does not rewrite the session's context while it runs: the stored fact is
|
||||
// the count of the LAST publication, brought up to date when the session concludes.
|
||||
var script = new InGameScript
|
||||
{
|
||||
Publish = static n => InGameStates.Streamline(n, resets: n),
|
||||
Hooks = FlHookFamily.Present | FlHookFamily.SlConstants,
|
||||
};
|
||||
Harness h = await MakeAsync(advanced: new FakeAdvanced { Latest = FakeAdvanced.Snapshot() }, advancedOn: true, inGame: script);
|
||||
|
||||
await h.Recorder.RecordAsync(Request(), TestContext.Current.CancellationToken);
|
||||
|
||||
AdvancedSessionRow row = h.Sessions.Stored.Single().Advanced.Should().BeOfType<AdvancedSessionRow>().Subject;
|
||||
(IReadOnlyList<AdvancedFact> facts, AdvancedSources sources) = AdvancedJson.ParseSession(row.FactsJson);
|
||||
sources.StreamlineConstants.Should().Be(AdvancedInGameCall.Read);
|
||||
sources.FsrFrameGeneration.Should().Be(AdvancedInGameCall.NotHooked);
|
||||
facts.Select(static f => f.Id).Should().Contain(["sl.constants.jitter", "sl.constants.motion_vectors", "sl.constants.depth", "sl.constants.projection", "sl.constants.resets"]);
|
||||
double resets = facts.Single(static f => string.Equals(f.Id, "sl.constants.resets", StringComparison.Ordinal)).Value.Number!.Value;
|
||||
resets.Should().BeGreaterThan(1, "more than one publication was taken, each with a higher count");
|
||||
resets.Should().Be(script.Published, "the count stored is the last publication's, not the first's");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AHookedSessionWhoseGameMadeNoneOfTheCallsSaysSoRatherThanNothing()
|
||||
{
|
||||
@@ -920,6 +980,8 @@ public sealed class SessionRecorderTests : IAsyncDisposable
|
||||
(IReadOnlyList<AdvancedFact> facts, AdvancedSources sources) = AdvancedJson.ParseSession(row.FactsJson);
|
||||
facts.Should().NotContain(static f => f.Id.StartsWith("ffx.", StringComparison.Ordinal) || f.Id.StartsWith("sl.", StringComparison.Ordinal));
|
||||
sources.InGame.Should().Be(AdvancedInGameStatus.NotHooked);
|
||||
sources.StreamlineConstants.Should().BeNull("a session not measured inside the game has no hook to speak of");
|
||||
sources.FsrFrameGeneration.Should().BeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -936,7 +998,14 @@ public sealed class SessionRecorderTests : IAsyncDisposable
|
||||
row.MachineFactsJson.Should().BeNull();
|
||||
(IReadOnlyList<AdvancedFact> facts, AdvancedSources sources) = AdvancedJson.ParseSession(row.FactsJson);
|
||||
facts.Should().BeEmpty("a read that threw costs the session its facts, not itself");
|
||||
sources.Should().Be(AdvancedSources.Unknown with { InGame = AdvancedInGameStatus.NothingSeen }, "the Agent's sources never answered; the game was measured from inside and made none of the calls");
|
||||
sources.Should().Be(
|
||||
AdvancedSources.Unknown with
|
||||
{
|
||||
InGame = AdvancedInGameStatus.NothingSeen,
|
||||
StreamlineConstants = AdvancedInGameCall.NotHooked,
|
||||
FsrFrameGeneration = AdvancedInGameCall.NotHooked,
|
||||
},
|
||||
"the Agent's sources never answered; the game was measured from inside, made none of the calls, and the capture side published neither of the two hooks that are installed only for Advanced metrics");
|
||||
hub.Released.Should().Be(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user