mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-22 01:47:36 +00:00
Added the AMD GPU driver version to the report. Added a check for erroneous ActivityPercent values returned by the ADL_Overdrive5_CurrentActivity_Get method.
This commit is contained in:
parent
2019791af9
commit
8afd59327e
@ -131,6 +131,18 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
public int VDDCI;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct ADLVersionsInfo {
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
|
||||
public string DriverVersion;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
|
||||
public string CatalystVersion;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
|
||||
public string CatalystWebLink;
|
||||
}
|
||||
|
||||
internal enum ADLODNCurrentPowerType {
|
||||
TOTAL_POWER = 0,
|
||||
PPT_POWER,
|
||||
@ -357,6 +369,8 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
public delegate ADLStatus ADL2_OverdriveN_PerformanceStatus_GetDelegate(
|
||||
IntPtr context, int adapterIndex,
|
||||
out ADLODNPerformanceStatus performanceStatus);
|
||||
public delegate ADLStatus ADL_Graphics_Versions_GetDelegate(
|
||||
out ADLVersionsInfo versionInfo);
|
||||
|
||||
private static ADL_Main_Control_CreateDelegate
|
||||
_ADL_Main_Control_Create;
|
||||
@ -401,6 +415,8 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
ADL_Overdrive5_ODParameters_Get;
|
||||
public static ADL2_OverdriveN_PerformanceStatus_GetDelegate
|
||||
ADL2_OverdriveN_PerformanceStatus_Get;
|
||||
public static ADL_Graphics_Versions_GetDelegate
|
||||
ADL_Graphics_Versions_Get;
|
||||
|
||||
private static string dllName;
|
||||
|
||||
@ -463,6 +479,8 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
out ADL_Overdrive5_ODParameters_Get);
|
||||
GetDelegate("ADL2_OverdriveN_PerformanceStatus_Get",
|
||||
out ADL2_OverdriveN_PerformanceStatus_Get);
|
||||
GetDelegate("ADL_Graphics_Versions_Get",
|
||||
out ADL_Graphics_Versions_Get);
|
||||
}
|
||||
|
||||
static ADL() {
|
||||
|
@ -563,8 +563,12 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
coreVoltage.Value = null;
|
||||
}
|
||||
|
||||
coreLoad.Value = Math.Min(adlp.ActivityPercent, 100);
|
||||
ActivateSensor(coreLoad);
|
||||
if (adlp.ActivityPercent >= 0 && adlp.ActivityPercent <= 100) {
|
||||
coreLoad.Value = adlp.ActivityPercent;
|
||||
ActivateSensor(coreLoad);
|
||||
} else {
|
||||
coreLoad.Value = null;
|
||||
}
|
||||
} else {
|
||||
coreClock.Value = null;
|
||||
memoryClock.Value = null;
|
||||
|
@ -34,6 +34,25 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
report.AppendLine(adl2Status.ToString());
|
||||
report.AppendLine();
|
||||
|
||||
report.AppendLine("Graphics Versions");
|
||||
report.AppendLine();
|
||||
try {
|
||||
var status = ADL.ADL_Graphics_Versions_Get(out var versionInfo);
|
||||
report.Append(" Status: ");
|
||||
report.AppendLine(status.ToString());
|
||||
report.Append(" DriverVersion: ");
|
||||
report.AppendLine(versionInfo.DriverVersion);
|
||||
report.Append(" CatalystVersion: ");
|
||||
report.AppendLine(versionInfo.CatalystVersion);
|
||||
report.Append(" CatalystWebLink: ");
|
||||
report.AppendLine(versionInfo.CatalystWebLink);
|
||||
} catch (DllNotFoundException) {
|
||||
report.AppendLine(" Status: DLL not found");
|
||||
} catch (Exception e) {
|
||||
report.AppendLine(" Status: " + e.Message);
|
||||
}
|
||||
report.AppendLine();
|
||||
|
||||
if (adlStatus == ADLStatus.OK) {
|
||||
int numberOfAdapters = 0;
|
||||
ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters);
|
||||
|
@ -10,5 +10,5 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.9.2.2")]
|
||||
[assembly: AssemblyInformationalVersion("0.9.2.2 Alpha")]
|
||||
[assembly: AssemblyVersion("0.9.2.3")]
|
||||
[assembly: AssemblyInformationalVersion("0.9.2.3 Alpha")]
|
Loading…
x
Reference in New Issue
Block a user