1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
use status::NvAPI_Status;
use types::NvAPI_ShortString;
use handles;
nvapi! {
pub type SYS_GetDriverAndBranchVersionFn = extern "C" fn(pDriverVersion: *mut u32, szBuildBranchString: *mut NvAPI_ShortString) -> NvAPI_Status;
pub unsafe fn NvAPI_SYS_GetDriverAndBranchVersion;
}
nvstruct! {
pub struct NV_DISPLAY_DRIVER_MEMORY_INFO_V1 {
pub version: u32,
pub dedicatedVideoMemory: u32,
pub availableDedicatedVideoMemory: u32,
pub systemVideoMemory: u32,
pub sharedSystemMemory: u32,
}
}
nvstruct! {
pub struct NV_DISPLAY_DRIVER_MEMORY_INFO_V2 {
pub v1: NV_DISPLAY_DRIVER_MEMORY_INFO_V1,
pub curAvailableDedicatedVideoMemory: u32,
}
}
nvinherit! { NV_DISPLAY_DRIVER_MEMORY_INFO_V2(v1: NV_DISPLAY_DRIVER_MEMORY_INFO_V1) }
nvstruct! {
pub struct NV_DISPLAY_DRIVER_MEMORY_INFO_V3 {
pub v2: NV_DISPLAY_DRIVER_MEMORY_INFO_V2,
pub dedicatedVideoMemoryEvictionsSize: u32,
pub dedicatedVideoMemoryEvictionCount: u32,
}
}
nvinherit! { NV_DISPLAY_DRIVER_MEMORY_INFO_V3(v2: NV_DISPLAY_DRIVER_MEMORY_INFO_V2) }
pub type NV_DISPLAY_DRIVER_MEMORY_INFO = NV_DISPLAY_DRIVER_MEMORY_INFO_V3;
nvversion! { NV_DISPLAY_DRIVER_MEMORY_INFO_VER_1(NV_DISPLAY_DRIVER_MEMORY_INFO_V1 = 4 * 5, 1) }
nvversion! { NV_DISPLAY_DRIVER_MEMORY_INFO_VER_2(NV_DISPLAY_DRIVER_MEMORY_INFO_V2 = 4 * 6, 2) }
nvversion! { NV_DISPLAY_DRIVER_MEMORY_INFO_VER_3(NV_DISPLAY_DRIVER_MEMORY_INFO_V3 = 4 * 8, 3) }
nvversion! { NV_DISPLAY_DRIVER_MEMORY_INFO_VER = NV_DISPLAY_DRIVER_MEMORY_INFO_VER_3 }
nvapi! {
pub type GPU_GetMemoryInfoFn = extern "C" fn(hPhysicalGpu: handles::NvPhysicalGpuHandle, pMemoryInfo: *mut NV_DISPLAY_DRIVER_MEMORY_INFO) -> NvAPI_Status;
pub unsafe fn NvAPI_GPU_GetMemoryInfo;
}
pub mod private {
use status::NvAPI_Status;
use handles;
nvapi! {
pub unsafe fn NvAPI_GetDisplayDriverMemoryInfo(hPhysicalGpu: handles::NvPhysicalGpuHandle, pMemoryInfo: *mut super::NV_DISPLAY_DRIVER_MEMORY_INFO) -> NvAPI_Status;
}
}