Commit Graph
52 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5 4ae682283c Path: make WithReplacedExtension(old, new) report a mismatch instead of hiding it
It used to return the path unchanged when the path didn't end in oldExtension,
so a caller that guessed wrong silently went on using the original file - and
"the screenshot next to this savestate" quietly becomes "this savestate".
Every caller had to know to check the extension first, and most didn't.

Now it's [[nodiscard]] bool with an out-param, in the style of ComputePathTo
next door, so the mismatch has to be handled. Changing the signature rather
than the behaviour means no call site can keep the old assumption by accident.
All four callers wanted "skip it" or "fall back", which they now say out loud.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 11:54:11 -06:00
Henrik Rydgård 8c9bf04add Headless: force opaque PNG screenshots by default, add --screenshot-keep-alpha
Games often use the framebuffer alpha channel for non-visual purposes,
so saved PNGs could look fully transparent in image viewers. Force alpha
to 255 when writing PNG screenshots unless --screenshot-keep-alpha is
passed. The MSE comparison ignores alpha either way.
2026-08-09 13:41:39 +02:00
Henrik Rydgård 893ac3e3db 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.
2026-08-09 13:41:39 +02:00
Henrik Rydgård e0ddfc7109 Add --print-equal-lines option to headless, good for context when looking at output 2026-07-29 18:55:00 +02:00
Henrik Rydgård 8666a3cd57 Add resolution scale parameter to headless 2026-07-20 21:40:14 +02:00
Henrik Rydgård b706d800cb More headless tweaks. D3D11 and Vulkan backends work, not OpenGL though, timing issue it seems 2026-07-19 01:46:41 +02:00
Henrik Rydgård 8ff9793e32 Headless: Update the documentation, remove outdated teamcity stuff (used DeepSeek V4 Flash) 2026-07-18 18:35:46 +02:00
Henrik Rydgård a317890c08 Remove the GPUDebugInterface class
Just a pointless extra layer in the class hiearchy, making it
unnecessarily hard to modify the interface.

Might as well hit GPUCommon directly.
2026-06-02 11:15:08 +02:00
Henrik Rydgård 1f129b6dca Replace "ReadFileToString" with a few semantically clearer wrappers. 2024-01-25 09:55:54 +01:00
Unknown W. Brackets 0ade62d264 Core: Remove Host entirely. 2023-03-25 17:47:25 -07:00
Unknown W. Brackets f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets f009d15078 headless: Allow screenshot to not be 512x272.
Ended up with a cropped screenshot for a frame dump, which just silently
crashed.  Could reject, but easy enough to support.
2022-10-18 21:33:47 -07:00
Unknown W. Brackets f32e8e11ab headless: Switch screenshot error to MSE.
This is more useful than 1/0 on whether a pixel doesn't match, when many
are close but not exact.
2022-09-17 14:13:26 -07:00
Unknown W. Brackets 1b72311e7d Headless: Fix comparison for oversized buffers.
At least when not flipping.
2022-08-21 15:51:56 -07:00
Unknown W. Brackets a45eeb56ed Headless: Fix compare of smaller buffers.
When the buffer is smaller, we need to flip properly to compare the
correct pixels.
2022-01-08 16:06:17 -08:00
Unknown W. Brackets fb69d56387 Headless: Generate a difference highlighting png.
Only for graphics tests that generate a screenshot, including ppdmp.
2021-11-07 11:05:17 -08:00
Unknown W. Brackets 92f9d3dc46 Headless: Move screenshot compare to class. 2021-11-07 10:03:49 -08:00
Unknown W. Brackets 0875c217c6 Headless: Fix ppdmp compare. 2021-11-07 10:01:16 -08:00
Unknown W. Brackets ed2ade4e22 headless: Correct tests. 2021-05-14 22:44:05 -07:00
Henrik Rydgård 2e16e83159 It never ends... 2021-05-13 10:39:16 +02:00
Henrik Rydgård ae06499a0c Change Copy, Rename to use Path. Remove std::string version of Exists().
Buildfixes

