├── Icon.psd ├── NvAPISample ├── Icon.ico └── NvAPISample.csproj ├── NvAPIWrapper ├── Icon.png ├── Native │ ├── Constants │ │ ├── Display.cs │ │ └── General.cs │ ├── Interfaces │ │ ├── IInitializable.cs │ │ ├── GPU │ │ │ ├── IEDID.cs │ │ │ ├── IThermalSettings.cs │ │ │ ├── IPerformanceStates20ClockDependentSingleFrequency.cs │ │ │ ├── IPerformanceStatesClock.cs │ │ │ ├── IPerformanceStatesVoltage.cs │ │ │ ├── IPerformanceState20.cs │ │ │ ├── IUtilizationDomainInfo.cs │ │ │ ├── IPerformanceState.cs │ │ │ ├── IPerformanceStates20VoltageEntry.cs │ │ │ ├── IUtilizationStatus.cs │ │ │ ├── IThermalSensor.cs │ │ │ ├── IDisplayDriverMemoryInfo.cs │ │ │ ├── IPerformanceStates20ClockDependentFrequencyRange.cs │ │ │ ├── IClockFrequencies.cs │ │ │ ├── IPerformanceStates20Info.cs │ │ │ └── IPerformanceStates20ClockEntry.cs │ │ ├── IAllocatable.cs │ │ ├── IHandle.cs │ │ ├── Display │ │ │ ├── IPathTargetInfo.cs │ │ │ ├── IScanOutIntensityData.cs │ │ │ ├── IPathInfo.cs │ │ │ ├── IDisplayDVCInfo.cs │ │ │ ├── IDisplayColorData.cs │ │ │ ├── IColorData.cs │ │ │ └── IHDRColorData.cs │ │ ├── Mosaic │ │ │ ├── ISupportedTopologiesInfo.cs │ │ │ ├── IDisplaySettings.cs │ │ │ └── IGridTopologyDisplay.cs │ │ ├── DRS │ │ │ └── IDRSApplication.cs │ │ └── General │ │ │ └── IChipsetInfo.cs │ ├── Attributes │ │ ├── AcceptsAttribute.cs │ │ ├── FunctionIdAttribute.cs │ │ └── StructureVersionAttribute.cs │ ├── Exceptions │ │ ├── NVIDIANotSupportedException.cs │ │ └── NVIDIAApiException.cs │ ├── Display │ │ ├── ScanOutCompositionParameter.cs │ │ ├── StaticMetadataDescriptorId.cs │ │ ├── InfoFrameDataType.cs │ │ ├── ColorDataHDRCommand.cs │ │ ├── WarpingVerticeFormat.cs │ │ ├── MonitorCapabilitiesType.cs │ │ ├── SpanningOrientation.cs │ │ ├── DisplayPortColorFormat.cs │ │ ├── InfoFrameBoolean.cs │ │ ├── InfoFrameVideoYCCQuantization.cs │ │ ├── ColorDataDynamicRange.cs │ │ ├── InfoFrameVideoITC.cs │ │ ├── TimingVerticalSyncPolarity.cs │ │ ├── TimingHorizontalSyncPolarity.cs │ │ ├── InfoFrameVideoScanInfo.cs │ │ ├── InfoFrameVideoColorFormat.cs │ │ ├── InfoFrameVideoAspectRatioCodedFrame.cs │ │ ├── ColorDataCommand.cs │ │ ├── InfoFrameVideoRGBQuantization.cs │ │ ├── InfoFrameAudioLFEPlaybackLevel.cs │ │ ├── Rotate.cs │ │ ├── TimingScanMode.cs │ │ ├── ColorFormat.cs │ │ ├── InfoFrameVideoContentType.cs │ │ ├── InfoFramePropertyMode.cs │ │ ├── InfoFrameVideoBarData.cs │ │ ├── InfoFrameAudioSampleSize.cs │ │ ├── ColorDataSelectionPolicy.cs │ │ ├── InfoFrameVideoNonUniformPictureScaling.cs │ │ ├── Structures │ │ │ ├── ScanOutWarpingStateV1.cs │ │ │ ├── ScanOutIntensityStateV1.cs │ │ │ ├── PrivateDisplayHUEInfo.cs │ │ │ ├── PrivateDisplayDVCInfo.cs │ │ │ ├── MonitorVCDBCapabilities.cs │ │ │ └── PrivateDisplayDVCInfoEx.cs │ │ ├── InfoFrameAudioExtendedCodec.cs │ │ ├── DisplayPortColorDepth.cs │ │ ├── InfoFrameVideoColorimetry.cs │ │ ├── TargetViewMode.cs │ │ ├── ColorDataFormat.cs │ │ ├── MonitorCapabilitiesConnectorType.cs │ │ ├── ColorDataDepth.cs │ │ ├── ColorDataDesktopDepth.cs │ │ ├── DisplayConfigFlags.cs │ │ ├── InfoFrameVideoExtendedColorimetry.cs │ │ ├── Scaling.cs │ │ ├── InfoFrameAudioChannelCount.cs │ │ ├── InfoFrameAudioSampleRate.cs │ │ └── InfoFrameVideoPixelRepetition.cs │ ├── GPU │ │ ├── ClockLockMode.cs │ │ ├── PowerTopologyDomain.cs │ │ ├── IlluminationDeviceType.cs │ │ ├── PerformanceStates20ClockType.cs │ │ ├── IlluminationAttribute.cs │ │ ├── SystemType.cs │ │ ├── FanCoolersControlMode.cs │ │ ├── IlluminationZoneControlValuesType.cs │ │ ├── GPUType.cs │ │ ├── ClockType.cs │ │ ├── IlluminationZoneType.cs │ │ ├── PerformanceVoltageDomain.cs │ │ ├── CoolerController.cs │ │ ├── CoolerControlMode.cs │ │ ├── IlluminationZoneLocation.cs │ │ ├── CoolerType.cs │ │ ├── PCIeGeneration.cs │ │ ├── ECCConfiguration.cs │ │ ├── IlluminationZoneControlMode.cs │ │ ├── OutputType.cs │ │ ├── UtilizationDomain.cs │ │ ├── IlluminationPiecewiseLinearCycleType.cs │ │ ├── Structures │ │ │ ├── PrivateActiveApplicationV2.cs │ │ │ ├── PrivateArchitectInfoV2.cs │ │ │ ├── IlluminationZoneControlDataFixedColorParameters.cs │ │ │ ├── ECCConfigurationInfoV1.cs │ │ │ ├── IlluminationZoneControlDataManualRGB.cs │ │ │ ├── ClockDomainInfo.cs │ │ │ ├── IlluminationZoneControlDataManualFixedColor.cs │ │ │ ├── PrivateVoltageStatusV1.cs │ │ │ ├── IlluminationZoneInfoParametersV1.cs │ │ │ ├── IlluminationDeviceInfoParametersV1.cs │ │ │ ├── PrivatePerformanceStatusV1.cs │ │ │ ├── ECCStatusInfoV1.cs │ │ │ └── PrivateVoltageBoostPercentV1.cs │ │ ├── GPUBusType.cs │ │ ├── GetPerformanceStatesInfoFlags.cs │ │ ├── PublicClockDomain.cs │ │ ├── CoolerTarget.cs │ │ ├── I2CSpeed.cs │ │ ├── PerformanceLimit.cs │ │ ├── CoolerPolicy.cs │ │ ├── ConnectedIdsFlag.cs │ │ ├── GPUFoundry.cs │ │ └── PerformanceDecreaseReason.cs │ ├── Stereo │ │ ├── StereoDriverMode.cs │ │ ├── StereoActivationFlag.cs │ │ ├── StereoRegistryIdentification.cs │ │ ├── StereoSwapChainMode.cs │ │ ├── StereoFrustumAdjustMode.cs │ │ ├── StereoSurfaceCreateMode.cs │ │ ├── StereoRegistryProfileType.cs │ │ └── StereoActiveEye.cs │ ├── General │ │ ├── ChipsetInfoFlag.cs │ │ └── Structures │ │ │ ├── LongString.cs │ │ │ ├── ShortString.cs │ │ │ ├── GenericString.cs │ │ │ ├── UnicodeString.cs │ │ │ └── StructureVersion.cs │ ├── DRS │ │ ├── DRSSettingType.cs │ │ └── DRSSettingLocation.cs │ └── Mosaic │ │ ├── DisplayTopologyWarning.cs │ │ ├── PixelShiftType.cs │ │ ├── TopologyValidity.cs │ │ ├── TopologyType.cs │ │ └── SetDisplayTopologyFlag.cs ├── DRS │ └── SettingValues │ │ ├── AnselEnable.cs │ │ ├── FXAAEnable.cs │ │ ├── VSyncSmoothAFR.cs │ │ ├── AnselAllow.cs │ │ ├── AutoLODBiasAdjust.cs │ │ ├── FXAAAllow.cs │ │ ├── OpenGLForceBlit.cs │ │ ├── OpenGLForceStereo.cs │ │ ├── WKSStereoSupport.cs │ │ ├── FXAAIndicatorEnable.cs │ │ ├── AnselWhiteListed.cs │ │ ├── LODBiasAdjust.cs │ │ ├── NvidiaQualityUpScaling.cs │ │ ├── CUDAExcludedGPUs.cs │ │ ├── MaxwellBSampleInterleave.cs │ │ ├── OpenGLThreadControl.cs │ │ ├── OpenGLTripleBuffer.cs │ │ ├── VRRFeatureIndicator.cs │ │ ├── VRROverlayIndicator.cs │ │ ├── WKSAPIStereoEyesExchange.cs │ │ ├── ExportPerformanceCounters.cs │ │ ├── OpenGLDeepColorScanOut.cs │ │ ├── MCSFRShowSplit.cs │ │ ├── PhysxIndicator.cs │ │ ├── PreventUiAnisotropicOverride.cs │ │ ├── AmbientOcclusionModeActive.cs │ │ ├── ControlPanelHiddenProfile.cs │ │ ├── D3DOpenGLGPUMaximumPower.cs │ │ ├── ExportPerformanceCountersDX9Only.cs │ │ ├── OptimusMaximumAntiAliasing.cs │ │ ├── PerformanceStateShaderDiskCache.cs │ │ ├── VSyncBehaviorFlags.cs │ │ ├── VSyncTearControl.cs │ │ ├── OpenGLDefaultSwapIntervalSign.cs │ │ ├── SetPowerThrottleForPCIeCompliance.cs │ │ ├── VRRMode.cs │ │ ├── WKSStereoDongleSupport.cs │ │ ├── OpenGLOverlaySupport.cs │ │ ├── VSyncVRRControl.cs │ │ ├── AntiAliasingModeSelectorSLIAntiAliasing.cs │ │ ├── PreRenderLimit.cs │ │ ├── VRPreRenderLimit.cs │ │ ├── PerformanceStateTextureFilteringNoNegativeLODBias.cs │ │ ├── VRRRequestState.cs │ │ ├── OpenGLDefaultSwapIntervalFractional.cs │ │ ├── AmbientOcclusionMode.cs │ │ ├── PerformanceStateTextureFilteringBiLinearInAnisotropic.cs │ │ ├── PerformanceStateTextureFilteringDisableTrilinearSlope.cs │ │ ├── BatteryBoost.cs │ │ ├── OpenGLOverlayPixelType.cs │ │ ├── OpenGLSingleBackDepthBuffer.cs │ │ ├── PerformanceStateTextureFilteringAnisotropicOptimization.cs │ │ ├── AnisotropicModeLevel.cs │ │ ├── OpenGLSLIMulticast.cs │ │ ├── RefreshRateOverride.cs │ │ ├── SLIGPUCount.cs │ │ ├── WKSMemoryAllocationPolicy.cs │ │ ├── WKSStereoSwapMode.cs │ │ ├── OpenGLAntiAliasingLineGamma.cs │ │ ├── QualityEnhancements.cs │ │ ├── AntiAliasingModeAlphaToCoverage.cs │ │ ├── SLIPredefinedGPUCount.cs │ │ ├── OpenGLQualityEnhancements.cs │ │ ├── SLIPredefinedGPUCountDX10.cs │ │ ├── AnisotropicModeSelector.cs │ │ ├── VRRApplicationOverride.cs │ │ ├── AntiAliasingModeSelector.cs │ │ ├── OpenGLEventLogSeverityThreshold.cs │ │ ├── OpenGLImplicitGPUAffinity.cs │ │ ├── OpenGLTMONLevel.cs │ │ ├── VRRApplicationOverrideRequestState.cs │ │ ├── SLIPredefinedMode.cs │ │ ├── SLIRenderingMode.cs │ │ ├── SetVABData.cs │ │ ├── SLIPredefinedModeDX10.cs │ │ ├── AntiAliasingModeGammaCorrection.cs │ │ ├── ApplicationProfileNotificationTimeOut.cs │ │ ├── ShimMCCOMPAT.cs │ │ ├── ShimRenderingMode.cs │ │ ├── VSyncMode.cs │ │ ├── PreferredPerformanceState.cs │ │ ├── OpenGLDefaultSwapInterval.cs │ │ ├── PerformanceStateFrameRateLimiter2Control.cs │ │ ├── PerformanceStateFrameRateLimiterGpsControl.cs │ │ ├── PerformanceStateFrameRateMonitorControl.cs │ │ ├── PerformanceStateFrameRateLimiter.cs │ │ ├── AntiAliasingModeReplay.cs │ │ ├── AntiAliasingBehaviorFlags.cs │ │ ├── WKSAPIStereoMode.cs │ │ └── ShimRenderingOptions.cs ├── readme.txt └── GPU │ ├── AGPInformation.cs │ ├── GPUUsageDomainStatus.cs │ ├── GPUPowerTopologyInformation.cs │ ├── GPUPowerTopologyStatus.cs │ ├── GPUThermalInformation.cs │ ├── GPUPowerLimitPolicy.cs │ └── GPUThermalLimitPolicy.cs ├── .editorconfig ├── NvAPICodeGenerator ├── Generator │ ├── CodeGeneratorBase.cs │ └── CodeGeneratorResult.cs ├── NvAPICodeGenerator.csproj ├── Properties │ └── launchSettings.json └── Parser │ ├── Processors │ ├── CProcessorBase.cs │ └── CDefineProcessor.cs │ ├── Models │ ├── CEnumValue.cs │ ├── CTree.cs │ └── CEnum.cs │ ├── CProcessorParseResult.cs │ ├── CProcessorState.cs │ └── CProcessorStateValues.cs └── FunctionIdExtractor.ps1 /Icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/falahati/NvAPIWrapper/HEAD/Icon.psd -------------------------------------------------------------------------------- /NvAPISample/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/falahati/NvAPIWrapper/HEAD/NvAPISample/Icon.ico -------------------------------------------------------------------------------- /NvAPIWrapper/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/falahati/NvAPIWrapper/HEAD/NvAPIWrapper/Icon.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{cs,vb}] 2 | 3 | # IDE0032: Use auto property 4 | dotnet_style_prefer_auto_properties = false:silent 5 | -------------------------------------------------------------------------------- /NvAPICodeGenerator/Generator/CodeGeneratorBase.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPICodeGenerator.Generator 2 | { 3 | internal abstract class CodeGeneratorBase 4 | { 5 | public abstract CodeGeneratorResult Generate(); 6 | } 7 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/NvAPICodeGenerator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NvAPICodeGenerator/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "NvAPICodeGenerator": { 4 | "commandName": "Project", 5 | "commandLineArgs": "\"../../../../R410-developer\" \"../../../../NvAPIWrapper\"" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Constants/Display.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Constants 2 | { 3 | internal static class Display 4 | { 5 | public const int AdvancedDisplayHeads = 4; 6 | public const int MaxDisplayHeads = 2; 7 | } 8 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Constants/General.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Constants 2 | { 3 | internal static class General 4 | { 5 | public const int BinaryDataMax = 4096; 6 | public const int UnicodeStringLength = 2048; 7 | } 8 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AnselEnable.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AnselEnable : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/FXAAEnable.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum FXAAEnable : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VSyncSmoothAFR.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VSyncSmoothAFR : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AnselAllow.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AnselAllow : uint 5 | { 6 | Disallowed = 0x0, 7 | 8 | Allowed = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AutoLODBiasAdjust.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AutoLODBiasAdjust : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/FXAAAllow.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum FXAAAllow : uint 5 | { 6 | Disallowed = 0x0, 7 | 8 | Allowed = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLForceBlit.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLForceBlit : uint 5 | { 6 | On = 0x1, 7 | 8 | Off = 0x0, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLForceStereo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLForceStereo : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/WKSStereoSupport.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum WKSStereoSupport : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/IInitializable.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces 2 | { 3 | /// 4 | /// Marker interface for all types that should be filled with information before passing to un-managed code 5 | /// 6 | internal interface IInitializable 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/Processors/CProcessorBase.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPICodeGenerator.Parser.Processors 2 | { 3 | internal abstract class CProcessorBase 4 | { 5 | public abstract bool CanParse(string str); 6 | 7 | public abstract CProcessorParseResult Parse(string str, CProcessorState state); 8 | } 9 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/FXAAIndicatorEnable.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum FXAAIndicatorEnable : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AnselWhiteListed.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AnselWhiteListed : uint 5 | { 6 | Disallowed = 0x0, 7 | 8 | Allowed = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/LODBiasAdjust.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum LODBiasAdjust : uint 5 | { 6 | Minimum = 0xFFFFFF80, 7 | 8 | Maximum = 0x80, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/NvidiaQualityUpScaling.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum NvidiaQualityUpScaling : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/Models/CEnumValue.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPICodeGenerator.Parser.Models 2 | { 3 | internal class CEnumValue : CDefine 4 | { 5 | /// 6 | public CEnumValue(string name, string value, CTree parentTree) : base(name, value, parentTree) 7 | { 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/CUDAExcludedGPUs.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public static class CUDAExcludedGPUs 5 | { 6 | public const string Default = "none"; 7 | public const string None = "none"; 8 | } 9 | #pragma warning restore 1591 10 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/MaxwellBSampleInterleave.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum MaxwellBSampleInterleave : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLThreadControl.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLThreadControl : uint 5 | { 6 | Enable = 0x1, 7 | 8 | Disable = 0x2, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLTripleBuffer.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLTripleBuffer : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | Enabled = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRRFeatureIndicator.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRRFeatureIndicator : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | Enabled = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRROverlayIndicator.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRROverlayIndicator : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | Enabled = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/WKSAPIStereoEyesExchange.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum WKSAPIStereoEyesExchange : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ExportPerformanceCounters.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ExportPerformanceCounters : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLDeepColorScanOut.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLDeepColorScanOut : uint 5 | { 6 | Disable = 0x0, 7 | 8 | Enable = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/MCSFRShowSplit.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum MCSFRShowSplit : uint 5 | { 6 | Disabled = 0x34534064, 7 | 8 | Enabled = 0x24545582, 9 | 10 | Default = 0x34534064 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PhysxIndicator.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PhysxIndicator : uint 5 | { 6 | Disabled = 0x34534064, 7 | 8 | Enabled = 0x24545582, 9 | 10 | Default = 0x34534064 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PreventUiAnisotropicOverride.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PreventUiAnisotropicOverride : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AmbientOcclusionModeActive.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AmbientOcclusionModeActive : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | Enabled = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ControlPanelHiddenProfile.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ControlPanelHiddenProfile : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | Enabled = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/D3DOpenGLGPUMaximumPower.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public static class D3DOpenGLGPUMaximumPower 5 | { 6 | public const string Default = "0"; 7 | public const string DefaultPower = "0"; 8 | } 9 | #pragma warning restore 1591 10 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ExportPerformanceCountersDX9Only.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ExportPerformanceCountersDX9Only : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OptimusMaximumAntiAliasing.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OptimusMaximumAntiAliasing : uint 5 | { 6 | Minimum = 0x0, 7 | 8 | Maximum = 0x10, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateShaderDiskCache.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateShaderDiskCache : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VSyncBehaviorFlags.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VSyncBehaviorFlags : uint 5 | { 6 | None = 0x0, 7 | 8 | Default = 0x0, 9 | 10 | IgnoreFlipIntervalMultiple = 0x1 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VSyncTearControl.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VSyncTearControl : uint 5 | { 6 | Disable = 0x96861077, 7 | 8 | Enable = 0x99941284, 9 | 10 | Default = 0x96861077 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLDefaultSwapIntervalSign.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLDefaultSwapIntervalSign : uint 5 | { 6 | Positive = 0x0, 7 | 8 | Negative = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SetPowerThrottleForPCIeCompliance.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SetPowerThrottleForPCIeCompliance : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRRMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRRMode : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | FullScreenOnly = 0x1, 9 | 10 | FullScreenAndWindowed = 0x2, 11 | 12 | Default = 0x1 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/WKSStereoDongleSupport.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum WKSStereoDongleSupport : uint 5 | { 6 | Off = 0x0, 7 | 8 | DAC = 0x1, 9 | 10 | DLP = 0x2, 11 | 12 | Default = 0x0 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLOverlaySupport.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLOverlaySupport : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | ForceSoftware = 0x2, 11 | 12 | Default = 0x0 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VSyncVRRControl.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VSyncVRRControl : uint 5 | { 6 | Disable = 0x0, 7 | 8 | Enable = 0x1, 9 | 10 | NotSupported = 0x9F95128E, 11 | 12 | Default = 0x1 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AntiAliasingModeSelectorSLIAntiAliasing.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AntiAliasingModeSelectorSLIAntiAliasing : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | Enabled = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PreRenderLimit.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PreRenderLimit : uint 5 | { 6 | Minimum = 0x0, 7 | 8 | Maximum = 0xFF, 9 | 10 | ApplicationControlled = 0x0, 11 | 12 | Default = 0x0 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRPreRenderLimit.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRPreRenderLimit : uint 5 | { 6 | Minimum = 0x0, 7 | 8 | Maximum = 0xFF, 9 | 10 | ApplicationControlled = 0x0, 11 | 12 | Default = 0x1 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateTextureFilteringNoNegativeLODBias.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateTextureFilteringNoNegativeLODBias : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRRRequestState.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRRRequestState : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | FullScreenOnly = 0x1, 9 | 10 | FullScreenAndWindowed = 0x2, 11 | 12 | Default = 0x1 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLDefaultSwapIntervalFractional.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLDefaultSwapIntervalFractional : uint 5 | { 6 | ZeroScanLines = 0x0, 7 | 8 | OneFullFrameOfScanLines = 0x64, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AmbientOcclusionMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AmbientOcclusionMode : uint 5 | { 6 | Off = 0x0, 7 | 8 | Low = 0x1, 9 | 10 | Medium = 0x2, 11 | 12 | High = 0x3, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateTextureFilteringBiLinearInAnisotropic.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateTextureFilteringBiLinearInAnisotropic : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateTextureFilteringDisableTrilinearSlope.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateTextureFilteringDisableTrilinearSlope : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IEDID.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Interface for all EDID structures 5 | /// 6 | public interface IEDID 7 | { 8 | /// 9 | /// Gets whole or a part of the EDID data 10 | /// 11 | byte[] Data { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/BatteryBoost.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum BatteryBoost : uint 5 | { 6 | Minimum = 0x1, 7 | 8 | Maximum = 0xFF, 9 | 10 | Enabled = 0x10000000, 11 | 12 | Disabled = 0x0, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLOverlayPixelType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLOverlayPixelType : uint 5 | { 6 | None = 0x0, 7 | 8 | CI = 0x1, 9 | 10 | RGBA = 0x2, 11 | 12 | CIAndRGBA = 0x3, 13 | 14 | Default = 0x1 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLSingleBackDepthBuffer.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLSingleBackDepthBuffer : uint 5 | { 6 | Disable = 0x0, 7 | 8 | Enable = 0x1, 9 | 10 | UseHardwareDefault = 0xFFFFFFFF, 11 | 12 | Default = 0x0 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateTextureFilteringAnisotropicOptimization.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateTextureFilteringAnisotropicOptimization : uint 5 | { 6 | Off = 0x0, 7 | 8 | On = 0x1, 9 | 10 | Default = 0x0 11 | } 12 | #pragma warning restore 1591 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/IAllocatable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces 4 | { 5 | /// 6 | /// Marker interface for all types that should be allocated before passing to the managed code 7 | /// 8 | internal interface IAllocatable : IInitializable, IDisposable 9 | { 10 | void Allocate(); 11 | } 12 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AnisotropicModeLevel.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AnisotropicModeLevel : uint 5 | { 6 | Mask = 0xFFFF, 7 | 8 | NonePoint = 0x0, 9 | 10 | NoneLinear = 0x1, 11 | 12 | Maximum = 0x10, 13 | 14 | Default = 0x1 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLSLIMulticast.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLSLIMulticast : uint 5 | { 6 | Disable = 0x0, 7 | 8 | Enable = 0x1, 9 | 10 | ForceDisable = 0x2, 11 | 12 | AllowMosaic = 0x4, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/RefreshRateOverride.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum RefreshRateOverride : uint 5 | { 6 | ApplicationControlled = 0x0, 7 | 8 | HighestAvailable = 0x1, 9 | 10 | LowLatencyRefreshRateMask = 0xFF0, 11 | 12 | Default = 0x0 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SLIGPUCount.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SLIGPUCount : uint 5 | { 6 | AutoSelect = 0x0, 7 | 8 | One = 0x1, 9 | 10 | Two = 0x2, 11 | 12 | Three = 0x3, 13 | 14 | Four = 0x4, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/WKSMemoryAllocationPolicy.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum WKSMemoryAllocationPolicy : uint 5 | { 6 | AsNeeded = 0x0, 7 | 8 | ModeratePreAllocation = 0x1, 9 | 10 | AggressivePreAllocation = 0x2, 11 | 12 | Default = 0x0 13 | } 14 | #pragma warning restore 1591 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/WKSStereoSwapMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum WKSStereoSwapMode : uint 5 | { 6 | ApplicationControl = 0x0, 7 | 8 | PerEye = 0x1, 9 | 10 | PerEyePair = 0x2, 11 | 12 | LegacyBehavior = 0x3, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLAntiAliasingLineGamma.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLAntiAliasingLineGamma : uint 5 | { 6 | Disabled = 0x10, 7 | 8 | Enabled = 0x23, 9 | 10 | Minimum = 0x1, 11 | 12 | Maximum = 0x64, 13 | 14 | Default = 0x10 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/QualityEnhancements.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum QualityEnhancements : uint 5 | { 6 | HighQuality = 0xFFFFFFF6, 7 | 8 | Quality = 0x0, 9 | 10 | Performance = 0xA, 11 | 12 | HighPerformance = 0x14, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AntiAliasingModeAlphaToCoverage.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AntiAliasingModeAlphaToCoverage : uint 5 | { 6 | ModeMask = 0x4, 7 | 8 | ModeOff = 0x0, 9 | 10 | ModeOn = 0x4, 11 | 12 | ModeMaximum = 0x4, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SLIPredefinedGPUCount.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SLIPredefinedGPUCount : uint 5 | { 6 | AutoSelect = 0x0, 7 | 8 | One = 0x1, 9 | 10 | Two = 0x2, 11 | 12 | Three = 0x3, 13 | 14 | Four = 0x4, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLQualityEnhancements.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLQualityEnhancements : uint 5 | { 6 | HighQuality = 0xFFFFFFF6, 7 | 8 | Quality = 0x0, 9 | 10 | Performance = 0xA, 11 | 12 | HighPerformance = 0x14, 13 | 14 | Default = 0x0 15 | } 16 | #pragma warning restore 1591 17 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SLIPredefinedGPUCountDX10.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SLIPredefinedGPUCountDX10 : uint 5 | { 6 | AutoSelect = 0x0, 7 | 8 | One = 0x1, 9 | 10 | Two = 0x2, 11 | 12 | Three = 0x3, 13 | 14 | Four = 0x4, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AnisotropicModeSelector.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AnisotropicModeSelector : uint 5 | { 6 | Mask = 0xF, 7 | 8 | Application = 0x0, 9 | 10 | User = 0x1, 11 | 12 | Condition = 0x2, 13 | 14 | Maximum = 0x2, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRRApplicationOverride.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRRApplicationOverride : uint 5 | { 6 | Allow = 0x0, 7 | 8 | ForceOff = 0x1, 9 | 10 | DisAllow = 0x2, 11 | 12 | ULMB = 0x3, 13 | 14 | FixedRefresh = 0x4, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IThermalSettings.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Holds a list of thermal sensors 5 | /// 6 | public interface IThermalSettings 7 | { 8 | /// 9 | /// Gets a list of requested thermal sensor information 10 | /// 11 | IThermalSensor[] Sensors { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AntiAliasingModeSelector.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AntiAliasingModeSelector : uint 5 | { 6 | Mask = 0x3, 7 | 8 | ApplicationControl = 0x0, 9 | 10 | Override = 0x1, 11 | 12 | Enhance = 0x2, 13 | 14 | Maximum = 0x2, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Attributes/AcceptsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Delegate)] 6 | internal class AcceptsAttribute : Attribute 7 | { 8 | public AcceptsAttribute(params Type[] types) 9 | { 10 | Types = types; 11 | } 12 | 13 | public Type[] Types { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Exceptions/NVIDIANotSupportedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Exceptions 4 | { 5 | /// 6 | /// Represents errors that raised by NvAPIWrapper 7 | /// 8 | public class NVIDIANotSupportedException : NotSupportedException 9 | { 10 | internal NVIDIANotSupportedException(string message) : base(message) 11 | { 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLEventLogSeverityThreshold.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLEventLogSeverityThreshold : uint 5 | { 6 | Disable = 0x0, 7 | 8 | Critical = 0x1, 9 | 10 | Warning = 0x2, 11 | 12 | Information = 0x3, 13 | 14 | All = 0x4, 15 | 16 | Default = 0x4 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLImplicitGPUAffinity.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public static class OpenGLImplicitGPUAffinity 5 | { 6 | public const string AutoSelect = "autoselect"; 7 | 8 | public const string Default = "autoselect"; 9 | public const string EnvironmentVariable = "OGL_DEFAULT_RENDERING_GPU"; 10 | } 11 | #pragma warning restore 1591 12 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLTMONLevel.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLTMONLevel : uint 5 | { 6 | Disable = 0x0, 7 | 8 | Critical = 0x1, 9 | 10 | Warning = 0x2, 11 | 12 | Information = 0x3, 13 | 14 | Most = 0x4, 15 | 16 | Verbose = 0x5, 17 | 18 | Default = 0x4 19 | } 20 | #pragma warning restore 1591 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VRRApplicationOverrideRequestState.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VRRApplicationOverrideRequestState : uint 5 | { 6 | Allow = 0x0, 7 | 8 | ForceOff = 0x1, 9 | 10 | DisAllow = 0x2, 11 | 12 | ULMB = 0x3, 13 | 14 | FixedRefresh = 0x4, 15 | 16 | Default = 0x0 17 | } 18 | #pragma warning restore 1591 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ScanOutCompositionParameter.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Holds a list of possible scan out composition configurable parameters 5 | /// 6 | public enum ScanOutCompositionParameter : uint 7 | { 8 | /// 9 | /// Warping re-sampling method parameter 10 | /// 11 | WarpingReSamplingMethod = 0 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/readme.txt: -------------------------------------------------------------------------------- 1 | NvAPIWrapper Library 2 | ------------------------------------------------------------ 3 | NvAPIWrapper is a library released under the LGPLv3 license, 4 | allowing all .Net developers to access and use the NVAPI 5 | functionalities. 6 | 7 | For more information about this library, please check out 8 | our GitHub page: 9 | https://github.com/falahati/NvAPIWrapper 10 | 11 | 12 | 2017 Soroush Falahati (https://falahati.net) -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ClockLockMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds the possible clock lock modes 5 | /// 6 | public enum ClockLockMode : uint 7 | { 8 | /// 9 | /// No clock lock 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Manual clock lock 15 | /// 16 | Manual = 3 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PowerTopologyDomain.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of known power topology domain 5 | /// 6 | public enum PowerTopologyDomain : uint 7 | { 8 | /// 9 | /// The GPU 10 | /// 11 | GPU = 0, 12 | 13 | /// 14 | /// The GPU board 15 | /// 16 | Board 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SLIPredefinedMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SLIPredefinedMode : uint 5 | { 6 | AutoSelect = 0x0, 7 | 8 | ForceSingle = 0x1, 9 | 10 | ForceAFR = 0x2, 11 | 12 | ForceAFR2 = 0x3, 13 | 14 | ForceSFR = 0x4, 15 | 16 | ForceAFROfSFRFallback3AFR = 0x5, 17 | 18 | Default = 0x0 19 | } 20 | #pragma warning restore 1591 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SLIRenderingMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SLIRenderingMode : uint 5 | { 6 | AutoSelect = 0x0, 7 | 8 | ForceSingle = 0x1, 9 | 10 | ForceAFR = 0x2, 11 | 12 | ForceAFR2 = 0x3, 13 | 14 | ForceSFR = 0x4, 15 | 16 | ForceAFROfSFRFallback3AFR = 0x5, 17 | 18 | Default = 0x0 19 | } 20 | #pragma warning restore 1591 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Attributes/FunctionIdAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NvAPIWrapper.Native.Helpers; 3 | 4 | namespace NvAPIWrapper.Native.Attributes 5 | { 6 | [AttributeUsage(AttributeTargets.Delegate)] 7 | internal class FunctionIdAttribute : Attribute 8 | { 9 | public FunctionIdAttribute(FunctionId functionId) 10 | { 11 | FunctionId = functionId; 12 | } 13 | 14 | public FunctionId FunctionId { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/StaticMetadataDescriptorId.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the type of the Static Metadata Descriptor block structure 5 | /// 6 | public enum StaticMetadataDescriptorId : uint 7 | { 8 | /// 9 | /// Type 1 Static Metadata Descriptor block structure 10 | /// 11 | StaticMetadataType1 = 0 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SetVABData.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SetVABData : uint 5 | { 6 | Zero = 0x0, 7 | 8 | UIntOne = 0x1, 9 | 10 | FloatOne = 0x3F800000, 11 | 12 | FloatPosInf = 0x7F800000, 13 | 14 | FloatNan = 0x7FC00000, 15 | 16 | UseAPIDefaults = 0xFFFFFFFF, 17 | 18 | Default = 0xFFFFFFFF 19 | } 20 | #pragma warning restore 1591 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/SLIPredefinedModeDX10.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum SLIPredefinedModeDX10 : uint 5 | { 6 | AutoSelect = 0x0, 7 | 8 | ForceSingle = 0x1, 9 | 10 | ForceAFR = 0x2, 11 | 12 | ForceAFR2 = 0x3, 13 | 14 | ForceSFR = 0x4, 15 | 16 | ForceAFROfSFRFallback3AFR = 0x5, 17 | 18 | Default = 0x0 19 | } 20 | #pragma warning restore 1591 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationDeviceType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid illumination zone device types 5 | /// 6 | public enum IlluminationDeviceType : uint 7 | { 8 | /// 9 | /// Invalid device type 10 | /// 11 | Invalid = 0, 12 | 13 | /// 14 | /// MCUV10 device 15 | /// 16 | MCUV10 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceStates20ClockType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains valid clock frequency types 5 | /// 6 | public enum PerformanceStates20ClockType 7 | { 8 | /// 9 | /// Single frequency clock 10 | /// 11 | Single = 0, 12 | 13 | /// 14 | /// Variable frequency clock 15 | /// 16 | Range 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoDriverMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of possible values for the driver stereo mode 5 | /// 6 | public enum StereoDriverMode 7 | { 8 | /// 9 | /// Automatic stereo mode 10 | /// 11 | Automatic = 0, 12 | 13 | /// 14 | /// Direct stereo mode 15 | /// 16 | Direct = 2 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AntiAliasingModeGammaCorrection.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AntiAliasingModeGammaCorrection : uint 5 | { 6 | Mask = 0x3, 7 | 8 | Off = 0x0, 9 | 10 | OnIfFOS = 0x1, 11 | 12 | OnAlways = 0x2, 13 | 14 | Maximum = 0x2, 15 | 16 | Default = 0x0, 17 | 18 | DefaultTesla = 0x2, 19 | 20 | DefaultFermi = 0x2 21 | } 22 | #pragma warning restore 1591 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ApplicationProfileNotificationTimeOut.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ApplicationProfileNotificationTimeOut : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | NineSeconds = 0x9, 9 | 10 | FifteenSeconds = 0xF, 11 | 12 | ThirtySeconds = 0x1E, 13 | 14 | OneMinute = 0x3C, 15 | 16 | TwoMinutes = 0x78, 17 | 18 | Default = 0x0 19 | } 20 | #pragma warning restore 1591 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameDataType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible info-frame data type 5 | /// 6 | public enum InfoFrameDataType : uint 7 | { 8 | /// 9 | /// Auxiliary Video data 10 | /// 11 | AuxiliaryVideoInformation = 2, 12 | 13 | /// 14 | /// Audio data 15 | /// 16 | AudioInformation = 4, 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/ChipsetInfoFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.General 4 | { 5 | /// 6 | /// Chipset information flags - obsolete 7 | /// 8 | [Flags] 9 | public enum ChipsetInfoFlag 10 | { 11 | /// 12 | /// No flags 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Hybrid chipset configuration 18 | /// 19 | Hybrid = 1 20 | } 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoActivationFlag.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid values for the stereo activation process 5 | /// 6 | public enum StereoActivationFlag 7 | { 8 | /// 9 | /// Immediate activation 10 | /// 11 | Immediate = 0, 12 | 13 | /// 14 | /// Delayed activation 15 | /// 16 | Delayed 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid illumination attributes 5 | /// 6 | public enum IlluminationAttribute : uint 7 | { 8 | /// 9 | /// Logo brightness control 10 | /// 11 | LogoBrightness = 0, 12 | 13 | /// 14 | /// SLI bridge brightness control 15 | /// 16 | SLIBrightness 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ShimMCCOMPAT.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ShimMCCOMPAT : uint 5 | { 6 | Integrated = 0x0, 7 | 8 | Enable = 0x1, 9 | 10 | UserEditable = 0x2, 11 | 12 | Mask = 0x3, 13 | 14 | VideoMask = 0x4, 15 | 16 | VaryingBit = 0x8, 17 | 18 | AutoSelect = 0x10, 19 | 20 | OverrideBit = 0x80000000, 21 | 22 | Default = 0x10 23 | } 24 | #pragma warning restore 1591 25 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20ClockDependentSingleFrequency.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Holds information regarding the clock frequency of a fixed frequency clock domain 5 | /// 6 | public interface IPerformanceStates20ClockDependentSingleFrequency 7 | { 8 | /// 9 | /// Gets the clock frequency of a clock domain in kHz 10 | /// 11 | uint FrequencyInkHz { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Attributes/StructureVersionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Struct)] 6 | internal class StructureVersionAttribute : Attribute 7 | { 8 | public StructureVersionAttribute() 9 | { 10 | } 11 | 12 | public StructureVersionAttribute(int versionNumber) 13 | { 14 | VersionNumber = versionNumber; 15 | } 16 | 17 | public int VersionNumber { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataHDRCommand.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the HDR color data command 5 | /// 6 | public enum ColorDataHDRCommand : uint 7 | { 8 | /// 9 | /// Get the current HDR color data 10 | /// 11 | Get = 0, 12 | 13 | /// 14 | /// Set the current HDR color data 15 | /// 16 | Set = 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ShimRenderingMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ShimRenderingMode : uint 5 | { 6 | Integrated = 0x0, 7 | 8 | Enable = 0x1, 9 | 10 | UserEditable = 0x2, 11 | 12 | Mask = 0x3, 13 | 14 | VideoMask = 0x4, 15 | 16 | VaryingBit = 0x8, 17 | 18 | AutoSelect = 0x10, 19 | 20 | OverrideBit = 0x80000000, 21 | 22 | Default = 0x10 23 | } 24 | #pragma warning restore 1591 25 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/VSyncMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum VSyncMode : uint 5 | { 6 | Passive = 0x60925292, 7 | 8 | ForceOff = 0x8416747, 9 | 10 | ForceOn = 0x47814940, 11 | 12 | FlipInterval2 = 0x32610244, 13 | 14 | FlipInterval3 = 0x71271021, 15 | 16 | FlipInterval4 = 0x13245256, 17 | 18 | Virtual = 0x18888888, 19 | 20 | Default = 0x60925292 21 | } 22 | #pragma warning restore 1591 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/SystemType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// GPU systems 5 | /// 6 | public enum SystemType 7 | { 8 | /// 9 | /// Unknown type 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// Laptop GPU 15 | /// 16 | Laptop = 1, 17 | 18 | /// 19 | /// Desktop GPU 20 | /// 21 | Desktop = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/WarpingVerticeFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Holds a list of possible warping vertex formats 5 | /// 6 | public enum WarpingVerticeFormat : uint 7 | { 8 | /// 9 | /// XYUVRQ Triangle Strip vertex format 10 | /// 11 | TriangleStripXYUVRQ = 0, 12 | 13 | /// 14 | /// XYUVRQ Triangles format 15 | /// 16 | TrianglesXYUVRQ = 1 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/FanCoolersControlMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds possible fan cooler control modes 7 | /// 8 | [Flags] 9 | public enum FanCoolersControlMode : uint 10 | { 11 | /// 12 | /// Automatic fan cooler control 13 | /// 14 | Auto = 0, 15 | 16 | /// 17 | /// Manual fan cooler control 18 | /// 19 | Manual = 0b1, 20 | } 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneControlValuesType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid zone control value types to set or to retrieve 5 | /// 6 | public enum IlluminationZoneControlValuesType 7 | { 8 | /// 9 | /// Currently active values 10 | /// 11 | CurrentlyActive = 0, 12 | 13 | /// 14 | /// Default values 15 | /// 16 | Default = 1 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/MonitorCapabilitiesType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the monitor capabilities type 5 | /// 6 | public enum MonitorCapabilitiesType : uint 7 | { 8 | /// 9 | /// The Vendor Specific Data Block 10 | /// 11 | VSDB = 0x1000, 12 | 13 | /// 14 | /// The Video Capability Data Block 15 | /// 16 | VCDB = 0x1001 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GPUType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Possible GPU types 5 | /// 6 | public enum GPUType 7 | { 8 | /// 9 | /// Unknown GPU type 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// Integrated GPU 15 | /// 16 | Integrated = 1, 17 | 18 | /// 19 | /// Discrete GPU 20 | /// 21 | Discrete = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoRegistryIdentification.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid identification for registry values 5 | /// 6 | public enum StereoRegistryIdentification 7 | { 8 | /// 9 | /// Convergence value identification 10 | /// 11 | Convergence, 12 | 13 | /// 14 | /// Frustum adjust mode value identification 15 | /// 16 | FrustumAdjustMode 17 | } 18 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PreferredPerformanceState.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PreferredPerformanceState : uint 5 | { 6 | Adaptive = 0x0, 7 | 8 | PreferMaximum = 0x1, 9 | 10 | DriverControlled = 0x2, 11 | 12 | PreferConsistentPerformance = 0x3, 13 | 14 | PreferMinimum = 0x4, 15 | 16 | OptimalPower = 0x5, 17 | 18 | Minimum = 0x0, 19 | 20 | Maximum = 0x5, 21 | 22 | Default = 0x5 23 | } 24 | #pragma warning restore 1591 25 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoSwapChainMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid flags for the swap chain mode 5 | /// 6 | public enum StereoSwapChainMode 7 | { 8 | /// 9 | /// Automatic 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// Stereo 15 | /// 16 | Stereo, 17 | 18 | /// 19 | /// Mono 20 | /// 21 | Mono 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/SpanningOrientation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Display spanning for Windows XP 5 | /// 6 | public enum SpanningOrientation 7 | { 8 | /// 9 | /// No spanning 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Horizontal spanning 15 | /// 16 | Horizontal = 1, 17 | 18 | /// 19 | /// Vertical spanning 20 | /// 21 | Vertical = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ClockType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Clock types to request 5 | /// 6 | public enum ClockType : uint 7 | { 8 | /// 9 | /// Current clock frequencies 10 | /// 11 | CurrentClock = 0, 12 | 13 | /// 14 | /// Base clock frequencies 15 | /// 16 | BaseClock = 1, 17 | 18 | /// 19 | /// Boost clock frequencies 20 | /// 21 | BoostClock = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid illumination zone types 5 | /// 6 | public enum IlluminationZoneType : uint 7 | { 8 | /// 9 | /// Invalid zone type 10 | /// 11 | Invalid = 0, 12 | 13 | /// 14 | /// RGB zone 15 | /// 16 | RGB, 17 | 18 | /// 19 | /// Fixed color zone 20 | /// 21 | FixedColor 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceVoltageDomain.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU.Structures; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains the list of possible voltage domains 7 | /// 8 | public enum PerformanceVoltageDomain : uint 9 | { 10 | /// 11 | /// GPU Core 12 | /// 13 | Core = 0, 14 | 15 | /// 16 | /// Undefined voltage domain 17 | /// 18 | Undefined = PerformanceStatesInfoV2.MaxPerformanceStateVoltages 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/OpenGLDefaultSwapInterval.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum OpenGLDefaultSwapInterval : uint 5 | { 6 | Tear = 0x0, 7 | 8 | VSyncOne = 0x1, 9 | 10 | VSync = 0x1, 11 | 12 | ValueMask = 0xFFFF, 13 | 14 | ForceMask = 0xF0000000, 15 | 16 | ForceOff = 0xF0000000, 17 | 18 | ForceOn = 0x10000000, 19 | 20 | ApplicationControlled = 0x0, 21 | 22 | Disable = 0xFFFFFFFF, 23 | 24 | Default = 0x1 25 | } 26 | #pragma warning restore 1591 27 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerController.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds the list of possible cooler controllers 5 | /// 6 | public enum CoolerController : uint 7 | { 8 | /// 9 | /// No cooler controller 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// ADI cooler controller 15 | /// 16 | ADI, 17 | 18 | /// 19 | /// Internal cooler controller 20 | /// 21 | Internal 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerControlMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds possible cooler control modes 5 | /// 6 | public enum CoolerControlMode : uint 7 | { 8 | /// 9 | /// No cooler control 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Toggle based cooler control mode 15 | /// 16 | Toggle, 17 | 18 | /// 19 | /// Variable cooler control mode 20 | /// 21 | Variable 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/IHandle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces 4 | { 5 | /// 6 | /// Interface for all pointer based handles 7 | /// 8 | public interface IHandle 9 | { 10 | /// 11 | /// Returns true if the handle is null and not pointing to a valid location in the memory 12 | /// 13 | bool IsNull { get; } 14 | 15 | /// 16 | /// Gets the address of the handle in the memory 17 | /// 18 | IntPtr MemoryAddress { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/CProcessorParseResult.cs: -------------------------------------------------------------------------------- 1 | using NvAPICodeGenerator.Parser.Models; 2 | 3 | namespace NvAPICodeGenerator.Parser 4 | { 5 | internal class CProcessorParseResult 6 | { 7 | /// 8 | public CProcessorParseResult(CTree currentTree, bool endOfProcess, string unParsed) 9 | { 10 | CurrentTree = currentTree; 11 | EndOfProcess = endOfProcess; 12 | UnParsed = unParsed; 13 | } 14 | 15 | public CTree CurrentTree { get; } 16 | public bool EndOfProcess { get; } 17 | public string UnParsed { get; } 18 | } 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateFrameRateLimiter2Control.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateFrameRateLimiter2Control : uint 5 | { 6 | DelayCE = 0x0, 7 | 8 | Delay3D = 0x1, 9 | 10 | AvoidNoop = 0x2, 11 | 12 | DelayCEPresent3D = 0x8, 13 | 14 | AllowAllMaxwell = 0x10, 15 | 16 | AllowAll = 0x20, 17 | 18 | ForceOff = 0x40, 19 | 20 | EnableVCE = 0x80, 21 | 22 | DefaultForGM10X = 0x11, 23 | 24 | Default = 0x88 25 | } 26 | #pragma warning restore 1591 27 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/DisplayPortColorFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible display port color formats 5 | /// 6 | public enum DisplayPortColorFormat : uint 7 | { 8 | /// 9 | /// RGB color format 10 | /// 11 | RGB = 0, 12 | 13 | /// 14 | /// YCbCr422 color format 15 | /// 16 | YCbCr422 = 1, 17 | 18 | /// 19 | /// YCbCr444 color format 20 | /// 21 | YCbCr444 = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameBoolean.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for info-frame properties that accept or return a boolean value 5 | /// 6 | public enum InfoFrameBoolean : uint 7 | { 8 | /// 9 | /// False 10 | /// 11 | False = 0, 12 | 13 | /// 14 | /// True 15 | /// 16 | True, 17 | 18 | /// 19 | /// Auto (Unspecified) 20 | /// 21 | Auto = 3 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoYCCQuantization.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI YCC quantization 5 | /// 6 | public enum InfoFrameVideoYCCQuantization : uint 7 | { 8 | /// 9 | /// Limited YCC range 10 | /// 11 | LimitedRange = 0, 12 | 13 | /// 14 | /// Full YCC range 15 | /// 16 | FullRange, 17 | 18 | /// 19 | /// Auto (Unspecified) 20 | /// 21 | Auto = 7 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IPathTargetInfo.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display.Structures; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.Display 4 | { 5 | /// 6 | /// Interface for all PathTargetInfo structures 7 | /// 8 | public interface IPathTargetInfo 9 | { 10 | /// 11 | /// Contains extra information. NULL for Non-NVIDIA Display. 12 | /// 13 | PathAdvancedTargetInfo? Details { get; } 14 | 15 | /// 16 | /// Display identification 17 | /// 18 | uint DisplayId { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStatesClock.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a clock domain of a performance state 7 | /// 8 | public interface IPerformanceStatesClock 9 | { 10 | /// 11 | /// Gets the clock domain identification 12 | /// 13 | PublicClockDomain DomainId { get; } 14 | 15 | /// 16 | /// Gets the clock frequency in kHz 17 | /// 18 | uint Frequency { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoFrustumAdjustMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid frustum adjust modes 5 | /// 6 | public enum StereoFrustumAdjustMode 7 | { 8 | /// 9 | /// No frustum adjustment 10 | /// 11 | NoFrustumAdjust, 12 | 13 | /// 14 | /// Stretch frustum adjustment 15 | /// 16 | Stretch, 17 | 18 | /// 19 | /// Clear edges frustum adjustment 20 | /// 21 | ClearEdges 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataDynamicRange.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for color data dynamic range 5 | /// 6 | public enum ColorDataDynamicRange : uint 7 | { 8 | /// 9 | /// VESA standard progress signal 10 | /// 11 | VESA = 0, 12 | 13 | /// 14 | /// CEA interlaced signal 15 | /// 16 | CEA, 17 | 18 | /// 19 | /// Automatically select the best value 20 | /// 21 | Auto 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStatesVoltage.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a voltage domain of a performance state 7 | /// 8 | public interface IPerformanceStatesVoltage 9 | { 10 | /// 11 | /// Gets the voltage domain identification 12 | /// 13 | PerformanceVoltageDomain DomainId { get; } 14 | 15 | /// 16 | /// Gets the voltage in mV 17 | /// 18 | uint Value { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Generator/CodeGeneratorResult.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace NvAPICodeGenerator.Generator 4 | { 5 | internal class CodeGeneratorResult 6 | { 7 | /// 8 | public CodeGeneratorResult(FileInfo[] filesAdded, FileInfo[] filesRemoved, DirectoryInfo generatedPath) 9 | { 10 | FilesAdded = filesAdded; 11 | FilesRemoved = filesRemoved; 12 | GeneratedPath = generatedPath; 13 | } 14 | 15 | public FileInfo[] FilesRemoved { get; } 16 | public FileInfo[] FilesAdded { get; } 17 | 18 | public DirectoryInfo GeneratedPath { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoITC.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI video content modes 5 | /// 6 | public enum InfoFrameVideoITC : uint 7 | { 8 | /// 9 | /// Normal video content (Consumer Electronics) 10 | /// 11 | VideoContent = 0, 12 | 13 | /// 14 | /// Information Technology content 15 | /// 16 | ITContent, 17 | 18 | /// 19 | /// Auto (Unspecified) 20 | /// 21 | Auto = 3 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceState20.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a performance state v2 7 | /// 8 | public interface IPerformanceState20 9 | { 10 | /// 11 | /// Gets a boolean value indicating if this performance state is editable 12 | /// 13 | bool IsEditable { get; } 14 | 15 | /// 16 | /// Gets the performance state identification 17 | /// 18 | PerformanceStateId StateId { get; } 19 | } 20 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoSurfaceCreateMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid values for the stereo surface creation mode 5 | /// 6 | public enum StereoSurfaceCreateMode 7 | { 8 | /// 9 | /// Automatic surface creation 10 | /// 11 | Auto = 0, 12 | 13 | /// 14 | /// Force stereo surface creation 15 | /// 16 | ForceStereo, 17 | 18 | /// 19 | /// Force mono surface creation 20 | /// 21 | ForceMono 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneLocation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of possible illumination zone locations 5 | /// 6 | public enum IlluminationZoneLocation : uint 7 | { 8 | /// 9 | /// Located on the top of GPU 10 | /// 11 | GPUTop = 0x00, 12 | 13 | /// 14 | /// Located on the top of SLI bridge 15 | /// 16 | SLITop = 0x20, 17 | 18 | /// 19 | /// Invalid zone location 20 | /// 21 | Invalid = 0xFFFFFFFF 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoRegistryProfileType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid application configuration registry profiles 5 | /// 6 | public enum StereoRegistryProfileType 7 | { 8 | /// 9 | /// The default profile 10 | /// 11 | DefaultProfile, 12 | 13 | /// 14 | /// The DirectX 9 specific profile 15 | /// 16 | DirectX9Profile, 17 | 18 | /// 19 | /// The DirectX 10 specific profile 20 | /// 21 | DirectX10Profile 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of possible cooler types 5 | /// 6 | public enum CoolerType : uint 7 | { 8 | /// 9 | /// No cooler type 10 | /// 11 | None, 12 | 13 | /// 14 | /// Air cooling 15 | /// 16 | Fan, 17 | 18 | /// 19 | /// Water cooling 20 | /// 21 | Water, 22 | 23 | /// 24 | /// Liquid nitrogen cooling 25 | /// 26 | LiquidNitrogen 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PCIeGeneration.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of known PCI-e generations and versions 5 | /// 6 | public enum PCIeGeneration : uint 7 | { 8 | /// 9 | /// PCI-e 1.0 10 | /// 11 | PCIe1 = 0, 12 | 13 | /// 14 | /// PCI-e 1.1 15 | /// 16 | PCIe1Minor1, 17 | 18 | /// 19 | /// PCI-e 2.0 20 | /// 21 | PCIe2, 22 | 23 | /// 24 | /// PCI-e 3.0 25 | /// 26 | PCIe3 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IUtilizationDomainInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | 4 | /// 5 | /// Holds information about a utilization domain 6 | /// 7 | public interface IUtilizationDomainInfo 8 | { 9 | /// 10 | /// Gets a boolean value that indicates if this utilization domain is present on this GPU. 11 | /// 12 | bool IsPresent { get; } 13 | 14 | /// 15 | /// Gets the percentage of time where the domain is considered busy in the last 1 second interval. 16 | /// 17 | uint Percentage { get; } 18 | } 19 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TimingVerticalSyncPolarity.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Vertical synchronized polarity modes 5 | /// 6 | public enum TimingVerticalSyncPolarity : byte 7 | { 8 | /// 9 | /// Positive vertical synchronized polarity 10 | /// 11 | Positive = 0, 12 | 13 | /// 14 | /// Negative vertical synchronized polarity 15 | /// 16 | Negative = 1, 17 | 18 | /// 19 | /// Default vertical synchronized polarity 20 | /// 21 | Default = Positive 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ECCConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list of possible ECC memory configurations 5 | /// 6 | public enum ECCConfiguration : uint 7 | { 8 | /// 9 | /// ECC memory configurations are not supported 10 | /// 11 | NotSupported = 0, 12 | 13 | /// 14 | /// Changes require a POST to take effect 15 | /// 16 | Deferred, 17 | 18 | /// 19 | /// Changes can optionally be made to take effect immediately 20 | /// 21 | Immediate 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TimingHorizontalSyncPolarity.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Horizontal synchronized polarity modes 5 | /// 6 | public enum TimingHorizontalSyncPolarity : byte 7 | { 8 | /// 9 | /// Positive horizontal synchronized polarity 10 | /// 11 | Positive = 0, 12 | 13 | /// 14 | /// Negative horizontal synchronized polarity 15 | /// 16 | Negative = 1, 17 | 18 | /// 19 | /// Default horizontal synchronized polarity 20 | /// 21 | Default = Negative 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationZoneControlMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains a list of available illumination zone control modes 7 | /// 8 | [Flags] 9 | public enum IlluminationZoneControlMode : uint 10 | { 11 | /// 12 | /// manual RGB control 13 | /// 14 | ManualRGB = 0, 15 | 16 | /// 17 | /// Piecewise linear RGB control 18 | /// 19 | PiecewiseLinearRGB, 20 | 21 | /// 22 | /// Invalid control mode 23 | /// 24 | Invalid = 0xFF 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/OutputType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Connected output device types 5 | /// 6 | public enum OutputType : uint 7 | { 8 | /// 9 | /// Unknown display device 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// CRT display device 15 | /// 16 | CRT = 1, 17 | 18 | /// 19 | /// Digital Flat Panel display device 20 | /// 21 | DFP = 2, 22 | 23 | /// 24 | /// TV display device 25 | /// 26 | TV = 3 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/DRS/DRSSettingType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.DRS 2 | { 3 | /// 4 | /// Holds a list of possible setting value types 5 | /// 6 | public enum DRSSettingType : uint 7 | { 8 | /// 9 | /// Integer value type 10 | /// 11 | Integer = 0, 12 | 13 | /// 14 | /// Binary value type 15 | /// 16 | Binary, 17 | 18 | /// 19 | /// ASCII string value type 20 | /// 21 | String, 22 | 23 | /// 24 | /// Unicode string value type 25 | /// 26 | UnicodeString 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoScanInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for AVI scan information 5 | /// 6 | public enum InfoFrameVideoScanInfo : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// Overscan 15 | /// 16 | OverScan, 17 | 18 | /// 19 | /// Underscan 20 | /// 21 | UnderScan, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Mosaic/DisplayTopologyWarning.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Mosaic 4 | { 5 | /// 6 | /// Possible display problems in a topology validation process 7 | /// 8 | [Flags] 9 | public enum DisplayTopologyWarning : uint 10 | { 11 | /// 12 | /// No warning 13 | /// 14 | NoWarning = 0, 15 | 16 | /// 17 | /// Display position is problematic 18 | /// 19 | DisplayPosition = 1, 20 | 21 | /// 22 | /// Driver reload is required for this changes 23 | /// 24 | DriverReloadRequired = 2 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/Models/CTree.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NvAPICodeGenerator.Parser.Models 4 | { 5 | internal class CTree 6 | { 7 | private readonly List _subTrees = new List(); 8 | 9 | public CTree(string name, CTree parent) 10 | { 11 | Name = name; 12 | Parent = parent; 13 | } 14 | 15 | public string Name { get; } 16 | 17 | public CTree Parent { get; } 18 | 19 | public CTree[] SubTrees 20 | { 21 | get => _subTrees.ToArray(); 22 | } 23 | 24 | public virtual void AddSubTree(CTree subTree) 25 | { 26 | _subTrees.Add(subTree); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPISample/NvAPISample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0;net45 5 | Icon.ico 6 | Exe 7 | NvAPISample.Program 8 | NvAPIWrapper 9 | Soroush Falahati 10 | Copyright © Soroush Falahati 2017 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/UtilizationDomain.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Valid utilization domain 5 | /// 6 | public enum UtilizationDomain 7 | { 8 | /// 9 | /// GPU utilization domain 10 | /// 11 | GPU, 12 | 13 | /// 14 | /// Frame buffer utilization domain 15 | /// 16 | FrameBuffer, 17 | 18 | /// 19 | /// Video engine utilization domain 20 | /// 21 | VideoEngine, 22 | 23 | /// 24 | /// Bus interface utilization domain 25 | /// 26 | BusInterface 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Stereo/StereoActiveEye.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Stereo 2 | { 3 | /// 4 | /// Holds a list of valid values for back buffer mode 5 | /// 6 | public enum StereoActiveEye 7 | { 8 | /// 9 | /// No back buffer 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Right eye back buffer mode 15 | /// 16 | RightEye = 1, 17 | 18 | /// 19 | /// Left eye back buffer mode 20 | /// 21 | LeftEye = 2, 22 | 23 | /// 24 | /// Mono back buffer mode 25 | /// 26 | Mono = 3 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoColorFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI color formats 5 | /// 6 | public enum InfoFrameVideoColorFormat : uint 7 | { 8 | /// 9 | /// The RGB color format 10 | /// 11 | RGB = 0, 12 | 13 | /// 14 | /// The YCbCr422 color format 15 | /// 16 | YCbCr422, 17 | 18 | /// 19 | /// The YCbCr444 color format 20 | /// 21 | YCbCr444, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Mosaic/ISupportedTopologiesInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NvAPIWrapper.Native.Mosaic.Structures; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.Mosaic 5 | { 6 | /// 7 | /// Interface for all SupportedTopologiesInfo structures 8 | /// 9 | public interface ISupportedTopologiesInfo 10 | { 11 | /// 12 | /// List of per display settings possible 13 | /// 14 | IEnumerable DisplaySettings { get; } 15 | 16 | /// 17 | /// List of supported topologies with only brief details 18 | /// 19 | IEnumerable TopologyBriefs { get; } 20 | } 21 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/CProcessorState.cs: -------------------------------------------------------------------------------- 1 | using NvAPICodeGenerator.Parser.Models; 2 | 3 | namespace NvAPICodeGenerator.Parser 4 | { 5 | internal class CProcessorState 6 | { 7 | /// 8 | public CProcessorState(CTree currentTree, CHeaderFileParser parser, CProcessorStateValues globalValues) 9 | { 10 | CurrentTree = currentTree; 11 | Parser = parser; 12 | GlobalValues = globalValues; 13 | Values = new CProcessorStateValues(); 14 | } 15 | 16 | public CTree CurrentTree { get; set; } 17 | public CProcessorStateValues GlobalValues { get; } 18 | public CHeaderFileParser Parser { get; } 19 | public CProcessorStateValues Values { get; } 20 | } 21 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IScanOutIntensityData.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display.Structures 2 | { 3 | /// 4 | /// Contains information regarding the scan-out intensity data 5 | /// 6 | public interface IScanOutIntensity { 7 | 8 | /// 9 | /// Gets the array of floating values building an intensity RGB texture 10 | /// 11 | float[] BlendingTexture { get; } 12 | 13 | /// 14 | /// Gets the height of the input texture 15 | /// 16 | uint Height { get; } 17 | 18 | 19 | /// 20 | /// Gets the width of the input texture 21 | /// 22 | uint Width { get; } 23 | } 24 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoAspectRatioCodedFrame.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Gets the possible values for AVI source aspect ratio 5 | /// 6 | public enum InfoFrameVideoAspectRatioCodedFrame : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// The 4x3 aspect ratio 15 | /// 16 | Aspect4X3, 17 | 18 | /// 19 | /// The 16x9 aspect ratio 20 | /// 21 | Aspect16X9, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataCommand.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the color data command 5 | /// 6 | public enum ColorDataCommand : uint 7 | { 8 | /// 9 | /// Get the current color data 10 | /// 11 | Get = 1, 12 | 13 | /// 14 | /// Set the current color data 15 | /// 16 | Set, 17 | 18 | /// 19 | /// Check if the passed color data is supported 20 | /// 21 | IsSupportedColor, 22 | 23 | /// 24 | /// Get the default color data 25 | /// 26 | GetDefault 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Mosaic/PixelShiftType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Mosaic 2 | { 3 | /// 4 | /// Possible pixel shift types for a display 5 | /// 6 | public enum PixelShiftType 7 | { 8 | /// 9 | /// No pixel shift will be applied to this display. 10 | /// 11 | NoPixelShift = 0, 12 | 13 | /// 14 | /// This display will be used to scan-out top left pixels in 2x2 PixelShift configuration 15 | /// 16 | TopLeft2X2Pixels = 1, 17 | 18 | /// 19 | /// This display will be used to scan-out bottom right pixels in 2x2 PixelShift configuration 20 | /// 21 | BottomRight2X2Pixels = 2 22 | } 23 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/Models/CEnum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPICodeGenerator.Parser.Models 4 | { 5 | internal class CEnum : CTree 6 | { 7 | public CEnum(string name, CTree parentTree) : base(name, parentTree) 8 | { 9 | } 10 | 11 | /// 12 | public override void AddSubTree(CTree subTree) 13 | { 14 | if (!(subTree is CEnumValue)) 15 | { 16 | throw new ArgumentException("CEnum only accepts subtrees of type CEnumValue.", nameof(subTree)); 17 | } 18 | 19 | base.AddSubTree(subTree); 20 | } 21 | 22 | /// 23 | public override string ToString() 24 | { 25 | return $"ENUM {Name}"; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoRGBQuantization.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI RGB quantization 5 | /// 6 | public enum InfoFrameVideoRGBQuantization : uint 7 | { 8 | /// 9 | /// Default setting 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// Limited RGB range [16-235] (86%) 15 | /// 16 | LimitedRange, 17 | 18 | /// 19 | /// Full RGB range [0-255] (100%) 20 | /// 21 | FullRange, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Exceptions/NVIDIAApiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NvAPIWrapper.Native.General; 3 | 4 | namespace NvAPIWrapper.Native.Exceptions 5 | { 6 | /// 7 | /// Represents errors that raised by NVIDIA Api 8 | /// 9 | public class NVIDIAApiException : Exception 10 | { 11 | internal NVIDIAApiException(Status status) 12 | { 13 | Status = status; 14 | } 15 | 16 | /// 17 | public override string Message 18 | { 19 | get => GeneralApi.GetErrorMessage(Status) ?? Status.ToString(); 20 | } 21 | 22 | /// 23 | /// Gets NVIDIA Api exception status code 24 | /// 25 | public Status Status { get; } 26 | } 27 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioLFEPlaybackLevel.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible audio low frequency effects channel playback level 5 | /// 6 | public enum InfoFrameAudioLFEPlaybackLevel : uint 7 | { 8 | /// 9 | /// Data not available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// No change to the source audio 15 | /// 16 | Plus0Decibel, 17 | 18 | /// 19 | /// Adds 10 decibel 20 | /// 21 | Plus10Decibel, 22 | 23 | /// 24 | /// Auto (Unspecified) 25 | /// 26 | Auto = 7 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateFrameRateLimiterGpsControl.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateFrameRateLimiterGpsControl : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | DecreaseFilterMask = 0x1FF, 9 | 10 | PauseTimeMask = 0xFE00, 11 | 12 | PauseTimeShift = 0x9, 13 | 14 | TargetRenderTimeMask = 0xFF0000, 15 | 16 | TargetRenderTimeShift = 0x10, 17 | 18 | PerformanceStepSizeMask = 0x1F000000, 19 | 20 | PerformanceStepSizeShift = 0x18, 21 | 22 | IncreaseFilterMask = 0xE0000000, 23 | 24 | IncreaseFilterShift = 0x1D, 25 | 26 | OptimalSetting = 0x4A5A3219, 27 | 28 | Default = 0x0 29 | } 30 | #pragma warning restore 1591 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/IlluminationPiecewiseLinearCycleType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains a list of valid cycle types for the piecewise linear control mode 5 | /// 6 | public enum IlluminationPiecewiseLinearCycleType : uint 7 | { 8 | /// 9 | /// Half half cycle mode 10 | /// 11 | HalfHalf = 0, 12 | 13 | /// 14 | /// Full half cycle mode 15 | /// 16 | FullHalf, 17 | 18 | /// 19 | /// Full repeat cycle mode 20 | /// 21 | FullRepeat, 22 | 23 | /// 24 | /// Invalid cycle mode 25 | /// 26 | Invalid = 0xFF 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/DRS/DRSSettingLocation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.DRS 2 | { 3 | /// 4 | /// Holds possible values for the setting location 5 | /// 6 | public enum DRSSettingLocation : uint 7 | { 8 | /// 9 | /// Setting is part of the current profile 10 | /// 11 | CurrentProfile = 0, 12 | 13 | /// 14 | /// Setting is part of the global profile 15 | /// 16 | GlobalProfile, 17 | 18 | /// 19 | /// Setting is part of the base profile 20 | /// 21 | BaseProfile, 22 | 23 | /// 24 | /// Setting is part of the default profile 25 | /// 26 | DefaultProfile 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Rotate.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible rotate modes 5 | /// 6 | public enum Rotate : uint 7 | { 8 | /// 9 | /// No rotation 10 | /// 11 | Degree0 = 0, 12 | 13 | /// 14 | /// 90 degree rotation 15 | /// 16 | Degree90 = 1, 17 | 18 | /// 19 | /// 180 degree rotation 20 | /// 21 | Degree180 = 2, 22 | 23 | /// 24 | /// 270 degree rotation 25 | /// 26 | Degree270 = 3, 27 | 28 | /// 29 | /// This value is ignored 30 | /// 31 | Ignored = 4 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TimingScanMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Timing scan modes 5 | /// 6 | public enum TimingScanMode : ushort 7 | { 8 | /// 9 | /// Progressive scan mode 10 | /// 11 | Progressive = 0, 12 | 13 | /// 14 | /// Interlaced scan mode 15 | /// 16 | Interlaced = 1, 17 | 18 | /// 19 | /// Interlaced scan mode with extra vertical blank 20 | /// 21 | InterlacedWithExtraVerticalBlank = 1, 22 | 23 | /// 24 | /// Interlaced scan mode without extra vertical blank 25 | /// 26 | InterlacedWithNoExtraVerticalBlank = 2 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible color formats 5 | /// 6 | public enum ColorFormat 7 | { 8 | /// 9 | /// Unknown, driver will choose one automatically. 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// 8bpp mode 15 | /// 16 | P8 = 41, 17 | 18 | /// 19 | /// 16bpp mode 20 | /// 21 | R5G6B5 = 23, 22 | 23 | /// 24 | /// 32bpp mode 25 | /// 26 | A8R8G8B8 = 21, 27 | 28 | /// 29 | /// 64bpp (floating point) 30 | /// 31 | A16B16G16R16F = 113 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoContentType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI content type 5 | /// 6 | public enum InfoFrameVideoContentType : uint 7 | { 8 | /// 9 | /// Graphics content 10 | /// 11 | Graphics = 0, 12 | 13 | /// 14 | /// Photo content 15 | /// 16 | Photo, 17 | 18 | /// 19 | /// Cinematic content 20 | /// 21 | Cinema, 22 | 23 | /// 24 | /// Gaming content 25 | /// 26 | Game, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/LongString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 7 | internal struct LongString : IInitializable 8 | { 9 | public const int LongStringLength = 256; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = LongStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public LongString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/ShortString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 7 | internal struct ShortString : IInitializable 8 | { 9 | public const int ShortStringLength = 64; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = ShortStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public ShortString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFramePropertyMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible info-frame property modes 5 | /// 6 | public enum InfoFramePropertyMode : uint 7 | { 8 | /// 9 | /// Driver determines whether to send info-frames. 10 | /// 11 | Auto = 0, 12 | 13 | /// 14 | /// Driver always sends info-frame. 15 | /// 16 | Enable, 17 | 18 | /// 19 | /// Driver never sends info-frame. 20 | /// 21 | Disable, 22 | 23 | /// 24 | /// Driver only sends info-frame when client requests it via info-frame escape call. 25 | /// 26 | AllowOverride 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/GenericString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 7 | internal struct GenericString : IInitializable 8 | { 9 | public const int GenericStringLength = 4096; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = GenericStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public GenericString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/UnicodeString.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 7 | internal struct UnicodeString : IInitializable 8 | { 9 | public const int UnicodeStringLength = 2048; 10 | 11 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = UnicodeStringLength)] 12 | private readonly string _Value; 13 | 14 | public string Value 15 | { 16 | get => _Value; 17 | } 18 | 19 | public UnicodeString(string value) 20 | { 21 | _Value = value ?? string.Empty; 22 | } 23 | 24 | public override string ToString() 25 | { 26 | return Value; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivateActiveApplicationV2.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.GPU.Structures 7 | { 8 | [StructureVersion(2)] 9 | [StructLayout(LayoutKind.Sequential)] 10 | public struct PrivateActiveApplicationV2 : IInitializable 11 | { 12 | internal const int MaximumNumberOfApplications = 128; 13 | 14 | internal StructureVersion _Version; 15 | internal uint _ProcessId; 16 | internal LongString _ProcessName; 17 | 18 | public int ProcessId 19 | { 20 | get => (int) _ProcessId; 21 | } 22 | 23 | public string ProcessName 24 | { 25 | get => _ProcessName.Value; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoBarData.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI bar data that are available and should be used 5 | /// 6 | public enum InfoFrameVideoBarData : uint 7 | { 8 | /// 9 | /// No bar data present 10 | /// 11 | NotPresent = 0, 12 | 13 | /// 14 | /// Vertical bar 15 | /// 16 | Vertical, 17 | 18 | /// 19 | /// Horizontal bar 20 | /// 21 | Horizontal, 22 | 23 | /// 24 | /// Both sides have bars 25 | /// 26 | Both, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GPUBusType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Associated GPU bus types 5 | /// 6 | public enum GPUBusType 7 | { 8 | /// 9 | /// Bus type is undefined 10 | /// 11 | Undefined = 0, 12 | 13 | /// 14 | /// PCI Bus 15 | /// 16 | PCI = 1, 17 | 18 | /// 19 | /// AGP Bus 20 | /// 21 | AGP = 2, 22 | 23 | /// 24 | /// PCIExpress Bus 25 | /// 26 | PCIExpress = 3, 27 | 28 | /// 29 | /// FPCI Bus 30 | /// 31 | FPCI = 4, 32 | 33 | /// 34 | /// AXI Bus 35 | /// 36 | AXI = 5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioSampleSize.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible audio sample size (bit depth) 5 | /// 6 | public enum InfoFrameAudioSampleSize : uint 7 | { 8 | /// 9 | /// Data is available in the header of source data 10 | /// 11 | InHeader = 0, 12 | 13 | /// 14 | /// 16bit audio sample size 15 | /// 16 | B16, 17 | 18 | /// 19 | /// 20bit audio sample size 20 | /// 21 | B20, 22 | 23 | /// 24 | /// 24bit audio sample size 25 | /// 26 | B24, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GetPerformanceStatesInfoFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains the flags used by the GPUApi.GetPerformanceStatesInfo() function 7 | /// 8 | [Flags] 9 | public enum GetPerformanceStatesInfoFlags 10 | { 11 | /// 12 | /// Current performance states settings 13 | /// 14 | Current = 0, 15 | 16 | /// 17 | /// Default performance states settings 18 | /// 19 | Default = 1, 20 | 21 | /// 22 | /// Maximum range of performance states values 23 | /// 24 | Maximum = 2, 25 | 26 | /// 27 | /// Minimum range of performance states values 28 | /// 29 | Minimum = 4 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivateArchitectInfoV2.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.GPU.Structures 7 | { 8 | /// 9 | /// Contains information regarding a GPU architecture 10 | /// 11 | [StructLayout(LayoutKind.Sequential)] 12 | [StructureVersion(2)] 13 | public struct PrivateArchitectInfoV2 : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal uint _Unknown1; 17 | internal uint _Unknown2; 18 | internal uint _Revision; 19 | 20 | /// 21 | /// Gets the GPU revision 22 | /// 23 | public uint Revision 24 | { 25 | get => _Revision; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IPathInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NvAPIWrapper.Native.Display.Structures; 4 | 5 | namespace NvAPIWrapper.Native.Interfaces.Display 6 | { 7 | /// 8 | /// Interface for all PathInfo structures 9 | /// 10 | public interface IPathInfo : IDisposable 11 | { 12 | /// 13 | /// Identifies sourceId used by Windows CCD. This can be optionally set. 14 | /// 15 | uint SourceId { get; } 16 | 17 | /// 18 | /// Contains information about the source mode 19 | /// 20 | SourceModeInfo SourceModeInfo { get; } 21 | 22 | /// 23 | /// Contains information about path targets 24 | /// 25 | IEnumerable TargetsInfo { get; } 26 | } 27 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateFrameRateMonitorControl.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateFrameRateMonitorControl : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | ThresholdPctMask = 0xFF, 9 | 10 | MovingAverageXMask = 0xF00, 11 | 12 | MovingAverageXShift = 0x8, 13 | 14 | EnableFineGrained = 0x400000, 15 | 16 | EnableOnVSync = 0x800000, 17 | 18 | VSyncOffsetMask = 0xF000, 19 | 20 | VSyncOffsetShift = 0xC, 21 | 22 | FPSUseFrl = 0x0, 23 | 24 | FPS30 = 0x1E000000, 25 | 26 | FPS60 = 0x3C000000, 27 | 28 | FPSMask = 0xFF000000, 29 | 30 | FPSShift = 0x18, 31 | 32 | OptimalSetting = 0x364, 33 | 34 | VSyncOptimalSetting = 0x80F364, 35 | 36 | Default = 0x0 37 | } 38 | #pragma warning restore 1591 39 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IDisplayDVCInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.Display 2 | { 3 | /// 4 | /// Holds the Digital Vibrance Control information regarding the saturation level. 5 | /// 6 | public interface IDisplayDVCInfo 7 | { 8 | /// 9 | /// Gets the current saturation level 10 | /// 11 | int CurrentLevel { get; } 12 | 13 | /// 14 | /// Gets the default saturation level 15 | /// 16 | int DefaultLevel { get; } 17 | 18 | /// 19 | /// Gets the maximum valid saturation level 20 | /// 21 | int MaximumLevel { get; } 22 | 23 | /// 24 | /// Gets the minimum valid saturation level 25 | /// 26 | int MinimumLevel { get; } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataSelectionPolicy.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible values for the color data selection policy 5 | /// 6 | public enum ColorDataSelectionPolicy : uint 7 | { 8 | /// 9 | /// Application or the Nvidia Control Panel user configuration are used to decide the best color format 10 | /// 11 | User = 0, 12 | 13 | /// 14 | /// Driver or the Operating System decides the best color format 15 | /// 16 | BestQuality = 1, 17 | 18 | /// 19 | /// Default value, 20 | /// 21 | Default = BestQuality, 22 | 23 | /// 24 | /// Unknown policy 25 | /// 26 | Unknown = 0xFF 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoNonUniformPictureScaling.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI non uniform picture scaling 5 | /// 6 | public enum InfoFrameVideoNonUniformPictureScaling : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// Horizontal scaling 15 | /// 16 | Horizontal, 17 | 18 | /// 19 | /// Vertical scaling 20 | /// 21 | Vertical, 22 | 23 | /// 24 | /// Scaling in both directions 25 | /// 26 | Both, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/ScanOutWarpingStateV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.Display.Structures 7 | { 8 | /// 9 | /// Contains information regarding the scan-out warping state 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct ScanOutWarpingStateV1 : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal uint _IsEnabled; 17 | 18 | /// 19 | /// Gets a boolean value indicating if the scan out warping is enabled or not 20 | /// 21 | public bool IsEnabled 22 | { 23 | get => _IsEnabled > 0; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/ScanOutIntensityStateV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.Display.Structures 7 | { 8 | /// 9 | /// Contains information regarding the scan-out intensity state 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct ScanOutIntensityStateV1 : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal uint _IsEnabled; 17 | 18 | /// 19 | /// Gets a boolean value indicating if the scan out intensity is enabled or not 20 | /// 21 | public bool IsEnabled 22 | { 23 | get => _IsEnabled > 0; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PublicClockDomain.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU.Structures; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Contains the list of clocks available to public 7 | /// 8 | public enum PublicClockDomain 9 | { 10 | /// 11 | /// Undefined 12 | /// 13 | Undefined = ClockFrequenciesV1.MaxClocksPerGPU, 14 | 15 | /// 16 | /// 3D graphics clock 17 | /// 18 | Graphics = 0, 19 | 20 | /// 21 | /// Memory clock 22 | /// 23 | Memory = 4, 24 | 25 | /// 26 | /// Processor clock 27 | /// 28 | Processor = 7, 29 | 30 | /// 31 | /// Video decoding clock 32 | /// 33 | Video = 8 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/General/Structures/StructureVersion.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace NvAPIWrapper.Native.General.Structures 5 | { 6 | [StructLayout(LayoutKind.Sequential)] 7 | internal struct StructureVersion 8 | { 9 | private readonly uint _version; 10 | 11 | public int VersionNumber 12 | { 13 | get => (int) (_version >> 16); 14 | } 15 | 16 | public int StructureSize 17 | { 18 | get => (int) (_version & ~(0xFFFF << 16)); 19 | } 20 | 21 | public StructureVersion(int version, Type structureType) 22 | { 23 | _version = (uint) (Marshal.SizeOf(structureType) | (version << 16)); 24 | } 25 | 26 | public override string ToString() 27 | { 28 | return $"Structure Size: {StructureSize} Bytes, Version: {VersionNumber}"; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/DRS/IDRSApplication.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.DRS 2 | { 3 | /// 4 | /// Represents an application rule registered in a profile 5 | /// 6 | public interface IDRSApplication 7 | { 8 | /// 9 | /// Gets the application name 10 | /// 11 | string ApplicationName { get; } 12 | 13 | /// 14 | /// Gets the application friendly name 15 | /// 16 | string FriendlyName { get; } 17 | 18 | /// 19 | /// Gets a boolean value indicating if this application is predefined as part of NVIDIA driver 20 | /// 21 | bool IsPredefined { get; } 22 | 23 | /// 24 | /// Gets the application launcher name. 25 | /// 26 | string LauncherName { get; } 27 | } 28 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Mosaic/IDisplaySettings.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.Mosaic 2 | { 3 | /// 4 | /// Interface for all DisplaySettings structures 5 | /// 6 | public interface IDisplaySettings 7 | { 8 | /// 9 | /// Bits per pixel 10 | /// 11 | int BitsPerPixel { get; } 12 | 13 | /// 14 | /// Display frequency 15 | /// 16 | int Frequency { get; } 17 | 18 | /// 19 | /// Display frequency in x1k 20 | /// 21 | uint FrequencyInMillihertz { get; } 22 | 23 | /// 24 | /// Per-display height 25 | /// 26 | int Height { get; } 27 | 28 | /// 29 | /// Per-display width 30 | /// 31 | int Width { get; } 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds a list of possible cooler targets 7 | /// 8 | [Flags] 9 | public enum CoolerTarget : uint 10 | { 11 | /// 12 | /// No cooler target 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Cooler targets GPU 18 | /// 19 | GPU = 0b1, 20 | 21 | /// 22 | /// Cooler targets memory 23 | /// 24 | Memory = 0b10, 25 | 26 | /// 27 | /// Cooler targets power supply 28 | /// 29 | PowerSupply = 0b100, 30 | 31 | /// 32 | /// Cooler targets GPU, memory and power supply 33 | /// 34 | All = GPU | Memory | PowerSupply 35 | } 36 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioExtendedCodec.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible extended audio codecs 5 | /// 6 | public enum InfoFrameAudioExtendedCodec : uint 7 | { 8 | /// 9 | /// Use the primary audio codec type, data not available 10 | /// 11 | UseCodecType = 0, 12 | 13 | /// 14 | /// High-Efficiency Advanced Audio Coding 15 | /// 16 | HEAAC, 17 | 18 | /// 19 | /// High-Efficiency Advanced Audio Coding 2 20 | /// 21 | HEAACVersion2, 22 | 23 | /// 24 | /// MPEG Surround 25 | /// 26 | MPEGSurround, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 63 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/DisplayPortColorDepth.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible display port color depths 5 | /// 6 | public enum DisplayPortColorDepth : uint 7 | { 8 | /// 9 | /// Default color depth 10 | /// 11 | Default = 0, 12 | /// 13 | /// 6 bit per color color depth 14 | /// 15 | BPC6, 16 | /// 17 | /// 8 bit per color color depth 18 | /// 19 | BPC8, 20 | /// 21 | /// 10 bit per color color depth 22 | /// 23 | BPC10, 24 | /// 25 | /// 12 bit per color color depth 26 | /// 27 | BPC12, 28 | 29 | /// 30 | /// 16 bit per color color depth 31 | /// 32 | BPC16, 33 | } 34 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/AGPInformation.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.GPU 2 | { 3 | /// 4 | /// Contains information about the accelerated graphics connection 5 | /// 6 | public class AGPInformation 7 | { 8 | internal AGPInformation(int aperture, int currentRate) 9 | { 10 | ApertureInMB = aperture; 11 | CurrentRate = currentRate; 12 | } 13 | 14 | /// 15 | /// Gets AGP aperture in megabytes 16 | /// 17 | public int ApertureInMB { get; } 18 | 19 | /// 20 | /// Gets current AGP Rate (0 = AGP not present, 1 = 1x, 2 = 2x, etc.) 21 | /// 22 | public int CurrentRate { get; } 23 | 24 | /// 25 | public override string ToString() 26 | { 27 | return $"AGP Aperture: {ApertureInMB}MB, Current Rate: {CurrentRate}x"; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoColorimetry.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI color space 5 | /// 6 | public enum InfoFrameVideoColorimetry : uint 7 | { 8 | /// 9 | /// No data available 10 | /// 11 | NoData = 0, 12 | 13 | /// 14 | /// The SMPTE170M color space 15 | /// 16 | SMPTE170M, 17 | 18 | /// 19 | /// The ITURBT709 color space 20 | /// 21 | ITURBT709, 22 | 23 | /// 24 | /// Extended colorimetry value should be used to get information regarding AVI color space 25 | /// 26 | UseExtendedColorimetry, 27 | 28 | /// 29 | /// Auto (Unspecified) 30 | /// 31 | Auto = 7 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/TargetViewMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Display view modes 5 | /// 6 | public enum TargetViewMode 7 | { 8 | /// 9 | /// Standard view mode 10 | /// 11 | Standard = 0, 12 | 13 | /// 14 | /// Cloned view mode 15 | /// 16 | Clone = 1, 17 | 18 | /// 19 | /// Horizontal span view mode 20 | /// 21 | HorizontalSpan = 2, 22 | 23 | /// 24 | /// Vertical span view mode 25 | /// 26 | VerticalSpan = 3, 27 | 28 | /// 29 | /// Dual view mode 30 | /// 31 | DualView = 4, 32 | 33 | /// 34 | /// Multi view mode 35 | /// 36 | MultiView = 5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataFormat.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible color data color format values 5 | /// 6 | public enum ColorDataFormat : uint 7 | { 8 | /// 9 | /// RGB color format 10 | /// 11 | RGB = 0, 12 | 13 | /// 14 | /// YUV422 color format 15 | /// 16 | YUV422, 17 | 18 | /// 19 | /// YUV444 color format 20 | /// 21 | YUV444, 22 | 23 | /// 24 | /// YUV420 color format 25 | /// 26 | YUV420, 27 | 28 | /// 29 | /// Default color format 30 | /// 31 | Default = 0xFE, 32 | 33 | /// 34 | /// Automatically select the best color format 35 | /// 36 | Auto = 0xFF 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/MonitorCapabilitiesConnectorType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible values for the monitor capabilities connector type 5 | /// 6 | public enum MonitorCapabilitiesConnectorType : uint 7 | { 8 | /// 9 | /// Unknown or invalid connector 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// VGA connector 15 | /// 16 | VGA, 17 | 18 | /// 19 | /// Composite connector (TV) 20 | /// 21 | TV, 22 | 23 | /// 24 | /// DVI connector 25 | /// 26 | DVI, 27 | 28 | /// 29 | /// HDMI connector 30 | /// 31 | HDMI, 32 | 33 | /// 34 | /// Display Port connector 35 | /// 36 | DisplayPort 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/PerformanceStateFrameRateLimiter.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum PerformanceStateFrameRateLimiter : uint 5 | { 6 | Disabled = 0x0, 7 | 8 | FPS20 = 0x14, 9 | 10 | FPS30 = 0x1E, 11 | 12 | FPS40 = 0x28, 13 | 14 | Fpsmask = 0xFF, 15 | 16 | NoAlign = 0x4000, 17 | 18 | BBQM = 0x8000, 19 | 20 | LowerFPSToAlign = 0x20000, 21 | 22 | ForceVSyncOff = 0x40000, 23 | 24 | GpsWeb = 0x80000, 25 | 26 | Disallowed = 0x200000, 27 | 28 | UseCPUWait = 0x400000, 29 | 30 | NoLagOffset = 0x800000, 31 | 32 | Accurate = 0x10000000, 33 | 34 | AllowWindowed = 0x20000000, 35 | 36 | ForceOn = 0x40000000, 37 | 38 | Enabled = 0x80000000, 39 | 40 | OpenGLRemoteDesktop = 0xE000003C, 41 | 42 | Mask = 0xF0EEC0FF, 43 | 44 | Default = 0x0 45 | } 46 | #pragma warning restore 1591 47 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/I2CSpeed.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Contains possible I2C bus speed values in kHz 5 | /// 6 | public enum I2CSpeed : uint 7 | { 8 | /// 9 | /// Current / Default frequency setting 10 | /// 11 | Default, 12 | 13 | /// 14 | /// 3kHz 15 | /// 16 | I2C3KHz, 17 | 18 | /// 19 | /// 10kHz 20 | /// 21 | I2C10KHz, 22 | 23 | /// 24 | /// 33kHz 25 | /// 26 | I2C33KHz, 27 | 28 | /// 29 | /// 100kHz 30 | /// 31 | I2C100KHz, 32 | 33 | /// 34 | /// 200kHz 35 | /// 36 | I2C200KHz, 37 | 38 | /// 39 | /// 400kHz 40 | /// 41 | I2C400KHz 42 | } 43 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/General/IChipsetInfo.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.General; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.General 4 | { 5 | /// 6 | /// Interface for all ChipsetInfo structures 7 | /// 8 | public interface IChipsetInfo 9 | { 10 | /// 11 | /// Chipset device name 12 | /// 13 | string ChipsetName { get; } 14 | 15 | /// 16 | /// Chipset device identification 17 | /// 18 | int DeviceId { get; } 19 | 20 | /// 21 | /// Chipset information flags - obsolete 22 | /// 23 | ChipsetInfoFlag Flags { get; } 24 | 25 | /// 26 | /// Chipset vendor identification 27 | /// 28 | int VendorId { get; } 29 | 30 | /// 31 | /// Chipset vendor name 32 | /// 33 | string VendorName { get; } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AntiAliasingModeReplay.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AntiAliasingModeReplay : uint 5 | { 6 | SamplesMask = 0x70, 7 | 8 | SamplesOne = 0x0, 9 | 10 | SamplesTwo = 0x10, 11 | 12 | SamplesFour = 0x20, 13 | 14 | SamplesEight = 0x30, 15 | 16 | SamplesMaximum = 0x30, 17 | 18 | ModeMask = 0xF, 19 | 20 | ModeOff = 0x0, 21 | 22 | ModeAlphaTest = 0x1, 23 | 24 | ModePixelKill = 0x2, 25 | 26 | ModeDynamicBranch = 0x4, 27 | 28 | ModeOptimal = 0x4, 29 | 30 | ModeAll = 0x8, 31 | 32 | ModeMaximum = 0xF, 33 | 34 | Transparency = 0x23, 35 | 36 | DisAllowTraa = 0x100, 37 | 38 | TransparencyDefault = 0x0, 39 | 40 | TransparencyDefaultTesla = 0x0, 41 | 42 | TransparencyDefaultFermi = 0x0, 43 | 44 | Mask = 0x17F, 45 | 46 | Default = 0x0 47 | } 48 | #pragma warning restore 1591 49 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataDepth.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the color data depth 5 | /// 6 | public enum ColorDataDepth : uint 7 | { 8 | /// 9 | /// Default color depth meaning that the current setting should be kept 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// 6bit per color depth 15 | /// 16 | BPC6 = 1, 17 | 18 | /// 19 | /// 8bit per color depth 20 | /// 21 | BPC8 = 2, 22 | 23 | /// 24 | /// 10bit per color depth 25 | /// 26 | BPC10 = 3, 27 | 28 | /// 29 | /// 12bit per color depth 30 | /// 31 | BPC12 = 4, 32 | 33 | /// 34 | /// 16bit per color depth 35 | /// 36 | BPC16 = 5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceLimit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds a list of known performance limitations 7 | /// 8 | [Flags] 9 | public enum PerformanceLimit : uint 10 | { 11 | /// 12 | /// No performance limitation 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Limited by power usage 18 | /// 19 | PowerLimit = 0b1, 20 | 21 | /// 22 | /// Limited by temperature 23 | /// 24 | TemperatureLimit = 0b10, 25 | 26 | /// 27 | /// Limited by voltage 28 | /// 29 | VoltageLimit = 0b100, 30 | 31 | /// 32 | /// Unknown limitation 33 | /// 34 | Unknown8 = 0b1000, 35 | 36 | /// 37 | /// Limited due to no load 38 | /// 39 | NoLoadLimit = 0b10000 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceState.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding a performance state 7 | /// 8 | public interface IPerformanceState 9 | { 10 | /// 11 | /// Gets a boolean value indicating if this performance state is overclockable 12 | /// 13 | bool IsOverclockable { get; } 14 | 15 | /// 16 | /// Gets a boolean value indicating if this performance state is currently overclocked 17 | /// 18 | bool IsOverclocked { get; } 19 | 20 | /// 21 | /// Gets a boolean value indicating if this performance state is limited to use PCIE generation 1 or PCIE generation 2 22 | /// 23 | bool IsPCIELimited { get; } 24 | 25 | /// 26 | /// Gets the performance state identification 27 | /// 28 | PerformanceStateId StateId { get; } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/CoolerPolicy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds possible cooler policies 7 | /// 8 | [Flags] 9 | public enum CoolerPolicy : uint 10 | { 11 | /// 12 | /// No cooler policy 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Manual cooler control 18 | /// 19 | Manual = 0b1, 20 | 21 | /// 22 | /// Performance optimized cooler policy 23 | /// 24 | Performance = 0b10, 25 | 26 | /// 27 | /// Discrete temperature based cooler policy 28 | /// 29 | TemperatureDiscrete = 0b100, 30 | 31 | /// 32 | /// Continues temperature based cooler policy 33 | /// 34 | TemperatureContinuous = 0b1000, 35 | 36 | /// 37 | /// Silent cooler policy 38 | /// 39 | Silent = 0b10000 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/AntiAliasingBehaviorFlags.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum AntiAliasingBehaviorFlags : uint 5 | { 6 | None = 0x0, 7 | 8 | TreatOverrideAsApplicationControlled = 0x1, 9 | 10 | TreatOverrideAsEnhance = 0x2, 11 | 12 | DisableOverride = 0x3, 13 | 14 | TreatEnhanceAsApplicationControlled = 0x4, 15 | 16 | TreatEnhanceAsOverride = 0x8, 17 | 18 | DisableEnhance = 0xC, 19 | 20 | MapVCAAToMultiSampling = 0x10000, 21 | 22 | SLIDisableTransparencySupersampling = 0x20000, 23 | 24 | DisableCplaa = 0x40000, 25 | 26 | SkipRTDIMCheckForEnhance = 0x80000, 27 | 28 | DisableSLIAntiAliasing = 0x100000, 29 | 30 | Default = 0x0, 31 | 32 | AntiAliasingRTBPPDIV4 = 0xF0000000, 33 | 34 | AntiAliasingRTBPPDIV4Shift = 0x1C, 35 | 36 | NonAntiAliasingRTBPPDIV4 = 0xF000000, 37 | 38 | NonAntiAliasingRTBPPDIV4Shift = 0x18, 39 | 40 | Mask = 0xFF1F000F 41 | } 42 | #pragma warning restore 1591 43 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Mosaic/TopologyValidity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Mosaic 4 | { 5 | /// 6 | /// These bits are used to describe the validity of a topo 7 | /// 8 | [Flags] 9 | public enum TopologyValidity : uint 10 | { 11 | /// 12 | /// The topology is valid 13 | /// 14 | Valid = 0, 15 | 16 | /// 17 | /// Not enough SLI GPUs were found to fill the entire topology. PhysicalGPUHandle will be null for these. 18 | /// 19 | MissingGPU = 1, 20 | 21 | /// 22 | /// Not enough displays were found to fill the entire topology. Output identification will be 0 for these. 23 | /// 24 | MissingDisplay = 2, 25 | 26 | /// 27 | /// The topology is only possible with displays of the same output type. Check output identifications to make sure they 28 | /// are all CRTs, or all DFPs. 29 | /// 30 | MixedDisplayTypes = 4 31 | } 32 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Mosaic/TopologyType.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Mosaic 2 | { 3 | /// 4 | /// These values refer to the different types of Mosaic topologies that are possible. When getting the supported Mosaic 5 | /// topologies, you can specify one of these types to narrow down the returned list to only those that match the given 6 | /// type. 7 | /// 8 | public enum TopologyType 9 | { 10 | /// 11 | /// All mosaic topologies 12 | /// 13 | All = 0, 14 | 15 | /// 16 | /// Basic Mosaic topologies 17 | /// 18 | Basic = 1, 19 | 20 | /// 21 | /// Passive Stereo topologies 22 | /// 23 | PassiveStereo = 2, 24 | 25 | /// 26 | /// Not supported at this time 27 | /// 28 | ScaledClone = 3, 29 | 30 | /// 31 | /// Not supported at this time 32 | /// 33 | PassiveStereoScaledClone = 4 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUUsageDomainStatus.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.Interfaces.GPU; 3 | 4 | namespace NvAPIWrapper.GPU 5 | { 6 | /// 7 | /// Holds information about a utilization domain 8 | /// 9 | public class GPUUsageDomainStatus 10 | { 11 | internal GPUUsageDomainStatus(UtilizationDomain domain, IUtilizationDomainInfo utilizationDomainInfo) 12 | { 13 | Domain = domain; 14 | Percentage = (int) utilizationDomainInfo.Percentage; 15 | } 16 | 17 | /// 18 | /// Gets the utilization domain that this instance describes 19 | /// 20 | public UtilizationDomain Domain { get; } 21 | 22 | /// 23 | /// Gets the percentage of time where the domain is considered busy in the last 1 second interval. 24 | /// 25 | public int Percentage { get; } 26 | 27 | /// 28 | public override string ToString() 29 | { 30 | return $"[{Domain}] {Percentage}%"; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20VoltageEntry.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.GPU.Structures; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.GPU 5 | { 6 | /// 7 | /// Holds information regarding the voltage of a voltage domain 8 | /// 9 | public interface IPerformanceStates20VoltageEntry 10 | { 11 | /// 12 | /// Gets the voltage domain identification 13 | /// 14 | PerformanceVoltageDomain DomainId { get; } 15 | 16 | /// 17 | /// Gets a boolean value indicating this voltage domain is editable 18 | /// 19 | bool IsEditable { get; } 20 | 21 | /// 22 | /// Gets the base voltage delta and the range of valid values for the delta value 23 | /// 24 | PerformanceStates20ParameterDelta ValueDeltaInMicroVolt { get; } 25 | 26 | /// 27 | /// Gets the current value of this voltage domain in uV 28 | /// 29 | uint ValueInMicroVolt { get; } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/PrivateDisplayHUEInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.Display.Structures 7 | { 8 | /// 9 | /// Holds the current and the default HUE information 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct PrivateDisplayHUEInfo : IInitializable 14 | { 15 | internal StructureVersion _Version; 16 | internal int _CurrentAngle; 17 | internal int _DefaultAngle; 18 | 19 | /// 20 | /// Gets or sets the current HUE offset angle [0-359] 21 | /// 22 | public int CurrentAngle 23 | { 24 | get => _CurrentAngle; 25 | } 26 | 27 | /// 28 | /// Gets or sets the default HUE offset angle [0-359] 29 | /// 30 | public int DefaultAngle 31 | { 32 | get => _DefaultAngle; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUPowerTopologyInformation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using NvAPIWrapper.Native; 4 | 5 | namespace NvAPIWrapper.GPU 6 | { 7 | /// 8 | /// Holds information regarding current power topology and their current power usage 9 | /// 10 | public class GPUPowerTopologyInformation 11 | { 12 | internal GPUPowerTopologyInformation(PhysicalGPU physicalGPU) 13 | { 14 | PhysicalGPU = physicalGPU; 15 | } 16 | 17 | /// 18 | /// Gets the physical GPU that this instance describes 19 | /// 20 | public PhysicalGPU PhysicalGPU { get; } 21 | 22 | /// 23 | /// Gets the current power topology entries 24 | /// 25 | public IEnumerable PowerTopologyEntries 26 | { 27 | get 28 | { 29 | return GPUApi.ClientPowerTopologyGetStatus(PhysicalGPU.Handle).PowerPolicyStatusEntries 30 | .Select(entry => new GPUPowerTopologyStatus(entry)); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/ColorDataDesktopDepth.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the color data desktop color depth 5 | /// 6 | public enum ColorDataDesktopDepth : uint 7 | { 8 | /// 9 | /// Default color depth meaning that the current setting should be kept 10 | /// 11 | Default = 0x0, 12 | 13 | /// 14 | /// 8bit per integer color component 15 | /// 16 | BPC8 = 0x1, 17 | 18 | /// 19 | /// 10bit integer per color component 20 | /// 21 | BPC10 = 0x2, 22 | 23 | /// 24 | /// 16bit float per color component 25 | /// 26 | BPC16Float = 0x3, 27 | 28 | /// 29 | /// 16bit float per color component wide color gamut 30 | /// 31 | BPC16FloatWcg = 0x4, 32 | 33 | /// 34 | /// 16bit float per color component HDR 35 | /// 36 | BPC16FloatHDR = 0x5 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/CProcessorStateValues.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace NvAPICodeGenerator.Parser 5 | { 6 | internal class CProcessorStateValues 7 | { 8 | private readonly Dictionary _valueDictionary = new Dictionary(); 9 | 10 | public string[] Keys 11 | { 12 | get => _valueDictionary.Keys.ToArray(); 13 | } 14 | 15 | public object[] Values 16 | { 17 | get => _valueDictionary.Values.ToArray(); 18 | } 19 | 20 | public T GetValue(string key) 21 | { 22 | if (_valueDictionary.ContainsKey(key)) 23 | { 24 | return (T) _valueDictionary[key]; 25 | } 26 | 27 | return default(T); 28 | } 29 | 30 | public void SetValue(string key, T value) 31 | { 32 | if (_valueDictionary.ContainsKey(key)) 33 | { 34 | _valueDictionary[key] = value; 35 | } 36 | else 37 | { 38 | _valueDictionary.Add(key, value); 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneControlDataFixedColorParameters.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace NvAPIWrapper.Native.GPU.Structures 4 | { 5 | /// 6 | /// Holds information regarding a fixed color 7 | /// 8 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 9 | public struct IlluminationZoneControlDataFixedColorParameters 10 | { 11 | internal byte _BrightnessInPercentage; 12 | 13 | /// 14 | /// Creates a new instance of . 15 | /// 16 | /// The brightness percentage value of the zone. 17 | public IlluminationZoneControlDataFixedColorParameters(byte brightnessInPercentage) 18 | { 19 | _BrightnessInPercentage = brightnessInPercentage; 20 | } 21 | 22 | /// 23 | /// Gets the brightness percentage value of the zone. 24 | /// 25 | public byte BrightnessInPercentage 26 | { 27 | get => _BrightnessInPercentage; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/ConnectedIdsFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Flags used for retrieving a list of display identifications 7 | /// 8 | [Flags] 9 | public enum ConnectedIdsFlag : uint 10 | { 11 | /// 12 | /// No specific flag 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Get un-cached connected devices 18 | /// 19 | UnCached = 1, 20 | 21 | /// 22 | /// Get devices such that those can be selected in an SLI configuration 23 | /// 24 | SLI = 2, 25 | 26 | /// 27 | /// Get devices such that to reflect the Lid State 28 | /// 29 | LidState = 4, 30 | 31 | /// 32 | /// Get devices that includes the fake connected monitors 33 | /// 34 | Fake = 8, 35 | 36 | /// 37 | /// Excludes devices that are part of the multi stream topology 38 | /// 39 | ExcludeList = 16 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/ECCConfigurationInfoV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Helpers; 5 | using NvAPIWrapper.Native.Interfaces; 6 | 7 | namespace NvAPIWrapper.Native.GPU.Structures 8 | { 9 | /// 10 | /// Contains information about the ECC memory configurations 11 | /// 12 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 13 | [StructureVersion(1)] 14 | public struct ECCConfigurationInfoV1 : IInitializable 15 | { 16 | internal StructureVersion _Version; 17 | internal uint _Flags; 18 | 19 | /// 20 | /// Gets a boolean value indicating if the ECC memory is enabled 21 | /// 22 | public bool IsEnabled 23 | { 24 | get => _Flags.GetBit(0); 25 | } 26 | 27 | /// 28 | /// Gets a boolean value indicating if the ECC memory is enabled by default 29 | /// 30 | public bool IsEnabledByDefault 31 | { 32 | get => _Flags.GetBit(1); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneControlDataManualRGB.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information regarding a RGB control method 8 | /// 9 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 10 | public struct IlluminationZoneControlDataManualRGB : IInitializable 11 | { 12 | internal IlluminationZoneControlDataManualRGBParameters _Parameters; 13 | 14 | /// 15 | /// Creates a new instance of . 16 | /// 17 | /// The RGB parameters. 18 | public IlluminationZoneControlDataManualRGB(IlluminationZoneControlDataManualRGBParameters parameters) 19 | { 20 | _Parameters = parameters; 21 | } 22 | 23 | /// 24 | /// Gets the RGB parameters 25 | /// 26 | public IlluminationZoneControlDataManualRGBParameters Parameters 27 | { 28 | get => _Parameters; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/DisplayConfigFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Display 4 | { 5 | /// 6 | /// Flags for applying settings, used by NvAPI_DISP_SetDisplayConfig() 7 | /// 8 | [Flags] 9 | public enum DisplayConfigFlags 10 | { 11 | /// 12 | /// None 13 | /// 14 | None = 0, 15 | 16 | /// 17 | /// Do not apply 18 | /// 19 | ValidateOnly = 0x00000001, 20 | 21 | /// 22 | /// Save to the persistence storage 23 | /// 24 | SaveToPersistence = 0x00000002, 25 | 26 | /// 27 | /// Driver reload is permitted if necessary 28 | /// 29 | DriverReloadAllowed = 0x00000004, 30 | 31 | /// 32 | /// Refresh OS mode list. 33 | /// 34 | ForceModeEnumeration = 0x00000008, 35 | 36 | /// 37 | /// Tell OS to avoid optimizing CommitVidPn call during a modeset 38 | /// 39 | ForceCommitVideoPresentNetwork = 0x00000010 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/ClockDomainInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Helpers; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information about the clock frequency of an specific clock domain 8 | /// 9 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 10 | public struct ClockDomainInfo 11 | { 12 | internal readonly uint _IsPresent; 13 | internal readonly uint _Frequency; 14 | 15 | /// 16 | /// Gets a boolean value that indicates if this clock domain is present on this GPU and with the requested clock type. 17 | /// 18 | public bool IsPresent 19 | { 20 | get => _IsPresent.GetBit(0); 21 | } 22 | 23 | /// 24 | /// Gets the clock frequency in kHz 25 | /// 26 | public uint Frequency 27 | { 28 | get => _Frequency; 29 | } 30 | 31 | /// 32 | public override string ToString() 33 | { 34 | return IsPresent ? $"{_Frequency:N0} kHz" : "N/A"; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoExtendedColorimetry.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible values for the AVI extended color space 5 | /// 6 | public enum InfoFrameVideoExtendedColorimetry : uint 7 | { 8 | /// 9 | /// The xvYCC601 color space 10 | /// 11 | // ReSharper disable once InconsistentNaming 12 | xvYCC601 = 0, 13 | 14 | /// 15 | /// The xvYCC709 color space 16 | /// 17 | // ReSharper disable once InconsistentNaming 18 | xvYCC709, 19 | 20 | /// 21 | /// The sYCC601 color space 22 | /// 23 | // ReSharper disable once InconsistentNaming 24 | sYCC601, 25 | 26 | /// 27 | /// The AdobeYCC601 color space 28 | /// 29 | AdobeYCC601, 30 | 31 | /// 32 | /// The AdobeRGB color space 33 | /// 34 | AdobeRGB, 35 | 36 | /// 37 | /// Auto (Unspecified) 38 | /// 39 | Auto = 15 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IDisplayColorData.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display.Structures; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.Display 4 | { 5 | /// 6 | /// Holds information regarding a display color space configurations 7 | /// 8 | public interface IDisplayColorData 9 | { 10 | /// 11 | /// Gets the first primary color space coordinate (e.g. Red for RGB) [(0.0, 0.0)-(1.0, 1.0)] 12 | /// 13 | ColorDataColorCoordinate FirstColorCoordinate { get; } 14 | 15 | /// 16 | /// Gets the second primary color space coordinate (e.g. Green for RGB) [(0.0, 0.0)-(1.0, 1.0)] 17 | /// 18 | ColorDataColorCoordinate SecondColorCoordinate { get; } 19 | 20 | /// 21 | /// Gets the third primary color space coordinate (e.g. Blue for RGB) [(0.0, 0.0)-(1.0, 1.0)] 22 | /// 23 | ColorDataColorCoordinate ThirdColorCoordinate { get; } 24 | 25 | /// 26 | /// Gets the white color space coordinate [(0.0, 0.0)-(1.0, 1.0)] 27 | /// 28 | ColorDataColorCoordinate WhiteColorCoordinate { get; } 29 | } 30 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/GPUFoundry.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | 3 | namespace NvAPIWrapper.Native.GPU 4 | { 5 | /// 6 | /// Holds a list of known GPU foundries 7 | /// 8 | [SuppressMessage("ReSharper", "IdentifierTypo")] 9 | public enum GPUFoundry : uint 10 | { 11 | /// 12 | /// Unknown foundry 13 | /// 14 | Unknown, 15 | 16 | /// 17 | /// Taiwan Semiconductor Manufacturing Company Limited 18 | /// 19 | TSMC, 20 | 21 | /// 22 | /// United Microelectronics 23 | /// 24 | UMC, 25 | 26 | /// 27 | /// International Business Machines Corporation 28 | /// 29 | IBM, 30 | 31 | /// 32 | /// Semiconductor Manufacturing International Corporation 33 | /// 34 | SMIC, 35 | 36 | /// 37 | /// Chartered Semiconductor Manufacturing 38 | /// 39 | CSM, 40 | 41 | /// 42 | /// Toshiba Corporation 43 | /// 44 | Toshiba 45 | } 46 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneControlDataManualFixedColor.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Interfaces; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information regarding a manual fixed color control method 8 | /// 9 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 10 | public struct IlluminationZoneControlDataManualFixedColor : IInitializable 11 | { 12 | internal IlluminationZoneControlDataFixedColorParameters _Parameters; 13 | 14 | /// 15 | /// Creates a new instance of . 16 | /// 17 | /// The fixed color parameters. 18 | public IlluminationZoneControlDataManualFixedColor(IlluminationZoneControlDataFixedColorParameters parameters) 19 | { 20 | _Parameters = parameters; 21 | } 22 | 23 | /// 24 | /// Gets the fixed color parameters 25 | /// 26 | internal IlluminationZoneControlDataFixedColorParameters Parameters 27 | { 28 | get => _Parameters; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IUtilizationStatus.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NvAPIWrapper.Native.Interfaces.GPU; 3 | 4 | namespace NvAPIWrapper.Native.GPU.Structures 5 | { 6 | /// 7 | /// Holds information about the GPU utilization domains 8 | /// 9 | public interface IUtilizationStatus 10 | { 11 | 12 | /// 13 | /// Gets the Bus interface (BUS) utilization 14 | /// 15 | IUtilizationDomainInfo BusInterface { get; } 16 | /// 17 | /// Gets all valid utilization domains and information 18 | /// 19 | Dictionary Domains { get; } 20 | 21 | /// 22 | /// Gets the frame buffer (FB) utilization 23 | /// 24 | IUtilizationDomainInfo FrameBuffer { get; } 25 | 26 | /// 27 | /// Gets the graphic engine (GPU) utilization 28 | /// 29 | IUtilizationDomainInfo GPU { get; } 30 | 31 | 32 | /// 33 | /// Gets the Video engine (VID) utilization 34 | /// 35 | IUtilizationDomainInfo VideoEngine { get; } 36 | } 37 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/WKSAPIStereoMode.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum WKSAPIStereoMode : uint 5 | { 6 | ShutterGlasses = 0x0, 7 | 8 | VerticalInterlaced = 0x1, 9 | 10 | Twinview = 0x2, 11 | 12 | NV17ShutterGlassesAuto = 0x3, 13 | 14 | NV17ShutterGlassesDAC0 = 0x4, 15 | 16 | NV17ShutterGlassesDAC1 = 0x5, 17 | 18 | ColorLine = 0x6, 19 | 20 | ColorInterleaved = 0x7, 21 | 22 | Anaglyph = 0x8, 23 | 24 | HorizontalInterlaced = 0x9, 25 | 26 | SideField = 0xA, 27 | 28 | SubField = 0xB, 29 | 30 | CheckerBoard = 0xC, 31 | 32 | InverseCheckerBoard = 0xD, 33 | 34 | TridelitySL = 0xE, 35 | 36 | TridelityMV = 0xF, 37 | 38 | SeeFront = 0x10, 39 | 40 | StereoMirror = 0x11, 41 | 42 | FrameSequential = 0x12, 43 | 44 | AutodetectPassiveMode = 0x13, 45 | 46 | AegisDTFrameSequential = 0x14, 47 | 48 | OEMEmitterFrameSequential = 0x15, 49 | 50 | DPInBand = 0x16, 51 | 52 | UseHardwareDefault = 0xFFFFFFFF, 53 | 54 | DefaultGL = 0x3, 55 | 56 | Default = 0x0 57 | } 58 | #pragma warning restore 1591 59 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IThermalSensor.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Provides information about a single thermal sensor 7 | /// 8 | public interface IThermalSensor 9 | { 10 | /// 11 | /// Internal, ADM1032, MAX6649... 12 | /// 13 | ThermalController Controller { get; } 14 | 15 | /// 16 | /// Current temperature value of the thermal sensor in degree Celsius 17 | /// 18 | int CurrentTemperature { get; } 19 | 20 | /// 21 | /// Maximum default temperature value of the thermal sensor in degree Celsius 22 | /// 23 | int DefaultMaximumTemperature { get; } 24 | 25 | /// 26 | /// Minimum default temperature value of the thermal sensor in degree Celsius 27 | /// 28 | int DefaultMinimumTemperature { get; } 29 | 30 | /// 31 | /// Thermal sensor targeted - GPU, memory, chipset, power supply, Visual Computing Device, etc 32 | /// 33 | ThermalSettingsTarget Target { get; } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/PrivateDisplayDVCInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | using NvAPIWrapper.Native.Interfaces.Display; 6 | 7 | namespace NvAPIWrapper.Native.Display.Structures 8 | { 9 | /// 10 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 11 | [StructureVersion(1)] 12 | public struct PrivateDisplayDVCInfo : IInitializable, IDisplayDVCInfo 13 | { 14 | internal StructureVersion _Version; 15 | internal int _CurrentLevel; 16 | internal int _MinimumLevel; 17 | internal int _MaximumLevel; 18 | 19 | /// 20 | public int CurrentLevel 21 | { 22 | get => _CurrentLevel; 23 | } 24 | 25 | /// 26 | public int MinimumLevel 27 | { 28 | get => _MinimumLevel; 29 | } 30 | 31 | /// 32 | int IDisplayDVCInfo.DefaultLevel 33 | { 34 | get => 0; 35 | } 36 | 37 | /// 38 | public int MaximumLevel 39 | { 40 | get => _MaximumLevel; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Scaling.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Possible scaling modes 5 | /// 6 | public enum Scaling 7 | { 8 | /// 9 | /// No change 10 | /// 11 | Default = 0, 12 | 13 | /// 14 | /// Balanced - Full Screen 15 | /// 16 | ToClosest = 1, 17 | 18 | /// 19 | /// Force GPU - Full Screen 20 | /// 21 | ToNative = 2, 22 | 23 | /// 24 | /// Force GPU - Centered\No Scaling 25 | /// 26 | GPUScanOutToNative = 3, 27 | 28 | /// 29 | /// Force GPU - Aspect Ratio 30 | /// 31 | ToAspectScanOutToNative = 5, 32 | 33 | /// 34 | /// Balanced - Aspect Ratio 35 | /// 36 | ToAspectScanOutToClosest = 6, 37 | 38 | /// 39 | /// Balanced - Centered\No Scaling 40 | /// 41 | GPUScanOutToClosest = 7, 42 | 43 | /// 44 | /// Customized scaling - For future use 45 | /// 46 | Customized = 255 47 | } 48 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivateVoltageStatusV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.GPU.Structures 7 | { 8 | /// 9 | /// Contains information regarding GPU voltage boost status 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct PrivateVoltageStatusV1 : IInitializable 14 | { 15 | internal const int MaxNumberOfUnknown2 = 8; 16 | internal const int MaxNumberOfUnknown3 = 8; 17 | 18 | internal StructureVersion _Version; 19 | 20 | internal readonly uint _Unknown1; 21 | 22 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxNumberOfUnknown2)] 23 | internal readonly uint[] _Unknown2; 24 | 25 | internal readonly uint _ValueInuV; 26 | 27 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxNumberOfUnknown3)] 28 | internal readonly uint[] _Unknown3; 29 | 30 | /// 31 | /// Gets the value in uV 32 | /// 33 | public uint ValueInMicroVolt 34 | { 35 | get => _ValueInuV; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Mosaic/IGridTopologyDisplay.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display; 2 | using NvAPIWrapper.Native.Mosaic; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.Mosaic 5 | { 6 | /// 7 | /// Interface for all GridTopologyDisplay structures 8 | /// 9 | public interface IGridTopologyDisplay 10 | { 11 | /// 12 | /// Gets the clone group identification; Reserved, must be 0 13 | /// 14 | uint CloneGroup { get; } 15 | 16 | /// 17 | /// Gets the display identification 18 | /// 19 | uint DisplayId { get; } 20 | 21 | /// 22 | /// Gets the horizontal overlap (+overlap, -gap) 23 | /// 24 | int OverlapX { get; } 25 | 26 | /// 27 | /// Gets the vertical overlap (+overlap, -gap) 28 | /// 29 | int OverlapY { get; } 30 | 31 | 32 | /// 33 | /// Gets the type of display pixel shift 34 | /// 35 | PixelShiftType PixelShiftType { get; } 36 | 37 | /// 38 | /// Gets the rotation of display 39 | /// 40 | Rotate Rotation { get; } 41 | } 42 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioChannelCount.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible audio channels 5 | /// 6 | public enum InfoFrameAudioChannelCount : uint 7 | { 8 | /// 9 | /// Data is available in the header of source data 10 | /// 11 | InHeader = 0, 12 | 13 | /// 14 | /// Two channels 15 | /// 16 | Two, 17 | 18 | /// 19 | /// Three channels 20 | /// 21 | Three, 22 | 23 | /// 24 | /// Four channels 25 | /// 26 | Four, 27 | 28 | /// 29 | /// Five channels 30 | /// 31 | Five, 32 | 33 | /// 34 | /// Six channels 35 | /// 36 | Six, 37 | 38 | /// 39 | /// Seven channels 40 | /// 41 | Seven, 42 | 43 | /// 44 | /// Eight channels 45 | /// 46 | Eight, 47 | 48 | /// 49 | /// Auto (Unspecified) 50 | /// 51 | Auto = 15 52 | } 53 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IColorData.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.Display 4 | { 5 | /// 6 | /// Contains data corresponding to color information 7 | /// 8 | public interface IColorData 9 | { 10 | /// 11 | /// Gets the color data color depth 12 | /// 13 | ColorDataDepth? ColorDepth { get; } 14 | 15 | /// 16 | /// Gets the color data dynamic range 17 | /// 18 | ColorDataDynamicRange? DynamicRange { get; } 19 | 20 | /// 21 | /// Gets the color data color format 22 | /// 23 | ColorDataFormat ColorFormat { get; } 24 | 25 | /// 26 | /// Gets the color data color space 27 | /// 28 | ColorDataColorimetry Colorimetry { get; } 29 | 30 | /// 31 | /// Gets the color data selection policy 32 | /// 33 | ColorDataSelectionPolicy? SelectionPolicy { get; } 34 | 35 | /// 36 | /// Gets the color data desktop color depth 37 | /// 38 | ColorDataDesktopDepth? DesktopColorDepth { get; } 39 | } 40 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/Display/IHDRColorData.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.Display; 2 | using NvAPIWrapper.Native.Display.Structures; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.Display 5 | { 6 | /// 7 | /// Contains information regarding HDR color data 8 | /// 9 | public interface IHDRColorData 10 | { 11 | /// 12 | /// Gets the HDR color depth if available; otherwise null 13 | /// For Dolby Vision only, should and will be ignored if HDR is on 14 | /// 15 | ColorDataDepth? ColorDepth { get; } 16 | 17 | /// 18 | /// Gets the HDR color format if available; otherwise null 19 | /// 20 | ColorDataFormat? ColorFormat { get; } 21 | 22 | /// 23 | /// Gets the HDR dynamic range if available; otherwise null 24 | /// 25 | ColorDataDynamicRange? DynamicRange { get; } 26 | 27 | /// 28 | /// Gets the HDR mode 29 | /// 30 | ColorDataHDRMode HDRMode { get; } 31 | 32 | /// 33 | /// Gets the color space coordinates 34 | /// 35 | MasteringDisplayColorData MasteringDisplayData { get; } 36 | } 37 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationZoneInfoParametersV1.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Runtime.InteropServices; 3 | using NvAPIWrapper.Native.Attributes; 4 | using NvAPIWrapper.Native.General.Structures; 5 | using NvAPIWrapper.Native.Interfaces; 6 | 7 | namespace NvAPIWrapper.Native.GPU.Structures 8 | { 9 | /// 10 | /// Holds information regarding illumination zones 11 | /// 12 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 13 | [StructureVersion(1)] 14 | public struct IlluminationZoneInfoParametersV1 : IInitializable 15 | { 16 | private const int MaximumNumberOfReserved = 64; 17 | private const int MaximumNumberOfZones = 32; 18 | internal StructureVersion _Version; 19 | internal uint _NumberOfZones; 20 | 21 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaximumNumberOfReserved)] 22 | internal byte[] _Reserved; 23 | 24 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaximumNumberOfZones)] 25 | internal IlluminationZoneInfoV1[] _Zones; 26 | 27 | /// 28 | /// Gets the list of illumination zones. 29 | /// 30 | public IlluminationZoneInfoV1[] Zones 31 | { 32 | get => _Zones.Take((int) _NumberOfZones).ToArray(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IDisplayDriverMemoryInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Interfaces.GPU 2 | { 3 | /// 4 | /// Interface for all DisplayDriverMemoryInfo structures 5 | /// 6 | public interface IDisplayDriverMemoryInfo 7 | { 8 | /// 9 | /// Size(in kb) of the available physical frame buffer for allocating video memory surfaces. 10 | /// 11 | uint AvailableDedicatedVideoMemoryInkB { get; } 12 | 13 | /// 14 | /// Size(in kb) of the current available physical frame buffer for allocating video memory surfaces. 15 | /// 16 | uint CurrentAvailableDedicatedVideoMemoryInkB { get; } 17 | 18 | /// 19 | /// Size(in kb) of the physical frame buffer. 20 | /// 21 | uint DedicatedVideoMemoryInkB { get; } 22 | 23 | /// 24 | /// Size(in kb) of shared system memory that driver is allowed to commit for surfaces across all allocations. 25 | /// 26 | uint SharedSystemMemoryInkB { get; } 27 | 28 | /// 29 | /// Size(in kb) of system memory the driver allocates at load time. 30 | /// 31 | uint SystemVideoMemoryInkB { get; } 32 | } 33 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20ClockDependentFrequencyRange.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | 3 | namespace NvAPIWrapper.Native.Interfaces.GPU 4 | { 5 | /// 6 | /// Holds information regarding the frequency range of a clock domain as well as the dependent voltage domain and the 7 | /// range of the voltage 8 | /// 9 | public interface IPerformanceStates20ClockDependentFrequencyRange 10 | { 11 | /// 12 | /// Gets the maximum clock frequency in kHz 13 | /// 14 | uint MaximumFrequencyInkHz { get; } 15 | 16 | /// 17 | /// Gets the dependent voltage domain's maximum voltage in uV 18 | /// 19 | uint MaximumVoltageInMicroVolt { get; } 20 | 21 | /// 22 | /// Gets the minimum clock frequency in kHz 23 | /// 24 | uint MinimumFrequencyInkHz { get; } 25 | 26 | /// 27 | /// Gets the dependent voltage domain's minimum voltage in uV 28 | /// 29 | uint MinimumVoltageInMicroVolt { get; } 30 | 31 | /// 32 | /// Gets the dependent voltage domain identification 33 | /// 34 | PerformanceVoltageDomain VoltageDomainId { get; } 35 | } 36 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/PerformanceDecreaseReason.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.GPU 2 | { 3 | /// 4 | /// Holds a list possible reasons for performance decrease 5 | /// 6 | public enum PerformanceDecreaseReason : uint 7 | { 8 | /// 9 | /// No performance decrease 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Thermal protection performance decrease 15 | /// 16 | ThermalProtection = 0x00000001, 17 | 18 | /// 19 | /// Power control performance decrease 20 | /// 21 | PowerControl = 0x00000002, 22 | 23 | /// 24 | /// AC-BATT event performance decrease 25 | /// 26 | // ReSharper disable once InconsistentNaming 27 | AC_BATT = 0x00000004, 28 | 29 | /// 30 | /// API triggered performance decrease 31 | /// 32 | ApiTriggered = 0x00000008, 33 | 34 | /// 35 | /// Insufficient performance decrease (Power Connector Missing) 36 | /// 37 | InsufficientPower = 0x00000010, 38 | 39 | /// 40 | /// Unknown 41 | /// 42 | Unknown = 0x80000000 43 | } 44 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IClockFrequencies.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NvAPIWrapper.Native.GPU; 3 | using NvAPIWrapper.Native.GPU.Structures; 4 | 5 | namespace NvAPIWrapper.Native.Interfaces.GPU 6 | { 7 | /// 8 | /// Interface for all ClockFrequencies structures 9 | /// 10 | public interface IClockFrequencies 11 | { 12 | /// 13 | /// Gets all valid clocks 14 | /// 15 | IReadOnlyDictionary Clocks { get; } 16 | 17 | /// 18 | /// Gets the type of clock frequencies provided with this object 19 | /// 20 | ClockType ClockType { get; } 21 | 22 | /// 23 | /// Gets graphics engine clock 24 | /// 25 | ClockDomainInfo GraphicsClock { get; } 26 | 27 | /// 28 | /// Gets memory decoding clock 29 | /// 30 | ClockDomainInfo MemoryClock { get; } 31 | 32 | /// 33 | /// Gets processor clock 34 | /// 35 | ClockDomainInfo ProcessorClock { get; } 36 | 37 | /// 38 | /// Gets video decoding clock 39 | /// 40 | ClockDomainInfo VideoDecodingClock { get; } 41 | } 42 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Mosaic/SetDisplayTopologyFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NvAPIWrapper.Native.Mosaic 4 | { 5 | /// 6 | /// Possible flags for setting a display topology 7 | /// 8 | [Flags] 9 | public enum SetDisplayTopologyFlag : uint 10 | { 11 | /// 12 | /// No special flag 13 | /// 14 | NoFlag = 0, 15 | 16 | /// 17 | /// Do not change the current GPU topology. If the NO_DRIVER_RELOAD bit is not specified, then it may still require a 18 | /// driver reload. 19 | /// 20 | CurrentGPUTopology = 1, 21 | 22 | /// 23 | /// Do not allow a driver reload. That is, stick with the same master GPU as well as the same SLI configuration. 24 | /// 25 | NoDriverReload = 2, 26 | 27 | /// 28 | /// When choosing a GPU topology, choose the topology with the best performance. 29 | /// Without this flag, it will choose the topology that uses the smallest number of GPUs. 30 | /// 31 | MaximizePerformance = 4, 32 | 33 | /// 34 | /// Do not return an error if no configuration will work with all of the grids. 35 | /// 36 | AllowInvalid = 8 37 | } 38 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUPowerTopologyStatus.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.GPU.Structures; 3 | 4 | namespace NvAPIWrapper.GPU 5 | { 6 | /// 7 | /// Contains information about a power domain usage 8 | /// 9 | public class GPUPowerTopologyStatus 10 | { 11 | internal GPUPowerTopologyStatus( 12 | PrivatePowerTopologiesStatusV1.PowerTopologiesStatusEntry powerTopologiesStatusEntry) 13 | { 14 | Domain = powerTopologiesStatusEntry.Domain; 15 | PowerUsageInPCM = powerTopologiesStatusEntry.PowerUsageInPCM; 16 | } 17 | 18 | /// 19 | /// Gets the power usage domain 20 | /// 21 | public PowerTopologyDomain Domain { get; } 22 | 23 | /// 24 | /// Gets the current power usage in per cent mille (PCM) 25 | /// 26 | public uint PowerUsageInPCM { get; } 27 | 28 | /// 29 | /// Gets the current power usage in percentage 30 | /// 31 | public float PowerUsageInPercent 32 | { 33 | get => PowerUsageInPCM / 1000f; 34 | } 35 | 36 | /// 37 | public override string ToString() 38 | { 39 | return $"[{Domain}] {PowerUsageInPercent}%"; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/IlluminationDeviceInfoParametersV1.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Runtime.InteropServices; 3 | using NvAPIWrapper.Native.Attributes; 4 | using NvAPIWrapper.Native.General.Structures; 5 | using NvAPIWrapper.Native.Interfaces; 6 | 7 | namespace NvAPIWrapper.Native.GPU.Structures 8 | { 9 | /// 10 | /// Holds information regarding available illumination devices 11 | /// 12 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 13 | [StructureVersion(1)] 14 | public struct IlluminationDeviceInfoParametersV1 : IInitializable 15 | { 16 | private const int MaximumNumberOfReserved = 64; 17 | private const int MaximumNumberOfDevices = 32; 18 | internal StructureVersion _Version; 19 | internal uint _NumberOfDevices; 20 | 21 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaximumNumberOfReserved)] 22 | internal byte[] _Reserved; 23 | 24 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaximumNumberOfDevices)] 25 | internal IlluminationDeviceInfoV1[] _Devices; 26 | 27 | /// 28 | /// Gets an array containing all available illumination devices 29 | /// 30 | public IlluminationDeviceInfoV1[] Devices 31 | { 32 | get => _Devices.Take((int) _NumberOfDevices).ToArray(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUThermalInformation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using NvAPIWrapper.Native; 4 | 5 | namespace NvAPIWrapper.GPU 6 | { 7 | /// 8 | /// Holds information regarding the available thermal sensors and current thermal level of a GPU 9 | /// 10 | public class GPUThermalInformation 11 | { 12 | internal GPUThermalInformation(PhysicalGPU physicalGPU) 13 | { 14 | PhysicalGPU = physicalGPU; 15 | } 16 | 17 | /// 18 | /// Gets the current thermal level of the GPU 19 | /// 20 | public int CurrentThermalLevel 21 | { 22 | get => (int) GPUApi.GetCurrentThermalLevel(PhysicalGPU.Handle); 23 | } 24 | 25 | /// 26 | /// Gets the physical GPU that this instance describes 27 | /// 28 | public PhysicalGPU PhysicalGPU { get; } 29 | 30 | /// 31 | /// Gets the list of available thermal sensors 32 | /// 33 | public IEnumerable ThermalSensors 34 | { 35 | get 36 | { 37 | return GPUApi.GetThermalSettings(PhysicalGPU.Handle).Sensors 38 | .Select((sensor, i) => new GPUThermalSensor(i, sensor)); 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /FunctionIdExtractor.ps1: -------------------------------------------------------------------------------- 1 | $filename = "R410-developer\amd64\nvapi64.lib" 2 | $dumpbinAddress = "$Env:VS140COMNTOOLS..\..\VC\bin\dumpbin.exe" 3 | $dumpbinParameter = "/DISASM $filename" 4 | Start-Process $dumpbinAddress $dumpbinParameter -Wait -WindowStyle Hidden -RedirectStandardOutput "$filename.asm" 5 | $content = Get-Content "$filename.asm" 6 | $functionName = "" 7 | foreach ($line in $content) 8 | { 9 | if (!$line) 10 | { 11 | if ($functionName -ne "") { 12 | #Write-Host "$functionName = FAILED," 13 | } 14 | $functionName = "" 15 | continue; 16 | } 17 | if ($functionName -eq "" -and $line.EndsWith(":") -and ($line.StartsWith("NvAPI_"))) 18 | { 19 | $functionName = $line.TrimEnd(':') 20 | continue; 21 | } 22 | $leadingPattern = "ecx," 23 | if ($functionName -ne "" -and $line.Contains($leadingPattern) -and $line.EndsWith("h")) 24 | { 25 | $functionAddress = $line.Substring($line.IndexOf($leadingPattern) + $leadingPattern.Length).TrimEnd('h') 26 | $functionAddressNumberic = 0 27 | if ([int32]::TryParse($functionAddress, 28 | [System.Globalization.NumberStyles]::HexNumber, 29 | [System.Globalization.CultureInfo]::CurrentCulture, 30 | [ref] $functionAddressNumberic)) 31 | { 32 | $functionAddress = $functionAddressNumberic.ToString("X") 33 | Write-Host "$functionName = 0x$functionAddress," 34 | $functionName = "" 35 | continue; 36 | } 37 | } 38 | } 39 | Remove-Item "$filename.asm" -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameAudioSampleRate.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible audio sample rates (sampling frequency) 5 | /// 6 | public enum InfoFrameAudioSampleRate : uint 7 | { 8 | /// 9 | /// Data is available in the header of source data 10 | /// 11 | InHeader = 0, 12 | 13 | /// 14 | /// 31kHz sampling frequency 15 | /// 16 | F32000Hz, 17 | 18 | /// 19 | /// 44.1kHz sampling frequency 20 | /// 21 | F44100Hz, 22 | 23 | /// 24 | /// 48kHz sampling frequency 25 | /// 26 | F48000Hz, 27 | 28 | /// 29 | /// 88.2kHz sampling frequency 30 | /// 31 | F88200Hz, 32 | 33 | /// 34 | /// 96kHz sampling frequency 35 | /// 36 | F96000Hz, 37 | 38 | /// 39 | /// 176.4kHz sampling frequency 40 | /// 41 | F176400Hz, 42 | 43 | /// 44 | /// 192kHz sampling frequency 45 | /// 46 | F192000Hz, 47 | 48 | /// 49 | /// Auto (Unspecified) 50 | /// 51 | Auto = 15 52 | } 53 | } -------------------------------------------------------------------------------- /NvAPIWrapper/DRS/SettingValues/ShimRenderingOptions.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.DRS.SettingValues 2 | { 3 | #pragma warning disable 1591 4 | public enum ShimRenderingOptions : uint 5 | { 6 | DefaultRenderingMode = 0x0, 7 | 8 | DisableAsyncPresent = 0x1, 9 | 10 | EHShellDetect = 0x2, 11 | 12 | FlashplayerHostDetect = 0x4, 13 | 14 | VideoDRMApplicationDetect = 0x8, 15 | 16 | IgnoreOverrides = 0x10, 17 | 18 | Reserved1 = 0x20, 19 | 20 | EnableDWMAsyncPresent = 0x40, 21 | 22 | Reserved2 = 0x80, 23 | 24 | AllowInheritance = 0x100, 25 | 26 | DisableWrappers = 0x200, 27 | 28 | DisableDxgiWrappers = 0x400, 29 | 30 | PruneUnsupportedFormats = 0x800, 31 | 32 | EnableAlphaFormat = 0x1000, 33 | 34 | IGPUTranscoding = 0x2000, 35 | 36 | DisableCUDA = 0x4000, 37 | 38 | AllowCpCapabilitiesForVideo = 0x8000, 39 | 40 | IGPUTranscodingFwdOptimus = 0x10000, 41 | 42 | DisableDuringSecureBoot = 0x20000, 43 | 44 | InvertForQuadro = 0x40000, 45 | 46 | InvertForMSHybrid = 0x80000, 47 | 48 | RegisterProcessEnableGold = 0x100000, 49 | 50 | HandleWindowedModePerformanceOptimal = 0x200000, 51 | 52 | HandleWin7AsyncRuntimeBug = 0x400000, 53 | 54 | ExplicitAdapterOptedByApplication = 0x800000, 55 | 56 | Default = 0x0 57 | } 58 | #pragma warning restore 1591 59 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUPowerLimitPolicy.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.GPU.Structures; 3 | 4 | namespace NvAPIWrapper.GPU 5 | { 6 | /// 7 | /// Holds information regarding a currently active power limit policy 8 | /// 9 | public class GPUPowerLimitPolicy 10 | { 11 | internal GPUPowerLimitPolicy(PrivatePowerPoliciesStatusV1.PowerPolicyStatusEntry powerPolicyStatusEntry) 12 | { 13 | PerformanceStateId = powerPolicyStatusEntry.PerformanceStateId; 14 | PowerTargetInPCM = powerPolicyStatusEntry.PowerTargetInPCM; 15 | } 16 | 17 | /// 18 | /// Gets the corresponding performance state identification 19 | /// 20 | public PerformanceStateId PerformanceStateId { get; } 21 | 22 | /// 23 | /// Gets the current policy target power in per cent mille (PCM) 24 | /// 25 | public uint PowerTargetInPCM { get; } 26 | 27 | /// 28 | /// Gets the current policy target power in percentage 29 | /// 30 | public float PowerTargetInPercent 31 | { 32 | get => PowerTargetInPCM / 1000f; 33 | } 34 | 35 | /// 36 | public override string ToString() 37 | { 38 | return $"{PerformanceStateId} Target: {PowerTargetInPercent}%"; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /NvAPIWrapper/GPU/GPUThermalLimitPolicy.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.GPU.Structures; 3 | 4 | namespace NvAPIWrapper.GPU 5 | { 6 | /// 7 | /// Holds information regarding a currently active temperature limit policy 8 | /// 9 | public class GPUThermalLimitPolicy 10 | { 11 | internal GPUThermalLimitPolicy(PrivateThermalPoliciesStatusV2.ThermalPoliciesStatusEntry thermalPoliciesEntry) 12 | { 13 | Controller = thermalPoliciesEntry.Controller; 14 | PerformanceStateId = thermalPoliciesEntry.PerformanceStateId; 15 | TargetTemperature = thermalPoliciesEntry.TargetTemperature; 16 | } 17 | 18 | /// 19 | /// Gets the policy's thermal controller 20 | /// 21 | public ThermalController Controller { get; } 22 | 23 | /// 24 | /// Gets the corresponding performance state identification 25 | /// 26 | public PerformanceStateId PerformanceStateId { get; } 27 | 28 | /// 29 | /// Gets the current policy target temperature in degree Celsius 30 | /// 31 | public int TargetTemperature { get; } 32 | 33 | /// 34 | public override string ToString() 35 | { 36 | return 37 | $"{PerformanceStateId} [{Controller}] Target: {TargetTemperature}°C"; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivatePerformanceStatusV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Interfaces; 5 | 6 | namespace NvAPIWrapper.Native.GPU.Structures 7 | { 8 | /// 9 | /// Contains information regarding GPU performance limitations status 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct PrivatePerformanceStatusV1 : IInitializable 14 | { 15 | internal const int MaxNumberOfTimers = 3; 16 | internal const int MaxNumberOfUnknown5 = 326; 17 | 18 | internal StructureVersion _Version; 19 | internal uint _Unknown1; 20 | internal ulong _TimerInNanoSecond; 21 | internal PerformanceLimit _PerformanceLimit; 22 | internal uint _Unknown2; 23 | internal uint _Unknown3; 24 | internal uint _Unknown4; 25 | 26 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxNumberOfTimers)] 27 | internal ulong[] _TimersInNanoSecond; 28 | 29 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxNumberOfUnknown5)] 30 | internal uint[] _Unknown5; 31 | 32 | /// 33 | /// Gets the current effective performance limitation 34 | /// 35 | public PerformanceLimit PerformanceLimit 36 | { 37 | get => _PerformanceLimit; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20Info.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NvAPIWrapper.Native.GPU; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.GPU 5 | { 6 | /// 7 | /// Holds information regarding the valid power states and their clock and voltage settings as well as general 8 | /// over-volting settings 9 | /// 10 | public interface IPerformanceStates20Info 11 | { 12 | /// 13 | /// Gets a dictionary for valid power states and their clock frequencies 14 | /// 15 | IReadOnlyDictionary Clocks { get; } 16 | 17 | /// 18 | /// Gets the list of general over-volting settings 19 | /// 20 | IPerformanceStates20VoltageEntry[] GeneralVoltages { get; } 21 | 22 | /// 23 | /// Gets a boolean value indicating if performance states are editable 24 | /// 25 | bool IsEditable { get; } 26 | 27 | /// 28 | /// Gets an array of valid power states for the GPU 29 | /// 30 | IPerformanceState20[] PerformanceStates { get; } 31 | 32 | /// 33 | /// Gets a dictionary for valid power states and their voltage settings 34 | /// 35 | IReadOnlyDictionary Voltages { get; } 36 | } 37 | } -------------------------------------------------------------------------------- /NvAPICodeGenerator/Parser/Processors/CDefineProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NvAPICodeGenerator.Parser.Models; 3 | 4 | namespace NvAPICodeGenerator.Parser.Processors 5 | { 6 | // ReSharper disable once HollowTypeName 7 | internal class CDefineProcessor : CProcessorBase 8 | { 9 | /// 10 | public override bool CanParse(string str) 11 | { 12 | return str?.Trim().StartsWith("#define ") == true; 13 | } 14 | 15 | /// 16 | public override CProcessorParseResult Parse(string str, CProcessorState state) 17 | { 18 | str = str.Trim().Substring("#define ".Length).Trim(); 19 | var spaceIndex = str.IndexOf(" ", StringComparison.CurrentCulture); 20 | 21 | string name; 22 | string value; 23 | 24 | if (spaceIndex >= 0) 25 | { 26 | name = str.Substring(0, spaceIndex).Trim(); 27 | str = str.Substring(spaceIndex).Trim(); 28 | value = str.Trim(); 29 | str = string.Empty; 30 | } 31 | else 32 | { 33 | name = str.Trim(); 34 | value = true.ToString(); 35 | str = string.Empty; 36 | } 37 | 38 | var define = new CDefine(name, value, state.CurrentTree); 39 | state.CurrentTree.AddSubTree(define); 40 | 41 | return new CProcessorParseResult(state.CurrentTree, true, str); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/ECCStatusInfoV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Helpers; 5 | using NvAPIWrapper.Native.Interfaces; 6 | 7 | namespace NvAPIWrapper.Native.GPU.Structures 8 | { 9 | /// 10 | /// Contains information regarding the ECC Memory status 11 | /// 12 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 13 | [StructureVersion(1)] 14 | public struct ECCStatusInfoV1 : IInitializable 15 | { 16 | internal StructureVersion _Version; 17 | internal uint _IsSupported; 18 | internal ECCConfiguration _ConfigurationOptions; 19 | internal uint _IsEnabled; 20 | 21 | /// 22 | /// Gets a boolean value indicating if the ECC memory is available and supported 23 | /// 24 | public bool IsSupported 25 | { 26 | get => _IsSupported.GetBit(0); 27 | } 28 | 29 | /// 30 | /// Gets the ECC memory configurations 31 | /// 32 | public ECCConfiguration ConfigurationOptions 33 | { 34 | get => _ConfigurationOptions; 35 | } 36 | 37 | /// 38 | /// Gets boolean value indicating if the ECC memory is currently enabled 39 | /// 40 | public bool IsEnabled 41 | { 42 | get => _IsEnabled.GetBit(0); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/InfoFrameVideoPixelRepetition.cs: -------------------------------------------------------------------------------- 1 | namespace NvAPIWrapper.Native.Display 2 | { 3 | /// 4 | /// Contains possible AVI pixel repetition values 5 | /// 6 | public enum InfoFrameVideoPixelRepetition : uint 7 | { 8 | /// 9 | /// No pixel repetition 10 | /// 11 | None = 0, 12 | 13 | /// 14 | /// Two pixel repetition 15 | /// 16 | X2, 17 | 18 | /// 19 | /// Three pixel repetition 20 | /// 21 | X3, 22 | 23 | /// 24 | /// Four pixel repetition 25 | /// 26 | X4, 27 | 28 | /// 29 | /// Five pixel repetition 30 | /// 31 | X5, 32 | 33 | /// 34 | /// Six pixel repetition 35 | /// 36 | X6, 37 | 38 | /// 39 | /// Seven pixel repetition 40 | /// 41 | X7, 42 | 43 | /// 44 | /// Eight pixel repetition 45 | /// 46 | X8, 47 | 48 | /// 49 | /// Nine pixel repetition 50 | /// 51 | X9, 52 | 53 | /// 54 | /// Ten pixel repetition 55 | /// 56 | X10, 57 | 58 | /// 59 | /// Auto (Unspecified) 60 | /// 61 | Auto = 31 62 | } 63 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/GPU/Structures/PrivateVoltageBoostPercentV1.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Helpers; 5 | using NvAPIWrapper.Native.Interfaces; 6 | 7 | namespace NvAPIWrapper.Native.GPU.Structures 8 | { 9 | /// 10 | /// Contains information regarding GPU voltage boost percentage 11 | /// 12 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 13 | [StructureVersion(1)] 14 | public struct PrivateVoltageBoostPercentV1 : IInitializable 15 | { 16 | internal const int MaxNumberOfUnknown = 8; 17 | 18 | internal StructureVersion _Version; 19 | 20 | internal readonly uint _Percent; 21 | 22 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = MaxNumberOfUnknown)] 23 | internal readonly uint[] _Unknown; 24 | 25 | /// 26 | /// Gets the voltage boost in percentage 27 | /// 28 | public uint Percent 29 | { 30 | get => _Percent; 31 | } 32 | 33 | /// 34 | /// Creates a new instance of 35 | /// 36 | /// The voltage boost in percentage 37 | public PrivateVoltageBoostPercentV1(uint percent) 38 | { 39 | this = typeof(PrivateVoltageBoostPercentV1).Instantiate(); 40 | _Percent = percent; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Interfaces/GPU/IPerformanceStates20ClockEntry.cs: -------------------------------------------------------------------------------- 1 | using NvAPIWrapper.Native.GPU; 2 | using NvAPIWrapper.Native.GPU.Structures; 3 | 4 | namespace NvAPIWrapper.Native.Interfaces.GPU 5 | { 6 | /// 7 | /// Holds information regarding a clock domain of a performance states 8 | /// 9 | public interface IPerformanceStates20ClockEntry 10 | { 11 | /// 12 | /// Gets the type of clock frequency 13 | /// 14 | PerformanceStates20ClockType ClockType { get; } 15 | 16 | /// 17 | /// Gets the domain identification 18 | /// 19 | PublicClockDomain DomainId { get; } 20 | 21 | /// 22 | /// Gets the current base frequency delta value and the range for a valid delta value 23 | /// 24 | PerformanceStates20ParameterDelta FrequencyDeltaInkHz { get; } 25 | 26 | /// 27 | /// Gets the fixed frequency of the clock 28 | /// 29 | IPerformanceStates20ClockDependentFrequencyRange FrequencyRange { get; } 30 | 31 | 32 | /// 33 | /// Gets a boolean value indicating if this clock is editable 34 | /// 35 | bool IsEditable { get; } 36 | 37 | /// 38 | /// Gets the range of clock frequency and related voltage information if present 39 | /// 40 | IPerformanceStates20ClockDependentSingleFrequency SingleFrequency { get; } 41 | } 42 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/MonitorVCDBCapabilities.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NvAPIWrapper.Native.Helpers; 3 | 4 | namespace NvAPIWrapper.Native.Display.Structures 5 | { 6 | /// 7 | /// Contains monitor VCDB capabilities 8 | /// 9 | public struct MonitorVCDBCapabilities 10 | { 11 | private readonly byte[] _data; 12 | 13 | internal MonitorVCDBCapabilities(byte[] data) 14 | { 15 | if (data.Length != 49) 16 | { 17 | throw new ArgumentOutOfRangeException(nameof(data)); 18 | } 19 | 20 | _data = data; 21 | } 22 | 23 | /// 24 | /// Gets a boolean value indicating RGB range quantization 25 | /// 26 | public bool QuantizationRangeRGB 27 | { 28 | get => _data[0].GetBit(1); 29 | } 30 | 31 | /// 32 | /// Gets a boolean value indicating Ycc range quantization 33 | /// 34 | public bool QuantizationRangeYcc 35 | { 36 | get => _data[0].GetBit(0); 37 | } 38 | 39 | public byte ScanInfoConsumerElectronicsVideoFormats 40 | { 41 | get => (byte)_data[0].GetBits(6, 2); 42 | } 43 | 44 | public byte ScanInfoInformationTechnologyVideoFormats 45 | { 46 | get => (byte)_data[0].GetBits(4, 2); 47 | } 48 | 49 | public byte ScanInfoPreferredVideoFormat 50 | { 51 | get => (byte)_data[0].GetBits(2, 2); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /NvAPIWrapper/Native/Display/Structures/PrivateDisplayDVCInfoEx.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using NvAPIWrapper.Native.Attributes; 3 | using NvAPIWrapper.Native.General.Structures; 4 | using NvAPIWrapper.Native.Helpers; 5 | using NvAPIWrapper.Native.Interfaces; 6 | using NvAPIWrapper.Native.Interfaces.Display; 7 | 8 | namespace NvAPIWrapper.Native.Display.Structures 9 | { 10 | /// 11 | [StructLayout(LayoutKind.Sequential, Pack = 8)] 12 | [StructureVersion(1)] 13 | public struct PrivateDisplayDVCInfoEx : IInitializable, IDisplayDVCInfo 14 | { 15 | internal StructureVersion _Version; 16 | internal int _CurrentLevel; 17 | internal int _MinimumLevel; 18 | internal int _MaximumLevel; 19 | internal int _DefaultLevel; 20 | 21 | /// 22 | public int CurrentLevel 23 | { 24 | get => _CurrentLevel; 25 | } 26 | 27 | /// 28 | public int MinimumLevel 29 | { 30 | get => _MinimumLevel; 31 | } 32 | 33 | /// 34 | public int MaximumLevel 35 | { 36 | get => _MaximumLevel; 37 | } 38 | 39 | /// 40 | public int DefaultLevel 41 | { 42 | get => _DefaultLevel; 43 | } 44 | 45 | internal PrivateDisplayDVCInfoEx(int currentLevel) 46 | { 47 | this = typeof(PrivateDisplayDVCInfoEx).Instantiate(); 48 | _CurrentLevel = currentLevel; 49 | } 50 | } 51 | } --------------------------------------------------------------------------------