mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Frametests: add framedump rendering test runner and PNG screenshot support
- Add frametests.py: walks a dump tree, renders each dump per config variant through PPSSPPHeadless, generates reference images when missing and compares MSE when present, and writes a self-contained HTML report. The JSON config (which lives with the test set, not in the repo) points at the data tree and defines variants as suffix -> CLI args, e.g. 'soft': '--graphics=software'. - Headless: --screenshot-save saves PNG when the path ends in .png; new --screenshot-diff always writes a visual comparison when comparing; screenshot comparison failures (mismatch or unloadable reference) now fail the test instead of passing silently. - Read back framebuffers top-down, flipping only for BMP output/input (fixes upside-down PNG references). Sync libretro copy accordingly. - Document the system in docs/frametest.md; add AGENTS.md reference.
This commit is contained in:
1 parent
b67667cbd1
commit
893ac3e3db
12 files changed
+694
-28
No files matched your search
@@ -152,6 +152,16 @@ pspautotests are a large set of tests of the PSP OS's API surface, and thus test
|
||||
|
||||
See docs/pspautotests.md for a workflow for running pspautotests and improving PPSSPP with the results.
|
||||
|
||||
## Framedump rendering tests (frametests)
|
||||
|
||||
There is a rendering test system that replays GE frame dumps (`.ppdmp`) through PPSSPPHeadless and compares
|
||||
the output against reference images, driven by the `frametests.py` script and a JSON config per test set.
|
||||
When changing rendering code, consider running these tests. See docs/frametest.md for full documentation.
|
||||
|
||||
Note: `headless/Compare.cpp` reads back framebuffers top-down; the flip to bottom-up is only applied when
|
||||
writing BMPs (and when reading BMP references). `TranslateDebugBufferToCompare` also exists as a copy in
|
||||
`libretro/LibretroGraphicsContext.cpp` - keep the two in sync.
|
||||
|
||||
## Adding HLE modules
|
||||
|
||||
HLE module implementations live in `Core/HLE/sce<ModuleName>.cpp` / `.h` (e.g. `sceOpenPSID.cpp`, `scePauth.cpp` are good
|
||||
|
||||
Reference in new issue
Block a user