Skip to content

docs/fspx: the FidelityFX loader and upscaler entry points (measured) - #2017

Open
BubsMcgee wants to merge 1 commit into
ProjectLeonida:mainfrom
BubsMcgee:docs/fspx-entry-contract
Open

BubsMcgee wants to merge 1 commit into
ProjectLeonida:mainfrom
BubsMcgee:docs/fspx-entry-contract

Conversation

@BubsMcgee

Copy link
Copy Markdown
Contributor

Docs-only; measurement from the two shipped DLLs, no game data.

What

Why

This is T-3 in the isolated-RE plan: it turns the upscaler entry contract and the crash location into measured notes.
It does not change translation and does not replace #1862, which is the fix for the two missing FSPX programs.

Tests

  • python -I tests/test_docs_links.py and the other tests/test_docs_*.py suites
  • python -I scripts/check_no_game_data.py docs/fspx.md

AI-assisted (opencode). Claimed as FIDELITYFX-ENTRY-CONTRACT in the coordination issue.

@zmasi

zmasi commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Native Windows 11 Verification (2cd7770ff2)

Diff-audited docs/fspx.md (+32/-0) and verified merged onto origin/main (ba8b77b390) on Windows 11 (10.0.26200, Python 3.12.10 with -I).

Action Needed: tests/test_docs_cli_flags.py Fails on --coff-exports

Running python -I tests/test_docs_cli_flags.py on PR #2017 merged onto origin/main exits with rc=1:

FAIL: test_docs_name_existing_flags (__main__.DocsCliFlags.test_docs_name_existing_flags)
...
AssertionError: Lists differ: [('docs/fspx.md:434', '--coff-exports')] != []
flags in the docs that no source file mentions: docs/fspx.md:434 --coff-exports
  • Cause & 1-Line Fix: tests/test_docs_cli_flags.py checks every --flag token in docs/*.md against tracked non-Markdown source files and the FOREIGN allowlist (tests/test_docs_cli_flags.py:27-31). Either add "--coff-exports" to FOREIGN in tests/test_docs_cli_flags.py (alongside other external tool flags), or phrase docs/fspx.md without the --coff-exports flag token (e.g. "read from the COFF export tables on 1.0.2.1").

Passing Suites & FidelityFX SDK Cross-Check

  • Passing Suites: tests/test_fspx_prologue_probe.py (7/7), tests/test_fspx_shaders_stage.py, tests/test_fspx_unpack.py (37 ran, 1 skipped), tests/test_fspx_unpack_out.py (5/5), tests/test_docs_links.py (17/17), tests/test_docs_repo_paths.py (5/5), tests/test_docs_table_rows.py (2/2), tests/test_docs_list_items.py (3/3), tests/test_docs_encoding.py (1/1), tests/test_text_write_line_endings.py (3/3), and scripts/check_no_game_data.py all pass (rc=0).
  • ABI Cross-Check: Confirmed the measured raw values match AMD's public ffx_api headers (ffx_api_types.h / ffx_api.h): return codes 6 (FFX_API_RETURN_ERROR_PARAMETER), 2 (FFX_API_RETURN_ERROR_UNKNOWN_DESCTYPE), 4 (FFX_API_RETURN_NO_PROVIDER); type == 4 (FFX_API_QUERY_DESC_TYPE_GET_VERSIONS: createDescType at +0x10, device at +0x18, outputCount at +0x20); type == 5 (FFX_API_CREATE_CONTEXT_DESC_TYPE_OVERRIDE_VERSION); and effect mask 0x00ff0000 (0x10000 upscale vs 0x20000/0x30000 frame generation).

AI-assisted.

@enlight3d

Copy link
Copy Markdown
Contributor

RUN (local, docs-only PR)

PR #2017, head 2cd7770; main 1bc055e; PR merge base b9320a1.
Changed file: docs/fspx.md only (no Rust, Python or test change). git merge-tree --write-tree main pr merges cleanly (no conflicts).

Commands (repo root of the PR head, Python 3.13.12, one process per file):

for f in tests/test_docs_*.py tests/test_i18n_index.py tests/test_text_write_line_endings.py; do python -I $f; done
python -I scripts/check_no_game_data.py docs/fspx.md

GREEN/overall: 14 of 15 test files pass at the PR head. tests/test_docs_cli_flags.py FAILS (1 of 4 tests, test_docs_name_existing_flags): "flags in the docs that no source file mentions: docs/fspx.md:413 --coff-exports". The flag is an llvm-readobj option quoted in the new section, not a Leonida flag. The same file passes on the PR's base (b9320a1) and on main (1bc055e), so the failure comes from this PR's added text, not from a pre-existing problem. Fix idea for the author: reword the line so the option is not written as a bare --flag token (for example "llvm-readobj, COFF export listing"), or keep it out of backticks if the checker allows it.

RED: not applicable. The PR changes documentation only and adds no test, so there is no behaviour to revert and no red was invented. No cargo test is involved (the PR touches nothing under d3d12/).

Machine: NVIDIA GeForce RTX 3090 24 GB, driver 621.40, Windows 11 Pro 10.0.26300. No GPU or game run: docs-only change.

@OreoFR

OreoFR commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

TAKEN by OreoFR (Windows, RTX 4070 8 GB)

@OreoFR

OreoFR commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Verified by OreoFR — FAILS (tests/test_docs_cli_flags.py)

AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.

@OreoFR

OreoFR commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 4364a4f, PR head 2cd7770 : new doc-test failure

Doc tests run on main and on main + PR (merge commit built with merge-tree + commit-tree, same tree as merge --no-ff): the 13 tests/test_docs_*.py, test_design_contract_rows, test_progress_dashboard, test_make_game_preflight, test_ci_registration (17 files). Merge: clean.

  • New failure on the merge (MEASURED n=3, alone): test_docs_cli_flags.py::test_docs_name_existing_flags — flags in the docs that no source file mentions: docs/fspx.md:434 --coff-exports. Passes on main. Same finding as the earlier reports; no new commit since.
  • Concern for a maintainer: the added text quotes addresses/offsets inside vendor DLLs shipped with the game (Ghidra RVAs and vtable offsets). That looks like it may fall under the "no game data" rule; I cannot verify the values without those binaries.

Verdict: FAILS

AI-assisted: Claude Code

@aslan2142 aslan2142 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The measured ffx_api entry-point notes in docs/fspx.md look clean-room compliant, but requesting changes on two items:

  1. Fails tests/test_docs_cli_flags.py: As confirmed independently by @zmasi and @OreoFR, docs/fspx.md:434 (llvm-readobj --coff-exports) fails test_docs_name_existing_flags because --coff-exports is not recognized as a known/foreign CLI flag. Please either add --coff-exports to FOREIGN in tests/test_docs_cli_flags.py (with a comment naming llvm-readobj) or reword without triggering the flag check.
  2. No CI runs: No CI checks have run on head 2cd7770f.

Please fix the test_docs_cli_flags.py failure and ensure CI passes.

(AI-assisted review.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants