[PR #3557] [MERGED] amdgpu: Report GPU perf counter in GPU cycles. #3571

Closed
opened 2026-02-27 22:04:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3557
Author: @squidbus
Created: 9/8/2025
Status: Merged
Merged: 9/9/2025
Merged by: @squidbus

Base: mainHead: perfcount


📝 Commits (1)

  • 1c998a8 amdgpu: Report GPU perf counter in GPU cycles.

📊 Changes

1 file changed (+15 additions, -3 deletions)

View changed files

📝 src/video_core/amdgpu/pm4_cmds.h (+15 -3)

📄 Description

Currently the perf counter from the GPU is reported as the plain TSC value from the CPU, but the perf counter is expected to be in GPU cycles. Instead, scale the value from the TSC frequency to the GPU frequency, using sceGnmGetGpuCoreClockFrequency() to make sure regular vs Neo mode is accounted for.

Fixes Valkyria Revolution (CUSA06810) slowing itself down due to incorrect GPU time measurements.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3557 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/8/2025 **Status:** ✅ Merged **Merged:** 9/9/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `perfcount` --- ### 📝 Commits (1) - [`1c998a8`](https://github.com/shadps4-emu/shadPS4/commit/1c998a85c56111ab17ab0c0ddbc5a4d0dab09d5c) amdgpu: Report GPU perf counter in GPU cycles. ### 📊 Changes **1 file changed** (+15 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/amdgpu/pm4_cmds.h` (+15 -3) </details> ### 📄 Description Currently the perf counter from the GPU is reported as the plain TSC value from the CPU, but the perf counter is expected to be in GPU cycles. Instead, scale the value from the TSC frequency to the GPU frequency, using `sceGnmGetGpuCoreClockFrequency()` to make sure regular vs Neo mode is accounted for. Fixes Valkyria Revolution (CUSA06810) slowing itself down due to incorrect GPU time measurements. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:11 +03:00
Sign in to join this conversation.
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
starred/shadPS4#3571
No description provided.