Buildfix
2021-05-13 10:39:16 +02:00
Unknown W. Brackets 8a0adfde33 headless: Avoid C++ files for Path support.
Not critical for Android paths, but better if they work.
2021-05-09 17:00:48 -07:00
Unknown W. Brackets 8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Henrik Rydgård a2a0551a83 Buildfix, and more renaming while we're at it. 2021-04-25 22:25:29 +02:00
Henrik Rydgård 1b13badeb4 Move remaining FileUtil functions into the File namespace. 2021-04-25 20:38:22 +02:00
Unknown W. Brackets c84cbdda8a Headless: Default to PNG for ppdmp tests. 2021-01-17 18:34:23 -08:00
Unknown W. Brackets f9ef03b0a1 Headless: Allow PNGs and http:// for screenshot. 2021-01-17 18:33:02 -08:00
Unknown W. Brackets 3306ac115d Headless: Read expected file as a FileLoader.
This makes it possible to run tests from network locations.
2021-01-17 17:44:21 -08:00
Unknown W. Brackets 7014e8997c Build: Reference test as file on failure. 2020-12-31 07:27:27 -08:00
Unknown W. Brackets c73d8ab1d0 Headless: Add specific GitHub Actions logging. 2020-12-31 00:21:09 -08:00
Unknown W. Brackets af7c97d624 Headless: Cleanup TeamCity handling in test.py. 2020-12-31 00:21:09 -08:00
Henrik Rydgård 4f43cff5ca Move fileutil, net, image loaders, ui to Common. (#13506)
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing

Let's also move net while we're at it.

Move the ZIM/PNG loaders over to Common.

Move the UI framework into Common

iOS buildfix

* Buildfix

* Buildfixes

* Apple buildfix

* This typo again..

* UWP buildfix

* Fix build of PPSSPPQt, such as it is (it's not in good condition...)

* Guess what? Another buildfix.
2020-10-04 20:48:47 +02:00
Unknown W. Brackets d573bf9cc9 Headless: Fix compare for 16-bit output.
Most tests have been 32-bit output, so haven't run into this.  Enables
tests with softgpu to generate 16-bit output.
2018-11-30 17:46:47 -08:00
Unknown W. Brackets d5196b44f9 Minor tweaks. 2016-01-17 09:45:55 -08:00
Henrik Rydgard 3ba911bf07 Replace some calls to fopen with File::OpenCFile (utf8). 2016-01-17 15:59:20 +01:00
Unknown W. Brackets 86127b3d0d Update armips to latest version.
The new version has some speed and other improvements.
2015-12-26 20:30:35 -08:00
Henrik Rydgard aae254254b Fix bad cleanup change, thanks to tapcio for pointing it out in 07b17560f 2015-07-28 01:09:48 +02:00
Henrik Rydgard c2cf2bd97e Move some more color conversion functions to ColorConv 2015-04-08 22:52:47 +02:00
Unknown W. Brackets 9a8cd2c067 Log some file reading errors. 2015-04-08 12:14:07 -07:00
Chin 37f50a3792 Change to pass some arguments by reference 2015-03-01 16:49:00 +01:00
Henrik Rydgard cae58cafee Revert "Merge pull request #7361 from hrydgard/color-conv-centralize"
This reverts commit f1b57dabf5, reversing
changes made to 41001637ce.
2015-01-22 19:53:32 +01:00
Henrik Rydgard 2623a48b4a Centralize color conversion functions in Common/ColorConv. 2015-01-20 17:32:54 +01:00
Unknown W. Brackets cdbcc12a4e Oops, flipping was off by one.
That's why software and directx9 were off, arg.
2014-08-30 13:19:52 -07:00
Unknown W. Brackets f842d309b2 Swap RGBA/BGRA when comparing screenshot data. 2014-08-30 12:26:12 -07:00
Unknown W. Brackets af9e0510c3 Use the debug interface to compare screenshots.
This way it's already implemented in all backends.
2014-08-30 09:45:51 -07:00
Unknown W. Brackets 5554865ebb Fix headless auto-compare when expected have \r's. 2013-10-14 23:55:18 -07:00
adrian17 58d8bc86c5 Removed two functions as they are also in Native/file.
Also, removed TabsToSpaces() from the header as it no longer exists.
2013-09-28 23:05:36 +02:00
Unknown W. Brackets 0185825b23 Support the verbose test compare parameter. 2013-09-17 00:15:19 -07:00
Unknown W. Brackets 9a2ea4cdc1 Move the actual test run to its own function. 2013-09-16 23:49:41 -07:00
Unknown W. Brackets 5d99fd8a98 Skip trailing newlines in test comparison. 2013-09-16 23:49:09 -07:00