mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-04 06:00:23 +00:00
Add missing division for fallback AMD CPU power calculation.
This commit is contained in:
parent
140c0d8984
commit
a155c10df3
@ -95,7 +95,7 @@ void amdgpu_get_instant_metrics(struct amdgpu_common_metrics *metrics) {
|
||||
// fallback 1: sum of core power
|
||||
metrics->average_cpu_power_w = 0;
|
||||
for (unsigned i = 0; i < cpuStats.GetCPUData().size() / 2; i++)
|
||||
metrics->average_cpu_power_w = metrics->average_cpu_power_w + amdgpu_metrics->average_core_power[i];
|
||||
metrics->average_cpu_power_w = metrics->average_cpu_power_w + amdgpu_metrics->average_core_power[i] / 1000.f;
|
||||
} else if( IS_VALID_METRIC(amdgpu_metrics->average_socket_power) && IS_VALID_METRIC(amdgpu_metrics->average_gfx_power) ) {
|
||||
// fallback 2: estimate cpu power from total socket power
|
||||
metrics->average_cpu_power_w = amdgpu_metrics->average_socket_power / 1000.f - amdgpu_metrics->average_gfx_power / 1000.f;
|
||||
|
Loading…
Reference in New Issue
Block a user