feat(agc): host system report and an actionable missing-Vulkan-feature message #12690

Merged
MarcZX10 merged 30 commits from upstream-pr/12690 into main 2026-10-30 01:52:19 +00:00
MarcZX10 commented 2026-10-29 02:31:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T02:31:48Z.


What

A host system report for bug reports, and an actionable message when the GPU lacks something the game requires.

Gap on main: the facts maintainers ask for (docs/dev/GAME_TESTING.md step 3, the bug form's System field) are typed by hand. The driver name and version exist only in a performance trace summary, which needs a title that presents frames, so a start that fails early cannot produce them. A GPU lacking a required extension or feature stops with one line such as Vulkan presentation: VK_KHR_8bit_storage is unavailable: no GPU, no driver, only the first missing item, nothing to try.

  • ANYPS5_HOST_REPORT=1 prints one report to stderr when the presenting Vulkan device is chosen: commit, OS, CPU, threads, memory, CPU gate, SDL linked and compiled versions, GPU (name, type, ids, Vulkan version, driver name/info/raw version, largest device-local heap, every device found, surface present modes, requested present mode), each required and optional Vulkan item as present or missing, shader cache state and size, and the APS5_/ANYPS5_/VK_/SDL_ variables. Unset, empty or 0 prints nothing; any other value stops the start with an error naming the variable.
  • Paths, URLs, MAC addresses, control characters, and the account, host and home directory names never reach the text.
  • A GPU lacking a required item now fails at start with one message naming the GPU, driver and Vulkan version, listing every missing item, the other devices ANYPS5_GPU can select, and the report switch. The existing checks stay as a backstop.
  • Design: HostReport.cpp (facts, formatter, redaction, parser, message) has no driver or environment access; HostReportSources.cpp reads the machine; HostReportVulkan.cpp takes a vkGetInstanceProcAddr so tests answer the queries with a fake; VulkanDevice.cpp gets one call after device selection.
  • Docs: USAGE.md, ENVIRONMENT.md, bug form field, GAME_TESTING.md, one debt entry.

Commits: 26, each feature followed by its test commit (facts and formatter, path/URL/MAC redaction, named redaction, env parser, missing-feature message, collector, unavailable section, real sources, GPU queries, device hook, report hook), then one docs commit per statement.

Open PRs touching the same files: #12379, #12536 and #12569 touch VulkanDevice.cpp, the AGC CMakeLists.txt and USAGE.md/debt docs. My edits there are one insertion each (an include pair, a helper and one block after device selection, source and test registrations, one USAGE section, one debt line). No code of any other PR is used.

Tested

Linux 6.1 x86_64, GCC 12, throwaway archive build with the CPU gate patched (this host's Xeon E5-1620 v2 fails it), llvmpipe (Mesa 22.3.6) under Xvfb. Rebased on 3a2b919816.

  • New: agc_host_report and agc_host_report_vulkan pass (under 1 s each). The Vulkan test answers every query with a fake driver.
  • Existing, branch vs baseline (main at 319621ba2e before the rebase, same host): agc_driver_presentation_pass, agc_performance_overlay, agc_performance_overlay_device_selection, agc_driver_present_mode, video_out_flip_decode pass on both. The video_out_flip_* modes labels, lifetime, controls, overlay, resolution, fresh and eop were run directly with SDL_VIDEODRIVER=x11 under Xvfb on both and pass.
  • Validation layer on (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation): VUID- lines 0 on branch and baseline, was not found but was requested 0 on both.
  • Real device path: ANYPS5_HOST_REPORT=1 on video_out_flip_tests labels printed the report once from VulkanDevice on llvmpipe; unset and 0 printed none; 2 and yes exit 1 with ANYPS5_HOST_REPORT must be 0 or 1, not '2'. The report held no account name, host name or home path.
  • Negative controls: 55 mutations of HostReport.cpp and HostReportVulkan.cpp in scratch copies (dropped sorts, each redaction rule, name-boundary checks, each sanitized field, parser values and text, message parts, collector exception and null handling, filter prefixes, each required item, heap choice, type names, missing entry point). Four survived at first (a whole-word check hidden by the fixture, the trailing-separator home name, the first device-local heap, one parser message mutant that did not compile); the fixtures were tightened and all four then fail. No assertion is left un-controlled in those two files.
  • Not negative-controlled: the VulkanDevice.cpp hook and HostReportSources.cpp (covered only by the manual run above).
  • Checks clean: check_conventions.py --base upstream/main, git diff --check, header audit, env_reference.py --check.

Not run: Windows and macOS (their branches are written from existing PerformanceTrace and HostCpu code), a hardware GPU, a console, a failing GPU on the real device path (the missing-item message is tested with a fake driver only), the cpu_gate failure case on a real run (a lacking CPU stops the game before the report).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: llvmpipe (LLVM 15.0.6, Mesa 22.3.6, Vulkan 1.3.230), Linux 6.1, via Xvfb; no hardware GPU
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5061075743 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12690). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T02:31:48Z. --- ### What A host system report for bug reports, and an actionable message when the GPU lacks something the game requires. Gap on `main`: the facts maintainers ask for (`docs/dev/GAME_TESTING.md` step 3, the bug form's System field) are typed by hand. The driver name and version exist only in a performance trace summary, which needs a title that presents frames, so a start that fails early cannot produce them. A GPU lacking a required extension or feature stops with one line such as `Vulkan presentation: VK_KHR_8bit_storage is unavailable`: no GPU, no driver, only the first missing item, nothing to try. - `ANYPS5_HOST_REPORT=1` prints one report to stderr when the presenting Vulkan device is chosen: commit, OS, CPU, threads, memory, CPU gate, SDL linked and compiled versions, GPU (name, type, ids, Vulkan version, driver name/info/raw version, largest device-local heap, every device found, surface present modes, requested present mode), each required and optional Vulkan item as present or missing, shader cache state and size, and the `APS5_`/`ANYPS5_`/`VK_`/`SDL_` variables. Unset, empty or `0` prints nothing; any other value stops the start with an error naming the variable. - Paths, URLs, MAC addresses, control characters, and the account, host and home directory names never reach the text. - A GPU lacking a required item now fails at start with one message naming the GPU, driver and Vulkan version, listing every missing item, the other devices `ANYPS5_GPU` can select, and the report switch. The existing checks stay as a backstop. - Design: `HostReport.cpp` (facts, formatter, redaction, parser, message) has no driver or environment access; `HostReportSources.cpp` reads the machine; `HostReportVulkan.cpp` takes a `vkGetInstanceProcAddr` so tests answer the queries with a fake; `VulkanDevice.cpp` gets one call after device selection. - Docs: USAGE.md, ENVIRONMENT.md, bug form field, GAME_TESTING.md, one debt entry. Commits: 26, each feature followed by its test commit (facts and formatter, path/URL/MAC redaction, named redaction, env parser, missing-feature message, collector, unavailable section, real sources, GPU queries, device hook, report hook), then one docs commit per statement. Open PRs touching the same files: #12379, #12536 and #12569 touch `VulkanDevice.cpp`, the AGC `CMakeLists.txt` and `USAGE.md`/debt docs. My edits there are one insertion each (an include pair, a helper and one block after device selection, source and test registrations, one USAGE section, one debt line). No code of any other PR is used. ### Tested Linux 6.1 x86_64, GCC 12, throwaway archive build with the CPU gate patched (this host's Xeon E5-1620 v2 fails it), llvmpipe (Mesa 22.3.6) under Xvfb. Rebased on `3a2b919816`. - New: `agc_host_report` and `agc_host_report_vulkan` pass (under 1 s each). The Vulkan test answers every query with a fake driver. - Existing, branch vs baseline (`main` at `319621ba2e` before the rebase, same host): `agc_driver_presentation_pass`, `agc_performance_overlay`, `agc_performance_overlay_device_selection`, `agc_driver_present_mode`, `video_out_flip_decode` pass on both. The `video_out_flip_*` modes labels, lifetime, controls, overlay, resolution, fresh and eop were run directly with `SDL_VIDEODRIVER=x11` under Xvfb on both and pass. - Validation layer on (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`): `VUID-` lines 0 on branch and baseline, `was not found but was requested` 0 on both. - Real device path: `ANYPS5_HOST_REPORT=1` on `video_out_flip_tests labels` printed the report once from `VulkanDevice` on llvmpipe; unset and `0` printed none; `2` and `yes` exit 1 with `ANYPS5_HOST_REPORT must be 0 or 1, not '2'`. The report held no account name, host name or home path. - Negative controls: 55 mutations of `HostReport.cpp` and `HostReportVulkan.cpp` in scratch copies (dropped sorts, each redaction rule, name-boundary checks, each sanitized field, parser values and text, message parts, collector exception and null handling, filter prefixes, each required item, heap choice, type names, missing entry point). Four survived at first (a whole-word check hidden by the fixture, the trailing-separator home name, the first device-local heap, one parser message mutant that did not compile); the fixtures were tightened and all four then fail. No assertion is left un-controlled in those two files. - Not negative-controlled: the `VulkanDevice.cpp` hook and `HostReportSources.cpp` (covered only by the manual run above). - Checks clean: `check_conventions.py --base upstream/main`, `git diff --check`, header audit, `env_reference.py --check`. Not run: Windows and macOS (their branches are written from existing PerformanceTrace and HostCpu code), a hardware GPU, a console, a failing GPU on the real device path (the missing-item message is tested with a fake driver only), the `cpu_gate` failure case on a real run (a lacking CPU stops the game before the report). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: llvmpipe (LLVM 15.0.6, Mesa 22.3.6, Vulkan 1.3.230), Linux 6.1, via Xvfb; no hardware GPU - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12690
No description provided.