Skip to content

GS: Performance testing options. - #14814

Draft
TJnotJT wants to merge 2 commits into
PCSX2:masterfrom
TJnotJT:gs-perf-testing
Draft

GS: Performance testing options.#14814
TJnotJT wants to merge 2 commits into
PCSX2:masterfrom
TJnotJT:gs-perf-testing

Conversation

@TJnotJT

@TJnotJT TJnotJT commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Adds performance testing options to the Debug>GS menu.

Some code cleanup of GPU timing on VK/DX12, dump replayer, performance metrics, etc.

Rationale behind Changes

Allows printing stats while replaying a GS dump to make it easier to share performance results.

Suggested Testing Steps

The new options are in Debug>GS and only work when running a GS dump:

  • Frame range: Allows setting a start/end frame for a dump. Looping over a single frame of a dump can give more stable performance metrics. The end frame is exclusive so e.g. a range of 3-4 replays only frame 3.
  • Loop count: Number of loops to replay a dump before printing the performance stats. Setting it to 0 loops indefinitely.

The printed stats are identical to what the standalone GS dump runner prints with the -perf flag. For example:

[   40.7150] ======= HW STATISTICS FOR 40 (40) FRAMES ========
[   40.7167] @HWSTAT@ Draw Calls: 285358 (avg 7134)
[   40.7185] @HWSTAT@ Render Passes: 5713 (avg 143)
[   40.7207] @HWSTAT@ Barriers: 198124 (avg 4954)
[   40.7229] @HWSTAT@ Copies: 2307 (avg 58)
[   40.7248] @HWSTAT@ Uploads: 8675 (avg 217)
[   40.7270] @HWSTAT@ Readbacks: 0 (avg 0)
[   40.7287] @HWSTAT@ Copies (ROV): 0 (avg 0)
[   40.7309] @HWSTAT@ Draws Calls (ROV): 0 (avg 0)
[   40.7332] @HWSTAT@ Barriers (ROV): 0 (avg 0)
[   40.7361] @HWSTAT@ Minimum Frame Time: 117.237 ms (8.530 FPS)
[   40.7386] @HWSTAT@ Average Frame Time: 178.037 ms (5.617 FPS)
[   40.7409] @HWSTAT@ Maximum Frame Time: 273.409 ms (3.658 FPS)
[   40.7430] @HWSTAT@ Average CPU Thread Usage: 0.811 %
[   40.7457] @HWSTAT@ Average GS Thread Usage: 86.493 %
[   40.7481] @HWSTAT@ Average GPU Usage: 4.342 %
[   40.7511] @HWSTAT@ Average CPU Thread Time: 2.255 ms
[   40.7533] @HWSTAT@ Average GS Thread Time: 212.323 ms
[   40.7558] @HWSTAT@ Average GPU Time: 9.429 ms
[   40.7592] ============================================

Known issues:

  • The Uploads stat appears to be nondeterministic (maybe in master also?) and may change by +/-1 in different runs.
  • When the start frame is set to a > 0 number, all the lower frames will still be run on the first loop (e.g., if the frame range is 3-4, the first loop will runs frames 0, 1, 2, 3 and the remaining loops run only frame 3).
  • Will not work correctly with Big Picture Mode since UI elements are drawn during GS idle time.

Draft until dump run is completed.

Did you use AI to help find, test, or implement this issue or feature?

No.

TJnotJT added 2 commits August 4, 2026 18:09
Also allow dumping stats from the GUI after running a dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants