Skip to content

Commit

Permalink
naming, delay for synchronized system info on PMD tab, new ADLX TBP s…
Browse files Browse the repository at this point in the history
…ensor as default metric
  • Loading branch information
DevTechProfile committed Dec 18, 2022
1 parent 85f8a2f commit 0a0a94f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions source/CapFrameX.ADLX/ADLXManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ bool IntializeAdlx()
res = g_ADLXHelp.GetSystemServices()->GetGPUs(&gpus);
if (ADLX_SUCCEEDED(res))
{
IADLXGPUPtr oneGPU;
IADLXGPUPtr gpu;
// Use the first GPU in the list
res = gpus->At(gpus->Begin(), &oneGPU);
res = gpus->At(gpus->Begin(), &gpu);
if (ADLX_SUCCEEDED(res))
{
return true;
Expand Down Expand Up @@ -282,13 +282,13 @@ bool GetAdlxTelemetry(const adlx_uint index, AdlxTelemetryData* adlxTelemetryDat
IADLXGPUMetricsSupportPtr gpuMetricsSupport;
IADLXGPUMetricsPtr gpuMetrics;

IADLXGPUPtr oneGPU;
res = gpus->At(index, &oneGPU);
IADLXGPUPtr gpu;
res = gpus->At(index, &gpu);

if (ADLX_SUCCEEDED(res))
{
ADLX_RESULT res1 = perfMonitoringService->GetSupportedGPUMetrics(oneGPU, &gpuMetricsSupport);
ADLX_RESULT res2 = perfMonitoringService->GetCurrentGPUMetrics(oneGPU, &gpuMetrics);
ADLX_RESULT res1 = perfMonitoringService->GetSupportedGPUMetrics(gpu, &gpuMetricsSupport);
ADLX_RESULT res2 = perfMonitoringService->GetCurrentGPUMetrics(gpu, &gpuMetrics);

// Display timestamp and GPU metrics
if (ADLX_SUCCEEDED(res1) && ADLX_SUCCEEDED(res2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class SessionSensorData2 : Dictionary<string, ISessionSensorEntry>, ISess
[JsonIgnore]
public int[] GpuClock { get => Values.FirstOrDefault(c => c.Name.Contains("GPU Core") && c.Type == "Clock")?.Values.Select(Convert.ToInt32).ToArray() ?? Array.Empty<int>(); set => throw new NotImplementedException(); }
[JsonIgnore]
public int[] GpuPower { get => Values.FirstOrDefault(c => (c.Name.Contains("GPU Power") || c.Name.Contains("GPU Total") || c.Name.Contains("GPU TDP")) && c.Type == "Power")?.Values.Select(Convert.ToInt32).ToArray() ?? Array.Empty<int>(); set => throw new NotImplementedException(); }
public int[] GpuPower { get => Values.FirstOrDefault(c => (c.Name.Contains("GPU Power") || c.Name.Contains("GPU Total") || c.Name.Contains("GPU TDP") || c.Name.Contains("GPU TBP")) && c.Type == "Power")?.Values.Select(Convert.ToInt32).ToArray() ?? Array.Empty<int>(); set => throw new NotImplementedException(); }
[JsonIgnore]
public int[] GpuTBPSim { get => Values.FirstOrDefault(c => c.Name.Contains("GPU TBP") && c.Type == "Power")?.Values.Select(Convert.ToInt32).ToArray() ?? Array.Empty<int>(); set => throw new NotImplementedException(); }
[JsonIgnore]
Expand Down
3 changes: 2 additions & 1 deletion source/CapFrameX.Sensor/SensorEntryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public bool GetIsDefaultActiveSensor(ISensorEntry sensor)
case "GPU Power" when hardwareType == HardwareType.GpuNvidia:
case "GPU Power Limit" when hardwareType == HardwareType.GpuNvidia:
case "GPU Total" when hardwareType == HardwareType.GpuAti:
case "GPU TDP" when hardwareType == HardwareType.GpuIntel:
case "GPU TBP" when hardwareType == HardwareType.GpuAti:
case "GPU TDP" when hardwareType == HardwareType.GpuIntel:
case "Used Memory Game" when hardwareType == HardwareType.RAM:
case "GPU Memory Dedicated" when sensorType == SensorType.Data:
isDefault = true;
Expand Down
1 change: 1 addition & 0 deletions source/CapFrameX.ViewModel/PmdViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ public PmdViewModel(IPmdService pmdService, IAppConfiguration appConfiguration,
Task.Factory.StartNew(async () =>
{
await sensorService.SensorServiceCompletionSource.Task;
await Task.Delay(500);

Application.Current.Dispatcher.Invoke(() =>
{
Expand Down

0 comments on commit 0a0a94f

Please sign in to comment.