Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Intel iGpu and shared Memory usage #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions SidebarDiagnostics/Monitoring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -820,11 +820,16 @@ public void InitGPU(MetricConfig[] metrics, bool roundAll, bool useGHz, bool use
{
ISensor _vramLoad = _hardware.Sensors.Where(s => s.SensorType == SensorType.Load && s.Name.Contains("Memory")).FirstOrDefault() ??
_hardware.Sensors.Where(s => s.SensorType == SensorType.Load && s.Index == 1).FirstOrDefault();
ISensor _sharedmemory = _hardware.Sensors.Where(s => (s.SensorType == SensorType.Data || s.SensorType == SensorType.SmallData) && s.Name == "D3D Shared Memory Used").FirstOrDefault();

if (_vramLoad != null)
if (_vramLoad != null && _sharedmemory == null)
{
_sensorList.Add(new OHMMetric(_vramLoad, MetricKey.GPUVRAMLoad, DataType.Percent, null, roundAll));
}
if (_sharedmemory != null)
{
_sensorList.Add(new OHMMetric(_sharedmemory, MetricKey.GPUVRAMLoad, DataType.Megabyte, null, roundAll));
}
}
}

Expand Down Expand Up @@ -3036,7 +3041,7 @@ public static HardwareType[] GetHardwareTypes(this MonitorType type)
return new HardwareType[1] { HardwareType.Memory };

case MonitorType.GPU:
return new HardwareType[2] { HardwareType.GpuNvidia, HardwareType.GpuAmd };
return new HardwareType[3] { HardwareType.GpuNvidia, HardwareType.GpuAmd, HardwareType.GpuIntel };

default:
throw new ArgumentException("Invalid MonitorType.");
Expand Down