Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25e4e254d8 | ||
|
|
0f852ce670 | ||
|
|
2c4cc6ac1d | ||
|
|
1b824c7d4c | ||
|
|
79f5e2488c |
No files matched your search
@@ -19,6 +19,45 @@ GitHub release body, so a missing section will mean an empty release note.
|
||||
|
||||
### Added
|
||||
|
||||
- **AMD identity is measured through the ffx-api leaves, and the first non-NVIDIA vendor
|
||||
reaches the record.** HANDOFF item 7c. Lies of P at FSR 3.1 + frame generation printed
|
||||
`upscaler: N/A … frame generation: N/A` plus a census WARNING because the three AMD modules
|
||||
export the same five generic names and the identity lives in the descriptor the game passes
|
||||
— which needs the vendor's headers to decode, and `20_OPEN_QUESTIONS` §H11 forbids decoding
|
||||
it from observation. Five headers are vendored from FidelityFX-SDK **tag `v2.3.0`**,
|
||||
types-only under upstream's `Kits/FidelityFX/` layout, with upstream's `docs/license.md`
|
||||
verbatim: a binary-only default licence whose **MIT exception list names every one of the
|
||||
tree's 845 files** (the signed DLLs included), the five among them, and each header carries
|
||||
the grant inline; `license-check.ps1` §2d asserts both per vendored file. `v2.3.0` rather
|
||||
than the `v1.1.4` `18_GPU_VENDOR_APIS` first named, because its own reversal condition
|
||||
fired: installed titles already ship SDK 2.x effect DLLs (Hell Is Us 4.0.x, Expedition 33
|
||||
and Dying Light: The Beast 4.0.2 + 3.1.5) and the sample dispatches `PrepareV2`, which
|
||||
`v1.1.4` does not declare; every value and layout read is identical in both tags.
|
||||
**Three inventory rows, one compound family, one observer, three trampolines, and the rows
|
||||
are the LEAVES** — `amd_fidelityfx_dx12.dll` (the SDK 1.1.x monolith),
|
||||
`amd_fidelityfx_upscaler_dx12.dll`, `amd_fidelityfx_framegeneration_dx12.dll` — **never the
|
||||
SDK 2.x loader**, which forwards to the effect DLLs through their own exports (the only
|
||||
route five identical export tables allow) so hooking it too would count every dispatch
|
||||
twice, straight into `fg_factor`; a UE5 title ships the two leaves with no loader at all.
|
||||
The detour reads the descriptor's head type and, once matched, `renderSize` (UPSCALE,
|
||||
PREPARE) and `frameID` (PREPARE) — rule 4's class of read — and publishes: identity
|
||||
(`FSR3` from the monolith; the new **`FL_UPSCALER_FSR_UNVERSIONED`** from the 2.x upscaler
|
||||
DLL, which hosts FSR 3.1 and FSR 4 behind one dispatch type — an enumerator, no layout
|
||||
change), `renderW/H` exact with quality and sharpness `0xFF` (the ffx-api dispatch carries
|
||||
neither, so that is the true value), `fgMode = FSR_FG` on a present that drained a
|
||||
generated batch, and `fgEvaluations` from PREPARE's `frameID` counted on a **new** index
|
||||
only — this vendor's `slGetNewFrameToken` — falling back to the UPSCALE count on a title that
|
||||
never prepares. Streamline keeps precedence once it has ever issued a token, so every title
|
||||
validated on §S31 is byte-identical to before. Fixtures: three leaf stubs, a **forwarding
|
||||
loader decoy**, `--probe-ffx-resolve` (ctest `fl_ffx_resolve`), and `--hold-presenting-ffx`
|
||||
driven at K = 1 / K = 4 on both topologies with the PREPARE issued twice per frame — the
|
||||
K = 1 control reads 2.0 for a writer that counts calls, or that hooks the loader.
|
||||
`hookinventory-check` Pass C now reads the Overlay's **export table** too: `ffx_api.h`
|
||||
declares its entry points `__declspec(dllexport)` unconditionally. Hook-path overhead: the
|
||||
present path gains two `exchange`, two loads and a branch; the detour is one 8-byte read, a
|
||||
switch and one RMW per dispatch (a CAS loop on PREPARE). Owner-only runs owed: Lies of P at
|
||||
FSR + FG and FSR alone, Hell Is Us at FSR, against the table pre-committed in §H11.
|
||||
|
||||
- **`none` is reachable by counting, §S31 is resolved, and P0's frame-generation blocker is
|
||||
gone.** The owner's second run on #105's monotone count landed on row **P1** of the table
|
||||
pre-committed in `20_OPEN_QUESTIONS` §S31: Cyberpunk 2077 off / ×3 / ×4 at `presents/tokens`
|
||||
|
||||
@@ -103,7 +103,7 @@ Everything lives locally in `%LOCALAPPDATA%\FrameLedger`. The only network calls
|
||||
|
||||
GPL-3.0-only. See `LICENSE`. Third-party components: [`legal/THIRD_PARTY_NOTICES.md`](legal/THIRD_PARTY_NOTICES.md).
|
||||
|
||||
GPU telemetry is layered so the project never depends on a proprietary vendor licence: a vendor-neutral DXGI/performance-counter baseline, LibreHardwareMonitor (MPL-2.0) for sensors on all vendors, and NVIDIA's NVAPI SDK (MIT) for NVIDIA-only extras such as Reflex latency. No Intel or AMD GPU SDK is bundled — see `docs/18_GPU_VENDOR_APIS.md` for why.
|
||||
GPU telemetry is layered so the project never depends on a proprietary vendor licence: a vendor-neutral DXGI/performance-counter baseline, LibreHardwareMonitor (MPL-2.0) for sensors on all vendors, and NVIDIA's NVAPI SDK (MIT) for NVIDIA-only extras such as Reflex latency. No Intel or AMD GPU *telemetry* SDK is bundled — see `docs/18_GPU_VENDOR_APIS.md` for why. The one AMD component in the tree is five MIT headers from the FidelityFX SDK, used for types only so the upscaler hook can read an FSR title's own dispatch descriptor; nothing AMD-built is linked or redistributed.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
+35
-1
@@ -173,7 +173,10 @@ This is the metric the rewrite exists for. Resolution ladder, highest confidence
|
||||
>
|
||||
> A module that MAY generate frames counts as a frame-generation runtime: `amd_fidelityfx_dx12.dll`,
|
||||
> the FSR 3.1 facade, dispatches both upscaling and frame generation behind one export set (H11), and
|
||||
> Lies of P ships it alone while generating frames — so it warns rather than reassures.
|
||||
> Lies of P ships it alone while generating frames — so it warns rather than reassures. **Since
|
||||
> 2026-09-04 that module is also HOOKED** (§The AMD source below), so on such a title the count is
|
||||
> measured and the trio prints; the WARNING is what remains for a title whose ffx-api dispatches
|
||||
> never arrive.
|
||||
>
|
||||
> **What it may NOT say, and this is the whole design: the census never produces `none`.**
|
||||
> `FL_FG_NONE` and `FL_UPSCALER_NONE` mean "a hook ran and saw the alternative" — the only
|
||||
@@ -236,6 +239,37 @@ F_app = Σ fgEvaluations (APPLICATION frames, counted at the
|
||||
> identity is *frame generation active, technology not identified*, which on a UE5 title with
|
||||
> both Streamline and FidelityFX loaded is the honest answer.
|
||||
|
||||
> ### The AMD source is the ffx-api PREPARE dispatch's `frameID` — built 2026-09-04, HANDOFF item 7c
|
||||
>
|
||||
> An FSR title routes every per-frame piece of work through one export, `ffxDispatch`, and the
|
||||
> descriptor it passes says which: an **UPSCALE** dispatch once per application frame, a
|
||||
> frame-generation **PREPARE** once per application frame carrying `frameID` (documented by the
|
||||
> vendor as *"must increment by exactly one for each frame"*), and a **FRAMEGENERATION** dispatch
|
||||
> per generated batch, sent back through the same export from the title's own callback. The Overlay
|
||||
> detours `ffxDispatch` on the three modules that actually run the effects — the SDK 1.1.x monolith
|
||||
> and the two SDK 2.x effect DLLs, never the 2.x loader that forwards to them — and:
|
||||
>
|
||||
> - `fgEvaluations` is the number of **new** `frameID`s the PREPARE dispatches carried between two
|
||||
> presents — this vendor's `slGetNewFrameToken`, keyed the same way (a monotone maximum, so a
|
||||
> re-issued prepare counts once). A title that has **never** prepared counts UPSCALE dispatches
|
||||
> instead, one per application frame; the choice is a one-way latch per process, because choosing
|
||||
> per present would double-count a frame whose two dispatches straddle a present.
|
||||
> - `fgMode` is `FSR_FG` on a present that drained a FRAMEGENERATION dispatch; `UNKNOWN` otherwise.
|
||||
> `none` is still the consumer's verdict from the count, exactly as on the Streamline route.
|
||||
> - **Two vendors in one process** (UE5 loads Streamline and the AMD leaves whatever the menu says):
|
||||
> Streamline's token count keeps precedence once it has ever issued a token, so every title
|
||||
> validated on §S31 is byte-identical to before; a process where Streamline is loaded and idle
|
||||
> falls through to the AMD count.
|
||||
> - **The second count.** UPSCALE dispatches are counted separately in the same drain word, and the
|
||||
> consumer prints `frames/upscale-drained` beside `presents/frame` — the AMD twin of `tokens/batch`:
|
||||
> `1.00` when the two per-frame counts agree, `2.00` when one of them is doubled (a hook on the loader
|
||||
> as well as the leaf, or two upscale contexts per frame). **Build the second count before trusting
|
||||
> the first** is 7c's own rule, and this is it.
|
||||
>
|
||||
> The acceptance table for the owner's three launches is pre-committed in `20_OPEN_QUESTIONS` §H11.
|
||||
> What this route does NOT reach: the FSR 3.0 host DLLs (`ffx_fsr3_x64.dll`, named exports, deferred
|
||||
> to their own PR), statically linked FSR (§Scope decisions), and Intel (closed at the census).
|
||||
|
||||
> **MEASURED 2026-08-15, AND IT CHANGES WHAT THIS SECTION CAN PROMISE.** On the one title
|
||||
> measured — Cyberpunk 2077, SL 2.7.1 — `slEvaluateFeature(kFeatureDLSS_G)` is **never
|
||||
> called**: 0 evaluations across ~14,000 Streamline batches at four frame-generation
|
||||
|
||||
@@ -168,7 +168,7 @@ Files shipped with a game tell us what it *supports*. These populate a **"Suppor
|
||||
|
||||
- DLSS SR `nvngx_dlss.dll` · DLSS-G `nvngx_dlssg.dll` · **Ray Reconstruction `nvngx_dlssd.dll`**
|
||||
- Streamline `sl.interposer.dll`, `sl.dlss_g.dll`, `sl.reflex.dll`
|
||||
- FSR `ffx_fsr2_*.dll`, `ffx_frameinterpolation_*.dll`, `amd_fidelityfx_*.dll`, `ffx_api*.dll`
|
||||
- FSR `ffx_fsr2_*.dll`, `ffx_frameinterpolation_*.dll`, `amd_fidelityfx_*.dll`, `ffx_api*.dll` — a hint still, even though `amd_fidelityfx_dx12.dll` / `_upscaler_dx12.dll` / `_framegeneration_dx12.dll` are *hooked* since 2026-09-04: the measured chip comes from the dispatch, never from the file
|
||||
- XeSS `libxess.dll`, XeFG `libxess_fg.dll`
|
||||
- DXR-capable: `d3d12.dll` usage + RT-capable GPU (capability only — says nothing about the game)
|
||||
|
||||
|
||||
+3
-1
@@ -28,6 +28,8 @@ Targets:
|
||||
- `fl-probe-hookprofile` → build-profile probes for `/guard:cf` and `-D_HAS_EXCEPTIONS=0` (`20_OPEN_QUESTIONS` §H1/§H3)
|
||||
- `fl-probe-guard` → measures the Windows APIs the guard is built on, unelevated (`spike-notes.md` §1). Not the guard, and takes no injection rights.
|
||||
- `fl_stub_sl_interposer` → `sl.interposer.dll`, and `fl_stub_sl_common` → `sl.common.dll` (`src/native/tools/vendor-stubs/`). **Fixtures, never shipped**, built under `FL_BUILD_TOOLS`; nothing `12_BUILD` publishes references them. They export the **measured** vendor names from `docs/vendor-exports.json` so the Overlay's symbol resolution is observable, and the second is a **decoy** exporting the same name from a different module — without it, "we resolve module-scoped" is a property no test can falsify. Their **output filenames are the vendor's and their version blocks are ours**: `fl_add_version_resource` takes the real filename so a file called `sl.interposer.dll` in our build tree still says plainly that it is FrameLedger's, which `19_SAFETY` requires of everything we build.
|
||||
- `fl_stub_ffx_dx12` → `amd_fidelityfx_dx12.dll`, `fl_stub_ffx_upscaler` → `amd_fidelityfx_upscaler_dx12.dll`, `fl_stub_ffx_fg` → `amd_fidelityfx_framegeneration_dx12.dll` — the three AMD **leaves** — and `fl_stub_ffx_loader` → `amd_fidelityfx_loader_dx12.dll`, a **forwarding decoy** bound to the two 2.x leaves so `--hold-presenting-ffx` can push every dispatch through a loader the Overlay must not hook (2026-09-04). Same rules as the Streamline stubs: fixtures, never shipped, vendor filenames with our version blocks.
|
||||
- **`fl_fidelityfx_headers`** → an INTERFACE target over the five vendored FidelityFX ffx-api headers (`src/native/third_party/fidelityfx/`, tag v2.3.0, MIT by exception). Three include directories because upstream's headers include each other by relative path; include directories only and nothing to link — no `.lib` is vendored — and `hookinventory-check` Pass C reads the Overlay's export table because `ffx_api.h` declares its entry points `__declspec(dllexport)` unconditionally.
|
||||
- **`fl_streamline_headers`** → an INTERFACE target over the vendored MIT Streamline headers (`src/native/third_party/streamline/`). Include directories only, **never linked**: `SL_API` entry points are `extern "C"` imports, and linking one would make `sl.interposer.dll` a load-time dependency of `FrameLedger.Overlay.dll`, which would stop the Overlay loading in every game that ships no Streamline — in the loader, before any of our code runs, with no message anywhere.
|
||||
|
||||
Compiler/linker flags (enforced in CMake, not per-target ad hoc): `/std:c++20 /MT /O2 /GS /guard:cf /Qspectre /GR- /W4 /WX`, `-D_HAS_EXCEPTIONS=0` for the Overlay target. Link `/DYNAMICBASE /NXCOMPAT /HIGHENTROPYVA`.
|
||||
@@ -38,7 +40,7 @@ Compiler/linker flags (enforced in CMake, not per-target ad hoc): `/std:c++20 /M
|
||||
|
||||
> **This paragraph said "is not vendored yet" until 2026-08-09**, in the present tense, and added that `src/native/third_party/` *"contains `CMakeLists.txt` and `vulkan-headers` only"*. Both were false from #55 (2026-08-05) onward. The sentence was itself a correction — of an earlier claim that NVAPI *was* vendored when it was not — so this file has now been wrong in both directions about the same fact, which is worth more than the fix: **CLAUDE.md's pinned stack and `18_GPU_VENDOR_APIS` §L3 were updated when the vendoring landed and this one was not.** `legal/` is gated bidirectionally and caught its own version; `docs/` is not gated, and this is what that costs. Link it normally; do **not** resolve NVAPI by ordinal (that was a workaround for a licensing constraint that no longer exists, and it breaks across driver versions). Still guard `NvAPI_Initialize` failure as a normal path — plenty of users have no NVIDIA GPU.
|
||||
|
||||
**No AMD or Intel GPU SDK is vendored.** Those vendors are covered by LibreHardwareMonitor and the DXGI/PDH baseline (`18_GPU_VENDOR_APIS`). A build that pulls in Intel IGCL or AMD ADLX material is a licensing regression, not a feature — CI greps for it.
|
||||
**No AMD or Intel GPU *telemetry* SDK is vendored.** Those vendors' sensors are covered by LibreHardwareMonitor and the DXGI/PDH baseline (`18_GPU_VENDOR_APIS`). A build that pulls in Intel IGCL or AMD ADLX material is a licensing regression, not a feature — CI greps for it. **The AMD FidelityFX ffx-api headers (MIT by exception, tag v2.3.0) ARE vendored since 2026-09-04**, for the Overlay's upscaler hook and for types only — `fl_fidelityfx_headers` above, `18_GPU_VENDOR_APIS` §AMD for the licence reading, and `license-check.ps1` §2d for the per-file gate. Intel's XeSS SDK failed the checklist and nothing of it is here.
|
||||
|
||||
**VERSIONINFO is mandatory** on `FrameLedger.Overlay.dll` and `FrameLedger.VkLayer.dll`: real `CompanyName`, `ProductName=FrameLedger`, `FileDescription`, version. Identifiability is a requirement (`19_SAFETY`), and a CI check fails the build if the resource block is missing.
|
||||
|
||||
|
||||
+13
-5
@@ -83,10 +83,18 @@ Prefer hooking the **vtable entry** over inline-patching for COM methods (cleane
|
||||
|
||||
Every hook must be listed here with a purpose. Anything not on this list is not allowed to exist (`19_SAFETY` review checklist).
|
||||
|
||||
> **This table is a SPECIFICATION. As of 2026-09-03 the Overlay installs EIGHT DETOURS,
|
||||
> and they are marked ✅ across EIGHT rows** — the counts differed until this date, because a
|
||||
> **This table is a SPECIFICATION. As of 2026-09-04 the Overlay installs ELEVEN DETOURS —
|
||||
> the eight of 2026-09-03 plus three `ffxDispatch` trampolines, one per AMD leaf — and the
|
||||
> FidelityFX row below is the ninth ✅.** The counts differed until 2026-09-03, because a
|
||||
> row is a *capability* and a detour is a *patch*, and the FG-count row rode on the
|
||||
> evaluate detour; it has its own now, `sl.interposer.dll!slGetNewFrameToken`.
|
||||
> evaluate detour; it has its own now, `sl.interposer.dll!slGetNewFrameToken`. The AMD row
|
||||
> is the opposite shape — **one row-family, three modules, three patches from one
|
||||
> template body** — because the three leaves export the same five names and each must be
|
||||
> patched at its own address; and its family is published only once **every leaf the
|
||||
> process has loaded** is patched, which is `PublishHookFamily`'s own rule and was measured
|
||||
> mattering before it was applied (a fixture caught the window between the two 2.x leaves'
|
||||
> patches, in which UPSCALE dispatches were counted and the PREPARE and FRAMEGENERATION
|
||||
> dispatches on the other leaf were not).
|
||||
> `Present` (slot 8), `ResizeBuffers` (13) and `Present1` (22) go on the shared
|
||||
> `dxgi.dll` class vtable — indices proved by behaviour, never hardcoded (ctest
|
||||
> `fl_vtable_indices`); `sl.interposer.dll!slEvaluateFeature` and
|
||||
@@ -142,9 +150,9 @@ Every hook must be listed here with a purpose. Anything not on this list is not
|
||||
| NGX parameter accessors (`NVSDK_NGX_Parameter_SetI/GetI/SetUI`) — **exported by `sl.common.dll` only; see below** | `Width`/`Height` (render) vs `OutWidth`/`OutHeight` (output), `PerfQualityValue` (quality preset), sharpness |
|
||||
| ✅ Streamline: `slEvaluateFeature` · ⏳ `slInit`, `slSetFeatureLoaded`, `slSetConstants`, `slGetFeatureRequirements` | Feature set actually active when the game goes through SL rather than NGX directly (`kFeatureDLSS`, `DLSS_G`, `DLSS_RR`, `Reflex`, `NIS`). **Built 2026-08-09**, identity only: one MinHook detour on `sl.interposer.dll!slEvaluateFeature`, resolved **module-scoped** and installed lazily by the watchdog. Sets `FL_MEASURED_UPSCALER` + `FL_HOOK_UPSCALER_IDENTITY`; decodes `kFeatureDLSS`/`kFeatureNIS` and reports `FL_UPSCALER_UNKNOWN` for anything else. **Never `FL_UPSCALER_NONE`** — a Streamline-only writer cannot see FFX, XeSS or NGX-direct, and `NONE` is the only one of the three states that may be aggregated as a negative |
|
||||
| ✅ Streamline: `slSetTag` | The **global** resource tags, where a title states the size of the buffer it is upscaling *from*: `kBufferTypeScalingInputColor`'s extent → `renderW/H`. **Built 2026-08-15** (`FL_HOOK_UPSCALER_PARAMS`), and it is an ALTERNATIVE to the local tags in `slEvaluateFeature`'s `inputs`, not a layer over them — `sl_core_api.h:258` says global and local tags "do NOT interact", so a title using one yields nothing from the other and both are read. Published only on a frame where an evaluation was also seen, because a tag is viewport state that outlives any one frame. This row was MISSING from this table while the hook shipped, which is the gap the banner above now names |
|
||||
| FidelityFX: `ffxFsr2ContextCreate` / `ffxFsr3*` / unified `ffxCreateContext` (`ffx_api`) | `maxRenderSize` vs `displaySize`/`maxUpscaleSize`, FSR version, frame-interpolation context presence |
|
||||
| ✅ **FidelityFX ffx-api: `ffxDispatch` on the three LEAVES** — `amd_fidelityfx_dx12.dll` (SDK 1.1.x monolith), `amd_fidelityfx_upscaler_dx12.dll`, `amd_fidelityfx_framegeneration_dx12.dll` — **never `amd_fidelityfx_loader_dx12.dll`** · ⏳ FSR 3.0 host route `ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale` / `ffxFsr3DispatchFrameGeneration` · ~~`ffxFsr2ContextCreate`~~ · ~~`ffxCreateContext`~~ | **Built 2026-09-04** (`HANDOFF` item 7c). One observer behind three trampolines reads the DESCRIPTOR the title passed — head type first, body only after the type matched a constant from the vendored MIT headers (`third_party/fidelityfx/`, tag v2.3.0): **UPSCALE** → identity (`FSR3` from the monolith, `FSR_UNVERSIONED` from the 2.x upscaler DLL, which hosts FSR 3.1 and FSR 4 behind one type) + `renderSize` → `renderW/H` (quality and sharpness `0xFF`: the dispatch carries neither) + one COUNT; **PREPARE / PREPARE_V2** → `frameID` counted on a *new* index only — this vendor's `slGetNewFrameToken`, the `fgEvaluations` producer once a title has ever prepared, with the UPSCALE count as the fallback for a title that never does; **FRAMEGENERATION** → `fgMode = FSR_FG` on that present. Rule 4: the argument of the API we hooked, never `context`, `pNext`, a command list or a resource. **Why the leaves and not the loader:** all four modules export only the five ffx-api names, so the loader can reach an effect DLL only through the effect DLL's own export; a UE5 title ships the two leaves with no loader at all; hooking loader and leaf counts every dispatch twice. `ffxCreateContext` is deliberately NOT a row — nothing it carries fills a field the dispatch does not, and its honest family would collide with `slEvaluateFeature`'s under the installer's equality binding. The family is compound (`IDENTITY \| PARAMS \| FG_EVALUATIONS`), pinned by `static_assert`s that also bind the leaf table to the rows both ways and refuse the loader as a row. Streamline keeps precedence for the count once it has ever issued a token, so every §S31-validated title is byte-identical. Second count: the consumer prints `frames/upscale-drained`, the AMD `tokens/batch`. **FSR 3.0** (Cyberpunk's `ffx_fsr3_x64.dll`, named exports) is its own later PR — ten host headers from tag v1.1.4, and one title here to test on |
|
||||
| XeSS: `xessD3D12CreateContext`, `xessD3D12Init`, `xessD3D12Execute` | `outputResolution`, `qualitySetting`, XeSS version; `xess_fg` variants for XeFG |
|
||||
| ✅ **Application frames per present** (`fgEvaluations`) — **`sl.interposer.dll!slGetNewFrameToken` since 2026-09-03** | Native vs Displayed frame counts at Tier 1 — see `03_METRICS` §Frame Generation. **The producer is the frame-token export**: Streamline hands a title one token per application frame and the title must ask; the detour counts distinct tokens between two presents (pointer changes, nothing dereferenced), `FL_HOOK_FG_EVALUATIONS` is its family, and it installs on every Streamline 2 title including the ones that evaluate nothing through `slEvaluateFeature`. Rule 4: the out-parameter of an API we hooked. Premise and its gate in `03_METRICS`; pre-committed table in `20_OPEN_QUESTIONS` §S31. *The row as it stood before:* ~~NGX/SL/FFX/XeSS FG feature evaluations per present. **Built 2026-08-15 for Streamline, and MEASURED TO YIELD NOTHING ON THAT ROUTE**~~ — `slEvaluateFeature(kFeatureDLSS_G)` is never called by Cyberpunk 2077 (0 across ~14,000 batches, four FG settings), so this row installs, is honest, and counts zero; see `docs/HANDOFF.md` item 3. Built on the detour that was already there: `kFeatureDLSS_G` contributes to a saturating COUNT in the same word the feature bits live in (`fl_sl_seen.h`) rather than to a bit, because a bit collapses several evaluations between two presents into one — and under multi-frame generation that is the common case, not the edge. The row's family is therefore compound (`FL_HOOK_UPSCALER_IDENTITY \| FL_HOOK_FG_EVALUATIONS`), pinned by a `static_assert` because `hookinventory-check` reads that column as an opaque identifier. **Counts EVALUATIONS, not generated frames** — the 2026-08-14 owner ruling; the multiplier lives in `sl::DLSSGOptions`, which is only reachable by the route §2b refused. Non-NVIDIA FG vendors are **deferred with a written rationale**: `amd_fidelityfx_framegeneration_dx12.dll` 3.1.5 exports only the five generic `ffx*` entry points, identical to five sibling modules, so identity is in the arguments and we have no headers |
|
||||
| ✅ **Application frames per present** (`fgEvaluations`) — **`sl.interposer.dll!slGetNewFrameToken` since 2026-09-03** | Native vs Displayed frame counts at Tier 1 — see `03_METRICS` §Frame Generation. **The producer is the frame-token export**: Streamline hands a title one token per application frame and the title must ask; the detour counts distinct tokens between two presents (pointer changes, nothing dereferenced), `FL_HOOK_FG_EVALUATIONS` is its family, and it installs on every Streamline 2 title including the ones that evaluate nothing through `slEvaluateFeature`. Rule 4: the out-parameter of an API we hooked. Premise and its gate in `03_METRICS`; pre-committed table in `20_OPEN_QUESTIONS` §S31. *The row as it stood before:* ~~NGX/SL/FFX/XeSS FG feature evaluations per present. **Built 2026-08-15 for Streamline, and MEASURED TO YIELD NOTHING ON THAT ROUTE**~~ — `slEvaluateFeature(kFeatureDLSS_G)` is never called by Cyberpunk 2077 (0 across ~14,000 batches, four FG settings), so this row installs, is honest, and counts zero; see `docs/HANDOFF.md` item 3. Built on the detour that was already there: `kFeatureDLSS_G` contributes to a saturating COUNT in the same word the feature bits live in (`fl_sl_seen.h`) rather than to a bit, because a bit collapses several evaluations between two presents into one — and under multi-frame generation that is the common case, not the edge. The row's family is therefore compound (`FL_HOOK_UPSCALER_IDENTITY \| FL_HOOK_FG_EVALUATIONS`), pinned by a `static_assert` because `hookinventory-check` reads that column as an opaque identifier. **Counts EVALUATIONS, not generated frames** — the 2026-08-14 owner ruling; the multiplier lives in `sl::DLSSGOptions`, which is only reachable by the route §2b refused. ~~Non-NVIDIA FG vendors are **deferred with a written rationale**: `amd_fidelityfx_framegeneration_dx12.dll` 3.1.5 exports only the five generic `ffx*` entry points, identical to five sibling modules, so identity is in the arguments and we have no headers~~ — **AMD has a producer since 2026-09-04** (the FidelityFX row above: the PREPARE dispatch's `frameID`, or the UPSCALE count on a title that never prepares, feeds `fgEvaluations` when Streamline has never issued a token); Intel stays at the census (`20_OPEN_QUESTIONS` §Scope decisions, by licence); the FSR 3.0 host DLLs are deferred to their own PR |
|
||||
|
||||
> `GetFrameStatistics().PresentCount` is **not** in this inventory and must not be
|
||||
> re-added as an FG signal. It counts presents the application submitted through
|
||||
|
||||
+41
-18
@@ -127,27 +127,50 @@ Writing our own IGCL declarations to avoid vendoring the headers is **not an app
|
||||
|
||||
**NVIDIA NGX / Streamline, AMD FidelityFX, Intel XeSS runtimes** — not loaded and not redistributed by us at all. We observe the calls the *game* makes to the copies it ships (`17_HOOK_ENGINE`). No vendor code is distributed by FrameLedger.
|
||||
|
||||
**AMD FidelityFX SDK headers** — *checklist run 2026-09-04, CLEAR for the API headers; not yet vendored.*
|
||||
**AMD FidelityFX SDK headers** — *checklist run 2026-09-04, CLEAR; **vendored the same day at
|
||||
tag `v2.3.0`**, five headers, types only (`src/native/third_party/fidelityfx/README.md`).*
|
||||
Read off the upstream repository through the GitHub API, not from memory:
|
||||
|
||||
- **Tag `v1.1.4`** (the last 1.x, the FSR 3.1.x API the installed titles ship): the root
|
||||
`LICENSE.txt` is the MIT grant verbatim, and every header of interest carries the same grant
|
||||
inline — `ffx-api/include/ffx_api/{ffx_api.h, ffx_api_types.h, ffx_api_loader.h,
|
||||
ffx_upscale.h, ffx_framegeneration.h, dx12/ffx_api_dx12.h, vk/ffx_api_vk.h}` and the FSR 3.0
|
||||
host API `sdk/include/FidelityFX/host/{ffx_fsr3.h, ffx_fsr3upscaler.h,
|
||||
ffx_frameinterpolation.h, ffx_opticalflow.h, ffx_types.h, ffx_error.h, ffx_interface.h,
|
||||
ffx_util.h, ffx_assert.h}`. None of step 2's needles appear. **Vendor from this tag.**
|
||||
- **`main` (SDK 2.x, pushed 2026-06-24)** is a different shape and is the reason the tag is
|
||||
named: its repository-level `docs/license.md` is a **binary-only, no-reverse-engineering**
|
||||
licence that "applies to all files except as noted below" — and the 845-line exception list
|
||||
*does* name `Kits/FidelityFX/api/include/*.h`, `Kits/FidelityFX/framegeneration/include/*.h`
|
||||
and `Kits/FidelityFX/upscalers/fsr3/include/*.h`, which carry the MIT grant inline. So the
|
||||
API headers on `main` are MIT too, but only by exception, and `license-check.ps1` would have
|
||||
to assert the exception rather than a root licence. Take `v1.1.4` unless a title ships an API
|
||||
version that needs 2.x.
|
||||
- **Tag `v1.1.4`** (the last 1.x): the root `LICENSE.txt` is the MIT grant verbatim, and every
|
||||
header of interest carries the same grant inline — the `ffx-api/include/ffx_api/` set and the
|
||||
FSR 3.0 host API under `sdk/include/FidelityFX/host/`. None of step 2's needles appear. **This
|
||||
paragraph said "vendor from this tag", and its own reversal condition fired the same day** —
|
||||
see the third bullet. The host API is still only here: `main` dropped `ffx_fsr3.h`, so the FSR
|
||||
3.0 route (Cyberpunk's `ffx_fsr3_x64.dll`, named exports) vendors from `v1.1.4` when it is built,
|
||||
and its closure is **ten** files, not the nine first listed — `ffx_interface.h` includes
|
||||
`ffx_message.h` — with `<mutex>`/`<shared_mutex>` reached through `ffx_types.h`.
|
||||
- **`main` == tag `v2.3.0`** (`60f4ea81`, "AMD FSR SDK 2.3.0", 2026-06-24) is a different shape:
|
||||
its `docs/license.md` is a **binary-only, no-reverse-engineering** default licence that
|
||||
"applies to all files except as noted below", followed by an MIT exception list of 845 paths.
|
||||
**Read off the tree API: the repository at that commit holds exactly 845 blobs, and every one
|
||||
of them is on the list** — `Kits/FidelityFX/signedbin/*.dll` included — so the default licence
|
||||
governs no file that is actually in the tree, and the headers carry the grant inline as well.
|
||||
MIT by exception, for the whole tree. `license-check.ps1` §2d asserts it per vendored file
|
||||
rather than trusting this sentence: every path under `fidelityfx/Kits/` must be on the list
|
||||
inside the vendored `license.md`, every `.h` must carry the grant, and no binary or source may
|
||||
be present.
|
||||
- **Why `v2.3.0` and not `v1.1.4`, decided by the owner 2026-09-04.** The reversal condition —
|
||||
*"unless a title ships an API version that needs 2.x"* — is met on this machine: Hell Is Us
|
||||
ships `amd_fidelityfx_upscaler_dx12.dll` 4.0.3 and `amd_fidelityfx_framegeneration_dx12.dll`
|
||||
4.0.0, Expedition 33 and Dying Light: The Beast ship upscaler 4.0.2 with frame generation 3.1.5
|
||||
(all SDK 2.x effect DLLs), and the SDK's own sample dispatches
|
||||
`ffxDispatchDescFrameGenerationPrepareV2` (`0x0002000c`), which `v1.1.4` does not declare.
|
||||
Every value and layout the Overlay reads is identical in both tags (`UPSCALE 0x00010001`,
|
||||
`FRAMEGENERATION 0x00020003`, `PREPARE 0x00020004`, `ffxApiHeader`, `FfxApiResource`,
|
||||
`ffxDispatchDescUpscale`, the `Prepare` prefix through `renderSize`), so the 1.1.x monolith
|
||||
decodes with the 2.3.0 constants. Vendored: `Kits/FidelityFX/api/include/{ffx_api.h,
|
||||
ffx_api_types.h}`, `upscalers/include/ffx_upscale.h`, `framegeneration/include/{ffx_framegeneration.h,
|
||||
ffx_framegeneration_api_types.h}`, in upstream's layout because they include each other by
|
||||
relative path. Excluded, each with a reason in the README: `signedbin/`, `ffx_api_loader.h`
|
||||
(a `GetProcAddress` helper), the two `dx12/` backend headers (no consumer yet), the `.hpp`
|
||||
helpers and every source file.
|
||||
- Types-only, never linked, with a consumer in the same commit — the Streamline rules
|
||||
(`src/native/third_party/streamline/README.md`), and `hookinventory-check` Pass C's
|
||||
forbidden-import list must gain `amd_fidelityfx_*.dll` / `ffx_*.dll` in the same PR.
|
||||
(`src/native/third_party/streamline/README.md`). **`hookinventory-check` Pass C already
|
||||
forbade `amd_fidelityfx*` / `ffx_*` imports** — the sentence here that said the list "must
|
||||
gain" them was written before checking, and the self-test at line 242 had covered them since
|
||||
2026-08-14 — and now reads the built Overlay's **export table** too, because `ffx_api.h`
|
||||
declares its entry points `__declspec(dllexport)` with no import switch and a definition
|
||||
inside the Overlay would announce a vendor API it does not implement.
|
||||
|
||||
**Intel XeSS SDK** — *checklist run 2026-09-04, REJECTED; the same class as NGX.* The repository
|
||||
<https://github.com/intel/xess> ships `LICENSE.txt` = **Intel Simplified Software License
|
||||
|
||||
@@ -94,7 +94,7 @@ or it becomes the next stale status claim this file exists to record.
|
||||
| **S29** | 🔴 **open, new 2026-08-05 — five ✅ and two ◐, counted off the glyphs below on 2026-08-20** | (a) ◐ **CORRECTED**: the honesty assertion *is* in the merge gate, natively (`fl_guard`, 20.58 s on CI); only the **managed** drain is ungated, and §S19(b) is **not** a prerequisite of the feature hooks — the original claim was wrong and had been used to re-order the work. **Sharpened 2026-08-06:** fixing §S19(b) alone would still gate nothing, because `build.ps1`'s `-SkipIntegration` applies `--filter 'Category!=Integration'` and excludes the class *before* the guard is ever asked. Two independent mechanisms produce one absence, and `ci.yml` must drop the switch too; (b) ✅ `fl_vtable_indices` now pins the Overlay's indices through a shared header; (c) ✅ **closed 2026-08-06 by deleting `ShouldUnhookAsync`** — zero production callers, strictly weaker than `ScanOnceAsync`, and inverted in polarity; the gate's public instance surface is now pinned to `{StartAsync}`; (d) ◐ `vklayer-blastradius` case 3 is now an assertion, but the script still runs only by hand; (e) ✅ **closed 2026-08-06 host-side**, with a held process handle and a classifier that takes no elapsed-time parameter, so a frozen `writeIndex` can never end a session; (f) ✅ **closed 2026-08-20**: the normative contradiction between CLAUDE.md rule 7 and `03_METRICS` about inline RayQuery is settled the way the entry proposed — AS-build activity proves ray tracing is happening, *naming the technique* is what needs a DXIL scan — and rule 7 is amended in the PR that wrote the hooks. Its second half closes with it: `FL_MEASURED_RT` now has a producer (both command-list detours, installed off the game's own device), so all three conjuncts of the `No` branch are live and **`Yes` and `No` are both reachable for the first time**, proved by injection in both directions; (g) ✅ the present-only writer claimed `FL_MEASURED_OUTPUT_RES` unconditionally, including on records with no size |
|
||||
| **S30** | ✅ **closed 2026-08-15** | Answered on the title that raised it: with Ray Reconstruction on, Cyberpunk 2077 evaluates `kFeatureDLSS_RR` on every application frame and `kFeatureDLSS` **not once**, so RR was doing the upscaling and the decode had no arm for it. Evidence rather than inference: `renderW/H` are published only on a frame that drained an evaluation and read 1485×835 = 0.58 × 2560×1440, so the scaling-input tag arrives ON the RR evaluation. Two further defects fell out — the pre-committed decision table had two holes, and the fix contaminated the census that found it (it derived the id from the decoded byte) |
|
||||
| **S31** | ✅ **resolved 2026-09-04 — row P1, and `tokens/batch = 1.00`** | Is a drained Streamline batch an application frame? **Yes.** The `slGetNewFrameToken` count (#103, #105) reads 1.00 / 2.99 / 3.99 against Cyberpunk's own off / ×3 / ×4 and 4.00 on Hell Is Us, and on every leg with batches the two counts agree to the frame. Two independent per-frame API counts are the oracle four instruments could not be. `fg_factor` is published; `none` is reachable by counting. *(The row as it stood while open:)* ◐ **row P2, 2026-08-27 — the ORACLE is retired, the QUESTION is not** | Is a drained Streamline batch an application frame? The PresentMon 2.x `FrameType` test, with its decision table pre-committed BEFORE the run and `tools/frametype-oracle.ps1` producing the input as two dimensionless ratios. **Two obstacles measured before it could be run**: the console binary will not start a trace session unelevated on the dev box (exit 6; the account is in neither Administrators nor Performance Log Users, and the running shared service does not help), and `--track_frame_type` is a **beta** option whose own help says it needs application or driver instrumentation of the Intel-PresentMon provider — so it may be as unavailable as `fl-baseline-probe` proved to be. Two of the table's six rows retire it outright. Blocks HANDOFF item 3's producer decision |
|
||||
| **H11** | 🅓 **deferred 2026-08-20, rationale written** | XeFG and FSR3-FG identity. `libxess_fg.dll` and `ffx_fsr3_x64.dll` export nameable entry points, but the newer `amd_fidelityfx_framegeneration_dx12.dll` (3.1.5, three installed titles) exports only five generic `ffx*` names — identity lives in a struct field, and hand-declaring a vendor ABI from observation is the #71 defect class with another vendor's name on it. The licence checklist has not been run on either SDK either. Cost is coverage, not correctness: such a title reports `FL_FG_UNKNOWN`, never `NONE` |
|
||||
| **H11** | ◐ **AMD ffx-api BUILT 2026-09-04; Intel closed at the census by licence; FSR 3.0 host route deferred to its own PR** | XeFG and FSR3-FG identity. The AMD half is measured: the three ffx-api leaves are hooked (never the loader), the vendored MIT headers (tag v2.3.0) decode the dispatch descriptor, and the pre-committed acceptance table below awaits the owner's three launches. Intel's SDK failed the licence checklist, so XeSS/XeFG stay at the census (§Scope decisions). `ffx_fsr3_x64.dll` (FSR 3.0, Cyberpunk only here) needs ten host headers from tag v1.1.4 and is deferred with that costing written |
|
||||
|
||||
~~**Six items are ❓ and one is 🚫.**~~ **Recounted 2026-08-05: TWELVE items block
|
||||
exit criterion 2, not seven, and the undercount came from reading only the ❓ rows.**
|
||||
@@ -3302,9 +3302,43 @@ turns a would-be STL throw into `__fastfail`, which SEH cannot intercept
|
||||
(`spike-notes.md` §H3). The "no throwing STL in hook paths" rule is therefore
|
||||
load-bearing rather than stylistic.
|
||||
|
||||
### H11 🅓 · XeFG and FSR3-FG have no in-policy identity route — **deferred 2026-08-20 with a written rationale**
|
||||
### H11 ◐ · XeFG and FSR3-FG identity — **AMD built 2026-09-04 through the ffx-api leaves; Intel closed by licence; FSR 3.0 host route deferred**
|
||||
|
||||
> **The deferral has a next step as of 2026-09-04, and it is `HANDOFF` item 7c.** The Streamline
|
||||
> **BUILT, 2026-09-04, the AMD half — and the deferral's own rule was kept: header first, decode
|
||||
> second, never from observation.** `HANDOFF` item 7c. The FidelityFX headers cleared the
|
||||
> checklist and were vendored at tag **`v2.3.0`** (the tree is MIT by exception, 845 of 845 files;
|
||||
> `18_GPU_VENDOR_APIS` §AMD carries why 2.3.0 and not 1.1.4), and the Overlay now hooks `ffxDispatch`
|
||||
> on the three **leaves** — `amd_fidelityfx_dx12.dll`, `amd_fidelityfx_upscaler_dx12.dll`,
|
||||
> `amd_fidelityfx_framegeneration_dx12.dll` — and never on `amd_fidelityfx_loader_dx12.dll`, which
|
||||
> forwards to the effect DLLs through their own exports (all four modules export only the five
|
||||
> ffx-api names, so that is the only route there is) and would double every count. What it reads
|
||||
> is the descriptor's head type and, once matched, `renderSize` and `frameID`; what it publishes is
|
||||
> identity (`FSR3` from the 1.1.x monolith, `FSR_UNVERSIONED` from the 2.x upscaler DLL that hosts
|
||||
> FSR 3.1 and FSR 4 behind one type), `renderW/H`, `fgMode = FSR_FG` on a present that drained a
|
||||
> generated batch, and `fgEvaluations` from PREPARE's `frameID` counted on a new index only. The
|
||||
> K = 1 / K = 4 fixtures run on both vendor shapes with a forwarding loader decoy in the chain.
|
||||
>
|
||||
> **The owner's run, pre-committed before it happens** (one launch per leg; read the
|
||||
> `ffx dispatch census` line and the trio):
|
||||
>
|
||||
> | Row | Leg / reading | Verdict |
|
||||
> |---|---|---|
|
||||
> | **A1** | Lies of P, FSR + FG: `upscaler: Fsr3`, `frame generation: FsrFg`, `presents/frame ≈ 2.0`, `frames/upscale-drained ≈ 1.00`, `fg-dispatch/frame ≈ 1.0` | accept |
|
||||
> | **A2** | Lies of P, FSR, FG off: `presents/frame ≤ 1.05` → `none`, no `FsrFg` record, frames ≈ upscale-drained | accept |
|
||||
> | **A3** | Hell Is Us, FSR (+ FG if offered): `FSR (3.1 or 4 …)` printed; if Streamline still issues tokens, `fgEvaluations` is tokens and `frames/upscale-drained ≈ 1.00` corroborates across vendors; if tokens are 0 the latch hands the count to AMD — record which | accept, record |
|
||||
> | **R1** | A title that never prepares (count from UPSCALE dispatches): FG on still reads K, off reads 1.00 | accept, note here |
|
||||
> | **R2** | `presents/frame ≥ 1.5` with zero `FsrFg` records: the title's `frameGenerationCallback` bypasses the export → `Active (technology not identified)` | honest; follow-up, no code change |
|
||||
> | **R3** | `presents/frame ≈ 0.5·K` or below 1: a second hook in the chain — check `hooks installed`, the census, whether a loader row crept in | defect, block |
|
||||
> | **R4** | `frames/upscale-drained ≈ 2.00` with FG off: two upscale contexts per frame, or a doubled count on a title that never prepares | investigate before publishing |
|
||||
> | **R5** | UE5 with both vendors loaded and tokens ≠ prepares per frame: Streamline wins by the latch; the census line prints the disagreement | record; revisit precedence |
|
||||
>
|
||||
> **Still deferred, with the costing written:** the FSR 3.0 host route — `ffx_fsr3_x64.dll!ffxFsr3ContextDispatchUpscale`
|
||||
> / `ffxFsr3DispatchFrameGeneration`, named exports, no struct decode for identity — needs ten
|
||||
> host headers from tag `v1.1.4` (`main` dropped `ffx_fsr3.h`), whose closure reaches
|
||||
> `<mutex>`/`<shared_mutex>` through `ffx_types.h`, for exactly one installed title (Cyberpunk 2077,
|
||||
> whose default here is DLSS). Its own PR, with Cyberpunk switched to FSR 3 as the oracle.
|
||||
>
|
||||
> *The banner as it stood on the morning of 2026-09-04:* **The deferral has a next step, and it is `HANDOFF` item 7c.** The Streamline
|
||||
> work built every tool this needs — module-scoped inventory rows, types-only vendoring with a
|
||||
> consumer in the same commit, `hookinventory-check` Pass A–D, the K = 1 / K = 4 harness pair,
|
||||
> and a per-frame count validated against a title's own menu — and Lies of P (FSR 3.1 FG on,
|
||||
|
||||
@@ -731,6 +731,45 @@ hole; it does not close it.
|
||||
- **The only cheap improvement is wording**, and it is already in: the qualifier says
|
||||
*statically linked FSR3-FG … outside what this can see*. If a title is found, the first PR is
|
||||
a `spike-notes` row and a `20_OPEN_QUESTIONS` §Scope entry with the measured shape, not code.
|
||||
- **Measured 2026-09-04: no such title is installed.** Both Steam libraries scanned to full
|
||||
depth — every FSR title ships its DLLs (the SDK 1.1.x monolith, the SDK 2.x effect DLLs, or
|
||||
Red Dead Redemption 2's `ffx_fsr2_api_*` set); the module topology per title is in
|
||||
`spike-notes` §9. So this item stays a boundary row in §Scope decisions, not work.
|
||||
|
||||
#### ~~7c. AMD and Intel identity, measured rather than inferred~~ — **AMD LANDED 2026-09-04; Intel closed; the owner's three launches are owed**
|
||||
|
||||
**Do not start here.** The three ffx-api leaves are hooked, the FidelityFX headers are vendored
|
||||
at tag **`v2.3.0`** (not the `v1.1.4` step 1 below names — its own reversal condition fired:
|
||||
installed titles ship SDK 2.x effect DLLs whose `PrepareV2` descriptor 1.1.4 does not declare),
|
||||
the K = 1 / K = 4 pair runs on both vendor shapes, and the acceptance table is pre-committed in
|
||||
`20_OPEN_QUESTIONS` §H11 (rows A1–A3, R1–R5). Status is in `CHANGELOG.md` and §H11. **Three
|
||||
corrections to the entry below, each of which changed what got built:**
|
||||
|
||||
- **Scope to the LEAVES, not "the facade".** Step 2 says *"module-scope every row to the facade
|
||||
… the plugin modules are called by the facade"*. Measured: SDK 2.x's `amd_fidelityfx_loader_dx12.dll`
|
||||
contains no effect code and can reach an effect DLL only through the effect DLL's own five
|
||||
exports; Hell Is Us and Expedition 33 ship the two effect DLLs with **no loader at all** (the UE
|
||||
plugin compiles the MIT loader source in). So the rows are the three leaves — the 1.1.x
|
||||
monolith and the two 2.x effect DLLs — and the loader is refused as a row by `static_assert`.
|
||||
Hooking "the facade" on a loader-shipping title would have hooked the forwarder, and hooking
|
||||
both would have counted every dispatch twice.
|
||||
- **`ffxCreateContext` is not a row.** Identity comes off the UPSCALE dispatch's type — per
|
||||
frame, so it says *running* rather than *created* — and a create-context row's honest family
|
||||
is `UPSCALER_IDENTITY` alone, which collides with `slEvaluateFeature`'s under the installer's
|
||||
equality binding.
|
||||
- **"Extend Pass C's forbidden-import list" was already done** — `^(sl\.|_?nvngx|libxess|ffx_|amd_fidelityfx)`
|
||||
since 2026-08-14, self-tested. Pass C gained the **export** table instead, because `ffx_api.h`
|
||||
declares its entry points `__declspec(dllexport)` unconditionally.
|
||||
|
||||
**What the owner's runs settle** (one launch each, §H11's table): A1 Lies of P at FSR + FG prints
|
||||
`upscaler: Fsr3` / `frame generation: FsrFg` and the trio at ≈ ×2 with `frames/upscale-drained ≈ 1.00`;
|
||||
A2 the same title with FG off reads `none` by count; A3 Hell Is Us at FSR prints the
|
||||
`FSR (3.1 or 4 …)` identity and shows which vendor's count the latch chose. **The FSR 3.0 host
|
||||
route (`ffx_fsr3_x64.dll`, step 3 below) is deferred to its own PR** — ten host headers from
|
||||
`v1.1.4`, one title here to test on.
|
||||
|
||||
<details>
|
||||
<summary>The entry as it stood, kept for the reasoning it carries</summary>
|
||||
|
||||
#### 7c. AMD and Intel identity, measured rather than inferred — §H11's deferral has a next step
|
||||
|
||||
@@ -799,6 +838,8 @@ zero (resolve at the writer); a vendor keeps a NAME and changes a SIGNATURE (`Sp
|
||||
needs an AMD and an Intel arm); the K = 1 / K = 4 harness pair must exist before the first
|
||||
real-title run, or a writer that counts presents instead of dispatches is green everywhere.
|
||||
|
||||
</details>
|
||||
|
||||
### Separable
|
||||
|
||||
`fl-probe-signer` → §S19(b) → drop `-SkipIntegration`. **Not** a prerequisite of the
|
||||
|
||||
@@ -1690,6 +1690,27 @@ one launch per capture, consent granted after launch. Exit codes and full report
|
||||
counts FSR3 interpolations (H11), so `fg_factor` stays N/A there. The 59.9 on the DLSS run
|
||||
is a cap or vsync, not a measurement of anything this run was about.
|
||||
|
||||
- **2026-09-04, the AMD identity PR (HANDOFF 7c), measured before the code was written.** Both
|
||||
Steam libraries scanned to full depth for the AMD module topology, because the hook's scoping
|
||||
depends on which module the *game* calls:
|
||||
|
||||
| Title | AMD modules shipped | Shape |
|
||||
|---|---|---|
|
||||
| Lies of P, Cyberpunk 2077, Rune Factory: Guardians of Azuma | `amd_fidelityfx_dx12.dll` 1.0.1.41314 | SDK 1.1.x **monolith** — a leaf |
|
||||
| Black Myth: Wukong | the monolith **and** `amd_fidelityfx_loader_dx12.dll` 2.1.0 **and** `amd_fidelityfx_denoiser_dx12.dll` | mixed |
|
||||
| Dying Light: The Beast, Kingdom Come: Deliverance II | `amd_fidelityfx_loader_dx12.dll` 1.0.2 + `amd_fidelityfx_upscaler_dx12.dll` 4.0.2 (+ `…framegeneration_dx12.dll` 3.1.5 on DL:TB) | SDK 2.x **loader + leaves** |
|
||||
| Expedition 33 | upscaler 4.0.2 + frame generation 3.1.5, **no loader** | UE5: the plugin's built-in loader calls the leaves directly |
|
||||
| Hell Is Us | upscaler **4.0.3** + frame generation **4.0.0** under `Plugins/FSR/Source/fidelityfx-sdk/Kits/FidelityFX/signedbin/`, **no loader** | UE5, SDK 2.1.x |
|
||||
| Red Dead Redemption 2 | `ffx_fsr2_api_x64.dll` + `_dx12_` + `_vk_` | FSR 2, dynamic |
|
||||
| Cyberpunk 2077 (also) | `ffx_fsr3_x64.dll`, `ffx_backend_dx12_x64.dll`, `ffx_frameinterpolation_x64.dll`, `ffx_fsr3upscaler_x64.dll`, `ffx_opticalflow_x64.dll` | FSR 3.0 host DLLs, named exports — the deferred route |
|
||||
|
||||
Every module in the ffx-api family exports the same five names and nothing else
|
||||
(`vendor-exports.json`), so the loader can only reach a leaf through the leaf's own export —
|
||||
which is why the rows are the leaves and never the loader. **No statically linked FSR title is
|
||||
installed** (HANDOFF 7b): every FSR title above ships its DLLs. **Owed, one launch each, against
|
||||
`20_OPEN_QUESTIONS` §H11's table:** Lies of P at FSR + FG (A1) and FSR alone (A2), Hell Is Us at
|
||||
FSR (A3) — read the `ffx dispatch census` line and the trio.
|
||||
|
||||
## 10 · Telemetry layering
|
||||
|
||||
- L1 baseline vendor-neutral:
|
||||
|
||||
@@ -56,6 +56,7 @@ Telemetry is layered so no proprietary vendor licence is ever required (`docs/18
|
||||
| **LibreHardwareMonitorLib** | GPU sensors for **all vendors** (AMD, Intel, NVIDIA) + CPU/board sensors when elevated | **MPL-2.0** | Yes, as an unmodified NuGet package |
|
||||
| **DXGI + Windows performance counters (PDH)** | Vendor-neutral baseline: utilisation, VRAM, adapter identity | Windows OS APIs | n/a |
|
||||
| **NVIDIA Streamline headers** (`sl.h`, its eight-file include closure, and `sl_dlss.h`) | Declarations only — `sl::Feature`, the `kFeature*` ids and `PFun_slEvaluateFeature` — so the Overlay's upscaler hook has the vendor's own signature instead of a hand-written guess. **Types and `decltype` only: never linked**, or `sl.interposer.dll` would become a load-time dependency and the Overlay would fail to load in every game that ships no Streamline | **MIT** — <https://github.com/NVIDIA-RTX/Streamline>, `main`, 2026-08-09 | **Vendored 2026-08-09** at `src/native/third_party/streamline/`: `license.txt` and ten headers. **`sl_nvperf.h` is excluded** — the same `license.txt` carries a second, proprietary "NSight Perf SDK License, Version 2023.3" block naming `sl_nvperf.h` and `sl_nvperf.dll`. **All of `external/` is excluded** — upstream's `external/ngx-sdk/` is the RTX SDKs Licence. `license-check.ps1` asserts both exclusions and the grant text |
|
||||
| **AMD FidelityFX SDK headers** (`ffx_api.h`, `ffx_api_types.h`, `ffx_upscale.h`, `ffx_framegeneration.h`, `ffx_framegeneration_api_types.h`) | Declarations only — `ffxApiHeader::type`, the `FFX_API_*_DESC_TYPE_*` values, `ffxDispatchDescUpscale::renderSize`, the frame-generation `Prepare` descriptors' `frameID` and `PfnFfxDispatch` — so the Overlay's AMD hook decodes the dispatch descriptor by the vendor's own layout instead of a guess. **Types only: never linked**, and the Overlay defines none of the names the header declares `dllexport` (`hookinventory-check` Pass C reads its export table) | **MIT, by exception** — <https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK> tag `v2.3.0` (`60f4ea81`, 2026-06-24). Upstream's `docs/license.md` is a binary-only default licence followed by an MIT exception list; on 2026-09-04 that list named all 845 files in the tree, these five among them, and each header carries the grant in its own banner | **Vendored 2026-09-04** at `src/native/third_party/fidelityfx/`: `license.md` verbatim (exception list included) and five headers in upstream's `Kits/FidelityFX/…` layout. **No `signedbin/`, no `.lib`, no source, no `dx12/` backend headers** (no consumer yet). `license-check.ps1` §2d asserts every vendored path is on the exception list and every header carries the grant |
|
||||
| NVIDIA **NGX** / **Streamline**, AMD **FidelityFX**, Intel **XeSS** **runtimes** (the DLLs themselves) | Not loaded, not linked, not redistributed. We observe the calls a *game* makes to the copies it ships (`docs/17_HOOK_ENGINE.md`). Unchanged by the row above, which vendors **headers** and no runtime | — | **No vendor upscaler code is distributed by FrameLedger** |
|
||||
|
||||
### GPL-3.0 compatibility
|
||||
@@ -73,7 +74,7 @@ Telemetry is layered so no proprietary vendor licence is ever required (`docs/18
|
||||
|
||||
**Intel XeSS SDK** (`inc/xess/*.h`, `inc/xess_fg/*.h`, `inc/xell/*.h`, and the `libxess*.dll` binaries) — rejected on licence grounds, 2026-09-04. The repository's `LICENSE.txt` is the Intel Simplified Software License (October 2022): a binary-form-only grant with a no-reverse-engineering clause and a termination clause, and the headers themselves state they may not be used, copied or distributed without Intel's written permission. As with NGX, the headers are neither vendored nor re-declared; the runtime is observed by module name only (`docs/18_GPU_VENDOR_APIS.md` §Vendor SDKs we deliberately do not use).
|
||||
|
||||
*(Pending, not yet vendored: the **AMD FidelityFX SDK** API headers at tag `v1.1.4` are MIT — root `LICENSE.txt` and every header inline — and cleared the same checklist the same day. When they are vendored, a row goes in the table above with the tag and the file list, exactly as Streamline's does.)*
|
||||
*(The **AMD FidelityFX SDK** headers cleared the checklist on 2026-09-04 and were vendored the same day — the row is in the table above, with the tag and the file list, exactly as Streamline's is. The tag is `v2.3.0` rather than the `v1.1.4` this paragraph first named: installed titles already ship SDK 2.x effect DLLs whose descriptors `v1.1.4` does not declare, and the 2.x tree is MIT by the same mechanism, for every file in it.)*
|
||||
|
||||
Any proposal to add a vendor SDK must first pass the checklist in `docs/18_GPU_VENDOR_APIS.md` §Checklist, and the decision — including rejections and their reasons — must be recorded there.
|
||||
|
||||
@@ -96,5 +97,6 @@ All product names, logos, and brands are property of their respective owners and
|
||||
- ~~PresentMon license + copyright shipped beside the bundled binary~~ — **removed 2026-08-27 with the dependency.** Nothing Intel-authored is distributed by this project
|
||||
- [ ] MPL-2.0 source-availability note points to upstream LibreHardwareMonitor repository
|
||||
- [x] LHM checked for MPL-2.0 Exhibit B on any depended-upon file — clear as of 0.9.6 / commit `3d331e33`, 2026-08-02
|
||||
- [x] **AMD FidelityFX headers are vendored** (2026-09-04) — five headers, MIT **by exception**: `license-check.ps1` §2d asserts each vendored path against the exception list inside the vendored `license.md` and each header's own banner, file by file. No binary, no source
|
||||
- [x] **NVAPI is vendored** (2026-08-05) and all nine headers carry their `SPDX-License-Identifier: MIT` blocks unmodified — asserted file by file, not sampled. `license-check.ps1` enforces that this line and the table agree with the filesystem, **in both directions**: vendoring the material while the table still said "Not yet" failed the build, which is how this row came to be flipped
|
||||
- [ ] No Intel IGCL or AMD ADLX material anywhere in the tree (CI grep, see `docs/13_CI_CD.md`)
|
||||
@@ -0,0 +1,31 @@
|
||||
AMD FidelityFX SDK — headers vendored at src/native/third_party/fidelityfx/
|
||||
(tag v2.3.0, commit 60f4ea81909200d8542eca14dccb2628b763a9a3, 2026-06-24)
|
||||
|
||||
Upstream distributes its licence as docs/license.md: a binary-only default licence
|
||||
followed by an exception list that places the named files — all 845 files in the
|
||||
repository at that commit, the five vendored headers among them — under the MIT
|
||||
terms below. The vendored copy of that file, exception list included, is
|
||||
src/native/third_party/fidelityfx/license.md. Each vendored header also carries the
|
||||
same grant in its own banner.
|
||||
|
||||
This file is part of the FidelityFX SDK.
|
||||
|
||||
Copyright (C) 2026 Advanced Micro Devices, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,131 @@
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using FrameLedger.Shared;
|
||||
|
||||
namespace FrameLedger.CaptureHost.Consume;
|
||||
|
||||
/// <summary>
|
||||
/// What the ffx-api rows saw: two independent per-frame counts and their ratio — the AMD
|
||||
/// twin of <c>tokens/batch</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// <b>The count that becomes <c>fg_factor</c> needs a second count beside it, or a doubled
|
||||
/// writer is green everywhere.</b> On the Streamline route <c>tokens/batch</c> is that second
|
||||
/// count, and it is what answered §S31. On the AMD route the writer produces two per-frame
|
||||
/// counts from two different dispatch types — PREPARE's <c>frameID</c> (what <c>fgEvaluations</c>
|
||||
/// carries once a title has ever prepared) and the UPSCALE dispatches (what it carries
|
||||
/// otherwise, and what names the identity byte on the presents that drained one). A title
|
||||
/// that generates frames issues exactly one of each per application frame, so
|
||||
/// <see cref="FramesPerUpscale"/> reads <c>1.00</c> when the two agree, <c>2.00</c> when one of
|
||||
/// them is doubled — a row for the loader as well as the leaf, or a title with two upscale
|
||||
/// contexts per frame — and nothing else can see either.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Derived from the record, and only the record.</b> An UPSCALE drained is a present whose
|
||||
/// identity byte names an FSR value (the writer names it only on such a present); a
|
||||
/// FRAMEGENERATION drained is a present whose <c>fgMode</c> is <c>FSR_FG</c>. Both are the
|
||||
/// decoded bytes rather than raw fact bits, because <see cref="FlFeatureFlags"/> has no free
|
||||
/// bit for a raw AMD fact and adding one is a layout change — so unlike <see cref="SlCensus"/>
|
||||
/// this census MOVES if the decode moves, and is evidence about the counts, not about which
|
||||
/// descriptor type arrived.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>On a title with both vendors loaded</b> (UE5: <c>sl.interposer.dll</c> beside the two AMD
|
||||
/// leaves) <c>fgEvaluations</c> is Streamline's token count whenever Streamline has ever
|
||||
/// issued one, so <see cref="FramesPerUpscale"/> is then tokens against UPSCALE dispatches — a
|
||||
/// cross-vendor agreement, and printed as such.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
internal sealed record FfxCensus
|
||||
{
|
||||
/// <summary>Records in the window, whether or not they drained anything.</summary>
|
||||
public required int Records { get; init; }
|
||||
|
||||
/// <summary>Presents that drained an UPSCALE dispatch: the identity byte names an FSR value.</summary>
|
||||
public required int UpscaleDrained { get; init; }
|
||||
|
||||
/// <summary>Presents that drained a FRAMEGENERATION dispatch: <c>fgMode == FSR_FG</c>.</summary>
|
||||
public required int FgDispatchDrained { get; init; }
|
||||
|
||||
/// <summary><c>Σ fgEvaluations</c> over the same records — application frames, by whichever count the writer chose.</summary>
|
||||
public required long Frames { get; init; }
|
||||
|
||||
/// <summary>False when no record in the window carries an FSR identity or an FSR_FG mode.</summary>
|
||||
public bool SawAnything => UpscaleDrained > 0 || FgDispatchDrained > 0;
|
||||
|
||||
/// <summary><c>presents / frames</c> — the factor, before the guards <see cref="FgWindow"/> applies.</summary>
|
||||
public double? PresentsPerFrame => Frames > 0 ? Records / (double)Frames : null;
|
||||
|
||||
/// <summary>The agreement check: <c>1.00</c> when the two per-frame counts agree.</summary>
|
||||
public double? FramesPerUpscale => UpscaleDrained > 0 ? Frames / (double)UpscaleDrained : null;
|
||||
|
||||
/// <summary>≈ 1 while frame generation is on, 0 while it is off.</summary>
|
||||
public double? FgDispatchesPerFrame => Frames > 0 ? FgDispatchDrained / (double)Frames : null;
|
||||
|
||||
/// <summary>Builds the census over the window the identity hook governs.</summary>
|
||||
public static FfxCensus From(IReadOnlyList<FlFrameRecord> stream)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(stream);
|
||||
|
||||
int start = RecordWindow.ClaimedSuffixStart(
|
||||
stream, static r => ((FlMeasured)r.MeasuredMask).HasFlag(FlMeasured.Upscaler));
|
||||
if (start == stream.Count)
|
||||
{
|
||||
return new FfxCensus { Records = 0, UpscaleDrained = 0, FgDispatchDrained = 0, Frames = 0 };
|
||||
}
|
||||
|
||||
int upscale = 0;
|
||||
int fg = 0;
|
||||
long frames = 0;
|
||||
for (int i = start; i < stream.Count; i++)
|
||||
{
|
||||
FlFrameRecord r = stream[i];
|
||||
frames += r.FgEvaluations;
|
||||
upscale += IsFsr((FlUpscaler)r.Upscaler) ? 1 : 0;
|
||||
fg += (FlFgMode)r.FgMode == FlFgMode.FsrFg ? 1 : 0;
|
||||
}
|
||||
|
||||
return new FfxCensus
|
||||
{
|
||||
Records = stream.Count - start,
|
||||
UpscaleDrained = upscale,
|
||||
FgDispatchDrained = fg,
|
||||
Frames = frames,
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Every value the ffx-api rows can put in the identity byte.</summary>
|
||||
private static bool IsFsr(FlUpscaler u) =>
|
||||
u is FlUpscaler.Fsr2 or FlUpscaler.Fsr3 or FlUpscaler.Fsr4 or FlUpscaler.FsrUnversioned;
|
||||
|
||||
/// <summary>Two counts and their ratio, with the reading guide on the same line.</summary>
|
||||
public string Describe()
|
||||
{
|
||||
if (Records == 0)
|
||||
{
|
||||
return " ffx dispatch census: no record claimed FL_MEASURED_UPSCALER, so no ffx-api dispatch could have been seen";
|
||||
}
|
||||
|
||||
if (!SawAnything)
|
||||
{
|
||||
return " ffx dispatch census over " + N(Records) + " record(s): no UPSCALE or FRAMEGENERATION dispatch "
|
||||
+ "reached an ffx-api leaf (no FSR identity, no FSR_FG mode)";
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(" ffx dispatch census over ").Append(N(Records)).Append(" record(s): upscale-drained=")
|
||||
.Append(N(UpscaleDrained)).Append(" fg-dispatch-drained=").Append(N(FgDispatchDrained))
|
||||
.Append(" frames(Σ fgEvaluations)=").AppendLine(N(Frames));
|
||||
sb.Append(" presents/frame=").Append(F(PresentsPerFrame))
|
||||
.Append(" frames/upscale-drained=").Append(F(FramesPerUpscale))
|
||||
.Append(" fg-dispatch/frame=").Append(F(FgDispatchesPerFrame))
|
||||
.Append(" (frames/upscale-drained: 1.00 = the two per-frame counts agree; 2.00 = one of them is "
|
||||
+ "doubled — a hook on the loader as well as the leaf, or two upscale contexts per frame)");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static string N(long v) => v.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
private static string F(double? v) => v is null ? "—" : v.Value.ToString("F2", CultureInfo.InvariantCulture);
|
||||
}
|
||||
@@ -321,7 +321,8 @@ internal sealed record FgWindow
|
||||
|
||||
if (w.Evaluations == 0)
|
||||
{
|
||||
return "no application-frame token was counted in the window (slGetNewFrameToken) — a data gap, "
|
||||
return "no application-frame token was counted in the window (slGetNewFrameToken, or an ffx-api "
|
||||
+ "PREPARE / UPSCALE dispatch) — a data gap, "
|
||||
+ "and treating it as 'no frame generation' is how fg_factor becomes 1.0";
|
||||
}
|
||||
|
||||
|
||||
@@ -418,10 +418,19 @@ internal sealed record MeasuredFacts
|
||||
FlUpscaler.RetiredRayReconstruction => null,
|
||||
|
||||
FlUpscaler.NotReported => null,
|
||||
|
||||
// FSR through the SDK 2.x upscaler DLL, which hosts FSR 3.1 and FSR 4 behind one dispatch
|
||||
// type. The enum member's name is a token; the report gets the sentence, because a reader
|
||||
// who sees "FsrUnversioned" will ask what it means and the answer is the whole point.
|
||||
FlUpscaler.FsrUnversioned => UpscalerFsrUnversioned,
|
||||
_ => value.ToString(),
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>What <see cref="Upscaler"/> carries for <see cref="FlUpscaler.FsrUnversioned"/>.</summary>
|
||||
public const string UpscalerFsrUnversioned =
|
||||
"FSR (3.1 or 4 — the SDK 2.x upscaler DLL hosts both, and the dispatch does not name the version)";
|
||||
|
||||
private static Tri RayTracingOf(IReadOnlyList<FlFrameRecord> stream, FlWriterState writer)
|
||||
{
|
||||
// ONE RECORD SET FOR BOTH THE EVIDENCE AND ITS DENOMINATOR. Counting evidence over
|
||||
|
||||
@@ -57,7 +57,8 @@ internal static class SessionReport
|
||||
sb.Append(" FPS: ").Append(Num(w.NativeFps))
|
||||
.Append(" over ").Append(Count(w.Presents)).AppendLine(" present(s)");
|
||||
sb.Append(" frame generation: none — ").Append(Count(w.Evaluations))
|
||||
.Append(" application frame(s) counted (slGetNewFrameToken) against ").Append(Count(w.Presents))
|
||||
.Append(" application frame(s) counted (slGetNewFrameToken, or an ffx-api PREPARE / UPSCALE dispatch) against ")
|
||||
.Append(Count(w.Presents))
|
||||
.AppendLine(" present(s); every present carried an application frame");
|
||||
}
|
||||
else
|
||||
@@ -155,9 +156,10 @@ internal static class SessionReport
|
||||
// three rather than picking the one that flatters the hook.
|
||||
sb.Append(" upscaler: ").AppendLine(facts.Upscaler
|
||||
?? (facts.UpscalerHookRan
|
||||
? "N/A (Streamline is loaded and slEvaluateFeature never carried an identifiable feature: "
|
||||
? "N/A (an upscaler hook ran — Streamline's slEvaluateFeature and/or an ffx-api leaf's ffxDispatch — "
|
||||
+ "and no evaluation this build decodes arrived: "
|
||||
+ "upscaling is off in this title's settings, or it runs through a path this build does not "
|
||||
+ "hook — measured on 3 of 5 titles — or a vendor this build does not decode)"
|
||||
+ "hook — measured on 3 of 5 Streamline titles — or a vendor this build does not decode)"
|
||||
: NoHookRan("upscaler", facts.CensusRan, facts.UpscalerRuntimesLoaded)));
|
||||
sb.Append(" render -> output: ").AppendLine(facts.UpscaleRatio is null
|
||||
? "N/A (the ratio is not computed yet; the raw sizes are above)"
|
||||
|
||||
@@ -215,7 +215,7 @@ internal static class Program
|
||||
|
||||
// WHICH FEATURE IDS ACTUALLY ARRIVED. §S30's "print them first", and the input to the
|
||||
// decision table pre-committed in 20_OPEN_QUESTIONS before this run happens.
|
||||
HostConsole.Line(SlCensus.From(dominant).Describe());
|
||||
PrintDispatchCensuses(dominant);
|
||||
HostConsole.Line(RtCensus(dominant));
|
||||
|
||||
// The RAW values, so a real-title run can be checked against the game's own settings.
|
||||
@@ -232,6 +232,18 @@ internal static class Program
|
||||
HostConsole.Line(SessionReport.Render(facts));
|
||||
}
|
||||
|
||||
/// <summary>Which vendor dispatches actually arrived, one census per vendor route.</summary>
|
||||
/// <remarks>
|
||||
/// The Streamline census is §S30's "print them first". The AMD census is the second count
|
||||
/// HANDOFF 7c asks for before the first is trusted: PREPARE frames against UPSCALE
|
||||
/// dispatches, 1.00 when they agree and 2.00 when a writer has doubled one of them.
|
||||
/// </remarks>
|
||||
private static void PrintDispatchCensuses(IReadOnlyList<FlFrameRecord> dominant)
|
||||
{
|
||||
HostConsole.Line(SlCensus.From(dominant).Describe());
|
||||
HostConsole.Line(FfxCensus.From(dominant).Describe());
|
||||
}
|
||||
|
||||
/// <summary>The loop and its four collaborators, wired the only way this host allows.</summary>
|
||||
private static CaptureLoop BuildLoop(FileGameConsentStore store, int seconds)
|
||||
{
|
||||
|
||||
@@ -122,6 +122,14 @@ public enum FlUpscaler : byte
|
||||
/// <summary>A hook ran and there was no upscaler. Moved from 0 in v3.</summary>
|
||||
None = 8,
|
||||
|
||||
/// <summary>
|
||||
/// FSR, measured through the SDK 2.x upscaler DLL, version not named: that one module hosts
|
||||
/// FSR 3.1 and FSR 4 behind the same dispatch type, and the dispatch does not say which. The
|
||||
/// SDK 1.1.x monolith still decodes to <see cref="Fsr3"/>; <see cref="Fsr4"/> is reserved for a
|
||||
/// writer that can actually tell. An enumerator, not a field — no layout change.
|
||||
/// </summary>
|
||||
FsrUnversioned = 9,
|
||||
|
||||
/// <summary>A hook ran and could not identify what it saw. Different from "not measured".</summary>
|
||||
Unknown = 0xFF,
|
||||
}
|
||||
|
||||
@@ -18,13 +18,15 @@ add_library(FrameLedger.Overlay SHARED src/dllmain.cpp)
|
||||
# d3d11/dxgi: the present hook reads the SHARED class vtable off a throwaway WARP
|
||||
# composition swapchain (17_HOOK_ENGINE §Getting vtable addresses) — never a
|
||||
# hardcoded pointer, and the dummy object is released immediately.
|
||||
# fl_streamline_headers carries INCLUDE DIRECTORIES ONLY -- it is an INTERFACE
|
||||
# target with no target_link_libraries of its own, deliberately, so that naming
|
||||
# it here cannot make sl.interposer.dll a load-time dependency of this DLL. See
|
||||
# third_party/streamline/README.md: an Overlay that imports sl.interposer fails
|
||||
# to load in every game that ships no Streamline, in the loader, silently.
|
||||
# fl_streamline_headers and fl_fidelityfx_headers carry INCLUDE DIRECTORIES ONLY --
|
||||
# each is an INTERFACE target with no target_link_libraries of its own,
|
||||
# deliberately, so that naming it here cannot make sl.interposer.dll or an AMD
|
||||
# module a load-time dependency of this DLL. See third_party/streamline/README.md
|
||||
# and third_party/fidelityfx/README.md: an Overlay that imports a vendor module
|
||||
# fails to load in every game that ships no such module, in the loader, silently.
|
||||
# hookinventory-check Pass C reads the built DLL's import AND export tables.
|
||||
target_link_libraries(FrameLedger.Overlay PRIVATE FrameLedger.Shm fl_dxgi_vtable fl_native_flags fl_hostile_env_flags minhook
|
||||
fl_streamline_headers
|
||||
fl_streamline_headers fl_fidelityfx_headers
|
||||
Advapi32 d3d11 d3d12 dxgi)
|
||||
set_target_properties(FrameLedger.Overlay PROPERTIES OUTPUT_NAME "FrameLedger.Overlay")
|
||||
|
||||
|
||||
@@ -127,6 +127,134 @@ static_assert((kFamilyEvaluateFeature & static_cast<uint32_t>(fl::FL_HOOK_FG_EVA
|
||||
"so claiming FG_EVALUATIONS here would entitle FL_MEASURED_FG_COUNTS to a detour that writes "
|
||||
"nothing into fgEvaluations");
|
||||
|
||||
// --- AMD FidelityFX, through the ffx-api facade (2026-09-04, HANDOFF item 7c) ----
|
||||
//
|
||||
// ONE FAMILY, THREE ROWS, THREE MODULES, AND EVERY ROW IS THE SAME EXPORT NAME.
|
||||
// `ffxDispatch` is the single call an ffx-api title routes every per-frame piece
|
||||
// of work through -- the upscale, the frame-generation PREPARE, and the generated
|
||||
// batch -- and the DESCRIPTOR it is handed says which (ffxApiHeader::type, a value
|
||||
// from the vendored MIT headers). So the one detour IDENTIFIES the upscaler (an
|
||||
// UPSCALE dispatch arrived), publishes the render extent (the same descriptor's
|
||||
// renderSize: PARAMS) and COUNTS application frames (the PREPARE descriptor's
|
||||
// frameID, which the vendor documents as "must increment by exactly one for each
|
||||
// frame" -- this vendor's slGetNewFrameToken). Three families from one body, hence
|
||||
// a compound constant, and it must differ from all three single-bit values above
|
||||
// because InstallByFamily binds by EQUALITY (dllmain.cpp).
|
||||
//
|
||||
// WHY THESE THREE MODULES, AND WHY NOT A FOURTH. Measured on installed titles,
|
||||
// 2026-09-04:
|
||||
//
|
||||
// amd_fidelityfx_dx12.dll SDK 1.1.x MONOLITH -- Lies of P, Cyberpunk 2077,
|
||||
// Rune Factory, Black Myth: Wukong (1.0.1.41314)
|
||||
// amd_fidelityfx_upscaler_dx12.dll SDK 2.x effect DLL: the FSR 3.1 AND FSR 4 providers
|
||||
// amd_fidelityfx_framegeneration_dx12.dll SDK 2.x effect DLL: FSR 3.1 / FSR 4 frame generation
|
||||
// and the frame-generation swapchain
|
||||
// amd_fidelityfx_loader_dx12.dll SDK 2.x LOADER: no effect code, forwards to the two above
|
||||
//
|
||||
// All four export the same five names and nothing else (docs/vendor-exports.json),
|
||||
// so the loader can reach an effect DLL only through the effect DLL's OWN exports
|
||||
// -- and a UE5 title ships the two effect DLLs with NO loader at all (Hell Is Us,
|
||||
// Expedition 33: the engine plugin compiles the MIT loader source in and calls the
|
||||
// leaves directly). Every route therefore ends at a LEAF, and the leaves are what
|
||||
// is hooked. Hooking the loader as well would count each dispatch TWICE on a
|
||||
// loader-shipping title, straight into fg_factor -- the exact defect the module
|
||||
// column exists to prevent, one vendor over. The loader's name is kept here ONLY
|
||||
// so a static_assert below can refuse it as a row, and so the fixtures can build a
|
||||
// forwarding decoy that proves the leaf count reads 1x with a loader in the chain.
|
||||
//
|
||||
// The effect-DLL split is NOT a guess about the vendor's internals: the FidelityFX
|
||||
// SDK's own getting-started text says the loader "only manages the loading of
|
||||
// effect type DLLs" and is "interface- and behavior-compatible with
|
||||
// amd_fidelityfx_dx12.dll". The monolith IS its own leaf -- SDK 1.1.x compiled the
|
||||
// providers in -- which is why it is a row and the loader is not.
|
||||
inline constexpr uint32_t kFamilyFfxDispatch = static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_IDENTITY) |
|
||||
static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_PARAMS) |
|
||||
static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS);
|
||||
|
||||
// The complement, as its own list, for the reason kFamiliesEvaluateFeatureDoesNotImplement
|
||||
// gives: a bit added above has to be REMOVED here before the build goes green, and that
|
||||
// is the moment somebody decides whether the detour actually implements the family.
|
||||
inline constexpr uint32_t kFamiliesFfxDispatchDoesNotImplement =
|
||||
static_cast<uint32_t>(fl::FL_HOOK_PRESENT) | static_cast<uint32_t>(fl::FL_HOOK_RT_DISPATCH) |
|
||||
static_cast<uint32_t>(fl::FL_HOOK_RT_AS_BUILD) | static_cast<uint32_t>(fl::FL_HOOK_RT_PSO) |
|
||||
static_cast<uint32_t>(fl::FL_HOOK_PSO) | static_cast<uint32_t>(fl::FL_HOOK_COLOR_SPACE) |
|
||||
static_cast<uint32_t>(fl::FL_HOOK_REFLEX) | static_cast<uint32_t>(fl::FL_HOOK_VRAM);
|
||||
|
||||
static_assert((kFamilyFfxDispatch & kFamiliesFfxDispatchDoesNotImplement) == 0u,
|
||||
"the ffxDispatch rows claim a family their detour does not implement -- hookinventory-check reads "
|
||||
"this column as an opaque identifier and cannot see it, so a compile error is the only verdict");
|
||||
static_assert((kFamilyFfxDispatch & static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_IDENTITY)) != 0u,
|
||||
"an UPSCALE dispatch descriptor names the upscaler, so the row must claim identity");
|
||||
static_assert((kFamilyFfxDispatch & static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_PARAMS)) != 0u,
|
||||
"the UPSCALE descriptor carries renderSize, so the row must claim params");
|
||||
static_assert((kFamilyFfxDispatch & static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS)) != 0u,
|
||||
"the PREPARE descriptor's frameID is the application-frame count, so the row must claim FG counts");
|
||||
static_assert(kFamilyFfxDispatch != kFamilyEvaluateFeature &&
|
||||
kFamilyFfxDispatch != static_cast<uint32_t>(fl::FL_HOOK_UPSCALER_PARAMS) &&
|
||||
kFamilyFfxDispatch != static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS),
|
||||
"InstallByFamily binds a row by EQUALITY on this value -- a collision would hand a Streamline detour "
|
||||
"body to an AMD export, which is the neighbour's-body defect the installer exists to stop");
|
||||
|
||||
// The leaves, in the order dllmain's per-leaf trampoline and latch arrays are indexed.
|
||||
enum FfxLeaf : uint32_t {
|
||||
kFfxLeafMonolith = 0, // amd_fidelityfx_dx12.dll -- SDK 1.1.x, FSR 3.1 only
|
||||
kFfxLeafUpscaler = 1, // amd_fidelityfx_upscaler_dx12.dll -- SDK 2.x, FSR 3.1 or FSR 4
|
||||
kFfxLeafFrameGeneration = 2, // amd_fidelityfx_framegeneration_dx12.dll -- SDK 2.x
|
||||
kFfxLeafCount = 3,
|
||||
};
|
||||
|
||||
inline constexpr const wchar_t* kFfxLeafModules[kFfxLeafCount] = {
|
||||
L"amd_fidelityfx_dx12.dll",
|
||||
L"amd_fidelityfx_upscaler_dx12.dll",
|
||||
L"amd_fidelityfx_framegeneration_dx12.dll",
|
||||
};
|
||||
|
||||
// NOT A ROW, and asserted so below. Named here for the static_assert and for the
|
||||
// forwarding decoy in tools/vendor-stubs, nowhere else.
|
||||
inline constexpr const wchar_t* kFfxLoaderModule = L"amd_fidelityfx_loader_dx12.dll";
|
||||
|
||||
// constexpr string compares, so the bindings below are COMPILE errors rather than
|
||||
// runtime disagreements nobody runs. Case-sensitive: they compare this file's
|
||||
// spellings with each other, not a loader's answer with ours.
|
||||
constexpr bool SameW(const wchar_t* a, const wchar_t* b) noexcept {
|
||||
while (*a != L'\0' && *a == *b) {
|
||||
++a;
|
||||
++b;
|
||||
}
|
||||
return *a == *b;
|
||||
}
|
||||
constexpr bool SameA(const char* a, const char* b) noexcept {
|
||||
while (*a != '\0' && *a == *b) {
|
||||
++a;
|
||||
++b;
|
||||
}
|
||||
return *a == *b;
|
||||
}
|
||||
|
||||
// Which leaf slot a row's module is, exactly as spelled in the table. -1 if none.
|
||||
constexpr int FfxLeafOfExact(const wchar_t* module) noexcept {
|
||||
for (uint32_t i = 0; i < kFfxLeafCount; ++i) {
|
||||
if (SameW(module, kFfxLeafModules[i])) {
|
||||
return static_cast<int>(i);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// The runtime twin: the loader is case-insensitive about module names, so this is
|
||||
// too. dllmain's installer indexes its per-leaf storage with the result.
|
||||
inline int FfxLeafOf(const wchar_t* module) noexcept {
|
||||
if (module == nullptr) {
|
||||
return -1;
|
||||
}
|
||||
for (uint32_t i = 0; i < kFfxLeafCount; ++i) {
|
||||
if (_wcsicmp(module, kFfxLeafModules[i]) == 0) {
|
||||
return static_cast<int>(i);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// slGetNewFrameToken IS THE APPLICATION-FRAME PRODUCER (2026-09-03, HANDOFF item 3's
|
||||
// decision). Streamline hands a title one frame token per frame, and the title
|
||||
// must ask for it; the detour counts DISTINCT tokens between two presents, so a
|
||||
@@ -136,10 +264,61 @@ static_assert((kFamilyEvaluateFeature & static_cast<uint32_t>(fl::FL_HOOK_FG_EVA
|
||||
// DOES carry -- that the DLSS-G plugin does not request tokens for the frames it
|
||||
// generates -- is what 20_OPEN_QUESTIONS §S31's pre-committed table exists to test
|
||||
// against a title's own x2 / x4 before a ratio near 1 may be read as "none".
|
||||
// THE THREE ffxDispatch ROWS ARE THE LEAVES, spelled as literals because Pass A's
|
||||
// parser reads literals; the static_asserts under the table bind these spellings to
|
||||
// kFfxLeafModules in both directions, so neither list can gain or lose a module alone.
|
||||
#define FL_HOOK_INVENTORY(X) \
|
||||
X(L"sl.interposer.dll", "slEvaluateFeature", fl::inventory::kFamilyEvaluateFeature) \
|
||||
X(L"sl.interposer.dll", "slSetTag", fl::FL_HOOK_UPSCALER_PARAMS) \
|
||||
X(L"sl.interposer.dll", "slGetNewFrameToken", fl::FL_HOOK_FG_EVALUATIONS)
|
||||
X(L"sl.interposer.dll", "slGetNewFrameToken", fl::FL_HOOK_FG_EVALUATIONS) \
|
||||
X(L"amd_fidelityfx_dx12.dll", "ffxDispatch", fl::inventory::kFamilyFfxDispatch) \
|
||||
X(L"amd_fidelityfx_upscaler_dx12.dll", "ffxDispatch", fl::inventory::kFamilyFfxDispatch) \
|
||||
X(L"amd_fidelityfx_framegeneration_dx12.dll", "ffxDispatch", fl::inventory::kFamilyFfxDispatch)
|
||||
|
||||
// THE LEAF TABLE AND THE ROWS ARE BOUND TO EACH OTHER AT COMPILE TIME, BOTH WAYS.
|
||||
// A leaf without a row would be a trampoline slot nothing installs into; a row
|
||||
// without a leaf would resolve, reach InstallByFamily, and find no slot -- and the
|
||||
// installer's answer to that is to install nothing, silently, which is the shape
|
||||
// this whole file exists to make loud.
|
||||
constexpr bool FfxDispatchRowExistsFor(const wchar_t* module) noexcept {
|
||||
#define FL_FFX_ROW_FOR(mod, sym, family) \
|
||||
if (SameW(mod, module) && SameA(sym, "ffxDispatch")) { \
|
||||
return true; \
|
||||
}
|
||||
FL_HOOK_INVENTORY(FL_FFX_ROW_FOR)
|
||||
#undef FL_FFX_ROW_FOR
|
||||
return false;
|
||||
}
|
||||
constexpr bool EveryFfxDispatchRowIsALeaf() noexcept {
|
||||
#define FL_FFX_ROW_IS_LEAF(mod, sym, family) \
|
||||
if (SameA(sym, "ffxDispatch") && FfxLeafOfExact(mod) < 0) { \
|
||||
return false; \
|
||||
}
|
||||
FL_HOOK_INVENTORY(FL_FFX_ROW_IS_LEAF)
|
||||
#undef FL_FFX_ROW_IS_LEAF
|
||||
return true;
|
||||
}
|
||||
constexpr bool AnyRowNames(const wchar_t* module) noexcept {
|
||||
#define FL_ANY_ROW_NAMES(mod, sym, family) \
|
||||
if (SameW(mod, module)) { \
|
||||
return true; \
|
||||
}
|
||||
FL_HOOK_INVENTORY(FL_ANY_ROW_NAMES)
|
||||
#undef FL_ANY_ROW_NAMES
|
||||
return false;
|
||||
}
|
||||
static_assert(FfxDispatchRowExistsFor(kFfxLeafModules[kFfxLeafMonolith]) &&
|
||||
FfxDispatchRowExistsFor(kFfxLeafModules[kFfxLeafUpscaler]) &&
|
||||
FfxDispatchRowExistsFor(kFfxLeafModules[kFfxLeafFrameGeneration]),
|
||||
"every ffx leaf needs its ffxDispatch row, spelled identically -- a leaf with no row is a trampoline "
|
||||
"slot nothing installs into");
|
||||
static_assert(EveryFfxDispatchRowIsALeaf(),
|
||||
"an ffxDispatch row names a module the leaf table does not know -- InstallByFamily would resolve it "
|
||||
"and find no trampoline slot, and install nothing without saying so");
|
||||
static_assert(!AnyRowNames(kFfxLoaderModule),
|
||||
"amd_fidelityfx_loader_dx12.dll is a FORWARDER and must never be a row: it reaches the effect DLLs "
|
||||
"through their own ffxDispatch exports, so hooking it as well counts every dispatch twice, straight "
|
||||
"into fg_factor");
|
||||
|
||||
// Does this module speak the Streamline 2 ABI the vendored headers describe?
|
||||
//
|
||||
@@ -189,6 +368,26 @@ inline bool SpeaksStreamline2(HMODULE h) noexcept {
|
||||
// passes, because "no known ABI hazard" is the honest default for a module class
|
||||
// nobody has measured a break in -- and inventing a check for one would be
|
||||
// guessing, not guarding.
|
||||
// Does this module speak the ffx-api ABI the vendored headers describe?
|
||||
//
|
||||
// A NAME CHECK, AND SAID SO. The five entry points are the whole of the ffx-api
|
||||
// surface -- a module of a leaf's name that lacks any of them is not an ffx-api
|
||||
// module at all, whatever else it is. It is deliberately NOT a version check: ffx-api
|
||||
// is designed for ABI stability across SDK generations (the same five names, the same
|
||||
// header-typed descriptors, from the 1.1.x monolith through the 2.x effect DLLs), and
|
||||
// the vendored 2.3.0 declarations decode every generation measured. The guard that
|
||||
// actually protects the read is in the detour: a descriptor is reinterpreted only
|
||||
// AFTER its head type matched a constant whose layout is identical in every tag
|
||||
// consulted, and nothing past the head is touched otherwise.
|
||||
//
|
||||
// Probe-only names, like SpeaksStreamline2's: nothing resolves or calls them, and
|
||||
// they live in this file because Pass B exempts exactly this file.
|
||||
inline bool SpeaksFfxApi(HMODULE h) noexcept {
|
||||
return h != nullptr && GetProcAddress(h, "ffxCreateContext") != nullptr &&
|
||||
GetProcAddress(h, "ffxDestroyContext") != nullptr && GetProcAddress(h, "ffxConfigure") != nullptr &&
|
||||
GetProcAddress(h, "ffxQuery") != nullptr && GetProcAddress(h, "ffxDispatch") != nullptr;
|
||||
}
|
||||
|
||||
inline bool SpeaksExpectedAbi(const wchar_t* module, HMODULE h) noexcept {
|
||||
if (module == nullptr) {
|
||||
return false;
|
||||
@@ -196,6 +395,12 @@ inline bool SpeaksExpectedAbi(const wchar_t* module, HMODULE h) noexcept {
|
||||
if (_wcsicmp(module, L"sl.interposer.dll") == 0) {
|
||||
return SpeaksStreamline2(h);
|
||||
}
|
||||
// THE AMD ARM, by leaf name, for the same reason the Streamline arm is by name:
|
||||
// the loader also exports all five and is not a leaf, so a prefix test would
|
||||
// approve a module the inventory deliberately does not hook.
|
||||
if (FfxLeafOf(module) >= 0) {
|
||||
return SpeaksFfxApi(h);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <d3d12.h>
|
||||
#include <dxgi1_2.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fl_d3d12_vtable.h>
|
||||
@@ -60,6 +61,16 @@
|
||||
// runs. We use exactly one thing from here -- the PFun_slEvaluateFeature
|
||||
// typedef and the kFeature* ids -- and resolve the symbol at runtime.
|
||||
#include <sl.h>
|
||||
// AMD FidelityFX (ffx-api), the same way and under the same rule. Used for exactly
|
||||
// four things: ffxApiHeader::type, the FFX_API_DISPATCH_DESC_TYPE_* constants, the
|
||||
// renderSize / frameID fields of the descriptors those constants name, and the
|
||||
// PfnFfxDispatch typedef the trampolines are typed by. ffx_api.h declares the entry
|
||||
// points __declspec(dllexport) with no import switch; nothing here defines or takes
|
||||
// the address of one, so nothing is exported -- hookinventory-check Pass C reads the
|
||||
// built DLL's export table to keep it that way.
|
||||
#include <ffx_api.h>
|
||||
#include <ffx_framegeneration.h>
|
||||
#include <ffx_upscale.h>
|
||||
|
||||
using namespace fl;
|
||||
|
||||
@@ -756,6 +767,75 @@ std::atomic<uint8_t> g_dlssQuality{0xFFu};
|
||||
|
||||
constexpr uint64_t kTagValid = 1ull << 32;
|
||||
|
||||
// --- AMD FidelityFX through the ffx-api leaves (HANDOFF item 7c, 2026-09-04) -----
|
||||
//
|
||||
// ONE OBSERVER, THREE TRAMPOLINES. The three leaves in fl_hook_inventory.h each
|
||||
// export their own ffxDispatch, so each needs its own MinHook target, its own
|
||||
// trampoline and its own liveness latch -- and one observer, because what the detour
|
||||
// does with a descriptor does not depend on which leaf it arrived at.
|
||||
//
|
||||
// WHAT IS READ, AND FROM WHERE (CLAUDE.md rule 4). Only the descriptor the title
|
||||
// passed to the API we hooked: its head type, and -- once the type has matched a
|
||||
// vendored constant -- renderSize (UPSCALE, PREPARE) and frameID (PREPARE). Never the
|
||||
// context handle, never pNext, never a command list or a resource, never
|
||||
// numGeneratedFrames (there is no field to publish it into, and the factor is
|
||||
// MEASURED from counts rather than read off the configuration). Nothing is written.
|
||||
//
|
||||
// THE WORD RecordPresent DRAINS, in fl_sl_seen.h's encoding because that encoding is
|
||||
// vendor-neutral -- bits below kCountShift are facts, the field above them a COUNT:
|
||||
//
|
||||
// bit 0 FL_FFX_SEEN_FG_DISPATCH a FRAMEGENERATION dispatch -- a generated batch,
|
||||
// sent back through the export from the title's own
|
||||
// frameGenerationCallback -- since the last present
|
||||
// bit 1 FL_FFX_SEEN_OTHER a dispatch type this build does not decode
|
||||
// count UPSCALE dispatches since the last present. A COUNT and not a bit, on
|
||||
// purpose: it is the second application-frame count beside PREPARE's, and a
|
||||
// loader+leaf double hook reads 2.00 on their ratio where a bit would read 1.
|
||||
enum FlFfxSeen : uint32_t {
|
||||
FL_FFX_SEEN_FG_DISPATCH = 1u << 0,
|
||||
FL_FFX_SEEN_OTHER = 1u << 1,
|
||||
};
|
||||
static_assert(((FL_FFX_SEEN_FG_DISPATCH | FL_FFX_SEEN_OTHER) & ~fl::slseen::kFeatureMask) == 0u,
|
||||
"the FFX fact bits must stay below the count field");
|
||||
std::atomic<uint32_t> g_ffxSeen{0};
|
||||
|
||||
// PREPARE dispatches whose frameID was NEW -- the application-frame count on this
|
||||
// vendor, this vendor's slGetNewFrameToken. Keyed on a monotone maximum of frameID
|
||||
// for the reason Hook_SlGetNewFrameToken gives: the vendor's "must increment by
|
||||
// exactly one for each frame" is a contract about the INDEX, not about the number of
|
||||
// calls, and the SDK's own sample re-issues the prepare when its configuration
|
||||
// changes. Drained with exchange(0) in RecordPresent beside g_frameTokens.
|
||||
std::atomic<uint32_t> g_ffxPrepares{0};
|
||||
// frameID + 1, so that 0 means "no frame yet". 64 bits wide, so no tag bit is needed.
|
||||
std::atomic<uint64_t> g_ffxMaxFrameKey{0};
|
||||
|
||||
// The render extent, packed exactly as g_tagExtent is and persisting for the same
|
||||
// reason: it is the size the title is upscaling FROM, restated on every UPSCALE (and
|
||||
// every PREPARE) dispatch, and RecordPresent publishes it only on a present that
|
||||
// drained a dispatch -- so it cannot outlive the frame it describes.
|
||||
std::atomic<uint64_t> g_ffxExtent{0};
|
||||
|
||||
// Which leaf the last UPSCALE dispatch arrived at, plus one (0 = none yet). The
|
||||
// identity byte depends on it: the SDK 1.1.x monolith hosts FSR 3.1 and nothing
|
||||
// else, while the SDK 2.x upscaler DLL hosts FSR 3.1 AND FSR 4 and the dispatch does
|
||||
// not say which -- so the same UPSCALE type decodes to FL_UPSCALER_FSR3 from one leaf
|
||||
// and to FL_UPSCALER_FSR_UNVERSIONED from the other (fl_shm.h says why).
|
||||
std::atomic<uint32_t> g_ffxUpscaleLeaf{0};
|
||||
|
||||
using PFN_FfxDispatch = ::PfnFfxDispatch;
|
||||
PFN_FfxDispatch g_origFfxDispatch[fl::inventory::kFfxLeafCount] = {};
|
||||
// Per leaf: PATCHED, not published. The family is published once, below, when every
|
||||
// leaf the process has loaded is patched -- PublishHookFamily's own rule ("a hook that
|
||||
// spans several targets must not claim its family until every one of them is in"),
|
||||
// and it was measured mattering before it was applied: with the family published on
|
||||
// the FIRST leaf, an injected fixture caught the window between the upscaler leaf's
|
||||
// patch and the frame-generation leaf's, during which UPSCALE dispatches were counted
|
||||
// and the PREPARE and FRAMEGENERATION dispatches on the other leaf were not -- two
|
||||
// application frames identified as FSR with no FSR_FG mode, in a window the consumer
|
||||
// had every right to read as complete.
|
||||
std::atomic<uint32_t> g_ffxPatched[fl::inventory::kFfxLeafCount] = {};
|
||||
std::atomic<uint32_t> g_ffxLive{0};
|
||||
|
||||
// WHY THIS PERSISTS RATHER THAN BEING exchange(0)'d LIKE g_slSeen.
|
||||
//
|
||||
// g_slSeen answers "did an upscaler run THIS FRAME", so a sample that outlived
|
||||
@@ -932,6 +1012,143 @@ sl::Result STDMETHODCALLTYPE Hook_SlGetNewFrameToken(sl::FrameToken*& token, con
|
||||
return result;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// AMD FidelityFX: the one observer behind the three ffxDispatch trampolines.
|
||||
//
|
||||
// HEAD TYPE FIRST, AND NOTHING PAST THE HEAD UNTIL IT MATCHED. ffxApiHeader is the
|
||||
// first sixteen bytes of every descriptor -- a uint64 type and a pNext -- and that is
|
||||
// all that is read on an unmatched type. A body is reinterpreted only after its type
|
||||
// equalled a vendored constant whose layout is identical in every SDK tag consulted
|
||||
// (1.1.4 and 2.3.0), so the SDK 1.1.x monolith and the 2.x effect DLLs decode with
|
||||
// one switch. pNext is never followed: nothing this writer publishes lives in a
|
||||
// chained extension.
|
||||
//
|
||||
// WHAT EACH TYPE MEANS FOR THE RECORD:
|
||||
// UPSCALE the upscaler ran this application frame. Identity (which
|
||||
// leaf it arrived at), renderSize (PARAMS), and one more COUNT
|
||||
// in the drain word -- the second application-frame count,
|
||||
// beside PREPARE's, so the consumer can print their ratio the
|
||||
// way it prints tokens/batch for Streamline.
|
||||
// PREPARE / PREPARE_V2 the frame-generation prepare pass the title issues once per
|
||||
// application frame, carrying frameID: this vendor's
|
||||
// slGetNewFrameToken. Counted on a NEW frameID only.
|
||||
// FRAMEGENERATION a generated batch, dispatched back through the export from
|
||||
// the title's own frameGenerationCallback -- the fact that
|
||||
// names FL_FG_FSR_FG on this present.
|
||||
// anything else FL_FFX_SEEN_OTHER: a dispatch this build does not decode.
|
||||
//
|
||||
// ONE READ-MODIFY-WRITE PER ARM on the drain word, exactly as Hook_SlEvaluateFeature
|
||||
// keeps; the PREPARE arm's CAS loop is on its own word and is the token detour's
|
||||
// shape. Nothing here allocates, locks, logs or calls out.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// PREPARE (what an SDK 1.1.x title sends) and PREPARE_V2 (SDK 2.x) share their layout
|
||||
// through renderSize byte for byte, and the Overlay reads a PREPARE through the V2
|
||||
// struct. The older struct is [[deprecated]] in the vendored header, so under /W4 /WX
|
||||
// naming it is a build error -- the equality is asserted here, inside the smallest
|
||||
// possible suppression, rather than silencing the attribute for the file. Both offsets
|
||||
// sit inside the OLDER struct's size, so the read never leaves the smaller descriptor
|
||||
// a 1.1.x title actually passed.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
static_assert(offsetof(ffxDispatchDescFrameGenerationPrepare, frameID) ==
|
||||
offsetof(ffxDispatchDescFrameGenerationPrepareV2, frameID),
|
||||
"PREPARE and PREPARE_V2 must agree on where frameID is, or a 1.1.x title's frame index is read from "
|
||||
"the wrong bytes");
|
||||
static_assert(offsetof(ffxDispatchDescFrameGenerationPrepare, renderSize) ==
|
||||
offsetof(ffxDispatchDescFrameGenerationPrepareV2, renderSize),
|
||||
"PREPARE and PREPARE_V2 must agree on where renderSize is");
|
||||
static_assert(offsetof(ffxDispatchDescFrameGenerationPrepare, renderSize) + sizeof(FfxApiDimensions2D) <=
|
||||
sizeof(ffxDispatchDescFrameGenerationPrepare),
|
||||
"the fields read must lie inside the smaller descriptor");
|
||||
#pragma warning(pop)
|
||||
|
||||
// The render extent, from an UPSCALE or PREPARE descriptor. Same packing and the same
|
||||
// in-band unknown as NoteTags: a zero or absurd size clears the sample rather than
|
||||
// publishing a resolution nobody rendered at.
|
||||
void NoteFfxExtent(const FfxApiDimensions2D& size) noexcept {
|
||||
const uint64_t w = size.width;
|
||||
const uint64_t h = size.height;
|
||||
if (w == 0 || h == 0 || w > 0xFFFFu || h > 0xFFFFu) {
|
||||
g_ffxExtent.store(0, std::memory_order_release);
|
||||
return;
|
||||
}
|
||||
g_ffxExtent.store(w | (h << 16) | kTagValid, std::memory_order_release);
|
||||
}
|
||||
|
||||
void ObserveFfxDispatch(uint32_t leaf, const ffxDispatchDescHeader* desc) noexcept {
|
||||
if (desc == nullptr) {
|
||||
return;
|
||||
}
|
||||
switch (desc->type) {
|
||||
case FFX_API_DISPATCH_DESC_TYPE_UPSCALE: {
|
||||
const auto* up = reinterpret_cast<const ffxDispatchDescUpscale*>(desc);
|
||||
NoteFfxExtent(up->renderSize);
|
||||
g_ffxUpscaleLeaf.store(leaf + 1u, std::memory_order_relaxed);
|
||||
g_ffxSeen.fetch_add(fl::slseen::kCountOne, std::memory_order_relaxed);
|
||||
break;
|
||||
}
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE:
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2: {
|
||||
const auto* prep = reinterpret_cast<const ffxDispatchDescFrameGenerationPrepareV2*>(desc);
|
||||
NoteFfxExtent(prep->renderSize);
|
||||
// frameID + 1, so 0 stays "no frame yet"; a NEW maximum counts, a re-issue of a
|
||||
// frame already counted does not, and a large jump backwards (a level reload
|
||||
// restarting the counter) re-bases rather than freezing the count at zero.
|
||||
const uint64_t id = prep->frameID;
|
||||
const uint64_t key = id + 1u;
|
||||
uint64_t seen = g_ffxMaxFrameKey.load(std::memory_order_relaxed);
|
||||
for (;;) {
|
||||
const bool none = seen == 0u;
|
||||
const uint64_t max = seen - 1u;
|
||||
const bool rebase = !none && max > id && max - id > kFrameIndexRebaseGap;
|
||||
if (!none && !rebase && id <= max) {
|
||||
break;
|
||||
}
|
||||
if (g_ffxMaxFrameKey.compare_exchange_weak(seen, key, std::memory_order_relaxed)) {
|
||||
g_ffxPrepares.fetch_add(1u, std::memory_order_relaxed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION:
|
||||
g_ffxSeen.fetch_or(FL_FFX_SEEN_FG_DISPATCH, std::memory_order_relaxed);
|
||||
break;
|
||||
default:
|
||||
g_ffxSeen.fetch_or(FL_FFX_SEEN_OTHER, std::memory_order_relaxed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Three trampolines from one template, one per leaf slot: MinHook needs a distinct
|
||||
// detour address per patched target, and the leaf index is what lets the trampoline
|
||||
// find its own original. Every argument forwarded untouched, the original called
|
||||
// exactly once on every path including the fault path.
|
||||
template <uint32_t Leaf>
|
||||
ffxReturnCode_t Hook_FfxDispatchT(ffxContext* context, const ffxDispatchDescHeader* desc) {
|
||||
static_assert(Leaf < fl::inventory::kFfxLeafCount, "a trampoline per leaf, and no more");
|
||||
FL_HOOK_GUARD({
|
||||
if (MayObserve()) {
|
||||
ObserveFfxDispatch(Leaf, desc);
|
||||
}
|
||||
})
|
||||
return g_origFfxDispatch[Leaf](context, desc);
|
||||
}
|
||||
|
||||
void* FfxDispatchDetour(uint32_t leaf) noexcept {
|
||||
switch (leaf) {
|
||||
case fl::inventory::kFfxLeafMonolith:
|
||||
return reinterpret_cast<void*>(&Hook_FfxDispatchT<fl::inventory::kFfxLeafMonolith>);
|
||||
case fl::inventory::kFfxLeafUpscaler:
|
||||
return reinterpret_cast<void*>(&Hook_FfxDispatchT<fl::inventory::kFfxLeafUpscaler>);
|
||||
case fl::inventory::kFfxLeafFrameGeneration:
|
||||
return reinterpret_cast<void*>(&Hook_FfxDispatchT<fl::inventory::kFfxLeafFrameGeneration>);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Ray tracing (docs/HANDOFF.md item 4, 03_METRICS §RT/PT/RR).
|
||||
//
|
||||
@@ -1147,14 +1364,76 @@ bool InstallByFamily(const wchar_t* module, const char* symbol, uint32_t family)
|
||||
return InstallRow(module, symbol, family, reinterpret_cast<void*>(&Hook_SlGetNewFrameToken),
|
||||
reinterpret_cast<void**>(&g_origSlGetNewFrameToken), g_frameTokensLive);
|
||||
}
|
||||
if (family == fl::inventory::kFamilyFfxDispatch) {
|
||||
// THREE ROWS, ONE ARM: the row's MODULE picks the trampoline and the latch slot,
|
||||
// because the three leaves export the same name and each must be patched at its
|
||||
// own address. Per-leaf latches rather than one, so that on a UE5 title -- two
|
||||
// leaves, loaded in whatever order the engine's plugin loads them -- the watchdog
|
||||
// keeps trying the leaf that is not in yet after the other one is.
|
||||
//
|
||||
// PATCHED HERE, PUBLISHED IN PublishFfxFamilyIfWhole. InstallRow publishes the
|
||||
// family the moment one target is in, which is right for a one-target row and
|
||||
// wrong for this one: the family's three claims come from two different leaves
|
||||
// on a 2.x title, so a family published on the first leaf entitles records the
|
||||
// second leaf is not yet producing.
|
||||
//
|
||||
// A module the leaf table does not know installs NOTHING. fl_hook_inventory.h's
|
||||
// static_asserts make that unreachable for the rows as written; this is the
|
||||
// installer's safe direction for a row somebody adds later.
|
||||
const int leaf = fl::inventory::FfxLeafOf(module);
|
||||
if (leaf < 0) {
|
||||
return false;
|
||||
}
|
||||
const auto slot = static_cast<uint32_t>(leaf);
|
||||
if (g_ffxPatched[slot].load(std::memory_order_acquire) != 0) {
|
||||
return true;
|
||||
}
|
||||
void* target = fl::inventory::ResolveScoped(module, symbol);
|
||||
if (target == nullptr) {
|
||||
return false; // not loaded, or a module of the name that does not speak ffx-api
|
||||
}
|
||||
if (!PatchTarget(target, FfxDispatchDetour(slot), reinterpret_cast<void**>(&g_origFfxDispatch[slot]))) {
|
||||
return false;
|
||||
}
|
||||
g_ffxPatched[slot].store(1, std::memory_order_release);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Publish kFamilyFfxDispatch once EVERY LEAF THE PROCESS HAS LOADED is patched, and
|
||||
// at least one is. Runs every watchdog tick after the rows, so a leaf that loads later
|
||||
// (a title enabling frame generation from its menu after launch) is patched on the
|
||||
// next tick; by then the family is already published, and the short window in which
|
||||
// that leaf's dispatches go unobserved is what the consumer's frames/upscale-drained
|
||||
// ratio exists to show. A leaf of the right NAME that ResolveScoped refuses keeps the
|
||||
// family unpublished for as long as it stays loaded -- the writer cannot claim what
|
||||
// it cannot read, and a partial claim is the defect this function exists to prevent.
|
||||
void PublishFfxFamilyIfWhole() noexcept {
|
||||
if (g_ffxLive.load(std::memory_order_acquire) != 0) {
|
||||
return;
|
||||
}
|
||||
bool anyPatched = false;
|
||||
for (uint32_t i = 0; i < fl::inventory::kFfxLeafCount; ++i) {
|
||||
if (g_ffxPatched[i].load(std::memory_order_acquire) != 0) {
|
||||
anyPatched = true;
|
||||
continue;
|
||||
}
|
||||
if (fl::inventory::IsModuleLoaded(fl::inventory::kFfxLeafModules[i])) {
|
||||
return; // loaded and not yet patched: the family is not whole
|
||||
}
|
||||
}
|
||||
if (anyPatched) {
|
||||
PublishHookFamily(fl::inventory::kFamilyFfxDispatch, g_ffxLive);
|
||||
}
|
||||
}
|
||||
|
||||
bool InstallUpscalerHooks() noexcept {
|
||||
bool any = false;
|
||||
#define FL_INSTALL_ROW(mod, sym, family) any = InstallByFamily(mod, sym, static_cast<uint32_t>(family)) || any;
|
||||
FL_HOOK_INVENTORY(FL_INSTALL_ROW)
|
||||
#undef FL_INSTALL_ROW
|
||||
PublishFfxFamilyIfWhole();
|
||||
return any;
|
||||
}
|
||||
|
||||
@@ -1473,7 +1752,17 @@ void RecordPresent(IDXGISwapChain* sc, UINT syncInterval, UINT flags) noexcept {
|
||||
// mid-session settings change 03_METRICS §Upscaling segments on.
|
||||
const uint32_t seen = g_slSeen.exchange(0, std::memory_order_acq_rel);
|
||||
|
||||
if (g_upscalerIdentityLive.load(std::memory_order_relaxed) != 0) {
|
||||
// The AMD word and count, drained beside the Streamline word and for the same
|
||||
// reason. ALWAYS drained, whether or not anything below reads them: a count that
|
||||
// is consumed only once its hook is live would latch through the install window
|
||||
// and land whole on the first present after it.
|
||||
const uint32_t ffx = g_ffxSeen.exchange(0, std::memory_order_acq_rel);
|
||||
const uint32_t ffxPrepares = g_ffxPrepares.exchange(0u, std::memory_order_relaxed);
|
||||
const uint32_t ffxUpscales = fl::slseen::FgEvals(ffx);
|
||||
const bool ffxLive = g_ffxLive.load(std::memory_order_relaxed) != 0;
|
||||
const bool ffxSaw = ffxUpscales != 0u || ffxPrepares != 0u;
|
||||
|
||||
if (g_upscalerIdentityLive.load(std::memory_order_relaxed) != 0 || ffxLive) {
|
||||
// A hook CAPABLE of answering was live for this frame, so the field may
|
||||
// be read. What it says is a separate question, below.
|
||||
rec.measuredMask = static_cast<uint16_t>(rec.measuredMask | FL_MEASURED_UPSCALER);
|
||||
@@ -1505,14 +1794,29 @@ void RecordPresent(IDXGISwapChain* sc, UINT syncInterval, UINT flags) noexcept {
|
||||
// same word. So the technology is DLSS and the RR axis stays where it is;
|
||||
// giving RR its own upscaler value would resurrect the conflation v3 removed.
|
||||
rec.upscaler = FL_UPSCALER_DLSS;
|
||||
} else if (ffxUpscales != 0u) {
|
||||
// AN UPSCALE DISPATCH REACHED AN ffx-api LEAF THIS PRESENT, and which leaf
|
||||
// decides the byte. The SDK 1.1.x monolith (amd_fidelityfx_dx12.dll) hosts
|
||||
// FSR 3.1 and nothing else, so it is FSR3 as a fact. The SDK 2.x upscaler
|
||||
// DLL hosts FSR 3.1 AND FSR 4 behind the same UPSCALE type, the provider is
|
||||
// chosen at context creation by an opaque version id, and the dispatch does
|
||||
// not carry it -- so from that leaf the honest byte is "FSR, version not
|
||||
// named" (fl_shm.h §FL_UPSCALER_FSR_UNVERSIONED): FSR3 would be right on
|
||||
// every non-RDNA4 machine and a fabrication on one, and UNKNOWN would print
|
||||
// the very N/A this arm exists to remove.
|
||||
rec.upscaler = g_ffxUpscaleLeaf.load(std::memory_order_relaxed) == fl::inventory::kFfxLeafMonolith + 1u
|
||||
? static_cast<uint8_t>(FL_UPSCALER_FSR3)
|
||||
: static_cast<uint8_t>(FL_UPSCALER_FSR_UNVERSIONED);
|
||||
} else {
|
||||
// UNKNOWN, AND NEVER `NONE`. FL_UPSCALER_NONE means "a hook ran and
|
||||
// there was genuinely no upscaler" -- the one state fl_shm.h allows
|
||||
// to be aggregated as a negative. This writer hooks STREAMLINE and
|
||||
// nothing else, so an FSR, XeSS or NGX-direct title evaluates its
|
||||
// upscaler somewhere we are not looking. Reporting NONE would turn
|
||||
// "we do not cover that vendor" into a measured fact about the
|
||||
// title. UNKNOWN says the true thing: our coverage is short.
|
||||
// to be aggregated as a negative. This writer hooks Streamline and the
|
||||
// ffx-api leaves and nothing else, so an XeSS, NGX-direct or FSR 3.0
|
||||
// (ffx_fsr3_x64.dll) title evaluates its upscaler somewhere we are not
|
||||
// looking -- and so does an FSR title on a present that drained no
|
||||
// dispatch, which under frame generation is every generated present.
|
||||
// Reporting NONE would turn "we do not cover that vendor" into a measured
|
||||
// fact about the title. UNKNOWN says the true thing: our coverage is short.
|
||||
//
|
||||
// It is also what an unrecognised feature id lands on
|
||||
// (FL_SL_SEEN_OTHER) -- a NEW Streamline feature we do not decode is
|
||||
@@ -1559,6 +1863,25 @@ void RecordPresent(IDXGISwapChain* sc, UINT syncInterval, UINT flags) noexcept {
|
||||
// and later.
|
||||
rec.upscalerSharpness = 0xFFu;
|
||||
|
||||
rec.measuredMask = static_cast<uint16_t>(rec.measuredMask | FL_MEASURED_UPSCALER_PARAMS);
|
||||
}
|
||||
} else if (ffxLive && ffxSaw) {
|
||||
// THE SAME TWO CONDITIONS, ONE VENDOR OVER: an ffx-api leaf is hooked (we were
|
||||
// in a position to read a descriptor) AND a dispatch drained THIS PRESENT, so
|
||||
// the extent describes this frame and not a resolution the title stopped
|
||||
// rendering at. renderSize is read off the UPSCALE or PREPARE descriptor itself.
|
||||
const uint64_t ext = g_ffxExtent.load(std::memory_order_acquire);
|
||||
if ((ext & kTagValid) != 0u) {
|
||||
rec.renderW = static_cast<uint16_t>(ext & 0xFFFFu);
|
||||
rec.renderH = static_cast<uint16_t>((ext >> 16) & 0xFFFFu);
|
||||
// 0xFF for both, and for this vendor it is the TRUE value rather than a
|
||||
// gap: the ffx-api dispatch carries no quality mode at all -- the
|
||||
// FfxApiUpscaleQualityMode enum is an input to a QUERY the title makes
|
||||
// before creating its context, never to the per-frame dispatch -- and no
|
||||
// sharpness travels here either. A preset label derived from the measured
|
||||
// ratio is HANDOFF item 7a's owner decision, not this byte's.
|
||||
rec.upscalerQuality = 0xFFu;
|
||||
rec.upscalerSharpness = 0xFFu;
|
||||
rec.measuredMask = static_cast<uint16_t>(rec.measuredMask | FL_MEASURED_UPSCALER_PARAMS);
|
||||
}
|
||||
}
|
||||
@@ -1661,14 +1984,49 @@ void RecordPresent(IDXGISwapChain* sc, UINT syncInterval, UINT flags) noexcept {
|
||||
// The COUNT comes from slGetNewFrameToken: distinct frame tokens handed to the
|
||||
// title since the last present, i.e. application frames, on every Streamline 2
|
||||
// title including the ones that evaluate nothing through the other export.
|
||||
if (g_upscalerIdentityLive.load(std::memory_order_relaxed) != 0) {
|
||||
if (g_upscalerIdentityLive.load(std::memory_order_relaxed) != 0 || ffxLive) {
|
||||
const uint32_t evals = fl::slseen::FgEvals(seen);
|
||||
rec.fgMode = evals != 0u ? static_cast<uint8_t>(FL_FG_DLSS_G) : static_cast<uint8_t>(FL_FG_UNKNOWN);
|
||||
// FSR_FG when a generated batch came back through an ffx-api leaf's export this
|
||||
// present; DLSS_G when a kFeatureDLSS_G evaluation drained; UNKNOWN otherwise,
|
||||
// and never NONE -- `none` is the CONSUMER's verdict from the count
|
||||
// (FgWindow.NoneCeiling), because from here "nothing was generated" and
|
||||
// "generated somewhere we do not hook" are the same absence.
|
||||
uint8_t mode = FL_FG_UNKNOWN;
|
||||
if ((ffx & FL_FFX_SEEN_FG_DISPATCH) != 0u) {
|
||||
mode = FL_FG_FSR_FG;
|
||||
} else if (evals != 0u) {
|
||||
mode = FL_FG_DLSS_G;
|
||||
}
|
||||
rec.fgMode = mode;
|
||||
rec.measuredMask = static_cast<uint16_t>(rec.measuredMask | FL_MEASURED_FG);
|
||||
}
|
||||
if (g_frameTokensLive.load(std::memory_order_relaxed) != 0) {
|
||||
if (g_frameTokensLive.load(std::memory_order_relaxed) != 0 || ffxLive) {
|
||||
const uint32_t tokens = g_frameTokens.exchange(0u, std::memory_order_relaxed);
|
||||
rec.fgEvaluations = fl::slseen::SaturateToByte(tokens);
|
||||
|
||||
// WHICH COUNT, WHEN TWO VENDORS ARE IN THE PROCESS -- and on UE5 they routinely
|
||||
// are (Hell Is Us: sl.interposer.dll AND both AMD leaves loaded whatever the menu
|
||||
// says). Two latches, each one-way for the life of the process:
|
||||
//
|
||||
// Streamline keeps precedence once it has EVER handed out a token
|
||||
// (g_maxFrameKey != 0). Every Streamline title validated on §S31's table is
|
||||
// then byte-identical to before the AMD rows existed, which is what a
|
||||
// validated producer is owed. A process where Streamline is loaded and idle --
|
||||
// the plugin present, the token never requested -- falls through to AMD.
|
||||
//
|
||||
// On the AMD side, PREPARE's frameID once a PREPARE has EVER arrived
|
||||
// (g_ffxMaxFrameKey != 0), else the UPSCALE count. Choosing PER PRESENT would
|
||||
// double-count an application frame whose UPSCALE and PREPARE straddle a
|
||||
// present; the latch cannot. A title generating frames from the first frame
|
||||
// counts prepares throughout; a title with frame generation off never issues
|
||||
// one and counts upscales; a title that switches frame generation OFF
|
||||
// mid-session and stops preparing counts nothing from then on, which the
|
||||
// consumer refuses as a data gap rather than reading as 1.0 -- and which
|
||||
// 03_METRICS says to segment on in any case.
|
||||
const bool slEver = g_frameTokensLive.load(std::memory_order_relaxed) != 0 &&
|
||||
g_maxFrameKey.load(std::memory_order_relaxed) != 0u;
|
||||
const bool ffxPreparesEver = g_ffxMaxFrameKey.load(std::memory_order_relaxed) != 0u;
|
||||
const uint32_t ffxApp = ffxPreparesEver ? ffxPrepares : ffxUpscales;
|
||||
rec.fgEvaluations = fl::slseen::SaturateToByte(slEver ? tokens : ffxApp);
|
||||
rec.measuredMask = static_cast<uint16_t>(rec.measuredMask | FL_MEASURED_FG_COUNTS);
|
||||
}
|
||||
|
||||
|
||||
@@ -163,6 +163,22 @@ enum FlUpscaler : uint8_t {
|
||||
// across two languages is transcription risk for a cosmetic gain.
|
||||
FL_UPSCALER_NONE = 8,
|
||||
|
||||
// FSR THROUGH THE SDK 2.x UPSCALER DLL, VERSION NOT NAMED (2026-09-04). The
|
||||
// ffx-api dispatch descriptor says "upscale" and not which provider answered:
|
||||
// one amd_fidelityfx_upscaler_dx12.dll hosts FSR 3.1 AND FSR 4, the version is
|
||||
// chosen at context creation through an opaque id the title got from ffxQuery,
|
||||
// and reading that back is out of scope. FL_UPSCALER_FSR3 from that leaf would
|
||||
// be right on every non-RDNA4 machine and a fabrication on one; FL_UPSCALER_UNKNOWN
|
||||
// would print the very N/A the AMD hook exists to remove. So: FSR, measured,
|
||||
// version unnamed -- while the SDK 1.1.x monolith, which hosts FSR 3.1 only,
|
||||
// still decodes to FL_UPSCALER_FSR3. FSR4 stays reserved for a writer that can
|
||||
// actually tell.
|
||||
//
|
||||
// AN ENUMERATOR, NOT A FIELD (the FL_FEAT_SL_UNDECODED precedent): no struct
|
||||
// change, no FL_SHM_LAYOUT_VERSION bump, no fl-layout-dump entry. The byte and
|
||||
// its offset are unchanged; ShmLayout.cs gains the same member.
|
||||
FL_UPSCALER_FSR_UNVERSIONED = 9,
|
||||
|
||||
FL_UPSCALER_UNKNOWN = 0xFF,
|
||||
};
|
||||
|
||||
|
||||
@@ -3234,6 +3234,244 @@ TEST_CASE("application-frame tokens are COUNTED, and the count tracks the fixtur
|
||||
|
||||
namespace {
|
||||
|
||||
// What one --hold-presenting-ffx run yields, drained after the AMD rows are live.
|
||||
struct FfxObservation {
|
||||
std::uint32_t census = 0;
|
||||
std::size_t drained = 0;
|
||||
std::uint64_t sigma = 0; // sum of fgEvaluations over the window
|
||||
std::uint32_t hooks = 0;
|
||||
std::uint32_t faults = 0;
|
||||
bool everyRecordClaimsCounts = true;
|
||||
bool modeIsNeverNone = true;
|
||||
std::size_t measured = 0; // records claiming FL_MEASURED_UPSCALER
|
||||
std::size_t identified = 0; // records naming the EXPECTED FSR value
|
||||
std::size_t claimedDlss = 0;
|
||||
std::size_t claimedNone = 0;
|
||||
std::size_t paramsRecords = 0;
|
||||
std::size_t wrongExtent = 0;
|
||||
std::size_t valueWithoutBit = 0;
|
||||
std::size_t dishonestParams = 0;
|
||||
std::size_t fsrFgRecords = 0;
|
||||
};
|
||||
|
||||
// Inject into an ffx-api target and drain a post-install window.
|
||||
//
|
||||
// ONE HELPER FOR EVERY COMBINATION -- both topologies, both K values, PREPARE on and
|
||||
// off -- for the reason ObserveFg gives: two hand-written cases let one acquire a
|
||||
// tolerance the other does not have, and the pair stops discriminating the moment
|
||||
// they differ.
|
||||
bool ObserveFfx(int presentsPerEval, bool topology2x, bool prepare, fl::FlUpscaler expected, FfxObservation& out) {
|
||||
Child child;
|
||||
std::wstring cmd = std::wstring(L"\"") + FL_HARNESS_EXE + L"\" --real --presents-per-eval " +
|
||||
std::to_wstring(presentsPerEval) + (topology2x ? L" --ffx-topology 2x" : L" --ffx-topology 1x") +
|
||||
(prepare ? L"" : L" --ffx-no-prepare") + L" --hold-presenting-ffx 14";
|
||||
STARTUPINFOW si{};
|
||||
si.cb = sizeof(si);
|
||||
if (!CreateProcessW(FL_HARNESS_EXE, cmd.data(), nullptr, nullptr, FALSE, CREATE_NO_WINDOW, nullptr, nullptr, &si,
|
||||
&child.pi)) {
|
||||
return false;
|
||||
}
|
||||
Sleep(800);
|
||||
if (WaitForSingleObject(child.pi.hProcess, 0) != WAIT_TIMEOUT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ResetFake();
|
||||
g.modules = {"kernel32.dll"};
|
||||
g.scanSet = {child.pi.dwProcessId};
|
||||
if (!GuardedInjectWithSources(child.pi.dwProcessId, FL_OVERLAY_DLL, FakeSources()).Allowed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
wchar_t name[128]{};
|
||||
if (_snwprintf_s(name, _TRUNCATE, L"Local\\FrameLedger.Ring.%lu", child.pi.dwProcessId) <= 0) {
|
||||
return false;
|
||||
}
|
||||
HANDLE mapping = nullptr;
|
||||
for (int i = 0; i < 100 && mapping == nullptr; ++i) {
|
||||
mapping = OpenFileMappingW(FILE_MAP_READ, FALSE, name);
|
||||
if (mapping == nullptr) {
|
||||
Sleep(50);
|
||||
}
|
||||
}
|
||||
if (mapping == nullptr) {
|
||||
return false;
|
||||
}
|
||||
const void* base = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0);
|
||||
if (base == nullptr) {
|
||||
CloseHandle(mapping);
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto* st =
|
||||
reinterpret_cast<const fl::FlWriterState*>(static_cast<const unsigned char*>(base) + FL_SHM_WRITER_OFFSET);
|
||||
for (int i = 0; i < 100 && st->status != fl::FL_STATUS_READY; ++i) {
|
||||
Sleep(50);
|
||||
}
|
||||
|
||||
// ONE ROW PUBLISHES ALL THREE FAMILIES, so the FG_EVALUATIONS wait is the same wait
|
||||
// as identity's -- kept anyway, so the assertion is about the family the count is
|
||||
// entitled by rather than about which bit happened to be set first.
|
||||
bool ok = st->status == fl::FL_STATUS_READY && WaitForIdentityHook(st) &&
|
||||
WaitForHookFamily(st, static_cast<uint32_t>(fl::FL_HOOK_FG_EVALUATIONS));
|
||||
if (ok) {
|
||||
fl::RingReader rd;
|
||||
ok = rd.Init(base, FL_SHM_DEFAULT_CAPACITY);
|
||||
if (ok) {
|
||||
DiscardBacklog(rd);
|
||||
const std::vector<fl::FlFrameRecord> all = DrainAtLeast(rd, 60, 9000);
|
||||
out.drained = all.size();
|
||||
for (const auto& r : all) {
|
||||
out.sigma += r.fgEvaluations;
|
||||
if ((r.measuredMask & fl::FL_MEASURED_FG_COUNTS) == 0u) {
|
||||
out.everyRecordClaimsCounts = false;
|
||||
}
|
||||
if (r.fgMode == fl::FL_FG_NONE) {
|
||||
out.modeIsNeverNone = false;
|
||||
}
|
||||
if (r.fgMode == fl::FL_FG_FSR_FG) {
|
||||
++out.fsrFgRecords;
|
||||
}
|
||||
if ((r.measuredMask & fl::FL_MEASURED_UPSCALER) != 0u) {
|
||||
++out.measured;
|
||||
}
|
||||
if (r.upscaler == expected) {
|
||||
++out.identified;
|
||||
}
|
||||
if (r.upscaler == fl::FL_UPSCALER_DLSS) {
|
||||
++out.claimedDlss;
|
||||
}
|
||||
if (r.upscaler == fl::FL_UPSCALER_NONE) {
|
||||
++out.claimedNone;
|
||||
}
|
||||
if ((r.measuredMask & fl::FL_MEASURED_UPSCALER_PARAMS) != 0u) {
|
||||
++out.paramsRecords;
|
||||
if (r.upscalerQuality == 0u || r.upscalerSharpness != 0xFFu) {
|
||||
++out.dishonestParams;
|
||||
}
|
||||
if (r.renderW != FL_TAGGED_RENDER_W || r.renderH != FL_TAGGED_RENDER_H) {
|
||||
++out.wrongExtent;
|
||||
}
|
||||
} else if (r.renderW != 0u || r.renderH != 0u) {
|
||||
++out.valueWithoutBit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
out.hooks = st->hooksInstalledMask;
|
||||
out.census = st->runtimeCensus;
|
||||
out.faults = st->faultCount;
|
||||
|
||||
UnmapViewOfFile(base);
|
||||
CloseHandle(mapping);
|
||||
return ok;
|
||||
}
|
||||
|
||||
// The assertions every combination shares. Catch2's CHECK works from a helper, and
|
||||
// one helper is what keeps the four runs asserting ONE expression.
|
||||
void AssertFfxWindow(const FfxObservation& obs, int k) {
|
||||
CAPTURE(obs.drained);
|
||||
CAPTURE(obs.sigma);
|
||||
CAPTURE(obs.measured);
|
||||
CAPTURE(obs.identified);
|
||||
CAPTURE(obs.paramsRecords);
|
||||
CAPTURE(obs.fsrFgRecords);
|
||||
|
||||
// A COUNT OF ZERO FAILS HERE RATHER THAN DIVIDING BY IT.
|
||||
REQUIRE(obs.sigma >= 8u);
|
||||
|
||||
// THE SAME TOLERANCE THE TOKEN TEST DERIVES, for the same arithmetic: each
|
||||
// application frame is followed by exactly K presents. A writer counting PREPARE
|
||||
// CALLS (two per frame) reads 2x here at K = 1; a writer that also hooked the
|
||||
// loader reads 2x on the 2.x topology; a writer counting presents reads K x K.
|
||||
const long long drained = static_cast<long long>(obs.drained);
|
||||
const long long expected = static_cast<long long>(obs.sigma) * k;
|
||||
const long long diff = drained > expected ? drained - expected : expected - drained;
|
||||
CHECK(diff <= k);
|
||||
|
||||
CHECK(obs.everyRecordClaimsCounts);
|
||||
CHECK(obs.modeIsNeverNone);
|
||||
CHECK(obs.faults == 0u);
|
||||
|
||||
// Identity is claimed on every record once a leaf is hooked, and NAMED on the
|
||||
// presents that drained an UPSCALE -- one per application frame, so sigma of them
|
||||
// within a record of drain alignment. Never DLSS, never NONE.
|
||||
CHECK(obs.measured == obs.drained);
|
||||
CHECK(obs.identified + 1 >= obs.sigma);
|
||||
CHECK(obs.identified <= obs.sigma + 1);
|
||||
CHECK(obs.claimedDlss == 0u);
|
||||
CHECK(obs.claimedNone == 0u);
|
||||
|
||||
// renderW/H come off the descriptor the harness built, so the EXACT tagged extent
|
||||
// and nothing else; quality and sharpness are 0xFF on every record that claims the
|
||||
// bit; no value leaks onto a record whose bit is clear.
|
||||
CHECK(obs.paramsRecords + 1 >= obs.sigma);
|
||||
CHECK(obs.wrongExtent == 0u);
|
||||
CHECK(obs.valueWithoutBit == 0u);
|
||||
CHECK(obs.dishonestParams == 0u);
|
||||
|
||||
// FSR_FG is named on the presents that drained a FRAMEGENERATION dispatch -- one
|
||||
// per application frame at K > 1, none at all at K = 1. The K = 1 half is what
|
||||
// stops a writer from naming frame generation off the PREPARE alone.
|
||||
if (k > 1) {
|
||||
CHECK(obs.fsrFgRecords + 1 >= obs.sigma);
|
||||
} else {
|
||||
CHECK(obs.fsrFgRecords == 0u);
|
||||
}
|
||||
|
||||
// EQUALITY, not a bit test, for the reason the token test gives: the compound
|
||||
// family constant is the one value no gate reads.
|
||||
CHECK(obs.hooks == static_cast<std::uint32_t>(fl::FL_HOOK_PRESENT | fl::FL_HOOK_UPSCALER_IDENTITY |
|
||||
fl::FL_HOOK_UPSCALER_PARAMS | fl::FL_HOOK_FG_EVALUATIONS));
|
||||
CHECK((obs.census & fl::FL_CENSUS_RAN) != 0u);
|
||||
CHECK((obs.census & fl::FL_CENSUS_SL_INTERPOSER) == 0u);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_CASE("FSR through the SDK 2.x leaves behind a loader: identified, extent exact, and the count tracks K",
|
||||
"[guard][inject][shm][ffx]") {
|
||||
// THE LOADER IS IN THE CHAIN AND IS NOT HOOKED. Every dispatch enters through the
|
||||
// loader decoy's ffxDispatch and reaches a leaf through the leaf's, so a writer that
|
||||
// had a row for the loader would count each one twice -- and the K = 1 control below
|
||||
// would read 2.0 where it must read 1.0. That is the property the rows' leaf-only
|
||||
// scoping claims, made falsifiable.
|
||||
for (const int k : {1, 4}) {
|
||||
CAPTURE(k);
|
||||
FfxObservation obs;
|
||||
REQUIRE(ObserveFfx(k, /*topology2x=*/true, /*prepare=*/true, fl::FL_UPSCALER_FSR_UNVERSIONED, obs));
|
||||
AssertFfxWindow(obs, k);
|
||||
|
||||
// The census sees the two SDK 2.x leaves by name and NOT the monolith -- and
|
||||
// the frame-generation leaf is in the FG group, so a title on this shape prints
|
||||
// the WARNING shape only when nothing was measured, which here it was.
|
||||
CHECK((obs.census & fl::FL_CENSUS_AMD_FFX_UPSCALER) != 0u);
|
||||
CHECK((obs.census & fl::FL_CENSUS_AMD_FFX_FRAMEGENERATION) != 0u);
|
||||
CHECK((obs.census & fl::FL_CENSUS_AMD_FFX_DX12) == 0u);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("the SDK 1.1.x monolith is FSR3; with no PREPARE the count falls back to UPSCALE dispatches",
|
||||
"[guard][inject][shm][ffx]") {
|
||||
// TWO SHAPES A 1.1.x TITLE ACTUALLY HAS. Frame generation OFF: no PREPARE is ever
|
||||
// issued, so the application-frame count must come from the UPSCALE dispatches and
|
||||
// K = 1 must still read 1.0 -- a writer that counted only prepares reads sigma = 0
|
||||
// and fails the floor. Frame generation ON at x4: the pre-V2 PREPARE type, read
|
||||
// through the V2 layout the Overlay asserts is prefix-identical.
|
||||
for (const int k : {1, 4}) {
|
||||
CAPTURE(k);
|
||||
FfxObservation obs;
|
||||
REQUIRE(ObserveFfx(k, /*topology2x=*/false, /*prepare=*/k > 1, fl::FL_UPSCALER_FSR3, obs));
|
||||
AssertFfxWindow(obs, k);
|
||||
|
||||
CHECK((obs.census & fl::FL_CENSUS_AMD_FFX_DX12) != 0u);
|
||||
CHECK((obs.census & fl::FL_CENSUS_AMD_FFX_UPSCALER) == 0u);
|
||||
CHECK((obs.census & fl::FL_CENSUS_AMD_FFX_FRAMEGENERATION) == 0u);
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
struct RtObservation {
|
||||
std::size_t drained = 0;
|
||||
std::size_t withAsBuild = 0;
|
||||
|
||||
+40
@@ -203,3 +203,43 @@ target_include_directories(fl_streamline_headers SYSTEM INTERFACE
|
||||
# would stop the Overlay loading in every game that ships no Streamline, in the
|
||||
# loader, before any of our code runs and with no message anywhere. The Overlay
|
||||
# resolves the symbol at runtime, module-scoped, on a module the game loaded.
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# AMD FidelityFX SDK headers (MIT, by exception) — VENDORED, five files, at tag
|
||||
# v2.3.0, for the SAME two reasons as Streamline's and one more.
|
||||
#
|
||||
# WHAT THIS BUYS. The three AMD modules a title ships all export the same five
|
||||
# generic names -- ffxCreateContext, ffxDestroyContext, ffxConfigure, ffxQuery,
|
||||
# ffxDispatch -- so which effect ran is not in the symbol; it is in the
|
||||
# DESCRIPTOR the game passes: ffxApiHeader::type, then renderSize and frameID at
|
||||
# offsets only the vendor's own headers can vouch for. 20_OPEN_QUESTIONS §H11
|
||||
# forbade decoding that struct "from observation", and this target is what
|
||||
# makes the decode a declaration instead of a guess. `PfnFfxDispatch` is
|
||||
#
|
||||
# ffxReturnCode_t (*)(ffxContext* context, const ffxDispatchDescHeader* desc)
|
||||
#
|
||||
# two pointers in, a uint32 out, nothing in XMM.
|
||||
#
|
||||
# LICENCE: upstream's docs/license.md is a binary-only default licence with an
|
||||
# MIT exception list, and the list covers every file in the tree (845 of 845,
|
||||
# read off the GitHub tree API on 2026-09-04). The headers carry the grant inline
|
||||
# as well. tools/license-check.ps1 §2d asserts both per vendored file, and
|
||||
# third_party/fidelityfx/README.md records what is excluded and why -- including
|
||||
# why this is tag v2.3.0 and not the v1.1.4 that 18_GPU_VENDOR_APIS first named.
|
||||
#
|
||||
# THREE INCLUDE DIRECTORIES, NOT ONE, because upstream's headers include each
|
||||
# other by relative path and are kept in upstream's own layout so they need no
|
||||
# edit. <ffx_api.h>, <ffx_upscale.h> and <ffx_framegeneration.h> each resolve
|
||||
# from exactly one of them.
|
||||
add_library(fl_fidelityfx_headers INTERFACE)
|
||||
target_include_directories(fl_fidelityfx_headers SYSTEM INTERFACE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/fidelityfx/Kits/FidelityFX/api/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/fidelityfx/Kits/FidelityFX/upscalers/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/fidelityfx/Kits/FidelityFX/framegeneration/include"
|
||||
)
|
||||
# NEVER target_link_libraries anything here, and there is nothing to link in any
|
||||
# case: no .lib is vendored. The entry points are declared FFX_API_ENTRY, which
|
||||
# ffx_api.h defines as __declspec(dllexport) with no import switch -- a
|
||||
# declaration that exports nothing unless something DEFINES it. FrameLedger.Overlay
|
||||
# must never define or take the address of one; hookinventory-check Pass C reads
|
||||
# the built DLL's export table as well as its imports for exactly that.
|
||||
@@ -0,0 +1,213 @@
|
||||
// This file is part of the FidelityFX SDK.
|
||||
//
|
||||
// Copyright (C) 2026 Advanced Micro Devices, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files(the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions :
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif // #if defined(__cplusplus)
|
||||
|
||||
#define FFX_API_ENTRY __declspec(dllexport)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum FfxApiReturnCodes
|
||||
{
|
||||
FFX_API_RETURN_OK = 0, ///< The oparation was successful.
|
||||
FFX_API_RETURN_ERROR = 1, ///< An error occurred that is not further specified.
|
||||
FFX_API_RETURN_ERROR_UNKNOWN_DESCTYPE = 2, ///< The structure type given was not recognized for the function or context with which it was used. This is likely a programming error.
|
||||
FFX_API_RETURN_ERROR_RUNTIME_ERROR = 3, ///< The underlying runtime (e.g. D3D12, Vulkan) or effect returned an error code.
|
||||
FFX_API_RETURN_NO_PROVIDER = 4, ///< No provider was found for the given structure type. This is likely a programming error.
|
||||
FFX_API_RETURN_ERROR_MEMORY = 5, ///< A memory allocation failed.
|
||||
FFX_API_RETURN_ERROR_PARAMETER = 6, ///< A parameter was invalid, e.g. a null pointer, empty resource or out-of-bounds enum value.
|
||||
FFX_API_RETURN_PROVIDER_NO_SUPPORT_NEW_DESCTYPE = 7, ///< The structure type given is new and not supported in the old provider. This is likely fixed with driver upgrade or effect DLL upgrade.
|
||||
};
|
||||
|
||||
typedef void* ffxContext;
|
||||
typedef uint32_t ffxReturnCode_t;
|
||||
|
||||
#define FFX_API_EFFECT_MASK 0x00ff0000u
|
||||
#define FFX_API_BACKEND_MASK 0xff000000u
|
||||
#define FFX_API_EFFECT_ID_GENERAL 0x00000000u
|
||||
|
||||
// Base Descriptor types
|
||||
typedef uint64_t ffxStructType_t;
|
||||
typedef struct ffxApiHeader
|
||||
{
|
||||
ffxStructType_t type; ///< The structure type. Must always be set to the corresponding value for any structure (found nearby with a similar name).
|
||||
struct ffxApiHeader* pNext; ///< Pointer to next structure, used for optional parameters and extensions. Can be null.
|
||||
} ffxApiHeader;
|
||||
|
||||
typedef ffxApiHeader ffxCreateContextDescHeader;
|
||||
typedef ffxApiHeader ffxConfigureDescHeader;
|
||||
typedef ffxApiHeader ffxQueryDescHeader;
|
||||
typedef ffxApiHeader ffxDispatchDescHeader;
|
||||
|
||||
// Extensions for global debug
|
||||
#define FFX_API_CONFIGURE_GLOBALDEBUG_LEVEL_SILENCE 0x0000000u
|
||||
#define FFX_API_CONFIGURE_GLOBALDEBUG_LEVEL_ERRORS 0x0000001u
|
||||
#define FFX_API_CONFIGURE_GLOBALDEBUG_LEVEL_WARNINGS 0x0000002u
|
||||
#define FFX_API_CONFIGURE_GLOBALDEBUG_LEVEL_VERBOSE 0xfffffffu
|
||||
|
||||
enum FfxApiMsgType
|
||||
{
|
||||
FFX_API_MESSAGE_TYPE_ERROR = 0,
|
||||
FFX_API_MESSAGE_TYPE_WARNING = 1,
|
||||
FFX_API_MESSAGE_TYPE_COUNT
|
||||
};
|
||||
|
||||
typedef void (*ffxApiMessage)(uint32_t type, const wchar_t* message);
|
||||
|
||||
#define FFX_API_CONFIGURE_DESC_TYPE_GLOBALDEBUG1 0x0000001u
|
||||
struct ffxConfigureDescGlobalDebug1
|
||||
{
|
||||
ffxConfigureDescHeader header;
|
||||
ffxApiMessage fpMessage;
|
||||
uint32_t debugLevel;
|
||||
};
|
||||
|
||||
#define FFX_API_CONFIGURE_DESC_TYPE_GLOBALDEBUG 7u
|
||||
struct ffxConfigureDescGlobalDebug
|
||||
{
|
||||
ffxConfigureDescHeader header;
|
||||
uint64_t effectId;
|
||||
ffxApiMessage fpMessage; ///< A pointer to a function that can receive messages from the runtime. May be null.
|
||||
uint32_t debugLevel;
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_GET_VERSIONS 4u
|
||||
struct ffxQueryDescGetVersions
|
||||
{
|
||||
ffxQueryDescHeader header;
|
||||
uint64_t createDescType; ///< Create description for the effect whose versions should be enumerated.
|
||||
void* device; ///< For DX12: pointer to ID3D12Device.
|
||||
uint64_t *outputCount; ///< Input capacity of id and name arrays. Output number of returned versions. If initially zero, output is number of available versions.
|
||||
uint64_t *versionIds; ///< Output array of version ids to be used as version overrides. If null, only names and count are returned.
|
||||
const char** versionNames; ///< Output array of version names for display. If null, only ids and count are returned. If both this and versionIds are null, only count is returned.
|
||||
};
|
||||
|
||||
#define FFX_API_DESC_TYPE_OVERRIDE_VERSION 5u
|
||||
struct ffxOverrideVersion
|
||||
{
|
||||
ffxApiHeader header;
|
||||
uint64_t versionId; ///< Id of version to use. Must be a value returned from a query in ffxQueryDescGetVersions.versionIds array.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_GET_PROVIDER_VERSION 6u
|
||||
struct ffxQueryGetProviderVersion
|
||||
{
|
||||
ffxQueryDescHeader header;
|
||||
uint64_t versionId; ///< Id of provider being used for queried context. 0 if invalid.
|
||||
const char* versionName; ///< Version name for display. If nullptr, the query was invalid.
|
||||
};
|
||||
|
||||
// Memory allocation function. Must return a valid pointer to at least size bytes of memory aligned to hold any type.
|
||||
// May return null to indicate failure. Standard library malloc fulfills this requirement.
|
||||
typedef void* (*ffxAlloc)(void* pUserData, uint64_t size);
|
||||
|
||||
// Memory deallocation function. May be called with null pointer as second argument.
|
||||
typedef void (*ffxDealloc)(void* pUserData, void* pMem);
|
||||
|
||||
typedef struct ffxAllocationCallbacks
|
||||
{
|
||||
void* pUserData;
|
||||
ffxAlloc alloc;
|
||||
ffxDealloc dealloc;
|
||||
} ffxAllocationCallbacks;
|
||||
|
||||
// Creates a FFX object context.
|
||||
// Depending on the desc structures provided to this function, the context will be created with the desired version and attributes.
|
||||
// Non-zero return indicates error code.
|
||||
// Pointers passed in desc must remain live until ffxDestroyContext is called on the context.
|
||||
// MemCb may be null; the system allocator (malloc/free) will be used in this case.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxCreateContext(ffxContext* context, ffxCreateContextDescHeader* desc, const ffxAllocationCallbacks* memCb);
|
||||
typedef ffxReturnCode_t (*PfnFfxCreateContext)(ffxContext* context, ffxCreateContextDescHeader* desc, const ffxAllocationCallbacks* memCb);
|
||||
|
||||
// Destroys an FFX object context.
|
||||
// Non-zero return indicates error code.
|
||||
// MemCb must be compatible with the callbacks passed into ffxCreateContext.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxDestroyContext(ffxContext* context, const ffxAllocationCallbacks* memCb);
|
||||
typedef ffxReturnCode_t (*PfnFfxDestroyContext)(ffxContext* context, const ffxAllocationCallbacks* memCb);
|
||||
|
||||
// Configures the provided FFX object context.
|
||||
// If context is null, configure operates on any global state.
|
||||
// Non-zero return indicates error code.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxConfigure(ffxContext* context, const ffxConfigureDescHeader* desc);
|
||||
typedef ffxReturnCode_t (*PfnFfxConfigure)(ffxContext* context, const ffxConfigureDescHeader* desc);
|
||||
|
||||
// Queries the provided FFX object context.
|
||||
// If context is null, query operates on any global state.
|
||||
// Non-zero return indicates error code.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxQuery(ffxContext* context, ffxQueryDescHeader* desc);
|
||||
typedef ffxReturnCode_t (*PfnFfxQuery)(ffxContext* context, ffxQueryDescHeader* desc);
|
||||
|
||||
// Dispatches work on the given FFX object context defined by the dispatch descriptor.
|
||||
// Non-zero return indicates error code.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxDispatch(ffxContext* context, const ffxDispatchDescHeader* desc);
|
||||
typedef ffxReturnCode_t (*PfnFfxDispatch)(ffxContext* context, const ffxDispatchDescHeader* desc);
|
||||
|
||||
// FFX_API_EFFECT_IDs
|
||||
#define FFX_API_EFFECT_ID_UPSCALE 0x00010000u
|
||||
#define FFX_API_EFFECT_ID_FRAMEGENERATION 0x00020000u
|
||||
#define FFX_API_EFFECT_ID_FRAMEGENERATIONSWAPCHAIN 0x00030000u
|
||||
// Need to keep this ID around for the deprecated VK frame gen swapchain
|
||||
#define FFX_API_EFFECT_ID_FRAMEGENERATIONSWAPCHAIN_VK 0x00040000u
|
||||
// Need to keep this ID around for the deprecated VK frame gen swapchain
|
||||
#define FFX_API_EFFECT_ID_DENOISER 0x00050000u
|
||||
#define FFX_API_EFFECT_ID_RADIANCECACHE 0x00060000u
|
||||
|
||||
#define FFX_API_MAKE_EFFECT_SUB_ID(effectId, subversion) ((effectId & FFX_API_EFFECT_MASK) | (subversion & ~FFX_API_EFFECT_MASK))
|
||||
|
||||
// FFX_APID_BACKEND_IDs
|
||||
#define FFX_API_BACKEND_ID_DX12 0x00000000u
|
||||
#define FFX_API_BACKEND_ID_XBOX 0x01000000u
|
||||
#define FFX_API_BACKEND_ID_VK 0x02000000u // For new effects going forward, please use this backend ID for vulkan specifics
|
||||
|
||||
#define FFX_API_MAKE_BACKEND_SUB_ID(backendId, subversion) ((backendId & FFX_API_BACKEND_MASK) | (subversion & ~FFX_API_BACKEND_MASK))
|
||||
|
||||
// Combiner for BACKEND-specific EFFECT sub-Ids
|
||||
#define FFX_API_MAKE_BACKEND_EFFECT_SUB_ID(backendId, effectId, subversion) ((subversion & ~FFX_API_EFFECT_MASK) | (effectId & FFX_API_EFFECT_MASK) | (backendId & FFX_API_BACKEND_MASK) | (subversion & ~(FFX_API_BACKEND_MASK | FFX_API_EFFECT_MASK)))
|
||||
|
||||
// Pragma macros for controlling warnings so that deprecations take affect externally but can be suppressed internally.
|
||||
// This is so we can maintain the API/ABI until we are ready to make the breaking change.
|
||||
// These are sadly compiler specific.
|
||||
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
#define FFX_PRAGMA_WARNING_PUSH warning( push )
|
||||
#define FFX_PRAGMA_WARNING_POP warning( pop )
|
||||
#define FFX_PRAGMA_WARNING_DISABLE_DEPRECATIONS warning( disable: 4996 )
|
||||
#define FFX_PRAGMA_WARNING_WARN_DEPRECATIONS warning( default: 4996 )
|
||||
#elif defined(__clang__) || defined(__GNUC__)
|
||||
#define FFX_PRAGMA_WARNING_PUSH GCC diagnostic push
|
||||
#define FFX_PRAGMA_WARNING_POP GCC diagnostic pop
|
||||
#define FFX_PRAGMA_WARNING_DISABLE_DEPRECATIONS GCC diagnostic ignored "-Wdeprecated"
|
||||
#define FFX_PRAGMA_WARNING_WARN_DEPRECATIONS GCC diagnostic warning "-Wdeprecated"
|
||||
#else
|
||||
#define FFX_PRAGMA_WARNING_PUSH
|
||||
#define FFX_PRAGMA_WARNING_POP
|
||||
#define FFX_PRAGMA_WARNING_DISABLE_DEPRECATIONS
|
||||
#endif
|
||||
|
||||
#define FFX_DEPRECATION(message) [[deprecated(message)]]
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif // #if defined(__cplusplus)
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
// This file is part of the FidelityFX SDK.
|
||||
//
|
||||
// Copyright (C) 2026 Advanced Micro Devices, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files(the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions :
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/// An enumeration of surface formats. Needs to match enum FfxApiSurfaceFormat
|
||||
enum FfxApiSurfaceFormat
|
||||
{
|
||||
FFX_API_SURFACE_FORMAT_UNKNOWN, ///< Unknown format
|
||||
FFX_API_SURFACE_FORMAT_R32G32B32A32_TYPELESS, ///< 32 bit per channel, 4 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R32G32B32A32_UINT, ///< 32 bit per channel, 4 channel uint format
|
||||
FFX_API_SURFACE_FORMAT_R32G32B32A32_FLOAT, ///< 32 bit per channel, 4 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R16G16B16A16_FLOAT, ///< 16 bit per channel, 4 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R32G32B32_FLOAT, ///< 32 bit per channel, 3 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R32G32_FLOAT, ///< 32 bit per channel, 2 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R8_UINT, ///< 8 bit per channel, 1 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R32_UINT, ///< 32 bit per channel, 1 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R8G8B8A8_TYPELESS, ///< 8 bit per channel, 4 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R8G8B8A8_UNORM, ///< 8 bit per channel, 4 channel unsigned normalized format
|
||||
FFX_API_SURFACE_FORMAT_R8G8B8A8_SNORM, ///< 8 bit per channel, 4 channel signed normalized format
|
||||
FFX_API_SURFACE_FORMAT_R8G8B8A8_SRGB, ///< 8 bit per channel, 4 channel srgb normalized
|
||||
FFX_API_SURFACE_FORMAT_B8G8R8A8_TYPELESS, ///< 8 bit per channel, 4 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_B8G8R8A8_UNORM, ///< 8 bit per channel, 4 channel unsigned normalized format
|
||||
FFX_API_SURFACE_FORMAT_B8G8R8A8_SRGB, ///< 8 bit per channel, 4 channel srgb normalized
|
||||
FFX_API_SURFACE_FORMAT_R11G11B10_FLOAT, ///< 32 bit 3 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R10G10B10A2_UNORM, ///< 10 bit per 3 channel, 2 bit for 1 channel normalized format
|
||||
FFX_API_SURFACE_FORMAT_R16G16_FLOAT, ///< 16 bit per channel, 2 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R16G16_UINT, ///< 16 bit per channel, 2 channel unsigned int format
|
||||
FFX_API_SURFACE_FORMAT_R16G16_SINT, ///< 16 bit per channel, 2 channel signed int format
|
||||
FFX_API_SURFACE_FORMAT_R16_FLOAT, ///< 16 bit per channel, 1 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R16_UINT, ///< 16 bit per channel, 1 channel unsigned int format
|
||||
FFX_API_SURFACE_FORMAT_R16_UNORM, ///< 16 bit per channel, 1 channel unsigned normalized format
|
||||
FFX_API_SURFACE_FORMAT_R16_SNORM, ///< 16 bit per channel, 1 channel signed normalized format
|
||||
FFX_API_SURFACE_FORMAT_R8_UNORM, ///< 8 bit per channel, 1 channel unsigned normalized format
|
||||
FFX_API_SURFACE_FORMAT_R8G8_UNORM, ///< 8 bit per channel, 2 channel unsigned normalized format
|
||||
FFX_API_SURFACE_FORMAT_R8G8_UINT, ///< 8 bit per channel, 2 channel unsigned integer format
|
||||
FFX_API_SURFACE_FORMAT_R32_FLOAT, ///< 32 bit per channel, 1 channel float format
|
||||
FFX_API_SURFACE_FORMAT_R9G9B9E5_SHAREDEXP, ///< 9 bit per channel, 5 bit exponent format
|
||||
|
||||
FFX_API_SURFACE_FORMAT_R16G16B16A16_TYPELESS, ///< 16 bit per channel, 4 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R32G32_TYPELESS, ///< 32 bit per channel, 2 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R10G10B10A2_TYPELESS, ///< 10 bit per 3 channel, 2 bit for 1 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R16G16_TYPELESS, ///< 16 bit per channel, 2 channel typless format
|
||||
FFX_API_SURFACE_FORMAT_R16_TYPELESS, ///< 16 bit per channel, 1 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R8_TYPELESS, ///< 8 bit per channel, 1 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R8G8_TYPELESS, ///< 8 bit per channel, 2 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R32_TYPELESS, ///< 32 bit per channel, 1 channel typeless format
|
||||
FFX_API_SURFACE_FORMAT_R32G32_UINT, ///< 32 bit per channel, 2 channel uint format
|
||||
|
||||
FFX_API_SURFACE_FORMAT_R8_SNORM, ///< 8 bit per channel, 1 channel signed normalized format
|
||||
};
|
||||
|
||||
/// An enumeration of resource usage.
|
||||
enum FfxApiResourceUsage
|
||||
{
|
||||
FFX_API_RESOURCE_USAGE_READ_ONLY = 0, ///< No usage flags indicate a resource is read only.
|
||||
FFX_API_RESOURCE_USAGE_RENDERTARGET = (1<<0), ///< Indicates a resource will be used as render target.
|
||||
FFX_API_RESOURCE_USAGE_UAV = (1<<1), ///< Indicates a resource will be used as UAV.
|
||||
FFX_API_RESOURCE_USAGE_DEPTHTARGET = (1<<2), ///< Indicates a resource will be used as depth target.
|
||||
FFX_API_RESOURCE_USAGE_INDIRECT = (1<<3), ///< Indicates a resource will be used as indirect argument buffer
|
||||
FFX_API_RESOURCE_USAGE_ARRAYVIEW = (1<<4), ///< Indicates a resource that will generate array views. Works on 2D and cubemap textures
|
||||
FFX_API_RESOURCE_USAGE_STENCILTARGET = (1<<5), ///< Indicates a resource will be used as stencil target.
|
||||
|
||||
FFX_API_RESOURCE_USAGE_DCC_RENDERTARGET = (1<<15), ///< Indicates a resource that should specify optimal render target memory access flags (for console use)
|
||||
};
|
||||
|
||||
|
||||
/// An enumeration of resource states.
|
||||
enum FfxApiResourceState
|
||||
{
|
||||
FFX_API_RESOURCE_STATE_COMMON = (1 << 0),
|
||||
FFX_API_RESOURCE_STATE_UNORDERED_ACCESS = (1 << 1), ///< Indicates a resource is in the state to be used as UAV.
|
||||
FFX_API_RESOURCE_STATE_COMPUTE_READ = (1 << 2), ///< Indicates a resource is in the state to be read by compute shaders.
|
||||
FFX_API_RESOURCE_STATE_PIXEL_READ = (1 << 3), ///< Indicates a resource is in the state to be read by pixel shaders.
|
||||
FFX_API_RESOURCE_STATE_PIXEL_COMPUTE_READ = (FFX_API_RESOURCE_STATE_PIXEL_READ | FFX_API_RESOURCE_STATE_COMPUTE_READ), ///< Indicates a resource is in the state to be read by pixel or compute shaders.
|
||||
FFX_API_RESOURCE_STATE_COPY_SRC = (1 << 4), ///< Indicates a resource is in the state to be used as source in a copy command.
|
||||
FFX_API_RESOURCE_STATE_COPY_DEST = (1 << 5), ///< Indicates a resource is in the state to be used as destination in a copy command.
|
||||
FFX_API_RESOURCE_STATE_GENERIC_READ = (FFX_API_RESOURCE_STATE_COPY_SRC | FFX_API_RESOURCE_STATE_COMPUTE_READ), ///< Indicates a resource is in generic (slow) read state.
|
||||
FFX_API_RESOURCE_STATE_INDIRECT_ARGUMENT = (1 << 6), ///< Indicates a resource is in the state to be used as an indirect command argument
|
||||
FFX_API_RESOURCE_STATE_PRESENT = (1 << 7), ///< Indicates a resource is in the state to be used to present to the swap chain
|
||||
FFX_API_RESOURCE_STATE_RENDER_TARGET = (1 << 8), ///< Indicates a resource is in the state to be used as render target
|
||||
FFX_API_RESOURCE_STATE_DEPTH_ATTACHMENT = (1 << 9), ///< Indicates a resource is in the state to be used as depth attachment
|
||||
};
|
||||
|
||||
/// An enumeration of surface dimensions.
|
||||
enum FfxApiResourceDimension
|
||||
{
|
||||
FFX_API_RESOURCE_DIMENSION_TEXTURE_1D, ///< A resource with a single dimension.
|
||||
FFX_API_RESOURCE_DIMENSION_TEXTURE_2D, ///< A resource with two dimensions.
|
||||
};
|
||||
|
||||
/// An enumeration of resource flags.
|
||||
enum FfxApiResourceFlags
|
||||
{
|
||||
FFX_API_RESOURCE_FLAGS_NONE = 0, ///< No flags.
|
||||
FFX_API_RESOURCE_FLAGS_ALIASABLE = (1 << 0), ///< A bit indicating a resource does not need to persist across frames.
|
||||
FFX_API_RESOURCE_FLAGS_UNDEFINED = (1 << 1), ///< Special case flag used internally when importing resources that require additional setup
|
||||
};
|
||||
|
||||
// An enumeration for different resource types
|
||||
enum FfxApiResourceType
|
||||
{
|
||||
FFX_API_RESOURCE_TYPE_BUFFER, ///< The resource is a buffer.
|
||||
FFX_API_RESOURCE_TYPE_TEXTURE1D, ///< The resource is a 1-dimensional texture.
|
||||
FFX_API_RESOURCE_TYPE_TEXTURE2D, ///< The resource is a 2-dimensional texture.
|
||||
FFX_API_RESOURCE_TYPE_TEXTURE_CUBE, ///< The resource is a cube map.
|
||||
FFX_API_RESOURCE_TYPE_TEXTURE3D, ///< The resource is a 3-dimensional texture.
|
||||
};
|
||||
|
||||
enum FfxApiBackbufferTransferFunction
|
||||
{
|
||||
FFX_API_BACKBUFFER_TRANSFER_FUNCTION_SRGB,
|
||||
FFX_API_BACKBUFFER_TRANSFER_FUNCTION_PQ,
|
||||
FFX_API_BACKBUFFER_TRANSFER_FUNCTION_SCRGB
|
||||
};
|
||||
|
||||
/// A structure encapsulating a 2-dimensional point, using 32bit unsigned integers.
|
||||
struct FfxApiDimensions2D
|
||||
{
|
||||
uint32_t width; ///< The width of a 2-dimensional range.
|
||||
uint32_t height; ///< The height of a 2-dimensional range.
|
||||
};
|
||||
|
||||
/// A structure encapsulating a 2-dimensional set of floating point coordinates.
|
||||
struct FfxApiFloatCoords2D
|
||||
{
|
||||
float x; ///< The x coordinate of a 2-dimensional point.
|
||||
float y; ///< The y coordinate of a 2-dimensional point.
|
||||
};
|
||||
|
||||
/// A structure encapsulating a 3-dimensional set of floating point coordinates.
|
||||
struct FfxApiFloatCoords3D
|
||||
{
|
||||
float x; ///< The x coordinate of a 3-dimensional point.
|
||||
float y; ///< The y coordinate of a 3-dimensional point.
|
||||
float z; ///< The z coordinate of a 3-dimensional point.
|
||||
};
|
||||
|
||||
/// A structure encapsulating a 2-dimensional rect.
|
||||
struct FfxApiRect2D
|
||||
{
|
||||
int32_t left;
|
||||
int32_t top;
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
};
|
||||
|
||||
/// A structure describing a resource.
|
||||
///
|
||||
/// @ingroup SDKTypes
|
||||
struct FfxApiResourceDescription
|
||||
{
|
||||
uint32_t type; ///< The type of the resource.
|
||||
uint32_t format; ///< The surface format.
|
||||
union {
|
||||
uint32_t width; ///< The width of the texture resource.
|
||||
uint32_t size; ///< The size of the buffer resource.
|
||||
};
|
||||
|
||||
union {
|
||||
uint32_t height; ///< The height of the texture resource.
|
||||
uint32_t stride; ///< The stride of the buffer resource.
|
||||
};
|
||||
|
||||
union {
|
||||
uint32_t depth; ///< The depth of the texture resource.
|
||||
uint32_t alignment; ///< The alignment of the buffer resource.
|
||||
};
|
||||
|
||||
uint32_t mipCount; ///< Number of mips (or 0 for full mipchain).
|
||||
uint32_t flags; ///< A set of resource flags.
|
||||
uint32_t usage; ///< Resource usage flags.
|
||||
};
|
||||
|
||||
#define FFX_RESOURCE_NAME_SIZE 64
|
||||
|
||||
struct FfxApiResource
|
||||
{
|
||||
void* resource;
|
||||
struct FfxApiResourceDescription description;
|
||||
uint32_t state;
|
||||
};
|
||||
|
||||
//struct definition matches FfxApiEffectMemoryUsage
|
||||
typedef struct FfxApiEffectMemoryUsage
|
||||
{
|
||||
uint64_t totalUsageInBytes;
|
||||
uint64_t aliasableUsageInBytes;
|
||||
} FfxApiEffectMemoryUsage;
|
||||
|
||||
/// A structure describing a constant buffer allocation.
|
||||
///
|
||||
/// @ingroup SDKTypes
|
||||
typedef struct FfxApiConstantBufferAllocation
|
||||
{
|
||||
struct FfxApiResource resource; ///< The resource representing the constant buffer resource.
|
||||
uint64_t handle; ///< The binding handle for the constant buffer
|
||||
|
||||
} FfxApiConstantBufferAllocation;
|
||||
|
||||
/// A function definition for a constant buffer allocation callback
|
||||
/// Used to provide a constant buffer allocator to the calling backend
|
||||
///
|
||||
/// @param [in] data The constant buffer data.
|
||||
/// @param [in] dataSize The size of the constant buffer data.
|
||||
///
|
||||
/// @ingroup SDKTypes
|
||||
typedef FfxApiConstantBufferAllocation(*FfxApiConstantBufferAllocator)(void* data, const uint64_t dataSize);
|
||||
|
||||
/// A 4-component floating point vector
|
||||
typedef struct FfxApiFloat4
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float w;
|
||||
} FfxApiFloat4;
|
||||
|
||||
/// A 4x4 matrix in row-major layout with row-vector convention.
|
||||
/// This is the canonical format expected by FFX APIs.
|
||||
///
|
||||
/// Memory layout: rows[row_index][column_index]
|
||||
/// Mathematical convention: v * M (row vector multiplied by matrix)
|
||||
typedef struct FfxApiMatrix4x4
|
||||
{
|
||||
FfxApiFloat4 rows[4]; ///< Four rows of the matrix. Access as rows[row].x, rows[row].y etc.
|
||||
} FfxApiMatrix4x4;
|
||||
|
||||
/// An inclusive floating-point interval [min, max].
|
||||
/// Valid instances must satisfy min <= max.
|
||||
typedef struct FfxApiFloatBounds
|
||||
{
|
||||
float min; ///< Lower bound of the interval.
|
||||
float max; ///< Upper bound of the interval.
|
||||
} FfxApiFloatBounds;
|
||||
Vendored
+294
@@ -0,0 +1,294 @@
|
||||
// This file is part of the FidelityFX SDK.
|
||||
//
|
||||
// Copyright (C) 2026 Advanced Micro Devices, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files(the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions :
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../api/include/ffx_api.h"
|
||||
#include "ffx_framegeneration_api_types.h"
|
||||
|
||||
#define FFX_FRAMEGENERATION_VERSION_MAJOR 4
|
||||
#define FFX_FRAMEGENERATION_VERSION_MINOR 0
|
||||
#define FFX_FRAMEGENERATION_VERSION_PATCH 1
|
||||
|
||||
#define FFX_FRAMEGENERATION_MAKE_VERSION(major, minor, patch) (((major) << 22) | ((minor) << 12) | (patch))
|
||||
#define FFX_FRAMEGENERATION_VERSION FFX_FRAMEGENERATION_MAKE_VERSION(FFX_FRAMEGENERATION_VERSION_MAJOR, FFX_FRAMEGENERATION_VERSION_MINOR, FFX_FRAMEGENERATION_VERSION_PATCH)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
enum FfxApiCreateContextFramegenerationFlags
|
||||
{
|
||||
FFX_FRAMEGENERATION_ENABLE_ASYNC_WORKLOAD_SUPPORT = (1 << 0), ///< A bit indicating that async compute workloads should be supported. Enables generation work on async compute queues.
|
||||
FFX_FRAMEGENERATION_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS = (1 << 1), ///< A bit indicating if the motion vectors are rendered at display resolution.
|
||||
FFX_FRAMEGENERATION_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION = (1 << 2), ///< A bit indicating that the motion vectors have the jittering pattern applied to them.
|
||||
FFX_FRAMEGENERATION_ENABLE_DEPTH_INVERTED = (1 << 3), ///< A bit indicating that the input depth buffer data provided is inverted [1..0].
|
||||
FFX_FRAMEGENERATION_ENABLE_DEPTH_INFINITE = (1 << 4), ///< A bit indicating that the input depth buffer data provided is using an infinite far plane.
|
||||
FFX_FRAMEGENERATION_ENABLE_HIGH_DYNAMIC_RANGE = (1 << 5), ///< A bit indicating if the input color data provided to all inputs is using a high-dynamic range.
|
||||
FFX_FRAMEGENERATION_ENABLE_DEBUG_CHECKING = (1 << 6), ///< A bit indicating that the runtime should check some API values and report issues.
|
||||
};
|
||||
|
||||
enum FfxApiDispatchFramegenerationFlags
|
||||
{
|
||||
FFX_FRAMEGENERATION_FLAG_DRAW_DEBUG_TEAR_LINES = (1 << 0), ///< A bit indicating that the debug tear lines will be drawn to the generated output.
|
||||
FFX_FRAMEGENERATION_FLAG_DRAW_DEBUG_RESET_INDICATORS = (1 << 1), ///< A bit indicating that the debug reset indicators will be drawn to the generated output.
|
||||
FFX_FRAMEGENERATION_FLAG_DRAW_DEBUG_VIEW = (1 << 2), ///< A bit indicating that the generated output resource will contain debug views with relevant information.
|
||||
FFX_FRAMEGENERATION_FLAG_NO_SWAPCHAIN_CONTEXT_NOTIFY = (1 << 3), ///< A bit indicating that the context should only run frame interpolation and not modify the swapchain.
|
||||
FFX_FRAMEGENERATION_FLAG_DRAW_DEBUG_PACING_LINES = (1 << 4), ///< A bit indicating that the debug pacing lines will be drawn to the generated output.
|
||||
FFX_FRAMEGENERATION_FLAG_RESERVED_1 = (1 << 5), ///< Reserved for future use.
|
||||
FFX_FRAMEGENERATION_FLAG_RESERVED_2 = (1 << 6), ///< Reserved for future use.
|
||||
};
|
||||
|
||||
enum FfxApiUiCompositionFlags
|
||||
{
|
||||
FFX_FRAMEGENERATION_UI_COMPOSITION_FLAG_USE_PREMUL_ALPHA = (1 << 0), ///< A bit indicating that we use premultiplied alpha for UI composition.
|
||||
FFX_FRAMEGENERATION_UI_COMPOSITION_FLAG_ENABLE_INTERNAL_UI_DOUBLE_BUFFERING = (1 << 1), ///< A bit indicating that the swapchain should doublebuffer the UI resource.
|
||||
};
|
||||
|
||||
#define FFX_API_CREATE_CONTEXT_DESC_TYPE_FRAMEGENERATION FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x01)
|
||||
struct ffxCreateContextDescFrameGeneration
|
||||
{
|
||||
ffxCreateContextDescHeader header; ///< Description header for frame generation context creation.
|
||||
uint32_t flags; ///< A combination of zero or more values from FfxApiCreateContextFramegenerationFlags.
|
||||
struct FfxApiDimensions2D displaySize; ///< The resolution at which both rendered and generated frames will be displayed.
|
||||
struct FfxApiDimensions2D maxRenderSize; ///< The maximum rendering resolution.
|
||||
uint32_t backBufferFormat; ///< The surface format for the backbuffer. One of the values from FfxApiSurfaceFormat.
|
||||
};
|
||||
|
||||
#define FFX_API_CALLBACK_DESC_TYPE_FRAMEGENERATION_PRESENT FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x05)
|
||||
typedef struct ffxCallbackDescFrameGenerationPresent
|
||||
{
|
||||
ffxDispatchDescHeader header; ///< Description header for present callback dispatch.
|
||||
void* device; ///< The GPU device (ID3D12Device for DX12, VkDevice for Vulkan) passed during context creation.
|
||||
void* commandList; ///< A command list (ID3D12GraphicsCommandList for DX12, VkCommandBuffer for Vulkan) that will be executed before presentation.
|
||||
struct FfxApiResource currentBackBuffer; ///< Backbuffer image either rendered or generated.
|
||||
struct FfxApiResource currentUI; ///< UI image for composition if passed. Otherwise empty.
|
||||
struct FfxApiResource outputSwapChainBuffer; ///< Output image that will be presented.
|
||||
bool isGeneratedFrame; ///< true if this frame is generated, false if rendered.
|
||||
uint64_t frameID; ///< Identifier used to select internal resources when async support is enabled. Must increment by exactly one (1) for each frame. Any non-exactly-one difference will reset the frame generation logic.
|
||||
} ffxCallbackDescFrameGenerationPresent;
|
||||
|
||||
#define FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x03)
|
||||
typedef struct ffxDispatchDescFrameGeneration
|
||||
{
|
||||
ffxDispatchDescHeader header; ///< Description header for frame generation dispatch.
|
||||
void* commandList; ///< The command list (ID3D12GraphicsCommandList for DX12, VkCommandBuffer for Vulkan) to record frame generation commands.
|
||||
struct FfxApiResource presentColor; ///< The current presentation color buffer to be used as source for frame generation.
|
||||
struct FfxApiResource outputs[4]; ///< Output destination targets for generated frames (1 for each frame in numGeneratedFrames).
|
||||
uint32_t numGeneratedFrames; ///< The number of frames to generate from the input color target.
|
||||
bool reset; ///< A boolean value which when set to true, indicates the camera has moved discontinuously and frame generation should reset.
|
||||
uint32_t backbufferTransferFunction; ///< The transfer function used to convert frame generation source color data to linear RGB. One of the values from FfxApiBackbufferTransferFunction.
|
||||
float minMaxLuminance[2]; ///< Min and max luminance values (in nits), used when converting HDR colors to linear RGB.
|
||||
struct FfxApiRect2D generationRect; ///< The area of the backbuffer that should be used for frame generation in case only a part of the screen is active (e.g. due to movie bars).
|
||||
uint64_t frameID; ///< Identifier used to select internal resources when async support is enabled. Must increment by exactly one (1) for each frame. Any non-exactly-one difference will reset the frame generation logic.
|
||||
} ffxDispatchDescFrameGeneration;
|
||||
|
||||
typedef ffxReturnCode_t (*FfxApiPresentCallbackFunc)(ffxCallbackDescFrameGenerationPresent* params, void* pUserCtx);
|
||||
typedef ffxReturnCode_t (*FfxApiFrameGenerationDispatchFunc)(ffxDispatchDescFrameGeneration* params, void* pUserCtx);
|
||||
|
||||
#define FFX_API_CONFIGURE_DESC_TYPE_FRAMEGENERATION FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x02)
|
||||
struct ffxConfigureDescFrameGeneration
|
||||
{
|
||||
ffxConfigureDescHeader header; ///< Description header for frame generation configuration.
|
||||
void* swapChain; ///< The swapchain to use with frame generation (IDXGISwapChain for DX12, VkSwapchainKHR for Vulkan).
|
||||
FfxApiPresentCallbackFunc presentCallback; ///< Callback function called when finalizing the frame image for presentation and UI composition.
|
||||
void* presentCallbackUserContext; ///< User context pointer to be passed to the present callback function.
|
||||
FfxApiFrameGenerationDispatchFunc frameGenerationCallback; ///< Callback function called to dispatch frame generation work and generate interpolated frames.
|
||||
void* frameGenerationCallbackUserContext; ///< User context pointer to be passed to the frame generation callback function.
|
||||
bool frameGenerationEnabled; ///< Sets the state of frame generation. Set to false to disable frame generation.
|
||||
bool allowAsyncWorkloads; ///< Sets the state of async workloads. Set to true to enable generation work on async compute.
|
||||
struct FfxApiResource HUDLessColor; ///< The hudless back buffer image to use for UI extraction from backbuffer resource. May be empty.
|
||||
uint32_t flags; ///< Zero or combination of flags from FfxApiDispatchFrameGenerationFlags.
|
||||
bool onlyPresentGenerated; ///< Set to true to only present generated frames.
|
||||
struct FfxApiRect2D generationRect; ///< The area of the backbuffer that should be used for generation in case only a part of the screen is used e.g. due to movie bars
|
||||
uint64_t frameID; ///< Identifier used to select internal resources when async support is enabled. Must increment by exactly one (1) for each frame. Any non-exactly-one difference will reset the frame generation logic.
|
||||
};
|
||||
|
||||
#pragma FFX_PRAGMA_WARNING_PUSH
|
||||
#pragma FFX_PRAGMA_WARNING_DISABLE_DEPRECATIONS
|
||||
|
||||
#define FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x04)
|
||||
struct FFX_DEPRECATION("ffxDispatchDescFrameGenerationPrepare is deprecated, use ffxDispatchDescFrameGenerationPrepareV2") ffxDispatchDescFrameGenerationPrepare
|
||||
{
|
||||
ffxDispatchDescHeader header; ///< Description header for frame generation prepare dispatch.
|
||||
uint64_t frameID; ///< Frame identifier used to select internal resources when async support is enabled. Must increment by exactly one (1) for each frame. Any non-exactly-one difference will reset the frame generation logic.
|
||||
uint32_t flags; ///< Zero or combination of values from FfxApiDispatchFrameGenerationFlags.
|
||||
void* commandList; ///< The command list (ID3D12GraphicsCommandList for DX12, VkCommandBuffer for Vulkan) to record frame generation prepare commands.
|
||||
struct FfxApiDimensions2D renderSize; ///< The dimensions used to render game content, dilatedDepth, dilatedMotionVectors are expected to be of ths size.
|
||||
struct FfxApiFloatCoords2D jitterOffset; ///< The subpixel jitter offset applied to the camera.
|
||||
struct FfxApiFloatCoords2D motionVectorScale; ///< The scale factor to convert motion vectors to UV space. Set to (1.0, 1.0) if motion vectors are already in pixel space, or to renderSize dimensions if motion vectors are in UV space.
|
||||
|
||||
float frameTimeDelta; ///< Time elapsed in milliseconds since the last frame.
|
||||
bool unused_reset; ///< A (currently unused) boolean value which when set to true, indicates FrameGeneration will be called in reset mode
|
||||
float cameraNear; ///< The distance to the near plane of the camera.
|
||||
float cameraFar; ///< The distance to the far plane of the camera. This is used only used in case of non infinite depth.
|
||||
float cameraFovAngleVertical; ///< The camera angle field of view in the vertical direction (expressed in radians).
|
||||
float viewSpaceToMetersFactor; ///< The scale factor to convert view space units to meters
|
||||
struct FfxApiResource depth; ///< The depth buffer data for the current frame.
|
||||
struct FfxApiResource motionVectors; ///< The motion vector data for the current frame.
|
||||
};
|
||||
|
||||
#pragma FFX_PRAGMA_WARNING_POP
|
||||
|
||||
#define FFX_API_CONFIGURE_DESC_TYPE_FRAMEGENERATION_KEYVALUE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x06)
|
||||
struct ffxConfigureDescFrameGenerationKeyValue
|
||||
{
|
||||
ffxConfigureDescHeader header; ///< Description header for frame generation key-value configuration.
|
||||
uint64_t key; ///< Configuration key, member of the FfxApiConfigureFrameGenerationKey enumeration.
|
||||
uint64_t u64; ///< Integer value or enum value to set.
|
||||
void* ptr; ///< Pointer value to set or pointer to value to set.
|
||||
};
|
||||
|
||||
enum FfxApiConfigureFrameGenerationKey
|
||||
{
|
||||
FFX_API_CONFIGURE_FRAMEGENERATION_KEY_DEBUG_VIEW_MODE = 0, ///< A key to set a debug view mode of display.
|
||||
FFX_API_CONFIGURE_FRAMEGENERATION_KEY_DEBUG_VIEW_FLOW_SCALE = 1, ///< A key to set a debug view scale for flow resources.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_FRAMEGENERATION_GPU_MEMORY_USAGE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x07)
|
||||
struct ffxQueryDescFrameGenerationGetGPUMemoryUsage
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Description header for GPU memory usage query.
|
||||
struct FfxApiEffectMemoryUsage* gpuMemoryUsageFrameGeneration; ///< Output pointer to receive GPU memory usage information for frame generation.
|
||||
};
|
||||
|
||||
#define FFX_API_CONFIGURE_DESC_TYPE_FRAMEGENERATION_REGISTERDISTORTIONRESOURCE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x08)
|
||||
//Pass this optional linked struct after ffxConfigureDescFrameGeneration
|
||||
struct ffxConfigureDescFrameGenerationRegisterDistortionFieldResource
|
||||
{
|
||||
ffxConfigureDescHeader header; ///< Description header for distortion field resource configuration.
|
||||
struct FfxApiResource distortionField; ///< A resource containing distortion offset data. Needs to be 2-component (ie. RG). Read by FG shaders via Sample. Pixel value encodes [UV coordinate of pixel after lens distortion effect - UV coordinate of pixel before lens distortion].
|
||||
};
|
||||
|
||||
#define FFX_API_CREATE_CONTEXT_DESC_TYPE_FRAMEGENERATION_HUDLESS FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x09)
|
||||
//Pass this optional linked struct at FG context creation to enable app to use different hudlessBackBufferformat (IE.RGBA8_UNORM) from backBufferFormat (IE. BGRA8_UNORM)
|
||||
struct ffxCreateContextDescFrameGenerationHudless
|
||||
{
|
||||
ffxCreateContextDescHeader header; ///< Description header for hudless context creation.
|
||||
uint32_t hudlessBackBufferFormat; ///< The surface format for the hudless back buffer. One of the values from FfxApiSurfaceFormat.
|
||||
};
|
||||
|
||||
#pragma FFX_PRAGMA_WARNING_PUSH
|
||||
#pragma FFX_PRAGMA_WARNING_DISABLE_DEPRECATIONS
|
||||
|
||||
#define FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_CAMERAINFO FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x0a)
|
||||
// Link this struct after ffxDispatchDescFrameGenerationPrepare. This is a required input to FSR3.1.4 and FSR3.1.5.
|
||||
// These fields are now embedded in ffxDispatchDescFrameGenerationPrepareV2.
|
||||
struct FFX_DEPRECATION("ffxDispatchDescFrameGenerationPrepareCameraInfo is deprecated, use ffxDispatchDescFrameGenerationPrepareV2 instead") ffxDispatchDescFrameGenerationPrepareCameraInfo
|
||||
{
|
||||
ffxConfigureDescHeader header; ///< Description header for camera info configuration.
|
||||
float cameraPosition[3]; ///< The camera position in world space.
|
||||
float cameraUp[3]; ///< The camera up normalized vector in world space.
|
||||
float cameraRight[3]; ///< The camera right normalized vector in world space.
|
||||
float cameraForward[3]; ///< The camera forward normalized vector in world space.
|
||||
};
|
||||
|
||||
#pragma FFX_PRAGMA_WARNING_POP
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_FRAMEGENERATION_GPU_MEMORY_USAGE_V2 FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x0b)
|
||||
struct ffxQueryDescFrameGenerationGetGPUMemoryUsageV2
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Description header for GPU memory usage query.
|
||||
void* device; ///< The GPU device. For DX12: pointer to ID3D12Device. For VK: pointer to VkDeviceContext. App needs to fill out before Query() call.
|
||||
struct FfxApiDimensions2D maxRenderSize; ///< The maximum rendering resolution. App needs to fill out before Query() call.
|
||||
struct FfxApiDimensions2D displaySize; ///< The resolution at which both rendered and generated frames will be displayed. App needs to fill out before Query() call.
|
||||
uint32_t createFlags; ///< Context creation flags. A combination of zero or more values from FfxApiCreateContextFramegenerationFlags. App needs to fill out before Query() call.
|
||||
uint32_t dispatchFlags; ///< Dispatch flags. A combination of zero or more values from FfxApiDispatchFrameGenerationFlags. App needs to fill out before Query() call.
|
||||
uint32_t backBufferFormat; ///< The surface format for the backbuffer. One of the values from FfxApiSurfaceFormat. App needs to fill out before Query() call.
|
||||
uint32_t hudlessBackBufferFormat; ///< The surface format for HUDLessColor resource if used. One of the values from FfxApiSurfaceFormat. Otherwise set value to FFX_API_SURFACE_FORMAT_UNKNOWN(0). App needs to fill out before Query() call.
|
||||
struct FfxApiEffectMemoryUsage* gpuMemoryUsageFrameGeneration; ///< Output pointer to receive GPU memory usage information for frame generation. Populated by Query() call.
|
||||
};
|
||||
|
||||
#define FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2 FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x0c)
|
||||
struct ffxDispatchDescFrameGenerationPrepareV2
|
||||
{
|
||||
ffxDispatchDescHeader header; ///< Description header for frame generation prepare dispatch.
|
||||
uint64_t frameID; ///< Frame identifier used to select internal resources when async support is enabled. Must increment by exactly one (1) for each frame. Any non-exactly-one difference will reset the frame generation logic.
|
||||
uint32_t flags; ///< Zero or combination of values from FfxApiDispatchFrameGenerationFlags.
|
||||
void* commandList; ///< The command list (ID3D12GraphicsCommandList for DX12, VkCommandBuffer for Vulkan) to record frame generation prepare commands.
|
||||
struct FfxApiDimensions2D renderSize; ///< The dimensions used to render game content. dilatedDepth and dilatedMotionVectors are expected to be of this size.
|
||||
struct FfxApiFloatCoords2D jitterOffset; ///< The subpixel jitter offset applied to the camera.
|
||||
struct FfxApiFloatCoords2D motionVectorScale; ///< The scale factor to convert motion vectors to UV space. Set to (1.0, 1.0) if motion vectors are already in pixel space, or to renderSize dimensions if motion vectors are in UV space.
|
||||
|
||||
float frameTimeDelta; ///< Time elapsed in milliseconds since the last frame.
|
||||
bool reset; ///< A boolean value which when set to true, indicates the camera has moved discontinuously and frame generation should reset its internal state.
|
||||
float cameraNear; ///< The distance to the near plane of the camera.
|
||||
float cameraFar; ///< The distance to the far plane of the camera. This is used only in case of non-infinite depth.
|
||||
float cameraFovAngleVertical; ///< The camera angle field of view in the vertical direction (expressed in radians).
|
||||
float viewSpaceToMetersFactor; ///< The scale factor to convert view space units to meters.
|
||||
struct FfxApiResource depth; ///< The depth buffer data for the current frame.
|
||||
struct FfxApiResource motionVectors; ///< The motion vector data for the current frame.
|
||||
|
||||
float cameraPosition[3]; ///< The camera position in world space.
|
||||
float cameraUp[3]; ///< The camera up normalized vector in world space.
|
||||
float cameraRight[3]; ///< The camera right normalized vector in world space.
|
||||
float cameraForward[3]; ///< The camera forward normalized vector in world space.
|
||||
};
|
||||
|
||||
#define FFX_API_CALLBACK_DESC_TYPE_FRAMEGENERATION_PRESENT_PREMUL_ALPHA FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x0d)
|
||||
// This is a structure that is attached to header.pNext of ffxCallbackDescFrameGenerationPresent
|
||||
// Provides whether to use premultiplied alpha blending or not for the UI
|
||||
typedef struct ffxCallbackDescFrameGenerationPresentPremulAlpha
|
||||
{
|
||||
ffxApiHeader header; ///< Header for versioning & ABI stability.
|
||||
bool usePremulAlpha; ///< Toggles whether UI gets premultiplied alpha blending or not.
|
||||
} ffxCallbackDescFrameGenerationPresentPremulAlpha;
|
||||
|
||||
/// Callback function for waiting on a named fence to reach a specific value.
|
||||
/// @param fenceName The name of the fence to wait on.
|
||||
/// @param fenceValueToWaitFor The fence value to wait for.
|
||||
/// @return 0 on success, non-zero error code on failure.
|
||||
typedef int32_t (*FfxWaitCallbackFunc)(wchar_t* fenceName, uint64_t fenceValueToWaitFor);
|
||||
|
||||
#define FFX_API_CREATE_CONTEXT_DESC_TYPE_FRAMEGENERATION_VERSION FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x0e)
|
||||
// Pass this linked struct at FG context creation to enable new API features - omitting this will prevent new APIs from functioning.
|
||||
struct ffxCreateContextDescFrameGenerationVersion
|
||||
{
|
||||
ffxCreateContextDescHeader header; ///< Description header for frame generation version context creation.
|
||||
uint32_t version; ///< The version of the API the application was built against. This must be set to FFX_FRAMEGENERATION_VERSION.
|
||||
};
|
||||
|
||||
#define FFX_API_FRAME_GENERATION_CONFIG FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_FRAMEGENERATION, 0x0f)
|
||||
/// A structure representing the configuration options to pass to FrameInterpolationSwapChain
|
||||
///
|
||||
/// @ingroup FfxInterface
|
||||
typedef struct FfxFrameGenerationConfig
|
||||
{
|
||||
ffxApiHeader header; ///< Header for versioning & ABI stability.
|
||||
void* swapChain; ///< The <c><i>FfxSwapchain</i></c> to use with frame interpolation.
|
||||
FfxApiPresentCallbackFunc presentCallback; ///< A UI composition callback to call when finalizing the frame image.
|
||||
void* presentCallbackContext; ///< A pointer to be passed to the UI composition callback.
|
||||
FfxApiFrameGenerationDispatchFunc frameGenerationCallback; ///< The frame generation callback to use to generate the interpolated frame.
|
||||
void* frameGenerationCallbackContext; ///< A pointer to be passed to the frame generation callback.
|
||||
bool frameGenerationEnabled; ///< Sets the state of frame generation. Set to false to disable frame generation.
|
||||
bool allowAsyncWorkloads; ///< Sets the state of async workloads. Set to true to enable interpolation work on async compute.
|
||||
bool allowAsyncPresent; ///< Sets the state of async presentation (console only). Set to true to enable present from async command queue.
|
||||
struct FfxApiResource HUDLessColor; ///< The hudless back buffer image to use for UI extraction from backbuffer resource.
|
||||
uint32_t flags; ///< Zero or combination of flags from FfxApiDispatchFrameGenerationFlags.
|
||||
bool onlyPresentInterpolated; ///< Set to true to only present interpolated frame.
|
||||
struct FfxApiRect2D interpolationRect; ///< Set the area in the backbuffer that will be interpolated.
|
||||
uint64_t frameID; ///< A frame identifier used to synchronize resource usage in workloads.
|
||||
bool drawDebugPacingLines; ///< Sets the state of pacing debug lines. Set to true to display debug lines.
|
||||
} FfxFrameGenerationConfig;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} // extern "C"
|
||||
#endif
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
// This file is part of the FidelityFX SDK.
|
||||
//
|
||||
// Copyright (C) 2026 Advanced Micro Devices, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files(the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions :
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "../../api/include/ffx_api_types.h"
|
||||
|
||||
/*
|
||||
Tuning varianceFactor and safetyMarginInMs Tips:
|
||||
Calculation of frame pacing algorithm's next target timestamp:
|
||||
target frametime delta = average Frametime - (variance * varianceFactor) - safetyMarginInMs
|
||||
|
||||
Default Tuning uses safetyMarginInMs==0.1ms and varianceFactor==0.1.
|
||||
Say Tuning set A uses safetyMarginInMs==0.75ms, and varianceFactor==0.1.
|
||||
Say Tuning Set B uses safetyMarginInMs==0.01ms and varianceFactor==0.3.
|
||||
|
||||
Example #1 - Actual Game Cutscene. Game's framerate after FG ON during camera pan from normal (19ms avg frametime) to complex (37ms avg frametime over 1 sec) and back to normal scene complexity (19ms avg frametime).
|
||||
After the panning is done,
|
||||
- Default Tuning now gets stuck at targeting ~33ms after panning to a complex scene. GPU utilization significantly lower in this case.
|
||||
- Tuning Set B and Tuning Set A are able to recover close to ~19ms because of these 2 tuning result in lower "target frametime delta" than Default Tuning.
|
||||
|
||||
However, larger varianceFactor or safetyMarginInMs results in higher variance. As seen in Example #2 below.
|
||||
|
||||
Example #2 - FFX_API_FSR sample. Set app fps cap to 33.33ms. Use OCAT to capture 10s at default camera position.
|
||||
FSR 3.1.0 FG msbetweenpresents ping-pong between 16.552 (5th-percentile) and 16.832 (95th-percentile). Variance is 0.01116.
|
||||
Tuning set A FG msbetweenpresents ping-pong between 15.901 (5th-percentile) and 17.500 (95th-percentile). Variance is 0.057674.
|
||||
Tuning Set B FG msbetweenpresents ping-pong between 16.589 (5th-percentile) and 16.971 (95th-percentile). Variance is 0.014452.
|
||||
|
||||
| FG output Frames timestamp | n | n+1 | n+2 | n+3 | frame delta n+1 to n+2 | frame delta n+2 to n+3 |
|
||||
| -------------------------- | - | ------ | ----- | ------ | ---------------------- | ---------------------- |
|
||||
| App real frame presents | 0 | | 33.33 | | | |
|
||||
| Default Tuning | 0 | 16.552 | 33.33 | 49.882 | 16.778 | 16.552 |
|
||||
| Tuning Set A | 0 | 15.901 | 33.33 | 49.231 | 17.429 | 15.901 |
|
||||
| Tuning Set B | 0 | 16.589 | 33.33 | 49.919 | 16.741 | 16.589 |
|
||||
|
||||
Analysis of table data in words:
|
||||
Ignoring the cost of FI,
|
||||
"Tuning set A"'s "target frametime delta" of 15.901 results in larger frame to frame delta (or in other words larger variance) vs Default tuning.
|
||||
"Tuning set B"'s "target frametime delta" of 16.589 results in a bit larger frame to frame delta (or in other words a bit larger variance) vs Default tuning.
|
||||
|
||||
TLDR:
|
||||
If your game when using FG, frame rate is running at an unexpectedly low frame rate, after gradual transition from rendering complex to easy scene complexity, you could try setting "Tuning Set B" to recover lost FPS at cost of a bit higher variance.
|
||||
|
||||
*/
|
||||
|
||||
//struct definition matches FfxSwapchainFramePacingTuning
|
||||
typedef struct FfxApiSwapchainFramePacingTuning
|
||||
{
|
||||
float safetyMarginInMs; ///< Frame pacing sleep time's safety margin in milliseconds. Default is 0.1ms.
|
||||
float varianceFactor; ///< Variance factor for consecutive frame times. Valid range [0.0,1.0], default is 0.1.
|
||||
bool allowHybridSpin; ///< Allows pacing spinlock to sleep. Less precise, but power saving. Default is false.
|
||||
uint32_t hybridSpinTime; ///< How long to spin if allowHybridSpin is true, in timer resolution units. Not recommended to go below 2, as it will result in frequent overshoots. Default is 2.
|
||||
bool allowWaitForSingleObjectOnFence; ///< Allows WaitForSingleObject instead of spinning for fence value. Default is false.
|
||||
} FfxApiSwapchainFramePacingTuning;
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
// This file is part of the FidelityFX SDK.
|
||||
//
|
||||
// Copyright (C) 2026 Advanced Micro Devices, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files(the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions :
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "../../api/include/ffx_api.h"
|
||||
#include "../../api/include/ffx_api_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FFX_UPSCALER_VERSION_MAJOR 4
|
||||
#define FFX_UPSCALER_VERSION_MINOR 1
|
||||
#define FFX_UPSCALER_VERSION_PATCH 1
|
||||
|
||||
#define FFX_UPSCALER_MAKE_VERSION(major, minor, patch) (((major) << 22) | ((minor) << 12) | (patch))
|
||||
#define FFX_UPSCALER_VERSION FFX_UPSCALER_MAKE_VERSION(FFX_UPSCALER_VERSION_MAJOR, FFX_UPSCALER_VERSION_MINOR, FFX_UPSCALER_VERSION_PATCH)
|
||||
|
||||
enum FfxApiUpscaleQualityMode
|
||||
{
|
||||
FFX_UPSCALE_QUALITY_MODE_NATIVEAA = 0, ///< Perform upscaling with a per-dimension upscaling ratio of 1.0x.
|
||||
FFX_UPSCALE_QUALITY_MODE_QUALITY = 1, ///< Perform upscaling with a per-dimension upscaling ratio of 1.5x.
|
||||
FFX_UPSCALE_QUALITY_MODE_BALANCED = 2, ///< Perform upscaling with a per-dimension upscaling ratio of 1.7x.
|
||||
FFX_UPSCALE_QUALITY_MODE_PERFORMANCE = 3, ///< Perform upscaling with a per-dimension upscaling ratio of 2.0x.
|
||||
FFX_UPSCALE_QUALITY_MODE_ULTRA_PERFORMANCE = 4 ///< Perform upscaling with a per-dimension upscaling ratio of 3.0x.
|
||||
};
|
||||
|
||||
enum FfxApiCreateContextUpscaleFlags
|
||||
{
|
||||
FFX_UPSCALE_ENABLE_HIGH_DYNAMIC_RANGE = (1 << 0), ///< A bit indicating if the input color data provided is using a high-dynamic range.
|
||||
FFX_UPSCALE_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS = (1 << 1), ///< A bit indicating if the motion vectors are rendered at display resolution.
|
||||
FFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION = (1 << 2), ///< A bit indicating that the motion vectors have the jittering pattern applied to them.
|
||||
FFX_UPSCALE_ENABLE_DEPTH_INVERTED = (1 << 3), ///< A bit indicating that the input depth buffer data provided is inverted [1..0].
|
||||
FFX_UPSCALE_ENABLE_DEPTH_INFINITE = (1 << 4), ///< A bit indicating that the input depth buffer data provided is using an infinite far plane.
|
||||
FFX_UPSCALE_ENABLE_AUTO_EXPOSURE = (1 << 5), ///< A bit indicating if automatic exposure should be applied to input color data.
|
||||
FFX_UPSCALE_ENABLE_DYNAMIC_RESOLUTION = (1 << 6), ///< A bit indicating that the application uses dynamic resolution scaling.
|
||||
FFX_UPSCALE_ENABLE_DEBUG_CHECKING = (1 << 7), ///< A bit indicating that the runtime should check some API values and report issues.
|
||||
FFX_UPSCALE_ENABLE_NON_LINEAR_COLORSPACE = (1 << 8), ///< A bit indicating that the color resource contains perceptual (gamma corrected) colors
|
||||
FFX_UPSCALE_ENABLE_DEBUG_VISUALIZATION = (1 << 9), ///< A bit indicating if debug visualization is allowed. (memory consumption could increase)
|
||||
};
|
||||
|
||||
enum FfxApiDispatchFsrUpscaleFlags
|
||||
{
|
||||
FFX_UPSCALE_FLAG_DRAW_DEBUG_VIEW = (1 << 0), ///< A bit indicating that the output resource will contain debug views with relevant information.
|
||||
FFX_UPSCALE_FLAG_NON_LINEAR_COLOR_SRGB = (1 << 1), ///< A bit indicating that the input color resource contains perceptual sRGB colors
|
||||
FFX_UPSCALE_FLAG_NON_LINEAR_COLOR_PQ = (1 << 2), ///< A bit indicating that the input color resource contains perceptual PQ colors
|
||||
};
|
||||
|
||||
enum FfxApiDispatchUpscaleAutoreactiveFlags
|
||||
{
|
||||
FFX_UPSCALE_AUTOREACTIVEFLAGS_APPLY_TONEMAP = (1 << 0), ///< Apply tonemapping function prior to calculating reactivity.
|
||||
FFX_UPSCALE_AUTOREACTIVEFLAGS_APPLY_INVERSETONEMAP = (1 << 1), ///< Apply inverse tonemapping function prior to calculating reactivity.
|
||||
FFX_UPSCALE_AUTOREACTIVEFLAGS_APPLY_THRESHOLD = (1 << 2), ///< Compare to a threshold value and only record reactivity above the threshold.
|
||||
FFX_UPSCALE_AUTOREACTIVEFLAGS_USE_COMPONENTS_MAX = (1 << 3), ///< When enabled use the max. component value, otherwise use the length to calculate reactivity.
|
||||
};
|
||||
|
||||
#define FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x00)
|
||||
struct ffxCreateContextDescUpscale
|
||||
{
|
||||
ffxCreateContextDescHeader header; ///< Header descriptor, use type FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE.
|
||||
uint32_t flags; ///< Zero or a combination of values from FfxApiCreateContextUpscaleFlags.
|
||||
struct FfxApiDimensions2D maxRenderSize; ///< The maximum size that rendering will be performed at.
|
||||
struct FfxApiDimensions2D maxUpscaleSize; ///< The size of the presentation resolution targeted by the upscaling process.
|
||||
ffxApiMessage fpMessage; ///< A pointer to a function that can receive messages from the runtime. May be null.
|
||||
};
|
||||
|
||||
#define FFX_API_DISPATCH_DESC_TYPE_UPSCALE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x01)
|
||||
struct ffxDispatchDescUpscale
|
||||
{
|
||||
ffxDispatchDescHeader header; ///< Header descriptor, use type FFX_API_DISPATCH_DESC_TYPE_UPSCALE.
|
||||
void* commandList; ///< Command list to record upscaling rendering commands into.
|
||||
struct FfxApiResource color; ///< Color buffer for the current frame (at render resolution).
|
||||
struct FfxApiResource depth; ///< 32bit depth values for the current frame (at render resolution).
|
||||
struct FfxApiResource motionVectors; ///< 2-dimensional motion vectors (at render resolution if <c><i>FFX_FSR_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS</i></c> is not set).
|
||||
struct FfxApiResource exposure; ///< Optional resource containing a 1x1 exposure value.
|
||||
struct FfxApiResource reactive; ///< Optional resource containing alpha value of reactive objects in the scene.
|
||||
struct FfxApiResource transparencyAndComposition; ///< Optional resource containing alpha value of special objects in the scene.
|
||||
struct FfxApiResource output; ///< Output color buffer for the current frame (at presentation resolution).
|
||||
struct FfxApiFloatCoords2D jitterOffset; ///< The subpixel jitter offset applied to the camera.
|
||||
struct FfxApiFloatCoords2D motionVectorScale; ///< The scale factor to apply to motion vectors.
|
||||
struct FfxApiDimensions2D renderSize; ///< The resolution that was used for rendering the input resources.
|
||||
struct FfxApiDimensions2D upscaleSize; ///< The resolution that the upscaler will upscale to (optional, assumed maxUpscaleSize otherwise).
|
||||
bool enableSharpening; ///< Enable an additional sharpening pass.
|
||||
float sharpness; ///< The sharpness value between 0 and 1, where 0 is no additional sharpness and 1 is maximum additional sharpness.
|
||||
float frameTimeDelta; ///< The time elapsed since the last frame (expressed in milliseconds).
|
||||
float preExposure; ///< The pre exposure value (must be > 0.0f)
|
||||
bool reset; ///< A boolean value which when set to true, indicates the camera has moved discontinuously.
|
||||
float cameraNear; ///< The distance to the near plane of the camera.
|
||||
float cameraFar; ///< The distance to the far plane of the camera.
|
||||
float cameraFovAngleVertical; ///< The camera angle field of view in the vertical direction (expressed in radians).
|
||||
float viewSpaceToMetersFactor; ///< The scale factor to convert view space units to meters
|
||||
uint32_t flags; ///< Zero or a combination of values from FfxApiDispatchFsrUpscaleFlags.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GETUPSCALERATIOFROMQUALITYMODE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x02)
|
||||
struct ffxQueryDescUpscaleGetUpscaleRatioFromQualityMode
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GETUPSCALERATIOFROMQUALITYMODE.
|
||||
uint32_t qualityMode; ///< The desired quality mode for FSR upscaling.
|
||||
float* pOutUpscaleRatio; ///< A pointer to a <c>float</c> which will hold the upscaling the per-dimension upscaling ratio.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GETRENDERRESOLUTIONFROMQUALITYMODE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x03)
|
||||
struct ffxQueryDescUpscaleGetRenderResolutionFromQualityMode
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GETRENDERRESOLUTIONFROMQUALITYMODE.
|
||||
uint32_t displayWidth; ///< The target display resolution width.
|
||||
uint32_t displayHeight; ///< The target display resolution height.
|
||||
uint32_t qualityMode; ///< The desired quality mode for FSR upscaling.
|
||||
uint32_t* pOutRenderWidth; ///< A pointer to a <c>uint32_t</c> which will hold the calculated render resolution width.
|
||||
uint32_t* pOutRenderHeight; ///< A pointer to a <c>uint32_t</c> which will hold the calculated render resolution height.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GETJITTERPHASECOUNT FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x04)
|
||||
struct ffxQueryDescUpscaleGetJitterPhaseCount
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GETJITTERPHASECOUNT.
|
||||
uint32_t renderWidth; ///< The render resolution width.
|
||||
uint32_t displayWidth; ///< The output resolution width.
|
||||
int32_t* pOutPhaseCount; ///< A pointer to a <c>int32_t</c> which will hold the jitter phase count for the scaling factor between <c><i>renderWidth</i></c> and <c><i>displayWidth</i></c>.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GETJITTEROFFSET FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x05)
|
||||
struct ffxQueryDescUpscaleGetJitterOffset
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GETJITTEROFFSET.
|
||||
int32_t index; ///< The index within the jitter sequence.
|
||||
int32_t phaseCount; ///< The length of jitter phase. See <c><i>ffxQueryDescFsrGetJitterPhaseCount</i></c>.
|
||||
float* pOutX; ///< A pointer to a <c>float</c> which will contain the subpixel jitter offset for the x dimension.
|
||||
float* pOutY; ///< A pointer to a <c>float</c> which will contain the subpixel jitter offset for the y dimension.
|
||||
};
|
||||
|
||||
#define FFX_API_DISPATCH_DESC_TYPE_UPSCALE_GENERATEREACTIVEMASK FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x06)
|
||||
struct ffxDispatchDescUpscaleGenerateReactiveMask
|
||||
{
|
||||
ffxDispatchDescHeader header; ///< Header descriptor, use type FFX_API_DISPATCH_DESC_TYPE_UPSCALE_GENERATEREACTIVEMASK.
|
||||
void* commandList; ///< The <c><i>FfxCommandList</i></c> to record FSRUPSCALE rendering commands into.
|
||||
struct FfxApiResource colorOpaqueOnly; ///< A <c><i>FfxApiResource</i></c> containing the opaque only color buffer for the current frame (at render resolution).
|
||||
struct FfxApiResource colorPreUpscale; ///< A <c><i>FfxApiResource</i></c> containing the opaque+translucent color buffer for the current frame (at render resolution).
|
||||
struct FfxApiResource outReactive; ///< A <c><i>FfxApiResource</i></c> containing the surface to generate the reactive mask into.
|
||||
struct FfxApiDimensions2D renderSize; ///< The resolution that was used for rendering the input resources.
|
||||
float scale; ///< A value to scale the output
|
||||
float cutoffThreshold; ///< A threshold value to generate a binary reactive mask
|
||||
float binaryValue; ///< A value to set for the binary reactive mask
|
||||
uint32_t flags; ///< Flags to determine how to generate the reactive mask
|
||||
};
|
||||
|
||||
#define FFX_API_CONFIGURE_DESC_TYPE_UPSCALE_KEYVALUE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x07)
|
||||
struct ffxConfigureDescUpscaleKeyValue
|
||||
{
|
||||
ffxConfigureDescHeader header; ///< Header descriptor, use type FFX_API_CONFIGURE_DESC_TYPE_UPSCALE_KEYVALUE.
|
||||
uint64_t key; ///< Configuration key, member of the FfxApiConfigureUpscaleKey enumeration.
|
||||
uint64_t u64; ///< Integer value or enum value to set.
|
||||
void* ptr; ///< Pointer to set or pointer to value to set.
|
||||
};
|
||||
|
||||
enum FfxApiConfigureUpscaleKey
|
||||
{
|
||||
FFX_API_CONFIGURE_UPSCALE_KEY_FVELOCITYFACTOR = 0, ///< Override constant buffer fVelocityFactor. The float value is casted from void * ptr. Value of 0.0f can improve temporal stability of bright pixels. Default value is 1.0f. Value is clamped to [0.0f, 1.0f].
|
||||
FFX_API_CONFIGURE_UPSCALE_KEY_FREACTIVENESSSCALE = 1, ///< Override constant buffer fReactivenessScale. The float value is casted from void * ptr. Meant for development purpose to test if writing a larger value to reactive mask, reduces ghosting. Default value is 1.0f. Value is clamped to [0.0f, +infinity].
|
||||
FFX_API_CONFIGURE_UPSCALE_KEY_FSHADINGCHANGESCALE = 2, ///< Override fShadingChangeScale. Increasing this scales fsr3.1 computed shading change value at read to have higher reactiveness. Default value is 1.0f. Value is clamped to [0.0f, +infinity].
|
||||
FFX_API_CONFIGURE_UPSCALE_KEY_FACCUMULATIONADDEDPERFRAME = 3, ///< Override constant buffer fAccumulationAddedPerFrame. Corresponds to amount of accumulation added per frame at pixel coordinate where disocclusion occured or when reactive mask value is > 0.0f. Decreasing this and drawing the ghosting object (IE no mv) to reactive mask with value close to 1.0f can decrease temporal ghosting. Decreasing this value could result in more thin feature pixels flickering. Default value is 0.333. Value is clamped to [0.0f, 1.0f].
|
||||
FFX_API_CONFIGURE_UPSCALE_KEY_FMINDISOCCLUSIONACCUMULATION = 4, ///< Override constant buffer fMinDisocclusionAccumulation. Increasing this value may reduce white pixel temporal flickering around swaying thin objects that are disoccluding one another often. Too high value may increase ghosting. A sufficiently negative value means for pixel coordinate at frame N that is disoccluded, add fAccumulationAddedPerFrame starting at frame N+2. Default value is -0.333. Value is clamped to [-1.0f, 1.0f].
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GPU_MEMORY_USAGE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x08)
|
||||
struct ffxQueryDescUpscaleGetGPUMemoryUsage
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GPU_MEMORY_USAGE.
|
||||
struct FfxApiEffectMemoryUsage* gpuMemoryUsageUpscaler; ///< Output values by Query() call.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GPU_MEMORY_USAGE_V2 FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x09)
|
||||
struct ffxQueryDescUpscaleGetGPUMemoryUsageV2
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GPU_MEMORY_USAGE_V2.
|
||||
void* device; ///< For DX12: pointer to ID3D12Device. For VK, pointer to VkDeviceContext. App needs to fill out before Query() call.
|
||||
struct FfxApiDimensions2D maxRenderSize; ///< App needs to fill out before Query() call.
|
||||
struct FfxApiDimensions2D maxUpscaleSize; ///< App needs to fill out before Query() call.
|
||||
uint32_t flags; ///< Zero or a combination of values from FfxApiCreateContextUpscaleFlags. App needs to fill out before Query() call.
|
||||
struct FfxApiEffectMemoryUsage* gpuMemoryUsageUpscaler; ///< Output values by Query() call.
|
||||
};
|
||||
|
||||
enum FfxApiQueryResourceIdentifiers
|
||||
{
|
||||
FFX_API_QUERY_RESOURCE_INPUT_COLOR = (1 << 0), ///< Color buffer for the current frame (at render resolution).
|
||||
FFX_API_QUERY_RESOURCE_INPUT_DEPTH = (1 << 1), ///< 32bit depth values for the current frame (at render resolution).
|
||||
FFX_API_QUERY_RESOURCE_INPUT_MV = (1 << 2), ///< 2-dimensional motion vectors (at render resolution if FFX_FSR_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS is not set).
|
||||
FFX_API_QUERY_RESOURCE_INPUT_EXPOSURE = (1 << 3), ///< A 1x1 texture containing exposure value or the FFX_UPSCALE_ENABLE_AUTO_EXPOSURE set at context creation.
|
||||
FFX_API_QUERY_RESOURCE_INPUT_REACTIVEMASK = (1 << 4), ///< An R8 UNORM texture at render resolution that controls the influence of pixel history on upscaling result.
|
||||
FFX_API_QUERY_RESOURCE_INPUT_TRANSPARENCYCOMPOSITION = (1 << 5), ///< An R8 UNORM texture at render resolution that controls the blending of color in the upscaling result.
|
||||
};
|
||||
|
||||
#define FFX_API_QUERY_DESC_TYPE_UPSCALE_GET_RESOURCE_REQUIREMENTS FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x0a)
|
||||
struct ffxQueryDescUpscaleGetResourceRequirements
|
||||
{
|
||||
ffxQueryDescHeader header; ///< Header descriptor, use type FFX_API_QUERY_DESC_TYPE_UPSCALE_GET_RESOURCE_REQUIREMENTS.
|
||||
uint64_t required_resources; ///< resources 64b bitfield, that given current context state, are required for effect correctness.
|
||||
uint64_t optional_resources; ///< resources 64b bitfield, that given current context state, will be consumed if provided, but are optional.
|
||||
};
|
||||
|
||||
#define FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE_VERSION FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x0b)
|
||||
struct ffxCreateContextDescUpscaleVersion
|
||||
{
|
||||
ffxCreateContextDescHeader header; ///< Header descriptor, use type FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE_VERSION.
|
||||
uint32_t version; ///< The version of the API the application was built against. This must be set to FFX_UPSCALER_VERSION.
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
# AMD FidelityFX SDK headers (vendored)
|
||||
|
||||
Copied from <https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK>, tag
|
||||
**`v2.3.0`** (commit `60f4ea81909200d8542eca14dccb2628b763a9a3`, "AMD FSR SDK 2.3.0",
|
||||
2026-06-24 — the `main` head on the day of vendoring, 2026-09-04). **Five headers and
|
||||
the licence file. No `signedbin/`, no `.lib`, no `.cpp`, no `.hpp` helpers, and
|
||||
deliberately not the whole `Kits/FidelityFX/` tree** — see §What is here, and what is not.
|
||||
|
||||
**Licence: MIT, by exception, and the exception is the whole tree.** Upstream has no
|
||||
root `LICENSE`. Its `docs/license.md` opens with a binary-only, no-reverse-engineering
|
||||
licence that *"applies to all files except as noted below"*, followed by an exception
|
||||
list of **845** paths placed under the MIT grant. Read off the GitHub tree API on
|
||||
2026-09-04: the repository at that commit holds **exactly 845 blobs, and every one of
|
||||
them is on the list** — the signed effect DLLs included — so the default licence
|
||||
governs no file that is actually in the tree. Every header vendored here is on the list
|
||||
by path **and** carries the MIT grant inline in its own banner. `license.md` here is
|
||||
upstream's file verbatim, exception list and all, and `tools/license-check.ps1` §2d
|
||||
asserts both facts per file rather than trusting this paragraph: every path under
|
||||
`Kits/` must appear on the list, and every `.h` must contain the grant text.
|
||||
|
||||
**Why this tag and not `v1.1.4`.** `docs/18_GPU_VENDOR_APIS.md` recorded on 2026-09-04
|
||||
that `v1.1.4` (root `LICENSE.txt` = MIT) was the tag to take *"unless a title ships an
|
||||
API version that needs 2.x"*. Titles installed on the dev machine already do: Hell Is Us
|
||||
ships `amd_fidelityfx_upscaler_dx12.dll` 4.0.3 and `amd_fidelityfx_framegeneration_dx12.dll`
|
||||
4.0.0; Expedition 33 and Dying Light: The Beast ship upscaler 4.0.2 and frame generation
|
||||
3.1.5 — all SDK 2.x effect DLLs — and the SDK's own sample dispatches
|
||||
`ffxDispatchDescFrameGenerationPrepareV2` (`0x0002000c`), which `v1.1.4` does not
|
||||
declare. Every value and layout the Overlay reads is identical in both tags
|
||||
(`FFX_API_DISPATCH_DESC_TYPE_UPSCALE 0x00010001`, `…_FRAMEGENERATION 0x00020003`,
|
||||
`…_FRAMEGENERATION_PREPARE 0x00020004`, `ffxApiHeader`, `FfxApiResource`,
|
||||
`ffxDispatchDescUpscale`, the `Prepare` descriptors' prefix through `renderSize`); 2.3.0
|
||||
is a superset, so the SDK 1.1.x monolith (`amd_fidelityfx_dx12.dll` 1.0.1, which Lies of P,
|
||||
Cyberpunk 2077 and Rune Factory ship) is decoded by the same constants.
|
||||
|
||||
**Unmodified, and checked rather than claimed.** `git hash-object` on each vendored file
|
||||
equals the upstream blob sha at `v2.3.0`:
|
||||
|
||||
| | upstream blob |
|
||||
|---|---|
|
||||
| `Kits/FidelityFX/api/include/ffx_api.h` | `484ec23fa38a34c9061451cffd9f420ec2f7c1e8` |
|
||||
| `Kits/FidelityFX/api/include/ffx_api_types.h` | `07c0da20c8ae370caaa8bc674e7f22df83cbf163` |
|
||||
| `Kits/FidelityFX/upscalers/include/ffx_upscale.h` | `021ac23c179265752f5e6b66ef8487d8c12d17e9` |
|
||||
| `Kits/FidelityFX/framegeneration/include/ffx_framegeneration.h` | `5ca5486460744e4357e30d3d273d7f12019fb5b1` |
|
||||
| `Kits/FidelityFX/framegeneration/include/ffx_framegeneration_api_types.h` | `e7e514ddb6666753de3b14f720d8e6774339b0b9` |
|
||||
| `license.md` (upstream `docs/license.md`) | `a80304f4edb2a86ae349e39872ea9c87a39c6f97` |
|
||||
|
||||
Upstream ships **LF**. `.gitattributes` (`* text=auto eol=crlf`) stores LF in the index
|
||||
and materialises CRLF in the working tree, so `git ls-files -s` agrees with the table
|
||||
above and a checked-out file differs from upstream in line endings only — the NVAPI
|
||||
case, not the Streamline one.
|
||||
|
||||
## What is here, and what is not
|
||||
|
||||
The include closure of the three headers the Overlay reads, kept in **upstream's
|
||||
directory layout** because the headers include each other by relative path
|
||||
(`ffx_upscale.h` → `"../../api/include/ffx_api.h"`); flattening them would mean editing
|
||||
them, which drags them out of "consumed unmodified".
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| `api/include/ffx_api.h` | the five entry points and their `PfnFfx*` typedefs, `ffxApiHeader` (`type`, `pNext`), the effect ids and `FFX_API_MAKE_EFFECT_SUB_ID` |
|
||||
| `api/include/ffx_api_types.h` | `FfxApiDimensions2D`, `FfxApiResource` and the other plain structs the descriptors are built from |
|
||||
| `upscalers/include/ffx_upscale.h` | `FFX_API_DISPATCH_DESC_TYPE_UPSCALE` and `ffxDispatchDescUpscale` (`renderSize`, `upscaleSize`), `FfxApiUpscaleQualityMode` |
|
||||
| `framegeneration/include/ffx_framegeneration.h` | `FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION`, `…_PREPARE`, `…_PREPARE_V2` and their descriptors (`frameID`, `renderSize`, `numGeneratedFrames`) |
|
||||
| `framegeneration/include/ffx_framegeneration_api_types.h` | included by the header above |
|
||||
|
||||
Closure outside this directory: `<stdint.h>`, `<stdbool.h>`. **No STL, no `<windows.h>`,
|
||||
no D3D headers** — verified on the upstream files — so the `-D_HAS_EXCEPTIONS=0` hazard
|
||||
`third_party/streamline/README.md` records for `sl.h` does not arise here: there is
|
||||
nothing in this closure that could throw.
|
||||
|
||||
**Excluded deliberately, and each exclusion is load-bearing:**
|
||||
|
||||
- **`Kits/FidelityFX/signedbin/`** — the effect DLLs and `amd_fidelityfx_loader_dx12.lib`.
|
||||
They are on the MIT list too, and it changes nothing: FrameLedger observes the copies
|
||||
the *game* ships and never loads, links or redistributes a vendor runtime
|
||||
(`legal/THIRD_PARTY_NOTICES.md`). `license-check.ps1` fails on any `.dll`/`.lib`/`.exe`
|
||||
under this directory.
|
||||
- **`api/include/ffx_api_loader.h`** — a `GetProcAddress` helper that includes
|
||||
`<windows.h>`. The Overlay resolves symbols with its own module-scoped resolver and
|
||||
must never import a vendor module; a helper whose whole purpose is loading one is not
|
||||
something to have lying about.
|
||||
- **`api/include/dx12/ffx_api_dx12.h`, `framegeneration/include/dx12/…`** — the backend
|
||||
and frame-generation-swapchain descriptors (`0x30001`, `0x30005`, `0x30006`). Nothing
|
||||
decodes them yet, and `docs/18_GPU_VENDOR_APIS.md` records that an unconsumed vendored
|
||||
header can have an incomplete closure with every gate green, so nothing is vendored
|
||||
ahead of the code that consumes it. They are MIT and on the list; take them with the
|
||||
PR that reads them.
|
||||
- **The `.hpp` helpers, `api/internal/`, the provider sources, `Kits/Cauldron2/`,
|
||||
`Samples/`** — source and framework code, not declarations. MIT, and not ours to carry.
|
||||
|
||||
## How it is consumed, and the constraint that shapes that
|
||||
|
||||
Through the `fl_fidelityfx_headers` INTERFACE target, `SYSTEM`, with the three
|
||||
`include/` directories on the path — the same treatment `fl_streamline_headers` gets,
|
||||
and for the same reason: `/W4 /WX` must never fail our build on somebody else's
|
||||
warnings, because patching a vendored header would drag it out of "consumed unmodified".
|
||||
|
||||
**For types only. Never link, and never take the address of a vendor function in
|
||||
evaluated code.** `ffx_api.h` declares the five entry points as
|
||||
`FFX_API_ENTRY` = `__declspec(dllexport)` — unconditionally, with no import/export
|
||||
switch. A declaration with `dllexport` and no definition exports nothing, so including
|
||||
the header in `FrameLedger.Overlay` is harmless *as long as nothing defines or references
|
||||
those names there*; `tools/hookinventory-check.ps1` Pass C reads the built Overlay's
|
||||
**export table as well as its import table** and fails on any `ffx*`-shaped name in
|
||||
either. The stubs under `tools/vendor-stubs/` are the only place in this repository that
|
||||
defines them, and they do so through the header's own `FFX_API_ENTRY`, so the fixture
|
||||
and the detour cannot disagree about linkage or signature.
|
||||
|
||||
**One deprecation attribute, and where it bites.** `ffx_framegeneration.h` marks
|
||||
`struct ffxDispatchDescFrameGenerationPrepare` `[[deprecated]]` in favour of `…PrepareV2`.
|
||||
Under `/W4 /WX` naming the old struct is a build error. The two share their prefix through
|
||||
`renderSize` byte for byte, so the Overlay reads a `PREPARE` (`0x00020004`) descriptor
|
||||
through the `V2` layout and asserts that equality inside a scoped `#pragma warning` block
|
||||
rather than suppressing the attribute globally — the SDK 1.1.x monolith still sends the
|
||||
old type, so this is not theoretical.
|
||||
+894
@@ -0,0 +1,894 @@
|
||||
The following license applies to all files except as noted below.
|
||||
|
||||
Copyright (C) Advanced Micro Devices, Inc.
|
||||
|
||||
REDISTRIBUTION: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to install, reproduce, copy and distribute copies of the Software, in binary form only, and to permit persons to whom the Software is provided to do the same, provided that the following conditions are met:
|
||||
|
||||
No reverse engineering, decompilation, or disassembly of this Software is permitted.
|
||||
|
||||
Redistributions must reproduce the above copyright notice, this permission notice, and the following disclaimers and notices in the Software documentation and/or other materials provided with the Software.
|
||||
|
||||
DISCLAIMER: THE USE OF THE SOFTWARE IS AT YOUR SOLE RISK. THE SOFTWARE
|
||||
IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND AND COPYRIGHT
|
||||
HOLDER AND ITS LICENSORS EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS AND
|
||||
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
COPYRIGHT HOLDER AND ITS LICENSORS DO NOT WARRANT THAT THE SOFTWARE WILL
|
||||
MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE
|
||||
UNINTERRUPTED OR ERROR-FREE. THE ENTIRE RISK ASSOCIATED WITH THE USE OF
|
||||
THE SOFTWARE IS ASSUMED BY YOU. FURTHERMORE, COPYRIGHT HOLDER AND ITS
|
||||
LICENSORS DO NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE
|
||||
OR THE RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS,
|
||||
ACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE.
|
||||
|
||||
DISCLAIMER: UNDER NO CIRCUMSTANCES INCLUDING NEGLIGENCE, SHALL COPYRIGHT HOLDER AND ITS LICENSORS OR ITS DIRECTORS, OFFICERS, EMPLOYEES OR AGENTS ("AUTHORIZED REPRESENTATIVES") BE LIABLE FOR ANY INCIDENTAL, INDIRECT,
|
||||
SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS
|
||||
PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, AND THE
|
||||
LIKE) ARISING OUT OF THE USE, MISUSE OR INABILITY TO USE THE SOFTWARE,
|
||||
BREACH OR DEFAULT, INCLUDING THOSE ARISING FROM INFRINGEMENT OR ALLEGED
|
||||
INFRINGEMENT OF ANY PATENT, TRADEMARK, COPYRIGHT OR OTHER INTELLECTUAL
|
||||
PROPERTY RIGHT EVEN IF COPYRIGHT HOLDER AND ITS AUTHORIZED
|
||||
REPRESENTATIVES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN
|
||||
NO EVENT SHALL COPYRIGHT HOLDER OR ITS AUTHORIZED REPRESENTATIVES TOTAL
|
||||
LIABILITY FOR ALL DAMAGES, LOSSES, AND CAUSES OF ACTION (WHETHER IN
|
||||
CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE) EXCEED THE AMOUNT OF
|
||||
US$10.
|
||||
|
||||
These source files
|
||||
|
||||
- `3rdpartynotice.md`
|
||||
- `ClearMediaCache.bat`
|
||||
- `docs\getting-started\building-samples.md`
|
||||
- `docs\getting-started\index.md`
|
||||
- `docs\getting-started\media\component-dependencies-dark.png`
|
||||
- `docs\getting-started\media\component-dependencies.png`
|
||||
- `docs\getting-started\media\config_init.jpg`
|
||||
- `docs\getting-started\media\lighting-ui.jpg`
|
||||
- `docs\getting-started\media\limiter-ui.jpg`
|
||||
- `docs\getting-started\media\magnifier-ui.jpg`
|
||||
- `docs\getting-started\media\particle-ui.jpg`
|
||||
- `docs\getting-started\media\postprocessing-ui.jpg`
|
||||
- `docs\getting-started\media\shadowraster-ui.jpg`
|
||||
- `docs\getting-started\media\skydome-ui.jpg`
|
||||
- `docs\getting-started\media\taa-ui.jpg`
|
||||
- `docs\getting-started\running-samples.md`
|
||||
- `docs\getting-started\sdk-structure.md`
|
||||
- `docs\license.md`
|
||||
- `docs\media\AMD_FidelityFX_Lockup_Black.png`
|
||||
- `docs\media\AMD_FidelityFX_SDK_Colored.jpg`
|
||||
- `docs\media\fidelityfxsdk-logo-rescaled.png`
|
||||
- `docs\samples\denoiser.md`
|
||||
- `docs\samples\index.md`
|
||||
- `docs\samples\media\blur\blur.jpg`
|
||||
- `docs\samples\media\blur\blur.png`
|
||||
- `docs\samples\media\brixelizergi\sample.png`
|
||||
- `docs\samples\media\combine-adaptive-compute-ambient-occlusion\cacao-sample.jpg`
|
||||
- `docs\samples\media\combine-adaptive-compute-ambient-occlusion\cacao-sample.png`
|
||||
- `docs\samples\media\contrast-adaptive-sharpening\cas-sample.png`
|
||||
- `docs\samples\media\denoiser\fsr-ray-regeneration-sample.png`
|
||||
- `docs\samples\media\hybrid-reflections\hybrid-reflections.jpg`
|
||||
- `docs\samples\media\hybrid-reflections\hybrid-reflections.png`
|
||||
- `docs\samples\media\hybrid-shadows\hybrid-shadows-sample.jpg`
|
||||
- `docs\samples\media\hybrid-shadows\hybrid-shadows-sample.png`
|
||||
- `docs\samples\media\lens\lens-sample_resized.jpg`
|
||||
- `docs\samples\media\lens\lens-sample.jpg`
|
||||
- `docs\samples\media\luma-preserving-mapper\LPM.jpg`
|
||||
- `docs\samples\media\luma-preserving-mapper\LPM.png`
|
||||
- `docs\samples\media\luma-preserving-mapper\NoLPM.jpg`
|
||||
- `docs\samples\media\luma-preserving-mapper\NoLPM.png`
|
||||
- `docs\samples\media\parallel-sort\parallel-sort_resized.jpg`
|
||||
- `docs\samples\media\parallel-sort\parallel-sort.jpg`
|
||||
- `docs\samples\media\radiance-caching\nrc-preview-sample.png`
|
||||
- `docs\samples\media\single-pass-downsampler\spd-sample.jpg`
|
||||
- `docs\samples\media\stochastic-screen-space-reflections\sssr-sample_resized.jpg`
|
||||
- `docs\samples\media\stochastic-screen-space-reflections\sssr-sample.jpg`
|
||||
- `docs\samples\media\super-resolution\frame-interpolation-debug-overlay.svg`
|
||||
- `docs\samples\media\super-resolution\fsr3-sample_resized.jpg`
|
||||
- `docs\samples\media\super-resolution\fsr3-sample.jpg`
|
||||
- `docs\samples\media\super-resolution\upscaler-debug-overlay.svg`
|
||||
- `docs\samples\media\variable-shading\variable-shading.jpg`
|
||||
- `docs\samples\media\variable-shading\variable-shading.png`
|
||||
- `docs\samples\radiance-cache.md`
|
||||
- `docs\samples\super-resolution.md`
|
||||
- `docs\sdk.css`
|
||||
- `docs\tools\index.md`
|
||||
- `docs\tools\media-delivery.md`
|
||||
- `Kits\Cauldron2\dx12\Cauldron_vs2022.vcxproj`
|
||||
- `Kits\Cauldron2\dx12\Cauldron_vs2022.vcxproj.filters`
|
||||
- `Kits\Cauldron2\dx12\framework\config\cauldronconfig.json`
|
||||
- `Kits\Cauldron2\dx12\framework\core\backend_interface.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\component.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\component.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\animationcomponent.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\animationcomponent.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\cameracomponent.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\cameracomponent.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\lightcomponent.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\lightcomponent.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\meshcomponent.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\meshcomponent.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\particlespawnercomponent.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\components\particlespawnercomponent.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\contentloader.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\contentmanager.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\contentmanager.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\entity.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\entity.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\framework.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\framework.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\inputmanager.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\inputmanager.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\loaders\gltfloader.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\loaders\gltfloader.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\loaders\particleloader.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\loaders\particleloader.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\loaders\textureloader.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\loaders\textureloader.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\scene.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\scene.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\taskmanager.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\taskmanager.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\uibackend.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\uibackend.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\uimanager.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\uimanager.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\win\framework_win.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\win\framework_win.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\win\inputmanager_win.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\win\inputmanager_win.h`
|
||||
- `Kits\Cauldron2\dx12\framework\core\win\uibackend_win.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\core\win\uibackend_win.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\assert.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\corecounts.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\corecounts.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\fileio.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\fileio.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\helpers.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\log.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\log.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\math.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\math.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\sync.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\threadsafe_queue.h`
|
||||
- `Kits\Cauldron2\dx12\framework\misc\threadsafe_ringbuffer.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\animation.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\animation.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\backend_shader_reloader_common.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\backend_shader_reloader_common.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\backend_shader_reloader.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\backend_shader_reloader.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\CMakeLists.txt`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\command_execution.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\command_execution.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\native_backend_shader_reloader.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\backend_shader_reloader\native_backend_shader_reloader.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\buffer.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\buffer.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\color_conversion.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\color_conversion.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\commandlist.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\commandlist.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\copyresource.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\copyresource.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\device.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\device.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\buffer_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\buffer_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\commandlist_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\commandlist_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\copyresource_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\copyresource_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\defines_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\device_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\device_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\dynamicbufferpool_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\dynamicbufferpool_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\gpuresource_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\gpuresource_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\indirectworkload_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\indirectworkload_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\parameterset_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\parameterset_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\pipelinedesc_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\pipelinedesc_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\pipelineobject_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\pipelineobject_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\profiler_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\profiler_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\resourceview_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\resourceview_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\resourceviewallocator_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\resourceviewallocator_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\rootsignature_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\rootsignature_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\rootsignaturedesc_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\rootsignaturedesc_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\rtresources_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\rtresources_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\sampler_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\sampler_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\swapchain_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\swapchain_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\texture_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\texture_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\uploadheap_dx12.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dx12\uploadheap_dx12.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dynamicbufferpool.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dynamicbufferpool.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dynamicresourcepool.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\dynamicresourcepool.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\gpuresource.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\gpuresource.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\indirectworkload.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\material.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\material.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\mesh.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\mesh.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\parameterset.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\parameterset.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\particle.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\particle.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\pipelinedesc.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\pipelinedesc.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\pipelineobject.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\profiler.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\profiler.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rasterview.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rasterview.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\renderdefines.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\fpslimiter\fpslimiterrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\fpslimiter\fpslimiterrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\raytracing\raytracingrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\raytracing\raytracingrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\rsr\runtimeshaderrecompilerrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\rsr\runtimeshaderrecompilerrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\skinning\skinningrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\skinning\skinningrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\swapchain\swapchainrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\swapchain\swapchainrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\tonemapping\tonemappingrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\tonemapping\tonemappingrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\ui\uirendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rendermodules\ui\uirendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\resourceresizedlistener.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\resourceresizedlistener.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\resourceview.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\resourceview.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\resourceviewallocator.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\resourceviewallocator.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rootsignature.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rootsignaturedesc.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rootsignaturedesc.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\rtresources.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\sampler.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\shaderbuilder.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\shaderbuilderhelper.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\shaderbuilderhelper.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\shadowmapresourcepool.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\shadowmapresourcepool.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\swapchain.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\swapchain.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\texture.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\texture.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\uploadheap.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\render\uploadheap.h`
|
||||
- `Kits\Cauldron2\dx12\framework\render\win\shaderbuilder_win.cpp`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\autoexposure.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\builddistortionfield.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\commonintersect.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\computeskinning.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\copytexture.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_common_types.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_core_cpu.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_core_gpu_common_half.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_core_gpu_common.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_core_hlsl.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_core_portability.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\ffx_core.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\parallelsort\ffx_parallelsort_common.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\parallelsort\ffx_parallelsort.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fidelityfx\spd\ffx_spd.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fpslimiter.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\fullscreen.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\hudlessblit.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\lensdistortion.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\lightfunctionscommon.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\lightingcommon.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\particlecommon.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\rasterlightfunctions.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\raytracingcommon.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\raytracinglightfunctions.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\shadercommon.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\shadowFiltering.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\surfacerendercommon.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\tonemappercommon.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\tonemappers.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\tonemapping.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\transferFunction.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\transformVS.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\ui.hlsl`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\uicommon.h`
|
||||
- `Kits\Cauldron2\dx12\framework\shaders\upscaler.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\animatedtextures\animatedtexturesrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\animatedtextures\animatedtexturesrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\animatedtextures\shaders\AnimatedTexture.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gbuffer\config\gbufferrendermodule.json`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gbuffer\gbufferrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gbuffer\gbufferrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gbuffer\shaders\gbufferps.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_assert.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_error.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_interface.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_parallelsort_private.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_parallelsort.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_types.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\ffx_util.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\gpuparticlerendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\gpuparticlerendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_callbacks_glsl.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_callbacks_hlsl.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_common.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_reduce.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_resources.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_scan_add.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_scan.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_scatter.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_setup_indirect_args.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort_sum.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\parallelsort\ffx_parallelsort.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_common_ffx.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_reduce_pass.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_scan_add_pass.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_scan_pass.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_scatter_pass.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_setup_indirect_args.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\parallelsort_sum_pass.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\particleemit.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\particlesimulation.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\particlesimulationcommon.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\gpuparticle\shaders\simulationbindings.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\lighting\lightingrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\lighting\lightingrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\lighting\shaders\lighting.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\rastershadow\config\rastershadowrendermodule.json`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\rastershadow\rastershadowrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\rastershadow\rastershadowrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\rastershadow\shaders\rastershadowps.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\rendermoduleregistry.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\rendermoduleregistry.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\skydome\config\skydomerendermodule.json`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\skydome\shaders\skydome.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\skydome\shaders\skydomecommon.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\skydome\shaders\skydomeproc.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\skydome\skydomerendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\skydome\skydomerendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\taa\config\taarendermodule.json`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\taa\shaders\taa.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\taa\shaders\taacommon.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\taa\shaders\taaPost.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\taa\taarendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\taa\taarendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\translucency\config\translucencyrendermodule.json`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\translucency\shaders\particlerender.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\translucency\shaders\particlerendercommon.h`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\translucency\shaders\translucencyps.hlsl`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\translucency\translucencyrendermodule.cpp`
|
||||
- `Kits\Cauldron2\dx12\rendermodules\translucency\translucencyrendermodule.h`
|
||||
- `Kits\Cauldron2\dx12\vcpkg.json`
|
||||
- `Kits\FidelityFX\api\include\dx12\ffx_api_dx12.h`
|
||||
- `Kits\FidelityFX\api\include\dx12\ffx_api_dx12.hpp`
|
||||
- `Kits\FidelityFX\api\include\ffx_api_loader.h`
|
||||
- `Kits\FidelityFX\api\include\ffx_api_types.h`
|
||||
- `Kits\FidelityFX\api\include\ffx_api.h`
|
||||
- `Kits\FidelityFX\api\include\ffx_api.hpp`
|
||||
- `Kits\FidelityFX\api\internal\ffx_api_helper.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_api.cpp`
|
||||
- `Kits\FidelityFX\api\internal\ffx_assert.cpp`
|
||||
- `Kits\FidelityFX\api\internal\ffx_assert.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_backends.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_error.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_interface.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_internal_types.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_message.cpp`
|
||||
- `Kits\FidelityFX\api\internal\ffx_message.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_object_management.cpp`
|
||||
- `Kits\FidelityFX\api\internal\ffx_object_management.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_provider.h`
|
||||
- `Kits\FidelityFX\api\internal\ffx_query_fallback.cpp`
|
||||
- `Kits\FidelityFX\api\internal\ffx_util.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_common_types.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_core_cpu.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_core_gpu_common_half.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_core_gpu_common.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_core_hlsl.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_core_portability.h`
|
||||
- `Kits\FidelityFX\api\internal\gpu\ffx_core.h`
|
||||
- `Kits\FidelityFX\backend\dx12\d3dx12.h`
|
||||
- `Kits\FidelityFX\backend\dx12\ffx_backends_dx12.cpp`
|
||||
- `Kits\FidelityFX\backend\dx12\ffx_dx12.cpp`
|
||||
- `Kits\FidelityFX\backend\dx12\ffx_dx12.h`
|
||||
- `Kits\FidelityFX\denoisers\include\ffx_denoiser.h`
|
||||
- `Kits\FidelityFX\denoisers\include\ffx_denoiser.hpp`
|
||||
- `Kits\FidelityFX\docs\getting-started\ffx-api.md`
|
||||
- `Kits\FidelityFX\docs\getting-started\index.md`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\component-dependencies-dark.png`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\component-dependencies.png`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\config_init.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\lighting-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\limiter-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\magnifier-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\particle-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\postprocessing-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\shadowraster-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\skydome-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\media\taa-ui.jpg`
|
||||
- `Kits\FidelityFX\docs\getting-started\naming-guidelines.md`
|
||||
- `Kits\FidelityFX\docs\getting-started\sdk-structure.md`
|
||||
- `Kits\FidelityFX\docs\license.md`
|
||||
- `Kits\FidelityFX\docs\media\AMD_FSR_SDK_Lockup_RGB_Blk.png`
|
||||
- `Kits\FidelityFX\docs\media\AMD_FSR_SDK_Lockup_RGB_Wht.png`
|
||||
- `Kits\FidelityFX\docs\techniques\denoising.md`
|
||||
- `Kits\FidelityFX\docs\techniques\frame-interpolation-api.md`
|
||||
- `Kits\FidelityFX\docs\techniques\frame-interpolation-ml.md`
|
||||
- `Kits\FidelityFX\docs\techniques\frame-interpolation-swap-chain.md`
|
||||
- `Kits\FidelityFX\docs\techniques\frame-interpolation.md`
|
||||
- `Kits\FidelityFX\docs\techniques\index.md`
|
||||
- `Kits\FidelityFX\docs\techniques\media\cross.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\denoiser\fsr-ray-regeneration-brdf-lut.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\denoiser\fsr-ray-regeneration-debug-view.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\denoiser\fsr-ray-regeneration-denoised-sample.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\denoiser\fsr-ray-regeneration-noisy-sample.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\denoiser\fsr-ray-regeneration-sample.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\frame-interpolation-swapchain\frame-interpolation-swap-chain.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\frame-interpolation\frame-interpolation-debug-overlay.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\frame-pacing\fixed-high.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\frame-pacing\fixed-low.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\frame-pacing\pacing-overview.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\frame-pacing\variable-inside.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\banner.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\path-tracer-schematic-querying.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\path-tracer-schematic-self-train.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\path-tracer-schematic-subpaths.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\pipeline-one-pass.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\pipeline-two-pass.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\radiance-cache\sub-path-eqn.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\01_FSR3_DataFlow.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\02_FSR3_Flow.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\03_FSR3_FlowAsyncQueue.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\04_FSR3_UiCallback.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\05_FSR3_NoFG_UiCallback.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\06_FSR3_UiTex.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\07_FSR3_NoFG_UiTex.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-interpolation\08_FSR3_HUDLess.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-ml\fsr4-sample.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-ml\pipeline-placement.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\fsr2-sample_resized.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\fsr2-sample.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\fsr3-sample_resized.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\fsr3-sample.jpg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\jitter-space.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\motion-vectors.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\overview.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-temporal\pipeline-placement.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-upscaler\overview.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-upscaler\upscaler-debug-fsr4.png`
|
||||
- `Kits\FidelityFX\docs\techniques\media\super-resolution-upscaler\upscaler-debug-overlay.svg`
|
||||
- `Kits\FidelityFX\docs\techniques\media\tick.png`
|
||||
- `Kits\FidelityFX\docs\techniques\radiance-cache.md`
|
||||
- `Kits\FidelityFX\docs\techniques\super-resolution-ml.md`
|
||||
- `Kits\FidelityFX\docs\techniques\super-resolution-temporal.md`
|
||||
- `Kits\FidelityFX\docs\techniques\super-resolution-upscaler.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\index.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_1_0.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_1_1_1.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_1_1_2.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_1_1_3.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_1_1_4.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_1_1.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_2_0_0.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_2_1_0.md`
|
||||
- `Kits\FidelityFX\docs\whats-new\version_2_2_0.md`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\antilag2\ffx_antilag2_dx12.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\BuildFrameInterpolationShaders.bat`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\BuildOpticalFlowShaders.bat`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\ffx_provider_fsr3framegenerationswapchain_dx12.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDebugPacingPS.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDebugPacingVS.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12_DebugPacing.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12_DebugPacing.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12_Helpers.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12_Helpers.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12_UiComposition.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12_UiComposition.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainDX12.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainUiCompositionPremulPS.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainUiCompositionPremulVS.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainUiCompositionPS.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\FrameInterpolationSwapchainUiCompositionVS.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\dx12\recompileUiCompositionHLSL.bat`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\ffx_frameinterpolation.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\ffx_opticalflow.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\ffx_provider_fsr3framegeneration.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\ffx_provider_fsr3framegenerationswapchain.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_callbacks_hlsl.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_common.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_compute_game_vector_field_inpainting_pyramid.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_compute_inpainting_pyramid.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_debug_view.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_disocclusion_mask.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_game_motion_vector_field.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_inpainting.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_optical_flow_vector_field.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_reconstruct_dilated_velocity_and_previous_depth.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_reconstruct_previous_depth.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_resources.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation_setup.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\frameinterpolation\ffx_frameinterpolation.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_callbacks_hlsl.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_common.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_compute_luminance_pyramid.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_compute_optical_flow_v5.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_compute_scd_divergence.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_filter_optical_flow_v5.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_generate_scd_histogram.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_prepare_luma.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_resources.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\opticalflow\ffx_opticalflow_scale_optical_flow_advanced_v5.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\include\gpu\spd\ffx_spd.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_frameinterpolation_private.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_frameinterpolation_shaderblobs.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_frameinterpolation_shaderblobs.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_frameinterpolation.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_opticalflow_private.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_opticalflow_shaderblobs.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_opticalflow_shaderblobs.h`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_opticalflow.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\ffx_provider_fsr3framegeneration.cpp`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_compute_game_vector_field_inpainting_pyramid_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_compute_inpainting_pyramid_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_debug_view_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_disocclusion_mask_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_game_motion_vector_field_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_inpainting_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_optical_flow_vector_field_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_reconstruct_and_dilate_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_reconstruct_previous_depth_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_frameinterpolation_setup_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_compute_luminance_pyramid_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_compute_optical_flow_advanced_pass_v5.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_compute_scd_divergence_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_filter_optical_flow_pass_v5.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_generate_scd_histogram_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_prepare_luma_pass.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\ffx_opticalflow_scale_optical_flow_advanced_pass_v5.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\FrameInterpolationSwapchainDebugPacing.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\fsr3\internal\shaders\FrameInterpolationSwapchainUiComposition.hlsl`
|
||||
- `Kits\FidelityFX\framegeneration\include\dx12\ffx_api_framegeneration_dx12.h`
|
||||
- `Kits\FidelityFX\framegeneration\include\dx12\ffx_api_framegeneration_dx12.hpp`
|
||||
- `Kits\FidelityFX\framegeneration\include\ffx_framegeneration_api_types.h`
|
||||
- `Kits\FidelityFX\framegeneration\include\ffx_framegeneration.h`
|
||||
- `Kits\FidelityFX\framegeneration\include\ffx_framegeneration.hpp`
|
||||
- `Kits\FidelityFX\framegeneration\internal\ffx_framegeneration_internal.h`
|
||||
- `Kits\FidelityFX\radiancecache\include\ffx_radiancecache.h`
|
||||
- `Kits\FidelityFX\radiancecache\include\ffx_radiancecache.hpp`
|
||||
- `Kits\FidelityFX\readme.md`
|
||||
- `Kits\FidelityFX\signedbin\amd_fidelityfx_denoiser_dx12.dll`
|
||||
- `Kits\FidelityFX\signedbin\amd_fidelityfx_framegeneration_dx12.dll`
|
||||
- `Kits\FidelityFX\signedbin\amd_fidelityfx_loader_dx12.dll`
|
||||
- `Kits\FidelityFX\signedbin\amd_fidelityfx_loader_dx12.lib`
|
||||
- `Kits\FidelityFX\signedbin\amd_fidelityfx_radiancecache_dx12.dll`
|
||||
- `Kits\FidelityFX\signedbin\amd_fidelityfx_upscaler_dx12.dll`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\dx12\BuildFSR2Shaders.bat`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\dx12\BuildFSR3UpscalerShaders.bat`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\ffx_fsr2.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\ffx_fsr3upscaler.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\ffx_provider_fsr2.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\ffx_provider_fsr3upscale.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\ffx_spd.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr1\ffx_fsr1.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_accumulate.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_callbacks_hlsl.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_common.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_compute_luminance_pyramid.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_depth_clip.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_lock.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_postprocess_lock_status.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_rcas.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_reconstruct_dilated_velocity_and_previous_depth.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_reproject.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_resources.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_sample.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_tcr_autogen.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr2\ffx_fsr2_upsample.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3\ffx_fsr3_callbacks_hlsl.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3\ffx_fsr3_common.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3\ffx_fsr3_resources.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_accumulate.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_callbacks_hlsl.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_common.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_debug_view.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_luma_instability.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_luma_pyramid.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_prepare_inputs.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_prepare_reactivity.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_rcas.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_reproject.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_resources.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_sample.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_shading_change_pyramid.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_shading_change.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\fsr3upscaler\ffx_fsr3upscaler_upsample.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\include\gpu\spd\ffx_spd.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr2_maximum_bias.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr2_private.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr2_shaderblobs.cpp`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr2_shaderblobs.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr2.cpp`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr3_private.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr3upscaler_private.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr3upscaler_shaderblobs.cpp`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr3upscaler_shaderblobs.h`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_fsr3upscaler.cpp`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_provider_fsr2.cpp`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\ffx_provider_fsr3upscale.cpp`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_accumulate_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_autogen_reactive_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_compute_luminance_pyramid_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_debug_blit.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_depth_clip_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_lock_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_rcas_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_reconstruct_previous_depth_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr2_tcr_autogen_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_accumulate_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_autogen_reactive_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_debug_view_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_luma_instability_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_luma_pyramid_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_prepare_inputs_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_prepare_reactivity_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_rcas_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_shading_change_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\fsr3\internal\shaders\ffx_fsr3upscaler_shading_change_pyramid_pass.hlsl`
|
||||
- `Kits\FidelityFX\upscalers\include\ffx_upscale.h`
|
||||
- `Kits\FidelityFX\upscalers\include\ffx_upscale.hpp`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64_2022_MD.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64_2022_MDd.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64_2022_MT.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64_2022_MTd.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64.dll`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64.exp`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64d.exp`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_ARM64d.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64_2019_MD.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64_2019_MDd.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64_2019_MT.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64_2019_MTd.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64.dll`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64.exp`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64d.exp`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs_x64d.lib`
|
||||
- `Kits\OpenSource\amd\acs\amd_acs.h`
|
||||
- `Kits\OpenSource\amd\acs\LICENSE.txt`
|
||||
- `Kits\OpenSource\amd\acs\README.md`
|
||||
- `Kits\OpenSource\amd\ags\ags_shader_intrinsics_dx12.hlsl`
|
||||
- `Kits\OpenSource\amd\ags\amd_ags_x64.dll`
|
||||
- `Kits\OpenSource\amd\ags\amd_ags_x64.lib`
|
||||
- `Kits\OpenSource\amd\ags\amd_ags.chm`
|
||||
- `Kits\OpenSource\amd\ags\amd_ags.h`
|
||||
- `Kits\OpenSource\amd\ags\LICENSE.txt`
|
||||
- `Kits\OpenSource\amd\ags\README.md`
|
||||
- `Kits\OpenSource\amd\antilag2\ffx_antilag2_dx12.h`
|
||||
- `Kits\OpenSource\amd\antilag2\LICENSE.txt`
|
||||
- `Kits\OpenSource\amd\memoryallocator\D3D12MemAlloc.cpp`
|
||||
- `Kits\OpenSource\amd\memoryallocator\D3D12MemAlloc.h`
|
||||
- `Kits\OpenSource\amd\memoryallocator\license.txt`
|
||||
- `Kits\OpenSource\amd\memoryallocator\memoryallocator.cpp`
|
||||
- `Kits\OpenSource\amd\memoryallocator\memoryallocator.h`
|
||||
- `Kits\OpenSource\amd\memoryallocator\vk_mem_alloc.h`
|
||||
- `Kits\OpenSource\imgui\backends\imgui_impl_dx12.cpp`
|
||||
- `Kits\OpenSource\imgui\backends\imgui_impl_dx12.h`
|
||||
- `Kits\OpenSource\imgui\backends\imgui_impl_win32.cpp`
|
||||
- `Kits\OpenSource\imgui\backends\imgui_impl_win32.h`
|
||||
- `Kits\OpenSource\imgui\docs\BACKENDS.md`
|
||||
- `Kits\OpenSource\imgui\docs\CHANGELOG.txt`
|
||||
- `Kits\OpenSource\imgui\docs\CONTRIBUTING.md`
|
||||
- `Kits\OpenSource\imgui\docs\EXAMPLES.md`
|
||||
- `Kits\OpenSource\imgui\docs\FAQ.md`
|
||||
- `Kits\OpenSource\imgui\docs\FONTS.md`
|
||||
- `Kits\OpenSource\imgui\docs\README.md`
|
||||
- `Kits\OpenSource\imgui\docs\TODO.txt`
|
||||
- `Kits\OpenSource\imgui\imconfig.h`
|
||||
- `Kits\OpenSource\imgui\imgui_demo.cpp`
|
||||
- `Kits\OpenSource\imgui\imgui_draw.cpp`
|
||||
- `Kits\OpenSource\imgui\imgui_internal.h`
|
||||
- `Kits\OpenSource\imgui\imgui_tables.cpp`
|
||||
- `Kits\OpenSource\imgui\imgui_widgets.cpp`
|
||||
- `Kits\OpenSource\imgui\imgui.cpp`
|
||||
- `Kits\OpenSource\imgui\imgui.h`
|
||||
- `Kits\OpenSource\imgui\imstb_rectpack.h`
|
||||
- `Kits\OpenSource\imgui\imstb_textedit.h`
|
||||
- `Kits\OpenSource\imgui\imstb_truetype.h`
|
||||
- `Kits\OpenSource\imgui\LICENSE.txt`
|
||||
- `Kits\OpenSource\imgui\misc\cpp\imgui_stdlib.cpp`
|
||||
- `Kits\OpenSource\imgui\misc\cpp\imgui_stdlib.h`
|
||||
- `Kits\OpenSource\imgui\misc\cpp\README.txt`
|
||||
- `Kits\OpenSource\imgui\misc\debuggers\imgui.gdb`
|
||||
- `Kits\OpenSource\imgui\misc\debuggers\imgui.natstepfilter`
|
||||
- `Kits\OpenSource\imgui\misc\debuggers\imgui.natvis`
|
||||
- `Kits\OpenSource\imgui\misc\debuggers\README.txt`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\binary_to_compressed_c.cpp`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\Cousine-Regular.ttf`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\DroidSans.ttf`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\Karla-Regular.ttf`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\ProggyClean.ttf`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\ProggyTiny.ttf`
|
||||
- `Kits\OpenSource\imgui\misc\fonts\Roboto-Medium.ttf`
|
||||
- `Kits\OpenSource\imgui\misc\freetype\imgui_freetype.cpp`
|
||||
- `Kits\OpenSource\imgui\misc\freetype\imgui_freetype.h`
|
||||
- `Kits\OpenSource\imgui\misc\freetype\README.md`
|
||||
- `Kits\OpenSource\imgui\misc\README.txt`
|
||||
- `Kits\OpenSource\imgui\misc\single_file\imgui_single_file.h`
|
||||
- `Kits\OpenSource\nlohmann\json_fwd.hpp`
|
||||
- `Kits\OpenSource\nlohmann\json.hpp`
|
||||
- `Kits\OpenSource\nlohmann\LICENSE.MIT`
|
||||
- `Kits\OpenSource\nlohmann\version.txt`
|
||||
- `Kits\OpenSource\stb\LICENSE.MIT`
|
||||
- `Kits\OpenSource\stb\stb_image_write.h`
|
||||
- `Kits\OpenSource\stb\stb_image.h`
|
||||
- `Kits\OpenSource\vectormath\common.hpp`
|
||||
- `Kits\OpenSource\vectormath\docs\VectorMath-Library-Overview.pdf`
|
||||
- `Kits\OpenSource\vectormath\LICENSE.txt`
|
||||
- `Kits\OpenSource\vectormath\README.md`
|
||||
- `Kits\OpenSource\vectormath\scalar\matrix.hpp`
|
||||
- `Kits\OpenSource\vectormath\scalar\quaternion.hpp`
|
||||
- `Kits\OpenSource\vectormath\scalar\vector.hpp`
|
||||
- `Kits\OpenSource\vectormath\scalar\vectormath.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\boolinvec.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\floatinvec.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\internal.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\matrix.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\quaternion.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\vecidx.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\vector.hpp`
|
||||
- `Kits\OpenSource\vectormath\sse\vectormath.hpp`
|
||||
- `Kits\OpenSource\vectormath\vec2d.hpp`
|
||||
- `Kits\OpenSource\vectormath\vectormath.hpp`
|
||||
- `readme.md`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\config\denoiserconfig.json`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\debugoverlayrendermodule.cpp`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\debugoverlayrendermodule.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\denoiserrendermodule.cpp`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\denoiserrendermodule.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\dpiawarescaling.manifest`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\FidelityFX_Denoiser_Sample_2022.props`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\FidelityFX_Denoiser_Sample_2022.sln`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\FidelityFX_Denoiser_Sample_2022.vcxproj`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\FidelityFX_Denoiser_Sample_2022.vcxproj.filters`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\fsrapirendermodule.cpp`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\fsrapirendermodule.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\main.cpp`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\pathtracingrendermodule.cpp`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\pathtracingrendermodule.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\resources\cauldron.rc`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\resources\GPUOpenChip.ico`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\resources\resource.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\sample.cpp`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\sample.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\common.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\debug_overlay.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\denoiser_compose.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\denoiser_prepass.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\geometry.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\importance_sampling.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\material.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\random.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\raytracing_common.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\shared.h`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\trace_rays_denoiser.hlsl`
|
||||
- `Samples\Denoisers\FidelityFX_Denoiser\dx12\shaders\types.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\config.json`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\CopyNrcDlls.bat`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\D3DBase.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\D3DPipeline.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\D3DPipeline.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\dpiawarescaling.manifest`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\DXC.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\DXC.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\FidelityFX_NRC_2022.props`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\FidelityFX_NRC_2022.sln`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\FidelityFX_NRC_2022.vcxproj`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\FidelityFX_NRC_2022.vcxproj.filters`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\RenderManager.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\RenderManager.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\resources\cauldron.rc`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\resources\GPUOpenChip.ico`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\resources\resource.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\ShaderGraph.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\ShaderGraph.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Basis.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\bsdf\Beckmann.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\bsdf\BSDF.hlsli`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\bsdf\GGX.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\bsdf\Simple.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Camera.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Cel.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\color\Color.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\color\Grade.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Constants.hlsli`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Ctor.hlsli`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\FrameCtx.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Half.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Hash.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Hatch.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\integrator\PT.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\light\Planar.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Math.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\RadianceCache.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\random\Halton.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\random\OwenSobol.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\random\PCG.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\random\Random.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Ray.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\texture\Simple.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\tracable\Boolean.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\tracable\Intersector.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\tracable\KIFS.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\tracable\Primitive.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\tracable\SimpleCSG.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Transform.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\common\Triplanar.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\scene\Composite.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\scene\Display.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\scene\Meta.json`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\shaders\scene\Renderer.hlsl`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Assert.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Backtrace.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Backtrace.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\FilesystemUtils.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\FilesystemUtils.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\HighResTimer.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Json.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Json.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Log.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\Log.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\StringUtils.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\utils\StringUtils.h`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\vcpkg.json`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\Win32.cpp`
|
||||
- `Samples\RadianceCaches\FidelityFX_NRC\dx12\Win32.h`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\config\fsrapiconfig.json`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\dpiawarescaling.manifest`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\FidelityFX_FSR_2022.props`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\FidelityFX_FSR_2022.sln`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\FidelityFX_FSR_2022.vcxproj`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\FidelityFX_FSR_2022.vcxproj.filters`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\fsrapirendermodule.cpp`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\fsrapirendermodule.h`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\main.cpp`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\resources\cauldron.rc`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\resources\GPUOpenChip.ico`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\resources\resource.h`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\sample.cpp`
|
||||
- `Samples\Upscalers\FidelityFX_FSR\dx12\sample.h`
|
||||
- `Tools\media_delivery\MediaDelivery.exe`
|
||||
- `UpdateMedia.bat`
|
||||
|
||||
are subject to the following license:
|
||||
|
||||
|
||||
Copyright (C) Advanced Micro Devices, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -10,7 +10,8 @@ add_executable(hook-harness main.cpp proxy_swapchain.h)
|
||||
# reasoning brings in fl_hook_inventory.h from the Overlay's include directory:
|
||||
# --probe-upscaler-resolve calls the OVERLAY'S resolver, not a copy of it, or it
|
||||
# would prove a fact about GetProcAddress.
|
||||
target_link_libraries(hook-harness PRIVATE FrameLedger.Shm fl_dxgi_vtable fl_native_flags fl_streamline_headers)
|
||||
target_link_libraries(hook-harness PRIVATE FrameLedger.Shm fl_dxgi_vtable fl_native_flags fl_streamline_headers
|
||||
fl_fidelityfx_headers)
|
||||
target_include_directories(hook-harness PRIVATE "${CMAKE_SOURCE_DIR}/FrameLedger.Overlay/include")
|
||||
target_compile_definitions(hook-harness PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||
|
||||
@@ -23,6 +24,12 @@ target_compile_definitions(hook-harness PRIVATE
|
||||
FL_STUB_SL_INTERPOSER=L"$<TARGET_FILE:fl_stub_sl_interposer>"
|
||||
FL_STUB_SL_COMMON=L"$<TARGET_FILE:fl_stub_sl_common>"
|
||||
FL_STUB_SL_INTERPOSER_V1=L"$<TARGET_FILE:fl_stub_sl_interposer_v1>"
|
||||
# The three AMD leaves and the loader decoy (tools/vendor-stubs, same rule:
|
||||
# absolute paths, never a name a game directory could satisfy).
|
||||
FL_STUB_FFX_DX12=L"$<TARGET_FILE:fl_stub_ffx_dx12>"
|
||||
FL_STUB_FFX_UPSCALER=L"$<TARGET_FILE:fl_stub_ffx_upscaler>"
|
||||
FL_STUB_FFX_FG=L"$<TARGET_FILE:fl_stub_ffx_fg>"
|
||||
FL_STUB_FFX_LOADER=L"$<TARGET_FILE:fl_stub_ffx_loader>"
|
||||
# Shared with fl_guard_test from src/native/CMakeLists.txt, so the fixture and
|
||||
# the assertion cannot hold different numbers.
|
||||
FL_TAGGED_RENDER_W=${FL_TAGGED_RENDER_W}
|
||||
@@ -31,7 +38,8 @@ target_compile_definitions(hook-harness PRIVATE
|
||||
FL_DXR_DISPATCH_H=${FL_DXR_DISPATCH_H}
|
||||
FL_DXR_DISPATCH_D=${FL_DXR_DISPATCH_D}
|
||||
)
|
||||
add_dependencies(hook-harness fl_stub_sl_interposer fl_stub_sl_common fl_stub_sl_interposer_v1)
|
||||
add_dependencies(hook-harness fl_stub_sl_interposer fl_stub_sl_common fl_stub_sl_interposer_v1
|
||||
fl_stub_ffx_dx12 fl_stub_ffx_upscaler fl_stub_ffx_fg fl_stub_ffx_loader)
|
||||
|
||||
# WARP + CreateSwapChainForComposition means no GPU and no HWND are needed, so
|
||||
# these run on a hosted CI runner — which is what 20_OPEN_QUESTIONS §H4 said
|
||||
@@ -106,6 +114,16 @@ add_test(NAME fl_upscaler_resolve COMMAND hook-harness --probe-upscaler-resolve)
|
||||
# inside fl_upscaler_resolve would have the two silently test each other.
|
||||
add_test(NAME fl_sl_abi_guard COMMAND hook-harness --probe-sl-abi)
|
||||
|
||||
# AMD's version of the scoping argument, one step further along. Four modules
|
||||
# export the same five ffx-api names -- three LEAVES and the SDK 2.x LOADER that
|
||||
# forwards to two of them -- and the Overlay hooks the leaves only, because a
|
||||
# dispatch on a loader-shipping title crosses two exports of the same name and
|
||||
# hooking both would count it twice. This probe drives the Overlay's own resolver
|
||||
# against all four, and then pushes dispatches THROUGH the loader decoy to prove the
|
||||
# forwarding fixture the [ffx] injected cases rest on actually forwards -- the
|
||||
# vacuity guard for a K = 1 control that would otherwise be about nothing.
|
||||
add_test(NAME fl_ffx_resolve COMMAND hook-harness --probe-ffx-resolve)
|
||||
|
||||
# The inputs walk against malformed input. A unit probe rather than an injected
|
||||
# case: every branch dereferences caller-supplied pointers, a fault in the real
|
||||
# thing burns one of the three that self-disable the Overlay, and a game fixture
|
||||
|
||||
@@ -52,6 +52,21 @@
|
||||
// production call site at all
|
||||
// --presents-per-eval K
|
||||
// the FG factor --hold-presenting-fg emits. 1 is the control
|
||||
// --probe-ffx-resolve
|
||||
// AMD ffx-api: the Overlay's resolver picks each LEAF's own
|
||||
// ffxDispatch with the loader decoy present, and a dispatch
|
||||
// pushed through that decoy reaches exactly one leaf, once
|
||||
// --hold-presenting-ffx N
|
||||
// present for N seconds dispatching through the ffx-api the way
|
||||
// an FSR title does: one UPSCALE and one PREPARE (issued twice,
|
||||
// same frameID) per application frame, one FRAMEGENERATION per
|
||||
// frame at K > 1, then K presents (--presents-per-eval K)
|
||||
// --ffx-topology 1x|2x
|
||||
// which vendor shape --hold-presenting-ffx stands in: 2x (default)
|
||||
// is the SDK 2.x pair of effect DLLs behind the LOADER decoy, 1x
|
||||
// the SDK 1.1.x monolith sending the pre-V2 PREPARE
|
||||
// --ffx-no-prepare drop the PREPARE dispatch: the frame-generation-OFF shape, where
|
||||
// the Overlay must count UPSCALE dispatches instead
|
||||
//
|
||||
// This list was incomplete for several modes before 2026-08-15 and is not the
|
||||
// authority: the strcmp chain in main() is. Kept in step because a reader looking
|
||||
@@ -82,6 +97,12 @@
|
||||
// the upscaled-hold mode makes. Types only, never linked -- the same rule the
|
||||
// Overlay follows (third_party/streamline/README.md).
|
||||
#include <sl.h>
|
||||
// AMD FidelityFX, the same way and for the same reason: descriptor TYPES only, from
|
||||
// the vendored MIT headers, never linked. Used by --probe-ffx-resolve to build the
|
||||
// descriptors it pushes through the loader decoy.
|
||||
#include <ffx_api.h>
|
||||
#include <ffx_framegeneration.h>
|
||||
#include <ffx_upscale.h>
|
||||
|
||||
#pragma comment(lib, "d3d11.lib")
|
||||
#pragma comment(lib, "d3d12.lib")
|
||||
@@ -1969,6 +1990,157 @@ bool ProbeUpscalerResolve() {
|
||||
return g_failures == 0;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// AMD FidelityFX: LEAF-scoped resolution of ffxDispatch, with the LOADER in the
|
||||
// process and forwarding.
|
||||
//
|
||||
// Four modules export the same five names here, exactly as on a loader-shipping
|
||||
// title, and the property under test is fl_hook_inventory.h's: the Overlay's own
|
||||
// resolver returns each LEAF's own export, never the loader's, and refuses a module
|
||||
// of a leaf's name that does not speak the five-export ABI. The second half is a
|
||||
// VACUITY GUARD for the [ffx] injected cases: a dispatch pushed through the loader
|
||||
// decoy must arrive at exactly one leaf, counted once -- or the K = 1 control in
|
||||
// those cases would be proving something about a forwarder that did not forward.
|
||||
// ---------------------------------------------------------------------------
|
||||
using StubFfxCountFn = unsigned int(STDMETHODCALLTYPE*)(uint64_t);
|
||||
using StubFfxPlainCountFn = unsigned int(STDMETHODCALLTYPE*)();
|
||||
using StubLoaderBindFn = void(STDMETHODCALLTYPE*)(HMODULE, HMODULE);
|
||||
|
||||
bool ProbeFfxResolve() {
|
||||
std::printf("\n[ffx] leaf-scoped resolution of ffxDispatch, with the loader decoy present and forwarding\n");
|
||||
|
||||
const HMODULE monolith = LoadStubExactly(FL_STUB_FFX_DX12);
|
||||
const HMODULE upscaler = LoadStubExactly(FL_STUB_FFX_UPSCALER);
|
||||
const HMODULE fg = LoadStubExactly(FL_STUB_FFX_FG);
|
||||
const HMODULE loader = LoadStubExactly(FL_STUB_FFX_LOADER);
|
||||
const HMODULE decoy = LoadStubExactly(FL_STUB_SL_COMMON);
|
||||
Check(monolith != nullptr,
|
||||
"the amd_fidelityfx_dx12.dll stub (the SDK 1.1.x monolith) loaded from its absolute path");
|
||||
Check(upscaler != nullptr, "the amd_fidelityfx_upscaler_dx12.dll stub loaded");
|
||||
Check(fg != nullptr, "the amd_fidelityfx_framegeneration_dx12.dll stub loaded");
|
||||
Check(loader != nullptr, "the amd_fidelityfx_loader_dx12.dll forwarding decoy loaded");
|
||||
Check(decoy != nullptr, "the sl.common.dll decoy loaded, for the ABI arm's negative");
|
||||
if (monolith == nullptr || upscaler == nullptr || fg == nullptr || loader == nullptr || decoy == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// VACUITY FIRST. All four really export the name -- the loader included -- so
|
||||
// "the loader is not a row" is a decision the inventory took, not an accident
|
||||
// of the fixture exporting nothing (stub_sl_common.cpp records that exact
|
||||
// accident against its own first version).
|
||||
Check(GetProcAddress(monolith, "ffxDispatch") != nullptr, "the monolith stub exports ffxDispatch");
|
||||
Check(GetProcAddress(upscaler, "ffxDispatch") != nullptr, "the upscaler stub exports ffxDispatch");
|
||||
Check(GetProcAddress(fg, "ffxDispatch") != nullptr, "the frame-generation stub exports ffxDispatch");
|
||||
Check(GetProcAddress(loader, "ffxDispatch") != nullptr,
|
||||
"the LOADER stub exports ffxDispatch too - so leaving it out of the inventory is scoping, not luck");
|
||||
Check(fl::inventory::SpeaksFfxApi(loader),
|
||||
"and the loader speaks all five names - refusing it is not an ABI verdict");
|
||||
|
||||
// The leaf table agrees with itself at runtime, case-insensitively as the loader is.
|
||||
Check(fl::inventory::FfxLeafOf(L"amd_fidelityfx_dx12.dll") == static_cast<int>(fl::inventory::kFfxLeafMonolith),
|
||||
"amd_fidelityfx_dx12.dll is the monolith leaf");
|
||||
Check(fl::inventory::FfxLeafOf(L"AMD_FIDELITYFX_UPSCALER_DX12.DLL") ==
|
||||
static_cast<int>(fl::inventory::kFfxLeafUpscaler),
|
||||
"leaf lookup is case-insensitive, as GetModuleHandleExW is");
|
||||
Check(fl::inventory::FfxLeafOf(L"amd_fidelityfx_framegeneration_dx12.dll") ==
|
||||
static_cast<int>(fl::inventory::kFfxLeafFrameGeneration),
|
||||
"amd_fidelityfx_framegeneration_dx12.dll is the frame-generation leaf");
|
||||
Check(fl::inventory::FfxLeafOf(fl::inventory::kFfxLoaderModule) < 0, "the loader is not a leaf");
|
||||
Check(fl::inventory::FfxLeafOf(nullptr) < 0, "a null module name is not a leaf");
|
||||
|
||||
// No inventory row names the loader -- walked at runtime here as well as
|
||||
// asserted at compile time in the header, so the property has two witnesses.
|
||||
bool loaderIsARow = false;
|
||||
#define FL_PROBE_ROW(mod, sym, family) \
|
||||
if (_wcsicmp(mod, fl::inventory::kFfxLoaderModule) == 0) { \
|
||||
loaderIsARow = true; \
|
||||
}
|
||||
FL_HOOK_INVENTORY(FL_PROBE_ROW)
|
||||
#undef FL_PROBE_ROW
|
||||
Check(!loaderIsARow, "no FL_HOOK_INVENTORY row names amd_fidelityfx_loader_dx12.dll");
|
||||
|
||||
// THE PROPERTY: the Overlay's own resolver returns each leaf's OWN export.
|
||||
void* fromMonolith = fl::inventory::ResolveScoped(L"amd_fidelityfx_dx12.dll", "ffxDispatch");
|
||||
void* fromUpscaler = fl::inventory::ResolveScoped(L"amd_fidelityfx_upscaler_dx12.dll", "ffxDispatch");
|
||||
void* fromFg = fl::inventory::ResolveScoped(L"amd_fidelityfx_framegeneration_dx12.dll", "ffxDispatch");
|
||||
Check(fromMonolith == reinterpret_cast<void*>(GetProcAddress(monolith, "ffxDispatch")),
|
||||
"ResolveScoped returned the monolith's own export");
|
||||
Check(fromUpscaler == reinterpret_cast<void*>(GetProcAddress(upscaler, "ffxDispatch")),
|
||||
"ResolveScoped returned the upscaler leaf's own export");
|
||||
Check(fromFg == reinterpret_cast<void*>(GetProcAddress(fg, "ffxDispatch")),
|
||||
"ResolveScoped returned the frame-generation leaf's own export");
|
||||
Check(fromMonolith != nullptr && fromUpscaler != nullptr && fromFg != nullptr && fromMonolith != fromUpscaler &&
|
||||
fromUpscaler != fromFg && fromMonolith != fromFg,
|
||||
"three leaves, three DIFFERENT addresses - a name-only resolver could not tell them apart");
|
||||
Check(fromUpscaler != reinterpret_cast<void*>(GetProcAddress(loader, "ffxDispatch")) &&
|
||||
fromFg != reinterpret_cast<void*>(GetProcAddress(loader, "ffxDispatch")),
|
||||
"and none of them is the loader's export");
|
||||
|
||||
// The ABI arm, both directions.
|
||||
Check(fl::inventory::SpeaksExpectedAbi(L"amd_fidelityfx_upscaler_dx12.dll", upscaler),
|
||||
"a leaf module exporting all five names passes the AMD arm");
|
||||
Check(!fl::inventory::SpeaksFfxApi(decoy), "the sl.common.dll decoy does not speak ffx-api");
|
||||
Check(!fl::inventory::SpeaksExpectedAbi(L"amd_fidelityfx_upscaler_dx12.dll", decoy),
|
||||
"a leaf's NAME on a module without the five exports is REFUSED");
|
||||
|
||||
// Absent and misspelt resolve to nothing, and nothing is loaded to find out.
|
||||
Check(fl::inventory::ResolveScoped(L"amd_fidelityfx_denoiser_dx12.dll", "ffxDispatch") == nullptr,
|
||||
"a module not in this process resolves to nullptr rather than being loaded");
|
||||
Check(GetModuleHandleW(L"amd_fidelityfx_denoiser_dx12.dll") == nullptr, "and it really was not loaded");
|
||||
Check(fl::inventory::ResolveScoped(L"amd_fidelityfx_dx12.dll", "ffxDispatchX") == nullptr,
|
||||
"a misspelt symbol resolves to nullptr - it cannot silently find a neighbour");
|
||||
|
||||
// THE FORWARDING FIXTURE WORKS, which the injected [ffx] cases depend on.
|
||||
auto bind = reinterpret_cast<StubLoaderBindFn>(reinterpret_cast<void*>(GetProcAddress(loader, "FlStubLoaderBind")));
|
||||
auto loaderDispatch =
|
||||
reinterpret_cast<PfnFfxDispatch>(reinterpret_cast<void*>(GetProcAddress(loader, "ffxDispatch")));
|
||||
auto forwarded =
|
||||
reinterpret_cast<StubFfxPlainCountFn>(reinterpret_cast<void*>(GetProcAddress(loader, "FlStubLoaderForwarded")));
|
||||
auto countUp =
|
||||
reinterpret_cast<StubFfxCountFn>(reinterpret_cast<void*>(GetProcAddress(upscaler, "FlStubFfxDispatchCount")));
|
||||
auto countFg =
|
||||
reinterpret_cast<StubFfxCountFn>(reinterpret_cast<void*>(GetProcAddress(fg, "FlStubFfxDispatchCount")));
|
||||
auto countMono =
|
||||
reinterpret_cast<StubFfxCountFn>(reinterpret_cast<void*>(GetProcAddress(monolith, "FlStubFfxDispatchCount")));
|
||||
Check(bind != nullptr && loaderDispatch != nullptr && forwarded != nullptr && countUp != nullptr &&
|
||||
countFg != nullptr && countMono != nullptr,
|
||||
"the fixtures export their binding and counting entry points");
|
||||
if (bind == nullptr || loaderDispatch == nullptr || forwarded == nullptr || countUp == nullptr ||
|
||||
countFg == nullptr || countMono == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The descriptors come from the vendored structs, so the fixture and the
|
||||
// detour agree about the layout by construction.
|
||||
ffxDispatchDescUpscale up{};
|
||||
up.header.type = FFX_API_DISPATCH_DESC_TYPE_UPSCALE;
|
||||
up.renderSize.width = kTaggedRenderW;
|
||||
up.renderSize.height = kTaggedRenderH;
|
||||
Check(loaderDispatch(nullptr, &up.header) == FFX_API_RETURN_NO_PROVIDER,
|
||||
"an UNBOUND loader answers NO_PROVIDER rather than forwarding into nothing");
|
||||
|
||||
bind(upscaler, fg);
|
||||
Check(loaderDispatch(nullptr, &up.header) == FFX_API_RETURN_OK, "an UPSCALE dispatch through the loader succeeds");
|
||||
Check(countUp(FFX_API_DISPATCH_DESC_TYPE_UPSCALE) == 1u, "...and reached the UPSCALER leaf exactly once");
|
||||
Check(countFg(FFX_API_DISPATCH_DESC_TYPE_UPSCALE) == 0u, "not the frame-generation leaf");
|
||||
Check(countMono(FFX_API_DISPATCH_DESC_TYPE_UPSCALE) == 0u,
|
||||
"and not the monolith, which is outside the loader's chain");
|
||||
|
||||
ffxDispatchDescFrameGenerationPrepareV2 prep{};
|
||||
prep.header.type = FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2;
|
||||
prep.frameID = 1u;
|
||||
prep.renderSize.width = kTaggedRenderW;
|
||||
prep.renderSize.height = kTaggedRenderH;
|
||||
Check(loaderDispatch(nullptr, &prep.header) == FFX_API_RETURN_OK,
|
||||
"a PREPARE_V2 dispatch through the loader succeeds");
|
||||
Check(countFg(FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2) == 1u,
|
||||
"...and reached the FRAME-GENERATION leaf exactly once");
|
||||
Check(countUp(FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2) == 0u, "not the upscaler leaf");
|
||||
Check(countUp(FFX_API_DISPATCH_DESC_TYPE_UPSCALE) == 1u, "and the upscaler's own count did not move");
|
||||
Check(forwarded() == 2u, "the loader forwarded exactly the two calls that had a provider");
|
||||
return g_failures == 0;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// A target that EVALUATES AN UPSCALER while it presents.
|
||||
//
|
||||
@@ -2157,6 +2329,118 @@ int HoldPresentingFg(Gfx& g, int seconds, bool real, int presentsPerEval) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// A target that dispatches through the ffx-api the way an FSR title does.
|
||||
//
|
||||
// TWO TOPOLOGIES, because the vendor ships two. `2x` is the SDK 2.x shape: the two
|
||||
// effect-DLL leaves behind the LOADER decoy, every dispatch entering through the
|
||||
// loader's export and reaching a leaf through the leaf's -- the loader-shipping
|
||||
// titles, and the UE5 shape once the plugin's built-in loader is stood in for by
|
||||
// ours. `1x` is the SDK 1.1.x monolith: one module, no loader, PREPARE in its pre-V2
|
||||
// shape. The Overlay must read the same numbers off both, and the K = 1 control must
|
||||
// read 1.0 on both -- with the loader in the chain, a writer that hooked the loader
|
||||
// as well as the leaf reads 2.0 there.
|
||||
//
|
||||
// PER APPLICATION FRAME: one UPSCALE (renderSize = the shared tagged extent), the
|
||||
// PREPARE issued TWICE with the same frameID -- the re-issue trap, the way the token
|
||||
// fixture asks three times -- and, at K > 1, one FRAMEGENERATION dispatch carrying
|
||||
// numGeneratedFrames = K-1 as the real swapchain's callback would, then K presents.
|
||||
// --ffx-no-prepare drops the PREPARE entirely: the frame-generation-off shape, where
|
||||
// the Overlay must fall back to the UPSCALE count and K = 1 must still read 1.0.
|
||||
// ---------------------------------------------------------------------------
|
||||
int HoldPresentingFfx(Gfx& g, int seconds, bool real, int presentsPerEval, bool topology2x, bool prepare) {
|
||||
HMODULE entry = nullptr;
|
||||
if (topology2x) {
|
||||
const HMODULE upscaler = LoadStubExactly(FL_STUB_FFX_UPSCALER);
|
||||
const HMODULE fg = LoadStubExactly(FL_STUB_FFX_FG);
|
||||
const HMODULE loader = LoadStubExactly(FL_STUB_FFX_LOADER);
|
||||
if (upscaler == nullptr || fg == nullptr || loader == nullptr) {
|
||||
Check(false, "the SDK 2.x stubs (two leaves and the loader decoy) loaded for the ffx hold");
|
||||
return 1;
|
||||
}
|
||||
auto bind =
|
||||
reinterpret_cast<StubLoaderBindFn>(reinterpret_cast<void*>(GetProcAddress(loader, "FlStubLoaderBind")));
|
||||
if (bind == nullptr) {
|
||||
Check(false, "the loader decoy exports FlStubLoaderBind");
|
||||
return 1;
|
||||
}
|
||||
bind(upscaler, fg);
|
||||
entry = loader;
|
||||
} else {
|
||||
entry = LoadStubExactly(FL_STUB_FFX_DX12);
|
||||
if (entry == nullptr) {
|
||||
Check(false, "the SDK 1.1.x monolith stub loaded for the ffx hold");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
auto dispatch = reinterpret_cast<PfnFfxDispatch>(reinterpret_cast<void*>(GetProcAddress(entry, "ffxDispatch")));
|
||||
if (dispatch == nullptr) {
|
||||
Check(false, "the entry module exports ffxDispatch");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const int k = presentsPerEval < 1 ? 1 : presentsPerEval;
|
||||
const UINT flags = real ? 0u : DXGI_PRESENT_TEST;
|
||||
std::printf(" presenting for %d second(s) [%s], ffx-api %s, one UPSCALE%s per %d present(s)%s\n", seconds,
|
||||
real ? "REAL" : "DXGI_PRESENT_TEST",
|
||||
topology2x ? "SDK 2.x (two leaves behind the loader)" : "SDK 1.1.x (monolith)",
|
||||
prepare ? " + PREPARE x2" : " (no PREPARE)", k, k > 1 ? " + one FRAMEGENERATION" : "");
|
||||
std::printf(" renderSize %ux%u on every UPSCALE%s\n", kTaggedRenderW, kTaggedRenderH,
|
||||
prepare ? " and PREPARE" : "");
|
||||
std::fflush(stdout);
|
||||
|
||||
// Built from the vendored structs, so the fixture and the detour agree about the
|
||||
// layout by construction. The stub reads only the head; the Overlay reads the body.
|
||||
ffxDispatchDescUpscale up{};
|
||||
up.header.type = FFX_API_DISPATCH_DESC_TYPE_UPSCALE;
|
||||
up.renderSize.width = kTaggedRenderW;
|
||||
up.renderSize.height = kTaggedRenderH;
|
||||
up.upscaleSize.width = 1920u;
|
||||
up.upscaleSize.height = 1080u;
|
||||
|
||||
// PREPARE in the shape each generation sends -- V2 for SDK 2.x, the original type
|
||||
// for the 1.1.x monolith -- built in the V2 struct either way, because the two
|
||||
// share their layout through renderSize (the Overlay asserts that at compile time).
|
||||
ffxDispatchDescFrameGenerationPrepareV2 prep{};
|
||||
prep.header.type = topology2x ? FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2
|
||||
: FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE;
|
||||
prep.renderSize = up.renderSize;
|
||||
|
||||
ffxDispatchDescFrameGeneration gen{};
|
||||
gen.header.type = FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION;
|
||||
gen.numGeneratedFrames = static_cast<uint32_t>(k - 1);
|
||||
|
||||
const ULONGLONG until = GetTickCount64() + static_cast<ULONGLONG>(seconds) * 1000ULL;
|
||||
long long presented = 0;
|
||||
long long frames = 0;
|
||||
uint64_t frameId = 0;
|
||||
while (GetTickCount64() < until) {
|
||||
++frameId;
|
||||
dispatch(nullptr, &up.header);
|
||||
if (prepare) {
|
||||
// TWICE, SAME frameID: the SDK's own sample re-issues the prepare when its
|
||||
// configuration changes, and the vendor's contract is about the INDEX. A
|
||||
// writer that counted calls reads 2.0 at K = 1 here.
|
||||
prep.frameID = frameId;
|
||||
dispatch(nullptr, &prep.header);
|
||||
dispatch(nullptr, &prep.header);
|
||||
}
|
||||
if (k > 1) {
|
||||
gen.frameID = frameId;
|
||||
dispatch(nullptr, &gen.header);
|
||||
}
|
||||
++frames;
|
||||
for (int i = 0; i < k; ++i) {
|
||||
g.swapChain->Present(0, flags);
|
||||
++presented;
|
||||
Sleep(8);
|
||||
}
|
||||
}
|
||||
std::printf(" presented=%lld frames=%lld presentsPerEval=%d\n", presented, frames, k);
|
||||
std::fflush(stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// What a frame IS, asserted against DXGI's own counter.
|
||||
//
|
||||
// GetLastPresentCount is the one oracle in this area that does not share the
|
||||
@@ -2236,6 +2520,12 @@ int main(int argc, char** argv) {
|
||||
// apart by one assertion, or the assertion is not measuring the counter.
|
||||
int presentsPerEval = 1;
|
||||
|
||||
// Which vendor shape --hold-presenting-ffx stands in, and whether the title
|
||||
// issues a PREPARE at all. Pre-pass arguments, like --presents-per-eval, so one
|
||||
// hold mode drives every combination and the tests assert one expression.
|
||||
bool ffxTopology2x = true;
|
||||
bool ffxPrepare = true;
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (std::strcmp(argv[i], "--real") == 0) {
|
||||
real = true;
|
||||
@@ -2255,14 +2545,19 @@ int main(int argc, char** argv) {
|
||||
if (presentsPerEval < 1) {
|
||||
presentsPerEval = 1;
|
||||
}
|
||||
} else if (std::strcmp(argv[i], "--ffx-topology") == 0 && i + 1 < argc) {
|
||||
ffxTopology2x = std::strcmp(argv[++i], "1x") != 0;
|
||||
} else if (std::strcmp(argv[i], "--ffx-no-prepare") == 0) {
|
||||
ffxPrepare = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (std::strcmp(argv[i], "--real") == 0 || std::strcmp(argv[i], "--plus-ui") == 0 ||
|
||||
std::strcmp(argv[i], "--present-interval-ms") == 0 || std::strcmp(argv[i], "--presents-per-eval") == 0) {
|
||||
std::strcmp(argv[i], "--present-interval-ms") == 0 || std::strcmp(argv[i], "--presents-per-eval") == 0 ||
|
||||
std::strcmp(argv[i], "--ffx-topology") == 0 || std::strcmp(argv[i], "--ffx-no-prepare") == 0) {
|
||||
if (std::strcmp(argv[i], "--plus-ui") == 0 || std::strcmp(argv[i], "--present-interval-ms") == 0 ||
|
||||
std::strcmp(argv[i], "--presents-per-eval") == 0) {
|
||||
std::strcmp(argv[i], "--presents-per-eval") == 0 || std::strcmp(argv[i], "--ffx-topology") == 0) {
|
||||
++i;
|
||||
}
|
||||
continue; // consumed above
|
||||
@@ -2272,6 +2567,10 @@ int main(int argc, char** argv) {
|
||||
} else if (std::strcmp(argv[i], "--hold-presenting-fg") == 0 && i + 1 < argc) {
|
||||
ok = HoldPresentingFg(g, std::atoi(argv[++i]), real, presentsPerEval) == 0 && ok;
|
||||
ranSomething = true;
|
||||
} else if (std::strcmp(argv[i], "--hold-presenting-ffx") == 0 && i + 1 < argc) {
|
||||
ok =
|
||||
HoldPresentingFfx(g, std::atoi(argv[++i]), real, presentsPerEval, ffxTopology2x, ffxPrepare) == 0 && ok;
|
||||
ranSomething = true;
|
||||
} else if (std::strcmp(argv[i], "--hold-presenting-upscaled") == 0 && i + 1 < argc) {
|
||||
ok = HoldPresentingUpscaled(g, std::atoi(argv[++i]), real, sl::kFeatureDLSS) == 0 && ok;
|
||||
ranSomething = true;
|
||||
@@ -2286,6 +2585,9 @@ int main(int argc, char** argv) {
|
||||
} else if (std::strcmp(argv[i], "--probe-upscaler-resolve") == 0) {
|
||||
ok = ProbeUpscalerResolve() && ok;
|
||||
ranSomething = true;
|
||||
} else if (std::strcmp(argv[i], "--probe-ffx-resolve") == 0) {
|
||||
ok = ProbeFfxResolve() && ok;
|
||||
ranSomething = true;
|
||||
} else if (std::strcmp(argv[i], "--probe-sl-inputs") == 0) {
|
||||
ok = ProbeSlInputs() && ok;
|
||||
ranSomething = true;
|
||||
|
||||
@@ -19,9 +19,11 @@ function(fl_add_vendor_stub target output source)
|
||||
add_library(${target} SHARED ${source})
|
||||
set_target_properties(${target} PROPERTIES OUTPUT_NAME "${output}")
|
||||
# fl_hook_inventory.h (via fl_dxgi_vtable's sibling include dir) binds the
|
||||
# exported name to the Overlay's; fl_streamline_headers supplies the vendor
|
||||
# signature so the stub and the detour cannot disagree about the ABI.
|
||||
target_link_libraries(${target} PRIVATE FrameLedger.Shm fl_native_flags fl_streamline_headers)
|
||||
# exported name to the Overlay's; fl_streamline_headers and fl_fidelityfx_headers
|
||||
# supply the vendor signatures so the stub and the detour cannot disagree about
|
||||
# the ABI. Both are INTERFACE include targets and link nothing.
|
||||
target_link_libraries(${target} PRIVATE FrameLedger.Shm fl_native_flags fl_streamline_headers
|
||||
fl_fidelityfx_headers)
|
||||
target_include_directories(${target} PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}/FrameLedger.Overlay/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
@@ -57,3 +59,19 @@ set_target_properties(fl_stub_sl_interposer_v1 PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/sl1"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/sl1"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/sl1")
|
||||
|
||||
# --- AMD FidelityFX (ffx-api) -------------------------------------------------
|
||||
#
|
||||
# THREE LEAVES AND A FORWARDER. The three modules the Overlay hooks all export the
|
||||
# same five ffx-api names (docs/vendor-exports.json), and so does the SDK 2.x
|
||||
# loader, which forwards to the two effect DLLs and is deliberately NOT an
|
||||
# inventory row. The fixture reproduces exactly that shape: the harness binds the
|
||||
# loader stub to the two 2.x leaf stubs and dispatches THROUGH it, so "the leaf
|
||||
# count reads 1x with a loader in the chain" is a property the [ffx] tests can
|
||||
# falsify rather than a comment in fl_hook_inventory.h.
|
||||
#
|
||||
# Distinct output names, so no output-directory games are needed here.
|
||||
fl_add_vendor_stub(fl_stub_ffx_dx12 "amd_fidelityfx_dx12" stub_amd_fidelityfx_dx12.cpp)
|
||||
fl_add_vendor_stub(fl_stub_ffx_upscaler "amd_fidelityfx_upscaler_dx12" stub_amd_fidelityfx_upscaler_dx12.cpp)
|
||||
fl_add_vendor_stub(fl_stub_ffx_fg "amd_fidelityfx_framegeneration_dx12" stub_amd_fidelityfx_framegeneration_dx12.cpp)
|
||||
fl_add_vendor_stub(fl_stub_ffx_loader "amd_fidelityfx_loader_dx12" stub_amd_fidelityfx_loader_dx12.cpp)
|
||||
@@ -0,0 +1,9 @@
|
||||
// A stub that answers to the name `amd_fidelityfx_dx12.dll` -- the SDK 1.1.x
|
||||
// MONOLITH, which Lies of P, Cyberpunk 2077, Rune Factory and Black Myth: Wukong
|
||||
// ship (1.0.1.41314) -- and exports the five ffx-api entry points.
|
||||
//
|
||||
// A LEAF: the 1.1.x monolith compiled its providers in, so the game's call and the
|
||||
// effect's dispatch are the same export, and the Overlay hooks it directly. The
|
||||
// body is shared with the two SDK 2.x leaves; see stub_ffx_leaf.inl.
|
||||
#define FL_STUB_FFX_MODULE L"amd_fidelityfx_dx12.dll"
|
||||
#include "stub_ffx_leaf.inl"
|
||||
@@ -0,0 +1,12 @@
|
||||
// A stub that answers to the name `amd_fidelityfx_framegeneration_dx12.dll` -- the
|
||||
// SDK 2.x FRAME-GENERATION effect DLL (FSR 3.1 FG 3.1.5 in Expedition 33 and Dying
|
||||
// Light: The Beast, FSR 4 FG 4.0.0 in Hell Is Us), which also owns the
|
||||
// frame-generation swapchain.
|
||||
//
|
||||
// A LEAF, for the same reason as the upscaler leaf. In the real module the
|
||||
// PREPARE dispatch comes from the game once per application frame and the
|
||||
// FRAMEGENERATION dispatch comes back through the game's own callback once per
|
||||
// generated batch; this stub counts both by type and generates nothing. Body
|
||||
// shared with the other leaves; see stub_ffx_leaf.inl.
|
||||
#define FL_STUB_FFX_MODULE L"amd_fidelityfx_framegeneration_dx12.dll"
|
||||
#include "stub_ffx_leaf.inl"
|
||||
@@ -0,0 +1,159 @@
|
||||
// THE FORWARDING DECOY. A module named `amd_fidelityfx_loader_dx12.dll`, exporting
|
||||
// the SAME five names as the leaves -- and it must never be hooked.
|
||||
//
|
||||
// WHY A FORWARDER AND NOT A PLAIN DECOY. stub_sl_common.cpp's decoy proves module
|
||||
// scoping by exporting a name from the wrong module. The AMD hazard is one step
|
||||
// further along: on a loader-shipping title (Dying Light: The Beast, Kingdom Come II,
|
||||
// Black Myth: Wukong) the game calls the LOADER's ffxDispatch, and the loader
|
||||
// calls the EFFECT DLL's ffxDispatch -- the only route it has, since the effect
|
||||
// DLLs export nothing else. Every logical dispatch therefore crosses TWO exports of
|
||||
// the same name, and a writer that hooked both would count each one twice, straight
|
||||
// into fg_factor (03_METRICS: fg_factor = presents / F_app, so a doubled count
|
||||
// HALVES the factor -- reporting x2 frame generation as none). The inventory hooks
|
||||
// the leaves only, and this stub is what makes "the leaf count reads 1x with a
|
||||
// loader in the chain" a property a test can falsify: the harness binds it to the
|
||||
// two SDK 2.x leaf stubs and dispatches THROUGH it, and the leaf counters and the
|
||||
// Overlay's records had better agree with the number of calls the harness made.
|
||||
//
|
||||
// The negative is asserted at compile time, not merely by the fixture: the loader's
|
||||
// name is bound to fl::inventory::kFfxLoaderModule, and both fl_hook_inventory.h
|
||||
// and this file refuse a row for it.
|
||||
//
|
||||
// IT IS A FIXTURE, NOT A CLAIM ABOUT THE REAL LOADER'S INTERNALS. What is measured
|
||||
// is the export tables (docs/vendor-exports.json: five names, all four modules) and
|
||||
// the SDK's own description of the loader as containing no effect code; how the
|
||||
// signed binary routes internally is not ours to read, and it does not matter
|
||||
// here: with only those five exports, forwarding is the only way through.
|
||||
|
||||
#include <ffx_api.h>
|
||||
|
||||
#include "stub_common.h"
|
||||
|
||||
static_assert(!fl::stub::InventoryHasRow(fl::inventory::kFfxLoaderModule, "ffxDispatch"),
|
||||
"amd_fidelityfx_loader_dx12.dll became an inventory row -- hooking the loader AND a leaf counts every "
|
||||
"dispatch twice on a loader-shipping title, straight into fg_factor");
|
||||
static_assert(fl::inventory::FfxLeafOfExact(fl::inventory::kFfxLoaderModule) < 0,
|
||||
"the loader is not a leaf, and the leaf table must not say otherwise");
|
||||
|
||||
namespace {
|
||||
|
||||
struct Bound {
|
||||
PfnFfxCreateContext create = nullptr;
|
||||
PfnFfxDestroyContext destroy = nullptr;
|
||||
PfnFfxConfigure configure = nullptr;
|
||||
PfnFfxQuery query = nullptr;
|
||||
PfnFfxDispatch dispatch = nullptr;
|
||||
};
|
||||
|
||||
Bound g_upscaler;
|
||||
Bound g_frameGeneration;
|
||||
volatile LONG g_forwarded = 0;
|
||||
|
||||
void Bind(Bound& b, HMODULE h) {
|
||||
if (h == nullptr) {
|
||||
b = Bound{};
|
||||
return;
|
||||
}
|
||||
b.create = reinterpret_cast<PfnFfxCreateContext>(reinterpret_cast<void*>(GetProcAddress(h, "ffxCreateContext")));
|
||||
b.destroy = reinterpret_cast<PfnFfxDestroyContext>(reinterpret_cast<void*>(GetProcAddress(h, "ffxDestroyContext")));
|
||||
b.configure = reinterpret_cast<PfnFfxConfigure>(reinterpret_cast<void*>(GetProcAddress(h, "ffxConfigure")));
|
||||
b.query = reinterpret_cast<PfnFfxQuery>(reinterpret_cast<void*>(GetProcAddress(h, "ffxQuery")));
|
||||
b.dispatch = reinterpret_cast<PfnFfxDispatch>(reinterpret_cast<void*>(GetProcAddress(h, "ffxDispatch")));
|
||||
}
|
||||
|
||||
// Route by EFFECT ID, which is what the real loader's provider lookup keys on
|
||||
// (ffx_provider.h: CanProvide compares descType & FFX_API_EFFECT_MASK). The
|
||||
// frame-generation swapchain effect lives in the frame-generation DLL.
|
||||
Bound* Route(ffxStructType_t type) {
|
||||
const uint64_t effect = type & FFX_API_EFFECT_MASK;
|
||||
if (effect == FFX_API_EFFECT_ID_UPSCALE) {
|
||||
return &g_upscaler;
|
||||
}
|
||||
if (effect == FFX_API_EFFECT_ID_FRAMEGENERATION || effect == FFX_API_EFFECT_ID_FRAMEGENERATIONSWAPCHAIN) {
|
||||
return &g_frameGeneration;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
// FrameLedger-named. The harness hands over the two leaf modules it loaded by
|
||||
// absolute path; nothing here searches for a module by name.
|
||||
__declspec(dllexport) void FlStubLoaderBind(HMODULE upscaler, HMODULE frameGeneration) {
|
||||
Bind(g_upscaler, upscaler);
|
||||
Bind(g_frameGeneration, frameGeneration);
|
||||
}
|
||||
|
||||
__declspec(dllexport) unsigned int FlStubLoaderForwarded() {
|
||||
return static_cast<unsigned int>(InterlockedCompareExchange(&g_forwarded, 0, 0));
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxCreateContext(ffxContext* context, ffxCreateContextDescHeader* desc,
|
||||
const ffxAllocationCallbacks* memCb) {
|
||||
if (desc == nullptr) {
|
||||
return FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
Bound* b = Route(desc->type);
|
||||
if (b == nullptr || b->create == nullptr) {
|
||||
return FFX_API_RETURN_NO_PROVIDER;
|
||||
}
|
||||
InterlockedIncrement(&g_forwarded);
|
||||
return b->create(context, desc, memCb);
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxDestroyContext(ffxContext* context, const ffxAllocationCallbacks* memCb) {
|
||||
(void)memCb;
|
||||
if (context != nullptr) {
|
||||
*context = nullptr;
|
||||
}
|
||||
return FFX_API_RETURN_OK;
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxConfigure(ffxContext* context, const ffxConfigureDescHeader* desc) {
|
||||
if (desc == nullptr) {
|
||||
return FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
Bound* b = Route(desc->type);
|
||||
if (b == nullptr || b->configure == nullptr) {
|
||||
return FFX_API_RETURN_NO_PROVIDER;
|
||||
}
|
||||
InterlockedIncrement(&g_forwarded);
|
||||
return b->configure(context, desc);
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxQuery(ffxContext* context, ffxQueryDescHeader* desc) {
|
||||
if (desc == nullptr) {
|
||||
return FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
Bound* b = Route(desc->type);
|
||||
if (b == nullptr || b->query == nullptr) {
|
||||
return FFX_API_RETURN_NO_PROVIDER;
|
||||
}
|
||||
InterlockedIncrement(&g_forwarded);
|
||||
return b->query(context, desc);
|
||||
}
|
||||
|
||||
// The same name the leaves export, one hop earlier. If the Overlay ever hooks this
|
||||
// one, the K = 1 control in the [ffx] tests reads 2x and goes red.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxDispatch(ffxContext* context, const ffxDispatchDescHeader* desc) {
|
||||
if (desc == nullptr) {
|
||||
return FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
Bound* b = Route(desc->type);
|
||||
if (b == nullptr || b->dispatch == nullptr) {
|
||||
return FFX_API_RETURN_NO_PROVIDER;
|
||||
}
|
||||
InterlockedIncrement(&g_forwarded);
|
||||
return b->dispatch(context, desc);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID) {
|
||||
if (reason == DLL_PROCESS_ATTACH) {
|
||||
DisableThreadLibraryCalls(module);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// A stub that answers to the name `amd_fidelityfx_upscaler_dx12.dll` -- the SDK
|
||||
// 2.x UPSCALER effect DLL (FSR 3.1 and FSR 4 providers; 4.0.2 in Expedition 33,
|
||||
// Dying Light: The Beast and Kingdom Come: Deliverance II, 4.0.3 in Hell Is Us).
|
||||
//
|
||||
// A LEAF, reached either through amd_fidelityfx_loader_dx12.dll's forwarding or
|
||||
// directly by a UE5 plugin that compiled the loader in. Either way the effect's
|
||||
// dispatch arrives at THIS module's ffxDispatch, which is why it is a row and the
|
||||
// loader is not. Body shared with the other leaves; see stub_ffx_leaf.inl.
|
||||
#define FL_STUB_FFX_MODULE L"amd_fidelityfx_upscaler_dx12.dll"
|
||||
#include "stub_ffx_leaf.inl"
|
||||
@@ -56,6 +56,20 @@ constexpr bool InventoryHas(const char* name) noexcept {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Does the Overlay's inventory contain this symbol FROM THIS MODULE? The
|
||||
// module-scoped form, for a symbol several modules export: `InventoryHas("ffxDispatch")`
|
||||
// is true whichever AMD module a stub stands in for, and a stub for the LOADER --
|
||||
// which must NOT be a row -- needs to assert the negative about its own name.
|
||||
constexpr bool InventoryHasRow(const wchar_t* module, const char* symbol) noexcept {
|
||||
#define FL_STUB_MATCH_MODULE_ROW(mod, sym, family) \
|
||||
if (fl::inventory::SameW(mod, module) && Same(sym, symbol)) { \
|
||||
return true; \
|
||||
}
|
||||
FL_HOOK_INVENTORY(FL_STUB_MATCH_MODULE_ROW)
|
||||
#undef FL_STUB_MATCH_MODULE_ROW
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace fl::stub
|
||||
|
||||
#endif // FRAMELEDGER_STUB_COMMON_H
|
||||
@@ -0,0 +1,154 @@
|
||||
// The shared body of the three AMD FidelityFX LEAF stubs -- a module that answers
|
||||
// to one of the three names in fl::inventory::kFfxLeafModules and exports the five
|
||||
// ffx-api entry points.
|
||||
//
|
||||
// ONE BODY, THREE MODULES, because that is the vendor's shape: the SDK 1.1.x
|
||||
// monolith and the two SDK 2.x effect DLLs export the same five names and differ
|
||||
// only in which descriptor types they answer. The fixture does not model providers;
|
||||
// it COUNTS DISPATCHES BY DESCRIPTOR TYPE, which is the one thing the Overlay's
|
||||
// detour reads, so a test can assert how many UPSCALE / PREPARE / FRAMEGENERATION
|
||||
// dispatches reached THIS leaf -- and, with the loader decoy in the chain, that a
|
||||
// dispatch forwarded through the loader is counted once, at the leaf, and not
|
||||
// twice.
|
||||
//
|
||||
// THE SIGNATURES AND THE EXPORT LINKAGE COME FROM THE VENDORED MIT HEADER.
|
||||
// ffx_api.h declares every entry point FFX_API_ENTRY, which it defines as
|
||||
// __declspec(dllexport) with no import switch, so defining the function here
|
||||
// exports it under exactly the declaration the Overlay's detour is typed by. The
|
||||
// same header, included by FrameLedger.Overlay for types only, exports nothing
|
||||
// there because nothing there defines these names -- hookinventory-check Pass C
|
||||
// reads the built Overlay's export table to keep that true.
|
||||
//
|
||||
// The including file defines FL_STUB_FFX_MODULE (a wide literal, one of the leaf
|
||||
// names) before including this, and nothing else.
|
||||
|
||||
#ifndef FL_STUB_FFX_MODULE
|
||||
#error "define FL_STUB_FFX_MODULE (the leaf's module name, as a wide literal) before including stub_ffx_leaf.inl"
|
||||
#endif
|
||||
|
||||
#include <ffx_api.h>
|
||||
#include <ffx_framegeneration.h>
|
||||
#include <ffx_upscale.h>
|
||||
|
||||
#include "stub_common.h"
|
||||
|
||||
// Bound to the Overlay's table, both halves: the NAME must be a leaf the
|
||||
// inventory hooks, and the SYMBOL must be the one it hooks there. Renaming a row
|
||||
// is a compile error here rather than a fixture that passes while proving nothing.
|
||||
static_assert(fl::inventory::FfxLeafOfExact(FL_STUB_FFX_MODULE) >= 0,
|
||||
"this stub's module name is not in fl::inventory::kFfxLeafModules, so it stands in for a module the "
|
||||
"Overlay does not hook");
|
||||
static_assert(fl::stub::InventoryHasRow(FL_STUB_FFX_MODULE, "ffxDispatch"),
|
||||
"fl_hook_inventory.h has no ffxDispatch row for this module, so the fixture would exercise a name the "
|
||||
"Overlay does not install (20_OPEN_QUESTIONS S29(b), with a vendor's name on it)");
|
||||
|
||||
namespace {
|
||||
|
||||
// Per-descriptor-type counters, one per type the Overlay decodes plus one bucket
|
||||
// for everything else. Named counters rather than a table so a test reads them by
|
||||
// the vendor's own constant and a typo in the constant is a compile error.
|
||||
volatile LONG g_upscale = 0;
|
||||
volatile LONG g_prepare = 0;
|
||||
volatile LONG g_prepareV2 = 0;
|
||||
volatile LONG g_frameGeneration = 0;
|
||||
volatile LONG g_other = 0;
|
||||
volatile LONG g_contexts = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
extern "C" {
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxCreateContext(ffxContext* context, ffxCreateContextDescHeader* desc,
|
||||
const ffxAllocationCallbacks* memCb) {
|
||||
(void)memCb;
|
||||
if (context == nullptr || desc == nullptr) {
|
||||
return FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
// An opaque non-null handle. Nothing dereferences it -- not the harness, not the
|
||||
// Overlay, whose detour reads the descriptor and never the context.
|
||||
*context = reinterpret_cast<ffxContext>(static_cast<uintptr_t>(InterlockedIncrement(&g_contexts)));
|
||||
return FFX_API_RETURN_OK;
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxDestroyContext(ffxContext* context, const ffxAllocationCallbacks* memCb) {
|
||||
(void)memCb;
|
||||
if (context != nullptr) {
|
||||
*context = nullptr;
|
||||
}
|
||||
return FFX_API_RETURN_OK;
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxConfigure(ffxContext* context, const ffxConfigureDescHeader* desc) {
|
||||
(void)context;
|
||||
return desc != nullptr ? FFX_API_RETURN_OK : FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxQuery(ffxContext* context, ffxQueryDescHeader* desc) {
|
||||
(void)context;
|
||||
return desc != nullptr ? FFX_API_RETURN_OK : FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
|
||||
// THE ROW'S TARGET. Counts by head type and does nothing else -- the descriptor's
|
||||
// body is never read here, so a test that sees renderW/H in a record knows the
|
||||
// Overlay read it from the argument and not from anything this stub produced.
|
||||
FFX_API_ENTRY ffxReturnCode_t ffxDispatch(ffxContext* context, const ffxDispatchDescHeader* desc) {
|
||||
(void)context;
|
||||
if (desc == nullptr) {
|
||||
return FFX_API_RETURN_ERROR_PARAMETER;
|
||||
}
|
||||
switch (desc->type) {
|
||||
case FFX_API_DISPATCH_DESC_TYPE_UPSCALE:
|
||||
InterlockedIncrement(&g_upscale);
|
||||
break;
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE:
|
||||
InterlockedIncrement(&g_prepare);
|
||||
break;
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2:
|
||||
InterlockedIncrement(&g_prepareV2);
|
||||
break;
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION:
|
||||
InterlockedIncrement(&g_frameGeneration);
|
||||
break;
|
||||
default:
|
||||
InterlockedIncrement(&g_other);
|
||||
break;
|
||||
}
|
||||
return FFX_API_RETURN_OK;
|
||||
}
|
||||
|
||||
// FrameLedger-named observers, so nothing here pretends to be part of a vendor API.
|
||||
// How many dispatches of THIS descriptor type reached this leaf; 0 for a type the
|
||||
// stub does not bucket (the "other" bucket is FlStubFfxDispatchOther).
|
||||
__declspec(dllexport) unsigned int FlStubFfxDispatchCount(uint64_t type) {
|
||||
volatile LONG* counter = nullptr;
|
||||
switch (type) {
|
||||
case FFX_API_DISPATCH_DESC_TYPE_UPSCALE:
|
||||
counter = &g_upscale;
|
||||
break;
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE:
|
||||
counter = &g_prepare;
|
||||
break;
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION_PREPARE_V2:
|
||||
counter = &g_prepareV2;
|
||||
break;
|
||||
case FFX_API_DISPATCH_DESC_TYPE_FRAMEGENERATION:
|
||||
counter = &g_frameGeneration;
|
||||
break;
|
||||
default:
|
||||
return 0u;
|
||||
}
|
||||
return static_cast<unsigned int>(InterlockedCompareExchange(counter, 0, 0));
|
||||
}
|
||||
|
||||
__declspec(dllexport) unsigned int FlStubFfxDispatchOther() {
|
||||
return static_cast<unsigned int>(InterlockedCompareExchange(&g_other, 0, 0));
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID) {
|
||||
if (reason == DLL_PROCESS_ATTACH) {
|
||||
DisableThreadLibraryCalls(module);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
using System.Diagnostics;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.CaptureHost.Consume;
|
||||
using FrameLedger.Shared;
|
||||
|
||||
namespace FrameLedger.CaptureHost.Tests.Consume;
|
||||
|
||||
/// <summary>
|
||||
/// The AMD route on the reading side: identity from the leaf, <c>FSR_FG</c> from the generated
|
||||
/// batch, <c>none</c> from the count, and the second count printed beside the first.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The synthetic records are the shape <c>dllmain.cpp</c>'s ffx-api arms write and
|
||||
/// <c>guard_test.cpp</c>'s <c>[ffx]</c> cases assert against the real Overlay: identity, params
|
||||
/// and the count land on the present that DRAINED the dispatch, and the other K−1 presents of
|
||||
/// an application frame carry the bits with the honest zeros.
|
||||
/// </remarks>
|
||||
public sealed class FfxReportTests
|
||||
{
|
||||
private static List<FlFrameRecord> FfxStream(int frames, int k, FlUpscaler identity, bool fgDispatch,
|
||||
int evaluationsPerFrame = 1, int hz = 240)
|
||||
{
|
||||
var list = new List<FlFrameRecord>(frames * k);
|
||||
ulong qpc = 1_000_000;
|
||||
long step = Stopwatch.Frequency / hz;
|
||||
for (int f = 0; f < frames; f++)
|
||||
{
|
||||
for (int p = 0; p < k; p++)
|
||||
{
|
||||
bool drained = p == 0;
|
||||
list.Add(new FlFrameRecord
|
||||
{
|
||||
Qpc = qpc,
|
||||
SwapchainId = 1,
|
||||
OutputW = 2560,
|
||||
OutputH = 1440,
|
||||
Api = (byte)FlApi.D3D12,
|
||||
MeasuredMask = (ushort)(FlMeasured.OutputRes | FlMeasured.PresentArgs | FlMeasured.Upscaler
|
||||
| FlMeasured.Fg | FlMeasured.FgCounts
|
||||
| (drained ? FlMeasured.UpscalerParams : FlMeasured.None)),
|
||||
Upscaler = (byte)(drained ? identity : FlUpscaler.Unknown),
|
||||
FgMode = (byte)(drained && fgDispatch ? FlFgMode.FsrFg : FlFgMode.Unknown),
|
||||
FgEvaluations = (byte)(drained ? evaluationsPerFrame : 0),
|
||||
RenderW = (ushort)(drained ? 1485 : 0),
|
||||
RenderH = (ushort)(drained ? 835 : 0),
|
||||
UpscalerQuality = (byte)(drained ? 0xFF : 0),
|
||||
UpscalerSharpness = (byte)(drained ? 0xFF : 0),
|
||||
});
|
||||
qpc += (ulong)step;
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private static FlWriterState Writer(FlRuntimeCensus census) => new()
|
||||
{
|
||||
HooksInstalledMask = (uint)(FlHookFamily.Present | FlHookFamily.UpscalerIdentity
|
||||
| FlHookFamily.UpscalerParams | FlHookFamily.FgEvaluations),
|
||||
RuntimeCensus = (uint)(FlRuntimeCensus.Ran | census),
|
||||
};
|
||||
|
||||
private static (MeasuredFacts Facts, string Text) Render(List<FlFrameRecord> stream, FlWriterState writer)
|
||||
{
|
||||
MeasuredFacts facts = MeasuredFacts.From(stream, writer, Stopwatch.Frequency, 0, 0,
|
||||
FgWindow.From(stream, Stopwatch.Frequency));
|
||||
return (facts, SessionReport.Render(facts));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LiesOfPAtFsr3PlusFrameGenerationPrintsTheTrioAndNoWarning()
|
||||
{
|
||||
// HANDOFF 7c's acceptance row A1, on the reading side: the monolith is in the census's FG
|
||||
// group, which used to be exactly what printed the WARNING — measured now, the trio
|
||||
// prints and the qualifier does not.
|
||||
List<FlFrameRecord> stream = FfxStream(frames: 80, k: 2, FlUpscaler.Fsr3, fgDispatch: true);
|
||||
|
||||
(MeasuredFacts facts, string text) = Render(stream, Writer(FlRuntimeCensus.AmdFfxDx12));
|
||||
|
||||
facts.Upscaler.Should().Be("Fsr3");
|
||||
facts.FgMode.Should().Be("FsrFg");
|
||||
facts.FgFactor.Should().BeApproximately(2.0, 0.01);
|
||||
facts.HonestyViolations.Should().Be(0);
|
||||
text.Should().Contain("Native FPS").And.Contain("Displayed FPS").And.Contain("x2 FG");
|
||||
text.Should().Contain("upscaler: Fsr3");
|
||||
text.Should().Contain("frame generation: FsrFg");
|
||||
text.Should().NotContain("WARNING");
|
||||
text.Should().NotContain("MAY include generated frames");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FrameGenerationOffOnTheMonolithIsNoneByTheUpscaleCount()
|
||||
{
|
||||
// Row A2: no PREPARE ever, so the writer counted UPSCALE dispatches — one per present —
|
||||
// and the consumer reads the measured `none` from the ratio, not from the census.
|
||||
List<FlFrameRecord> stream = FfxStream(frames: 200, k: 1, FlUpscaler.Fsr3, fgDispatch: false);
|
||||
|
||||
(MeasuredFacts facts, string text) = Render(stream, Writer(FlRuntimeCensus.AmdFfxDx12));
|
||||
|
||||
facts.Upscaler.Should().Be("Fsr3");
|
||||
facts.FgMode.Should().Be(MeasuredFacts.FgNone);
|
||||
facts.FgFactor.Should().BeApproximately(1.0, 0.01);
|
||||
text.Should().Contain(" FPS: ").And.Contain("frame generation: none");
|
||||
text.Should().Contain("ffx-api PREPARE / UPSCALE dispatch");
|
||||
text.Should().NotContain("Native FPS").And.NotContain("Presented FPS");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheSdk2xUpscalerLeafIsNamedFsrWithoutAVersion()
|
||||
{
|
||||
// The enumerator is a token; the report carries the sentence, and never guesses FSR4.
|
||||
List<FlFrameRecord> stream = FfxStream(frames: 80, k: 2, FlUpscaler.FsrUnversioned, fgDispatch: true);
|
||||
|
||||
(MeasuredFacts facts, string text) = Render(stream,
|
||||
Writer(FlRuntimeCensus.AmdFfxUpscaler | FlRuntimeCensus.AmdFfxFrameGeneration));
|
||||
|
||||
facts.Upscaler.Should().Be(MeasuredFacts.UpscalerFsrUnversioned);
|
||||
text.Should().Contain("upscaler: FSR (3.1 or 4");
|
||||
text.Should().NotContain("Fsr4").And.NotContain("FsrUnversioned");
|
||||
text.Should().Contain("frame generation: FsrFg");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheCensusPrintsTwoCountsAndTheirAgreement()
|
||||
{
|
||||
List<FlFrameRecord> stream = FfxStream(frames: 60, k: 2, FlUpscaler.Fsr3, fgDispatch: true);
|
||||
|
||||
FfxCensus c = FfxCensus.From(stream);
|
||||
|
||||
c.Records.Should().Be(120);
|
||||
c.UpscaleDrained.Should().Be(60);
|
||||
c.FgDispatchDrained.Should().Be(60);
|
||||
c.Frames.Should().Be(60);
|
||||
c.PresentsPerFrame.Should().BeApproximately(2.0, 0.001);
|
||||
c.FramesPerUpscale.Should().BeApproximately(1.0, 0.001, "the PREPARE and UPSCALE counts agree");
|
||||
c.FgDispatchesPerFrame.Should().BeApproximately(1.0, 0.001);
|
||||
c.Describe().Should().Contain("frames/upscale-drained=1.00").And.Contain("upscale-drained=60");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ADoubledFrameCountReadsTwoOnTheAgreementRatio()
|
||||
{
|
||||
// THE SHAPE THE SECOND COUNT EXISTS TO CATCH: a writer that hooked the loader as well as
|
||||
// the leaf counts every PREPARE twice. presents/frame then reads 1.0 at ×2 — the factor
|
||||
// rule 6 forbids reaching by arithmetic — and only this ratio says why.
|
||||
List<FlFrameRecord> stream = FfxStream(frames: 60, k: 2, FlUpscaler.Fsr3, fgDispatch: true,
|
||||
evaluationsPerFrame: 2);
|
||||
|
||||
FfxCensus c = FfxCensus.From(stream);
|
||||
|
||||
c.PresentsPerFrame.Should().BeApproximately(1.0, 0.001);
|
||||
c.FramesPerUpscale.Should().BeApproximately(2.0, 0.001);
|
||||
c.Describe().Should().Contain("frames/upscale-drained=2.00");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AWindowWithNoFfxDispatchSaysSoRatherThanPrintingZeros()
|
||||
{
|
||||
// A Streamline title: the identity hook ran, nothing FSR-shaped arrived.
|
||||
List<FlFrameRecord> stream = FfxStream(frames: 20, k: 1, FlUpscaler.Dlss, fgDispatch: false);
|
||||
|
||||
FfxCensus c = FfxCensus.From(stream);
|
||||
|
||||
c.SawAnything.Should().BeFalse();
|
||||
c.Describe().Should().Contain("no UPSCALE or FRAMEGENERATION dispatch reached an ffx-api leaf");
|
||||
FfxCensus.From([]).Describe().Should().Contain("no record claimed FL_MEASURED_UPSCALER");
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,11 @@
|
||||
included for types only for exactly this reason
|
||||
(src/native/third_party/streamline/README.md).
|
||||
|
||||
PASS C READS THE EXPORT TABLE TOO, since 2026-09-04. The vendored ffx_api.h
|
||||
declares its entry points __declspec(dllexport) unconditionally; a definition
|
||||
of one inside the Overlay would announce a vendor API we do not implement,
|
||||
with every import check green. Same failure class, other table.
|
||||
|
||||
THAT README ASSERTED THIS CHECK EXISTED AND IT DID NOT. Recorded because it
|
||||
is the shape this repository keeps finding: a document describing a gate,
|
||||
reviewers trusting the document, and nothing behind it. Added 2026-08-14
|
||||
@@ -183,6 +188,34 @@ function Get-ForbiddenImport([string[]]$ImportNames) {
|
||||
return , $bad
|
||||
}
|
||||
|
||||
# The names a binary EXPORTS, from `dumpbin /exports` output.
|
||||
#
|
||||
# WHY THE EXPORT TABLE TOO (2026-09-04). The vendored ffx_api.h declares its five
|
||||
# entry points FFX_API_ENTRY, which it defines as __declspec(dllexport) with no
|
||||
# import switch at all. A declaration exports nothing -- but a DEFINITION anywhere
|
||||
# in the Overlay would, and the Overlay would then announce `ffxDispatch` from
|
||||
# inside somebody else's game, an API it does not implement, with every import
|
||||
# check green. Same failure class Pass C exists for, read from the other table.
|
||||
function Get-ExportName([string]$DumpbinText) {
|
||||
$names = @()
|
||||
foreach ($line in ($DumpbinText -split "`r?`n")) {
|
||||
# "ordinal hint RVA name" rows: three numeric columns, then the name (a
|
||||
# forwarder suffixes " = target", which the \S+ stops before).
|
||||
if ($line -match '^\s+\d+\s+[0-9A-Fa-f]+\s+[0-9A-Fa-f]{8}\s+(\S+)') { $names += $Matches[1] }
|
||||
}
|
||||
return , $names
|
||||
}
|
||||
|
||||
# Exported names FrameLedger.Overlay.dll must never carry: the vendor shapes Pass B
|
||||
# forbids as literals, applied to what the binary announces.
|
||||
function Get-ForbiddenExport([string[]]$ExportNames) {
|
||||
$bad = @()
|
||||
foreach ($n in $ExportNames) {
|
||||
if ($n -match '^(sl[A-Z]|NVSDK_NGX_|xess[A-Z]|xefg[A-Z]|ffx[A-Z])') { $bad += $n }
|
||||
}
|
||||
return , $bad
|
||||
}
|
||||
|
||||
# --- Self-test ---------------------------------------------------------------
|
||||
if ($SelfTest) {
|
||||
$oracle = [pscustomobject]@{
|
||||
@@ -242,6 +275,20 @@ if ($SelfTest) {
|
||||
Got = ((Get-ForbiddenImport @('libxess_fg.dll', 'ffx_fsr3_x64.dll', 'amd_fidelityfx_dx12.dll')).Count -eq 3); Want = $true }
|
||||
@{ Name = 'the match is ANCHORED - an innocent name merely CONTAINING a vendor prefix passes'
|
||||
Got = ((Get-ForbiddenImport @('mysl.dll', 'libffx_helper.dll', 'unvngx.dll')).Count -eq 0); Want = $true }
|
||||
@{ Name = 'the SDK 2.x AMD leaves and the loader are all caught as imports'
|
||||
Got = ((Get-ForbiddenImport @('amd_fidelityfx_upscaler_dx12.dll', 'amd_fidelityfx_framegeneration_dx12.dll', 'amd_fidelityfx_loader_dx12.dll')).Count -eq 3); Want = $true }
|
||||
|
||||
# --- AMD: one symbol, several rows ---------------------------------------
|
||||
@{ Name = 'three rows with the SAME symbol in different modules parse as three rows'
|
||||
Got = ((Get-InventoryRow 'X(L"a.dll", "ffxDispatch", fl::F) X(L"b.dll", "ffxDispatch", fl::F) X(L"c.dll", "ffxDispatch", fl::F)').Count -eq 3); Want = $true }
|
||||
|
||||
# --- Pass C, the export table --------------------------------------------
|
||||
@{ Name = 'dumpbin export rows parse into names, and the header and Summary do not'
|
||||
Got = ((Get-ExportName " ordinal hint RVA name`r`n`r`n 1 0 00001000 FlGuardedInject`r`n 2 1 00001040 ffxDispatch`r`n`r`n Summary`r`n`r`n 1000 .data`r`n") -join ',') -eq 'FlGuardedInject,ffxDispatch'; Want = $true }
|
||||
@{ Name = 'a vendor-shaped EXPORT is caught - a definition of an FFX_API_ENTRY name would announce an API we do not implement'
|
||||
Got = ((Get-ForbiddenExport @('FlGuardedInject', 'ffxDispatch')) -join ',') -eq 'ffxDispatch'; Want = $true }
|
||||
@{ Name = 'our own exports are not mistaken for vendor ones'
|
||||
Got = ((Get-ForbiddenExport @('FlGuardedInject', 'FlStubEvaluateCount', 'DllMain')).Count -eq 0); Want = $true }
|
||||
)
|
||||
|
||||
$bad = @()
|
||||
@@ -435,7 +482,31 @@ elseif ($violations.Count -eq 0) {
|
||||
foreach ($bad in (Get-ForbiddenImport $imports)) {
|
||||
$violations.Add("Pass C: FrameLedger.Overlay.dll IMPORTS '$bad' - the vendored headers are for types only, and a link makes that module a load-time dependency, so the Overlay would fail to load in every game that does not ship it (in the loader, before DllMain, with no message anywhere)")
|
||||
}
|
||||
$importState = "$importCount import(s) checked"
|
||||
|
||||
# --- and the EXPORT table, with a positive control for the parser ------
|
||||
#
|
||||
# The Overlay may legitimately export nothing vendor-shaped, so "zero
|
||||
# forbidden exports" cannot discriminate a working parser from a broken
|
||||
# one on its own. The leaf fixture MUST export ffxDispatch (the stub
|
||||
# defines it through the vendored header's own FFX_API_ENTRY), so the
|
||||
# same parser is run on it first: if it cannot see that, no verdict on
|
||||
# the Overlay's table can be trusted.
|
||||
$exports = Get-ExportName (& $dumpbin /nologo /exports $overlayDll.FullName 2>&1 | Out-String)
|
||||
$leafStub = Get-ChildItem $BuildDir -Recurse -Filter 'amd_fidelityfx_dx12.dll' -ErrorAction SilentlyContinue |
|
||||
Select-Object -First 1
|
||||
if (-not $leafStub) {
|
||||
$violations.Add("Pass C: the amd_fidelityfx_dx12.dll leaf fixture was not found under $BuildDir, so the export parser has no positive control and 'the Overlay exports no vendor name' would be a verdict decided before the check looked")
|
||||
}
|
||||
else {
|
||||
$stubExports = Get-ExportName (& $dumpbin /nologo /exports $leafStub.FullName 2>&1 | Out-String)
|
||||
if ($stubExports -notcontains 'ffxDispatch') {
|
||||
$violations.Add("Pass C: the export parser did not see ffxDispatch on the leaf fixture $($leafStub.FullName), so it reads nothing - refusing rather than reporting a clean export table nobody parsed")
|
||||
}
|
||||
}
|
||||
foreach ($bad in (Get-ForbiddenExport $exports)) {
|
||||
$violations.Add("Pass C: FrameLedger.Overlay.dll EXPORTS '$bad' - the vendored headers declare these names __declspec(dllexport), and a definition in the Overlay announces a vendor API it does not implement, from inside somebody else's game")
|
||||
}
|
||||
$importState = "$importCount import(s) and $($exports.Count) export(s) checked"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+67
-2
@@ -81,7 +81,15 @@ $vendored = @(
|
||||
# Khronos Vulkan headers, copied from SDK 1.4.357.0 rather than fetched, so
|
||||
# CI needs no ~1 GB SDK install and we compile against the same revision the
|
||||
# blast-radius test runs against. Apache-2.0 OR MIT; we ship the Apache text.
|
||||
@{ Path = 'src/native/third_party/vulkan-headers'; Licence = 'apache-2.0.txt'; Name = 'Khronos Vulkan headers' }
|
||||
@{ Path = 'src/native/third_party/vulkan-headers'; Licence = 'apache-2.0.txt'; Name = 'Khronos Vulkan headers' },
|
||||
|
||||
# AMD FidelityFX SDK headers, tag v2.3.0. MIT BY EXCEPTION: upstream's
|
||||
# docs/license.md is a binary-only default licence followed by an exception
|
||||
# list that places the named files under MIT -- and the list names every file
|
||||
# in the tree (845 of 845 on 2026-09-04). §2d below asserts, per vendored
|
||||
# file, that it is on that list and carries the grant inline; this row only
|
||||
# asserts the licence copy exists.
|
||||
@{ Path = 'src/native/third_party/fidelityfx'; Licence = 'fidelityfx-MIT.txt'; Name = 'AMD FidelityFX SDK headers' }
|
||||
)
|
||||
|
||||
$licenceDir = Join-Path $RepoRoot 'legal/licenses'
|
||||
@@ -198,6 +206,62 @@ if (Test-Path $slDir) {
|
||||
}
|
||||
}
|
||||
|
||||
# --- 2d. AMD FidelityFX: MIT BY EXCEPTION, asserted file by file --------------
|
||||
#
|
||||
# THE SHAPE OF THE RISK. Upstream has no root LICENSE. docs/license.md opens with
|
||||
# a binary-only, no-reverse-engineering licence that "applies to all files except
|
||||
# as noted below", and the MIT grant lives in the exception list that follows.
|
||||
# So the question for any file vendored from that tree is not "what does the
|
||||
# root licence say" but "is THIS PATH on the list" -- and a re-sync that adds a
|
||||
# header without checking is how a file under the wrong licence arrives with the
|
||||
# directory's licence copy sitting beside it looking fine. Both halves are
|
||||
# asserted per file: on the list, and carrying the grant in its own banner.
|
||||
#
|
||||
# The list happens to cover the whole tree today (845 of 845 blobs). That is a
|
||||
# fact about one commit, not a property to rely on: the check reads the list.
|
||||
$ffxDir = Join-Path $RepoRoot 'src/native/third_party/fidelityfx'
|
||||
if (Test-Path $ffxDir) {
|
||||
$ffxLicence = Join-Path $ffxDir 'license.md'
|
||||
if (-not (Test-Path $ffxLicence)) {
|
||||
$violations.Add('AMD FidelityFX is vendored but src/native/third_party/fidelityfx/license.md is missing — the MIT grant for these files is the exception list inside it, so nothing else can stand in for it')
|
||||
}
|
||||
else {
|
||||
$lic = Get-Content $ffxLicence -Raw
|
||||
if ($lic -notmatch 'except as noted below') {
|
||||
$violations.Add('src/native/third_party/fidelityfx/license.md no longer has the "except as noted below" shape — if upstream changed its licensing model, re-run docs/18_GPU_VENDOR_APIS.md §Checklist rather than trusting this gate')
|
||||
}
|
||||
if ($lic -notmatch 'Permission is hereby granted, free of charge') {
|
||||
$violations.Add('src/native/third_party/fidelityfx/license.md no longer contains the MIT permission grant')
|
||||
}
|
||||
$listed = @([regex]::Matches($lic, '(?m)^- `([^`]+)`\s*$') | ForEach-Object { $_.Groups[1].Value })
|
||||
if ($listed.Count -eq 0) {
|
||||
# NEVER A PASS: a parser matching nothing would report every vendored
|
||||
# file as off the list, which is the right failure -- but say why.
|
||||
$violations.Add('parsed ZERO entries from the MIT exception list in fidelityfx/license.md — either the list is gone or its shape changed, and both must fail rather than read as "nothing is licensed"')
|
||||
}
|
||||
|
||||
$kits = Join-Path $ffxDir 'Kits'
|
||||
$vendoredFiles = @(if (Test-Path $kits) { Get-ChildItem $kits -Recurse -File -ErrorAction SilentlyContinue })
|
||||
if ($vendoredFiles.Count -eq 0) {
|
||||
$violations.Add('src/native/third_party/fidelityfx/Kits holds no files — a vendoring directory with a licence copy and nothing under it is a claim about nothing (18_GPU_VENDOR_APIS: nothing is vendored ahead of its consumer, and nothing is disclosed ahead of being vendored)')
|
||||
}
|
||||
foreach ($f in $vendoredFiles) {
|
||||
# Upstream spells the list with backslashes relative to the repository
|
||||
# root, and this directory mirrors upstream's layout from Kits/ down.
|
||||
$rel = [IO.Path]::GetRelativePath($ffxDir, $f.FullName).Replace('/', '\')
|
||||
if ($listed -notcontains $rel) {
|
||||
$violations.Add("fidelityfx/$($rel.Replace('\', '/')) is NOT on license.md's MIT exception list — the binary-only default licence would apply to it, and it may not be vendored")
|
||||
}
|
||||
if ($f.Extension -in '.dll', '.lib', '.exe', '.cpp', '.hlsl') {
|
||||
$violations.Add("fidelityfx/$($rel.Replace('\', '/')) is a $($f.Extension) — only declarations are vendored from this SDK; binaries and sources are excluded whatever the list says (third_party/fidelityfx/README.md)")
|
||||
}
|
||||
if ($f.Extension -eq '.h' -and -not (Select-String -Path $f.FullName -Pattern 'Permission is hereby granted, free of charge' -Quiet)) {
|
||||
$violations.Add("fidelityfx/$($rel.Replace('\', '/')) does not carry the MIT grant in its own banner — every header of interest did on 2026-09-04, so this is a file that was not checked")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# --- 2c. The notices file's BUNDLING claim must match the filesystem ---------
|
||||
#
|
||||
# Every other check here is keyed on the directory a component WOULD occupy, so
|
||||
@@ -227,7 +291,8 @@ else {
|
||||
$claims = @(
|
||||
@{ Marker = 'NVIDIA NVAPI SDK'; Path = 'src/native/third_party/nvapi' },
|
||||
@{ Marker = 'Vulkan headers'; Path = 'src/native/third_party/vulkan-headers' },
|
||||
@{ Marker = 'NVIDIA Streamline'; Path = 'src/native/third_party/streamline' }
|
||||
@{ Marker = 'NVIDIA Streamline'; Path = 'src/native/third_party/streamline' },
|
||||
@{ Marker = 'AMD FidelityFX'; Path = 'src/native/third_party/fidelityfx' }
|
||||
)
|
||||
foreach ($c in $claims) {
|
||||
$matched = @($rows | Where-Object { $_ -match [regex]::Escape($c.Marker) })
|
||||
|
||||
Reference in new issue
Block a user