fix(vk): perf_report.cpp includes psapi.h again, so the Windows renderer compiles #1665

Merged
HumanBean merged 1 commit from HumanBean/Longshot:fix/perf-report-psapi into main 2026-11-18 22:23:01 +00:00
Owner

Type: fix · Risk: low · Tested on: Linux, the Windows renderer cross-built with llvm-mingw 20261104 · Needs: nothing more

TL;DR

The Windows renderer has not compiled since #1530: it removed perf_report.cpp's #include <psapi.h>, and ram_used_gb still uses PROCESS_MEMORY_COUNTERS_EX. The v3.0.0-rc.8 release run stops in its Windows Vulkan back end job. This puts the include back.

Breakdown

  • Who it helps: everyone on Windows: nightlies and releases build again.
  • What was wrong: perf_report.cpp:90: error: unknown type name 'PROCESS_MEMORY_COUNTERS_EX' (release run 38467).
  • What changes: #include <psapi.h> under _WIN32, as before #1530.
  • What does not change: anything Linux builds, and what the performance summary sends.
  • How it was checked: the Windows renderer cross-built from Linux with tools.lock's llvm-mingw: 213 files, 0 failed, longshot_vk.dll linked.
  • Risk: low: one include, the one the file had before.

Why

Release run 38467 (v3.0.0-rc.8 on 10fab152) failed in "Windows Vulkan back end (llvm-mingw)":

gpu/vk/perf_report.cpp:90:5: error: unknown type name 'PROCESS_MEMORY_COUNTERS_EX'
gpu/vk/perf_report.cpp:92:55: error: use of undeclared identifier 'PROCESS_MEMORY_COUNTERS'
FAILED perf_report.cpp

What changed

  • gpu/vk/perf_report.cpp: #include <psapi.h> under #ifdef _WIN32.

Measurements

Nothing to measure: a compile fix.

Flags and settings

None.

Testing

Tested: the Vulkan back end cross-built for Windows from this branch: RX_VK_ONLY=1 RX_RELEASE=1 RX_TARGET=windows LONGSHOT_MINGW=<llvm-mingw 20261104> python -I nx2/build.py --standalone, through the job queue: compiled in 278 s, 0 failed, longshot_vk.dll linked.

Not tested: a run in the game and tests/run_all.py: no game runs or tests on this PC. Opened without a game run at the maintainer's request, to unblock the release.

Must be tested: by hand on Windows, any GPU: the game starts and the performance summary's RAM reads as before, on the next nightly.

Risks

What could break: nothing; the file had this include until #1530.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

🤖 Generated with Claude Code

**Type:** fix · **Risk:** low · **Tested on:** Linux, the Windows renderer cross-built with llvm-mingw 20261104 · **Needs:** nothing more ## TL;DR The Windows renderer has not compiled since #1530: it removed `perf_report.cpp`'s `#include <psapi.h>`, and `ram_used_gb` still uses `PROCESS_MEMORY_COUNTERS_EX`. The v3.0.0-rc.8 release run stops in its Windows Vulkan back end job. This puts the include back. ## Breakdown - **Who it helps:** everyone on Windows: nightlies and releases build again. - **What was wrong:** `perf_report.cpp:90: error: unknown type name 'PROCESS_MEMORY_COUNTERS_EX'` (release run [38467](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/38467)). - **What changes:** `#include <psapi.h>` under `_WIN32`, as before #1530. - **What does not change:** anything Linux builds, and what the performance summary sends. - **How it was checked:** the Windows renderer cross-built from Linux with tools.lock's llvm-mingw: 213 files, 0 failed, `longshot_vk.dll` linked. - **Risk:** low: one include, the one the file had before. ## Why Release run 38467 (v3.0.0-rc.8 on `10fab152`) failed in "Windows Vulkan back end (llvm-mingw)": ``` gpu/vk/perf_report.cpp:90:5: error: unknown type name 'PROCESS_MEMORY_COUNTERS_EX' gpu/vk/perf_report.cpp:92:55: error: use of undeclared identifier 'PROCESS_MEMORY_COUNTERS' FAILED perf_report.cpp ``` ## What changed - `gpu/vk/perf_report.cpp`: `#include <psapi.h>` under `#ifdef _WIN32`. ## Measurements Nothing to measure: a compile fix. ### Flags and settings None. ## Testing **Tested:** the Vulkan back end cross-built for Windows from this branch: `RX_VK_ONLY=1 RX_RELEASE=1 RX_TARGET=windows LONGSHOT_MINGW=<llvm-mingw 20261104> python -I nx2/build.py --standalone`, through the job queue: compiled in 278 s, 0 failed, `longshot_vk.dll` linked. **Not tested:** a run in the game and `tests/run_all.py`: no game runs or tests on this PC. Opened without a game run at the maintainer's request, to unblock the release. **Must be tested:** by hand on Windows, any GPU: the game starts and the performance summary's RAM reads as before, on the next nightly. ## Risks **What could break:** nothing; the file had this include until #1530. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [ ] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(vk): perf_report.cpp includes psapi.h again, so the Windows renderer compiles
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
PR description / Description follows the template (pull_request_target) Failing after 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Third-party parts / As their notes say (pull_request) Successful in 21s
5035536f8d
#1530 removed the include, and ram_used_gb's PROCESS_MEMORY_COUNTERS_EX is
undeclared without it: the release run's Windows Vulkan back end job stops
at perf_report.cpp:90.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean deleted branch fix/perf-report-psapi 2026-11-18 22:23:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1665
No description provided.