using System.Runtime.InteropServices; using NvAPIWrapper.Native.Attributes; using NvAPIWrapper.Native.General.Structures; using NvAPIWrapper.Native.Interfaces; namespace NvAPIWrapper.Native.GPU.Structures { /// /// Contains information regarding GPU performance limitations /// [StructLayout(LayoutKind.Sequential, Pack = 8)] [StructureVersion(1)] public struct PrivatePerformanceInfoV1 : IInitializable { internal const int MaxNumberOfUnknown2 = 16; internal StructureVersion _Version; internal uint _Unknown1; internal PerformanceLimit _SupportedLimits; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxNumberOfUnknown2)] internal uint[] _Unknown2; /// /// Gets a boolean value indicating if performance limit by power usage is supported. /// public bool IsPowerLimitSupported { get => _SupportedLimits.HasFlag(PerformanceLimit.PowerLimit); } /// /// Gets a boolean value indicating if performance limit by temperature is supported. /// public bool IsTemperatureLimitSupported { get => _SupportedLimits.HasFlag(PerformanceLimit.TemperatureLimit); } /// /// Gets a boolean value indicating if performance limit by voltage usage is supported. /// public bool IsVoltageLimitSupported { get => _SupportedLimits.HasFlag(PerformanceLimit.VoltageLimit); } /// /// Gets a boolean value indicating if performance limit by detecting no load is supported. /// public bool IsNoLoadLimitSupported { get => _SupportedLimits.HasFlag(PerformanceLimit.NoLoadLimit); } } }