@@ -41,6 +41,7 @@ internal static class NvApi
4141 public static NvAPI_GPU_GetCoolerSettingsDelegate NvAPI_GPU_GetCoolerSettings { get ; internal set ; }
4242 public static NvAPI_GPU_GetDynamicPstatesInfoExDelegate NvAPI_GPU_GetDynamicPstatesInfoEx { get ; internal set ; }
4343 public static NvAPI_GPU_GetMemoryInfoDelegate NvAPI_GPU_GetMemoryInfo { get ; internal set ; }
44+ public static NvAPI_GPU_GetMemoryInfoExDelegate NvAPI_GPU_GetMemoryInfoEx { get ; internal set ; }
4445 public static NvAPI_GPU_GetPCIIdentifiersDelegate NvAPI_GPU_GetPCIIdentifiers { get ; internal set ; }
4546 public static NvAPI_GPU_GetTachReadingDelegate NvAPI_GPU_GetTachReading { get ; internal set ; }
4647 public static NvAPI_GPU_GetThermalSettingsDelegate NvAPI_GPU_GetThermalSettings { get ; internal set ; }
@@ -83,6 +84,7 @@ public static void Initialize()
8384 NvAPI_GPU_GetCoolerSettings = GetDelegate < NvAPI_GPU_GetCoolerSettingsDelegate > ( 0xDA141340 ) ;
8485 NvAPI_GPU_SetCoolerLevels = GetDelegate < NvAPI_GPU_SetCoolerLevelsDelegate > ( 0x891FA0AE ) ;
8586 NvAPI_GPU_GetMemoryInfo = GetDelegate < NvAPI_GPU_GetMemoryInfoDelegate > ( 0x774AA982 ) ;
87+ NvAPI_GPU_GetMemoryInfoEx = GetDelegate < NvAPI_GPU_GetMemoryInfoExDelegate > ( 0xC0599498 ) ;
8688 NvAPI_GetDisplayDriverVersion = GetDelegate < NvAPI_GetDisplayDriverVersionDelegate > ( 0xF951A4D1 ) ;
8789 _nvAPI_GetInterfaceVersionString = GetDelegate < NvAPI_GetInterfaceVersionStringDelegate > ( 0x01053FA5 ) ;
8890 NvAPI_GPU_GetPCIIdentifiers = GetDelegate < NvAPI_GPU_GetPCIIdentifiersDelegate > ( 0x2DDFB66E ) ;
@@ -145,6 +147,9 @@ public static void Initialize()
145147 [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
146148 public delegate NvStatus NvAPI_GPU_GetMemoryInfoDelegate ( NvDisplayHandle displayHandle , ref NvMemoryInfo nvMemoryInfo ) ;
147149
150+ [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
151+ public delegate NvStatus NvAPI_GPU_GetMemoryInfoExDelegate ( NvPhysicalGpuHandle gpuHandle , ref NvMemoryInfoEx nvMemoryInfo ) ;
152+
148153 [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
149154 public delegate NvStatus NvAPI_GPU_GetPCIIdentifiersDelegate ( NvPhysicalGpuHandle gpuHandle , out uint deviceId , out uint subSystemId , out uint revisionId , out uint extDeviceId ) ;
150155
@@ -575,6 +580,24 @@ internal struct NvMemoryInfo
575580 public uint CurrentAvailableDedicatedVideoMemory ;
576581 }
577582
583+ [ StructLayout ( LayoutKind . Sequential ) ]
584+ internal struct NvMemoryInfoEx
585+ {
586+ public uint Version ;
587+ public ulong DedicatedVideoMemory ;
588+ public ulong AvailableDedicatedVideoMemory ;
589+ public ulong SystemVideoMemory ;
590+ public ulong SharedSystemMemory ;
591+
592+ public ulong CurrentAvailableDedicatedVideoMemory ;
593+
594+ public ulong DedicatedVideoMemoryEvictionsSize ;
595+ public ulong DedicatedVideoMemoryEvictionCount ;
596+
597+ public ulong DedicatedVideoMemoryPromotionsSize ;
598+ public ulong DedicatedVideoMemoryPromotionCount ;
599+ }
600+
578601 [ StructLayout ( LayoutKind . Sequential , Pack = 8 ) ]
579602 internal struct NvDisplayDriverVersion
580603 {
0 commit comments