/nvapi/include/nvapi/nvapi.h

https://bitbucket.org/lindenlab/3p-nvapi · C Header · 11468 lines · 4645 code · 1173 blank · 5650 comment · 29 complexity · 101bef86354dcba61375ba9dec4ccf4f MD5 · raw file

  1. /************************************************************************************************************************************\
  2. |* *|
  3. |* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
  4. |* *|
  5. |* NOTICE TO USER: *|
  6. |* *|
  7. |* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
  8. |* *|
  9. |* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
  10. |* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
  11. |* Otherwise, you have no rights to use or access this software in any manner. *|
  12. |* *|
  13. |* If not covered by the applicable NVIDIA software license agreement: *|
  14. |* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
  15. |* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
  16. |* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
  17. |* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
  18. |* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
  19. |* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
  20. |* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
  21. |* *|
  22. |* U.S. Government End Users. *|
  23. |* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
  24. |* consisting of "commercial computer software" and "commercial computer software documentation" *|
  25. |* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
  26. |* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
  27. |* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
  28. |* *|
  29. |* Any use of this software in individual and commercial software must include, *|
  30. |* in the user documentation and internal comments to the code, *|
  31. |* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
  32. |* *|
  33. \************************************************************************************************************************************/
  34. ///////////////////////////////////////////////////////////////////////////////
  35. //
  36. // Date: Sep 26, 2012
  37. // File: nvapi.h
  38. //
  39. // NvAPI provides an interface to NVIDIA devices. This file contains the
  40. // interface constants, structure definitions and function prototypes.
  41. //
  42. // Target Profile: developer
  43. // Target Platform: windows
  44. //
  45. ///////////////////////////////////////////////////////////////////////////////
  46. #ifndef _NVAPI_H
  47. #define _NVAPI_H
  48. #pragma pack(push,8) // Make sure we have consistent structure packings
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52. // ====================================================
  53. // Universal NvAPI Definitions
  54. // ====================================================
  55. #ifndef _WIN32
  56. #define __cdecl
  57. #endif
  58. // ====================================================
  59. // SAL related support
  60. // ====================================================
  61. #ifndef __ecount
  62. #define __nvapi_undef__ecount
  63. #define __ecount(size)
  64. #endif
  65. #ifndef __bcount
  66. #define __nvapi_undef__bcount
  67. #define __bcount(size)
  68. #endif
  69. #ifndef __in
  70. #define __nvapi_undef__in
  71. #define __in
  72. #endif
  73. #ifndef __in_ecount
  74. #define __nvapi_undef__in_ecount
  75. #define __in_ecount(size)
  76. #endif
  77. #ifndef __in_bcount
  78. #define __nvapi_undef__in_bcount
  79. #define __in_bcount(size)
  80. #endif
  81. #ifndef __in_z
  82. #define __nvapi_undef__in_z
  83. #define __in_z
  84. #endif
  85. #ifndef __in_ecount_z
  86. #define __nvapi_undef__in_ecount_z
  87. #define __in_ecount_z(size)
  88. #endif
  89. #ifndef __in_bcount_z
  90. #define __nvapi_undef__in_bcount_z
  91. #define __in_bcount_z(size)
  92. #endif
  93. #ifndef __in_nz
  94. #define __nvapi_undef__in_nz
  95. #define __in_nz
  96. #endif
  97. #ifndef __in_ecount_nz
  98. #define __nvapi_undef__in_ecount_nz
  99. #define __in_ecount_nz(size)
  100. #endif
  101. #ifndef __in_bcount_nz
  102. #define __nvapi_undef__in_bcount_nz
  103. #define __in_bcount_nz(size)
  104. #endif
  105. #ifndef __out
  106. #define __nvapi_undef__out
  107. #define __out
  108. #endif
  109. #ifndef __out_ecount
  110. #define __nvapi_undef__out_ecount
  111. #define __out_ecount(size)
  112. #endif
  113. #ifndef __out_bcount
  114. #define __nvapi_undef__out_bcount
  115. #define __out_bcount(size)
  116. #endif
  117. #ifndef __out_ecount_part
  118. #define __nvapi_undef__out_ecount_part
  119. #define __out_ecount_part(size,length)
  120. #endif
  121. #ifndef __out_bcount_part
  122. #define __nvapi_undef__out_bcount_part
  123. #define __out_bcount_part(size,length)
  124. #endif
  125. #ifndef __out_ecount_full
  126. #define __nvapi_undef__out_ecount_full
  127. #define __out_ecount_full(size)
  128. #endif
  129. #ifndef __out_bcount_full
  130. #define __nvapi_undef__out_bcount_full
  131. #define __out_bcount_full(size)
  132. #endif
  133. #ifndef __out_z
  134. #define __nvapi_undef__out_z
  135. #define __out_z
  136. #endif
  137. #ifndef __out_z_opt
  138. #define __nvapi_undef__out_z_opt
  139. #define __out_z_opt
  140. #endif
  141. #ifndef __out_ecount_z
  142. #define __nvapi_undef__out_ecount_z
  143. #define __out_ecount_z(size)
  144. #endif
  145. #ifndef __out_bcount_z
  146. #define __nvapi_undef__out_bcount_z
  147. #define __out_bcount_z(size)
  148. #endif
  149. #ifndef __out_ecount_part_z
  150. #define __nvapi_undef__out_ecount_part_z
  151. #define __out_ecount_part_z(size,length)
  152. #endif
  153. #ifndef __out_bcount_part_z
  154. #define __nvapi_undef__out_bcount_part_z
  155. #define __out_bcount_part_z(size,length)
  156. #endif
  157. #ifndef __out_ecount_full_z
  158. #define __nvapi_undef__out_ecount_full_z
  159. #define __out_ecount_full_z(size)
  160. #endif
  161. #ifndef __out_bcount_full_z
  162. #define __nvapi_undef__out_bcount_full_z
  163. #define __out_bcount_full_z(size)
  164. #endif
  165. #ifndef __out_nz
  166. #define __nvapi_undef__out_nz
  167. #define __out_nz
  168. #endif
  169. #ifndef __out_nz_opt
  170. #define __nvapi_undef__out_nz_opt
  171. #define __out_nz_opt
  172. #endif
  173. #ifndef __out_ecount_nz
  174. #define __nvapi_undef__out_ecount_nz
  175. #define __out_ecount_nz(size)
  176. #endif
  177. #ifndef __out_bcount_nz
  178. #define __nvapi_undef__out_bcount_nz
  179. #define __out_bcount_nz(size)
  180. #endif
  181. #ifndef __inout
  182. #define __nvapi_undef__inout
  183. #define __inout
  184. #endif
  185. #ifndef __inout_ecount
  186. #define __nvapi_undef__inout_ecount
  187. #define __inout_ecount(size)
  188. #endif
  189. #ifndef __inout_bcount
  190. #define __nvapi_undef__inout_bcount
  191. #define __inout_bcount(size)
  192. #endif
  193. #ifndef __inout_ecount_part
  194. #define __nvapi_undef__inout_ecount_part
  195. #define __inout_ecount_part(size,length)
  196. #endif
  197. #ifndef __inout_bcount_part
  198. #define __nvapi_undef__inout_bcount_part
  199. #define __inout_bcount_part(size,length)
  200. #endif
  201. #ifndef __inout_ecount_full
  202. #define __nvapi_undef__inout_ecount_full
  203. #define __inout_ecount_full(size)
  204. #endif
  205. #ifndef __inout_bcount_full
  206. #define __nvapi_undef__inout_bcount_full
  207. #define __inout_bcount_full(size)
  208. #endif
  209. #ifndef __inout_z
  210. #define __nvapi_undef__inout_z
  211. #define __inout_z
  212. #endif
  213. #ifndef __inout_ecount_z
  214. #define __nvapi_undef__inout_ecount_z
  215. #define __inout_ecount_z(size)
  216. #endif
  217. #ifndef __inout_bcount_z
  218. #define __nvapi_undef__inout_bcount_z
  219. #define __inout_bcount_z(size)
  220. #endif
  221. #ifndef __inout_nz
  222. #define __nvapi_undef__inout_nz
  223. #define __inout_nz
  224. #endif
  225. #ifndef __inout_ecount_nz
  226. #define __nvapi_undef__inout_ecount_nz
  227. #define __inout_ecount_nz(size)
  228. #endif
  229. #ifndef __inout_bcount_nz
  230. #define __nvapi_undef__inout_bcount_nz
  231. #define __inout_bcount_nz(size)
  232. #endif
  233. #ifndef __ecount_opt
  234. #define __nvapi_undef__ecount_opt
  235. #define __ecount_opt(size)
  236. #endif
  237. #ifndef __bcount_opt
  238. #define __nvapi_undef__bcount_opt
  239. #define __bcount_opt(size)
  240. #endif
  241. #ifndef __in_opt
  242. #define __nvapi_undef__in_opt
  243. #define __in_opt
  244. #endif
  245. #ifndef __in_ecount_opt
  246. #define __nvapi_undef__in_ecount_opt
  247. #define __in_ecount_opt(size)
  248. #endif
  249. #ifndef __in_bcount_opt
  250. #define __nvapi_undef__in_bcount_opt
  251. #define __in_bcount_opt(size)
  252. #endif
  253. #ifndef __in_z_opt
  254. #define __nvapi_undef__in_z_opt
  255. #define __in_z_opt
  256. #endif
  257. #ifndef __in_ecount_z_opt
  258. #define __nvapi_undef__in_ecount_z_opt
  259. #define __in_ecount_z_opt(size)
  260. #endif
  261. #ifndef __in_bcount_z_opt
  262. #define __nvapi_undef__in_bcount_z_opt
  263. #define __in_bcount_z_opt(size)
  264. #endif
  265. #ifndef __in_nz_opt
  266. #define __nvapi_undef__in_nz_opt
  267. #define __in_nz_opt
  268. #endif
  269. #ifndef __in_ecount_nz_opt
  270. #define __nvapi_undef__in_ecount_nz_opt
  271. #define __in_ecount_nz_opt(size)
  272. #endif
  273. #ifndef __in_bcount_nz_opt
  274. #define __nvapi_undef__in_bcount_nz_opt
  275. #define __in_bcount_nz_opt(size)
  276. #endif
  277. #ifndef __out_opt
  278. #define __nvapi_undef__out_opt
  279. #define __out_opt
  280. #endif
  281. #ifndef __out_ecount_opt
  282. #define __nvapi_undef__out_ecount_opt
  283. #define __out_ecount_opt(size)
  284. #endif
  285. #ifndef __out_bcount_opt
  286. #define __nvapi_undef__out_bcount_opt
  287. #define __out_bcount_opt(size)
  288. #endif
  289. #ifndef __out_ecount_part_opt
  290. #define __nvapi_undef__out_ecount_part_opt
  291. #define __out_ecount_part_opt(size,length)
  292. #endif
  293. #ifndef __out_bcount_part_opt
  294. #define __nvapi_undef__out_bcount_part_opt
  295. #define __out_bcount_part_opt(size,length)
  296. #endif
  297. #ifndef __out_ecount_full_opt
  298. #define __nvapi_undef__out_ecount_full_opt
  299. #define __out_ecount_full_opt(size)
  300. #endif
  301. #ifndef __out_bcount_full_opt
  302. #define __nvapi_undef__out_bcount_full_opt
  303. #define __out_bcount_full_opt(size)
  304. #endif
  305. #ifndef __out_ecount_z_opt
  306. #define __nvapi_undef__out_ecount_z_opt
  307. #define __out_ecount_z_opt(size)
  308. #endif
  309. #ifndef __out_bcount_z_opt
  310. #define __nvapi_undef__out_bcount_z_opt
  311. #define __out_bcount_z_opt(size)
  312. #endif
  313. #ifndef __out_ecount_part_z_opt
  314. #define __nvapi_undef__out_ecount_part_z_opt
  315. #define __out_ecount_part_z_opt(size,length)
  316. #endif
  317. #ifndef __out_bcount_part_z_opt
  318. #define __nvapi_undef__out_bcount_part_z_opt
  319. #define __out_bcount_part_z_opt(size,length)
  320. #endif
  321. #ifndef __out_ecount_full_z_opt
  322. #define __nvapi_undef__out_ecount_full_z_opt
  323. #define __out_ecount_full_z_opt(size)
  324. #endif
  325. #ifndef __out_bcount_full_z_opt
  326. #define __nvapi_undef__out_bcount_full_z_opt
  327. #define __out_bcount_full_z_opt(size)
  328. #endif
  329. #ifndef __out_ecount_nz_opt
  330. #define __nvapi_undef__out_ecount_nz_opt
  331. #define __out_ecount_nz_opt(size)
  332. #endif
  333. #ifndef __out_bcount_nz_opt
  334. #define __nvapi_undef__out_bcount_nz_opt
  335. #define __out_bcount_nz_opt(size)
  336. #endif
  337. #ifndef __inout_opt
  338. #define __nvapi_undef__inout_opt
  339. #define __inout_opt
  340. #endif
  341. #ifndef __inout_ecount_opt
  342. #define __nvapi_undef__inout_ecount_opt
  343. #define __inout_ecount_opt(size)
  344. #endif
  345. #ifndef __inout_bcount_opt
  346. #define __nvapi_undef__inout_bcount_opt
  347. #define __inout_bcount_opt(size)
  348. #endif
  349. #ifndef __inout_ecount_part_opt
  350. #define __nvapi_undef__inout_ecount_part_opt
  351. #define __inout_ecount_part_opt(size,length)
  352. #endif
  353. #ifndef __inout_bcount_part_opt
  354. #define __nvapi_undef__inout_bcount_part_opt
  355. #define __inout_bcount_part_opt(size,length)
  356. #endif
  357. #ifndef __inout_ecount_full_opt
  358. #define __nvapi_undef__inout_ecount_full_opt
  359. #define __inout_ecount_full_opt(size)
  360. #endif
  361. #ifndef __inout_bcount_full_opt
  362. #define __nvapi_undef__inout_bcount_full_opt
  363. #define __inout_bcount_full_opt(size)
  364. #endif
  365. #ifndef __inout_z_opt
  366. #define __nvapi_undef__inout_z_opt
  367. #define __inout_z_opt
  368. #endif
  369. #ifndef __inout_ecount_z_opt
  370. #define __nvapi_undef__inout_ecount_z_opt
  371. #define __inout_ecount_z_opt(size)
  372. #endif
  373. #ifndef __inout_ecount_z_opt
  374. #define __nvapi_undef__inout_ecount_z_opt
  375. #define __inout_ecount_z_opt(size)
  376. #endif
  377. #ifndef __inout_bcount_z_opt
  378. #define __nvapi_undef__inout_bcount_z_opt
  379. #define __inout_bcount_z_opt(size)
  380. #endif
  381. #ifndef __inout_nz_opt
  382. #define __nvapi_undef__inout_nz_opt
  383. #define __inout_nz_opt
  384. #endif
  385. #ifndef __inout_ecount_nz_opt
  386. #define __nvapi_undef__inout_ecount_nz_opt
  387. #define __inout_ecount_nz_opt(size)
  388. #endif
  389. #ifndef __inout_bcount_nz_opt
  390. #define __nvapi_undef__inout_bcount_nz_opt
  391. #define __inout_bcount_nz_opt(size)
  392. #endif
  393. #ifndef __deref_ecount
  394. #define __nvapi_undef__deref_ecount
  395. #define __deref_ecount(size)
  396. #endif
  397. #ifndef __deref_bcount
  398. #define __nvapi_undef__deref_bcount
  399. #define __deref_bcount(size)
  400. #endif
  401. #ifndef __deref_out
  402. #define __nvapi_undef__deref_out
  403. #define __deref_out
  404. #endif
  405. #ifndef __deref_out_ecount
  406. #define __nvapi_undef__deref_out_ecount
  407. #define __deref_out_ecount(size)
  408. #endif
  409. #ifndef __deref_out_bcount
  410. #define __nvapi_undef__deref_out_bcount
  411. #define __deref_out_bcount(size)
  412. #endif
  413. #ifndef __deref_out_ecount_part
  414. #define __nvapi_undef__deref_out_ecount_part
  415. #define __deref_out_ecount_part(size,length)
  416. #endif
  417. #ifndef __deref_out_bcount_part
  418. #define __nvapi_undef__deref_out_bcount_part
  419. #define __deref_out_bcount_part(size,length)
  420. #endif
  421. #ifndef __deref_out_ecount_full
  422. #define __nvapi_undef__deref_out_ecount_full
  423. #define __deref_out_ecount_full(size)
  424. #endif
  425. #ifndef __deref_out_bcount_full
  426. #define __nvapi_undef__deref_out_bcount_full
  427. #define __deref_out_bcount_full(size)
  428. #endif
  429. #ifndef __deref_out_z
  430. #define __nvapi_undef__deref_out_z
  431. #define __deref_out_z
  432. #endif
  433. #ifndef __deref_out_ecount_z
  434. #define __nvapi_undef__deref_out_ecount_z
  435. #define __deref_out_ecount_z(size)
  436. #endif
  437. #ifndef __deref_out_bcount_z
  438. #define __nvapi_undef__deref_out_bcount_z
  439. #define __deref_out_bcount_z(size)
  440. #endif
  441. #ifndef __deref_out_nz
  442. #define __nvapi_undef__deref_out_nz
  443. #define __deref_out_nz
  444. #endif
  445. #ifndef __deref_out_ecount_nz
  446. #define __nvapi_undef__deref_out_ecount_nz
  447. #define __deref_out_ecount_nz(size)
  448. #endif
  449. #ifndef __deref_out_bcount_nz
  450. #define __nvapi_undef__deref_out_bcount_nz
  451. #define __deref_out_bcount_nz(size)
  452. #endif
  453. #ifndef __deref_inout
  454. #define __nvapi_undef__deref_inout
  455. #define __deref_inout
  456. #endif
  457. #ifndef __deref_inout_z
  458. #define __nvapi_undef__deref_inout_z
  459. #define __deref_inout_z
  460. #endif
  461. #ifndef __deref_inout_ecount
  462. #define __nvapi_undef__deref_inout_ecount
  463. #define __deref_inout_ecount(size)
  464. #endif
  465. #ifndef __deref_inout_bcount
  466. #define __nvapi_undef__deref_inout_bcount
  467. #define __deref_inout_bcount(size)
  468. #endif
  469. #ifndef __deref_inout_ecount_part
  470. #define __nvapi_undef__deref_inout_ecount_part
  471. #define __deref_inout_ecount_part(size,length)
  472. #endif
  473. #ifndef __deref_inout_bcount_part
  474. #define __nvapi_undef__deref_inout_bcount_part
  475. #define __deref_inout_bcount_part(size,length)
  476. #endif
  477. #ifndef __deref_inout_ecount_full
  478. #define __nvapi_undef__deref_inout_ecount_full
  479. #define __deref_inout_ecount_full(size)
  480. #endif
  481. #ifndef __deref_inout_bcount_full
  482. #define __nvapi_undef__deref_inout_bcount_full
  483. #define __deref_inout_bcount_full(size)
  484. #endif
  485. #ifndef __deref_inout_z
  486. #define __nvapi_undef__deref_inout_z
  487. #define __deref_inout_z
  488. #endif
  489. #ifndef __deref_inout_ecount_z
  490. #define __nvapi_undef__deref_inout_ecount_z
  491. #define __deref_inout_ecount_z(size)
  492. #endif
  493. #ifndef __deref_inout_bcount_z
  494. #define __nvapi_undef__deref_inout_bcount_z
  495. #define __deref_inout_bcount_z(size)
  496. #endif
  497. #ifndef __deref_inout_nz
  498. #define __nvapi_undef__deref_inout_nz
  499. #define __deref_inout_nz
  500. #endif
  501. #ifndef __deref_inout_ecount_nz
  502. #define __nvapi_undef__deref_inout_ecount_nz
  503. #define __deref_inout_ecount_nz(size)
  504. #endif
  505. #ifndef __deref_inout_bcount_nz
  506. #define __nvapi_undef__deref_inout_bcount_nz
  507. #define __deref_inout_bcount_nz(size)
  508. #endif
  509. #ifndef __deref_ecount_opt
  510. #define __nvapi_undef__deref_ecount_opt
  511. #define __deref_ecount_opt(size)
  512. #endif
  513. #ifndef __deref_bcount_opt
  514. #define __nvapi_undef__deref_bcount_opt
  515. #define __deref_bcount_opt(size)
  516. #endif
  517. #ifndef __deref_out_opt
  518. #define __nvapi_undef__deref_out_opt
  519. #define __deref_out_opt
  520. #endif
  521. #ifndef __deref_out_ecount_opt
  522. #define __nvapi_undef__deref_out_ecount_opt
  523. #define __deref_out_ecount_opt(size)
  524. #endif
  525. #ifndef __deref_out_bcount_opt
  526. #define __nvapi_undef__deref_out_bcount_opt
  527. #define __deref_out_bcount_opt(size)
  528. #endif
  529. #ifndef __deref_out_ecount_part_opt
  530. #define __nvapi_undef__deref_out_ecount_part_opt
  531. #define __deref_out_ecount_part_opt(size,length)
  532. #endif
  533. #ifndef __deref_out_bcount_part_opt
  534. #define __nvapi_undef__deref_out_bcount_part_opt
  535. #define __deref_out_bcount_part_opt(size,length)
  536. #endif
  537. #ifndef __deref_out_ecount_full_opt
  538. #define __nvapi_undef__deref_out_ecount_full_opt
  539. #define __deref_out_ecount_full_opt(size)
  540. #endif
  541. #ifndef __deref_out_bcount_full_opt
  542. #define __nvapi_undef__deref_out_bcount_full_opt
  543. #define __deref_out_bcount_full_opt(size)
  544. #endif
  545. #ifndef __deref_out_z_opt
  546. #define __nvapi_undef__deref_out_z_opt
  547. #define __deref_out_z_opt
  548. #endif
  549. #ifndef __deref_out_ecount_z_opt
  550. #define __nvapi_undef__deref_out_ecount_z_opt
  551. #define __deref_out_ecount_z_opt(size)
  552. #endif
  553. #ifndef __deref_out_bcount_z_opt
  554. #define __nvapi_undef__deref_out_bcount_z_opt
  555. #define __deref_out_bcount_z_opt(size)
  556. #endif
  557. #ifndef __deref_out_nz_opt
  558. #define __nvapi_undef__deref_out_nz_opt
  559. #define __deref_out_nz_opt
  560. #endif
  561. #ifndef __deref_out_ecount_nz_opt
  562. #define __nvapi_undef__deref_out_ecount_nz_opt
  563. #define __deref_out_ecount_nz_opt(size)
  564. #endif
  565. #ifndef __deref_out_bcount_nz_opt
  566. #define __nvapi_undef__deref_out_bcount_nz_opt
  567. #define __deref_out_bcount_nz_opt(size)
  568. #endif
  569. #ifndef __deref_inout_opt
  570. #define __nvapi_undef__deref_inout_opt
  571. #define __deref_inout_opt
  572. #endif
  573. #ifndef __deref_inout_ecount_opt
  574. #define __nvapi_undef__deref_inout_ecount_opt
  575. #define __deref_inout_ecount_opt(size)
  576. #endif
  577. #ifndef __deref_inout_bcount_opt
  578. #define __nvapi_undef__deref_inout_bcount_opt
  579. #define __deref_inout_bcount_opt(size)
  580. #endif
  581. #ifndef __deref_inout_ecount_part_opt
  582. #define __nvapi_undef__deref_inout_ecount_part_opt
  583. #define __deref_inout_ecount_part_opt(size,length)
  584. #endif
  585. #ifndef __deref_inout_bcount_part_opt
  586. #define __nvapi_undef__deref_inout_bcount_part_opt
  587. #define __deref_inout_bcount_part_opt(size,length)
  588. #endif
  589. #ifndef __deref_inout_ecount_full_opt
  590. #define __nvapi_undef__deref_inout_ecount_full_opt
  591. #define __deref_inout_ecount_full_opt(size)
  592. #endif
  593. #ifndef __deref_inout_bcount_full_opt
  594. #define __nvapi_undef__deref_inout_bcount_full_opt
  595. #define __deref_inout_bcount_full_opt(size)
  596. #endif
  597. #ifndef __deref_inout_z_opt
  598. #define __nvapi_undef__deref_inout_z_opt
  599. #define __deref_inout_z_opt
  600. #endif
  601. #ifndef __deref_inout_ecount_z_opt
  602. #define __nvapi_undef__deref_inout_ecount_z_opt
  603. #define __deref_inout_ecount_z_opt(size)
  604. #endif
  605. #ifndef __deref_inout_bcount_z_opt
  606. #define __nvapi_undef__deref_inout_bcount_z_opt
  607. #define __deref_inout_bcount_z_opt(size)
  608. #endif
  609. #ifndef __deref_inout_nz_opt
  610. #define __nvapi_undef__deref_inout_nz_opt
  611. #define __deref_inout_nz_opt
  612. #endif
  613. #ifndef __deref_inout_ecount_nz_opt
  614. #define __nvapi_undef__deref_inout_ecount_nz_opt
  615. #define __deref_inout_ecount_nz_opt(size)
  616. #endif
  617. #ifndef __deref_inout_bcount_nz_opt
  618. #define __nvapi_undef__deref_inout_bcount_nz_opt
  619. #define __deref_inout_bcount_nz_opt(size)
  620. #endif
  621. #ifndef __deref_opt_ecount
  622. #define __nvapi_undef__deref_opt_ecount
  623. #define __deref_opt_ecount(size)
  624. #endif
  625. #ifndef __deref_opt_bcount
  626. #define __nvapi_undef__deref_opt_bcount
  627. #define __deref_opt_bcount(size)
  628. #endif
  629. #ifndef __deref_opt_out
  630. #define __nvapi_undef__deref_opt_out
  631. #define __deref_opt_out
  632. #endif
  633. #ifndef __deref_opt_out_z
  634. #define __nvapi_undef__deref_opt_out_z
  635. #define __deref_opt_out_z
  636. #endif
  637. #ifndef __deref_opt_out_ecount
  638. #define __nvapi_undef__deref_opt_out_ecount
  639. #define __deref_opt_out_ecount(size)
  640. #endif
  641. #ifndef __deref_opt_out_bcount
  642. #define __nvapi_undef__deref_opt_out_bcount
  643. #define __deref_opt_out_bcount(size)
  644. #endif
  645. #ifndef __deref_opt_out_ecount_part
  646. #define __nvapi_undef__deref_opt_out_ecount_part
  647. #define __deref_opt_out_ecount_part(size,length)
  648. #endif
  649. #ifndef __deref_opt_out_bcount_part
  650. #define __nvapi_undef__deref_opt_out_bcount_part
  651. #define __deref_opt_out_bcount_part(size,length)
  652. #endif
  653. #ifndef __deref_opt_out_ecount_full
  654. #define __nvapi_undef__deref_opt_out_ecount_full
  655. #define __deref_opt_out_ecount_full(size)
  656. #endif
  657. #ifndef __deref_opt_out_bcount_full
  658. #define __nvapi_undef__deref_opt_out_bcount_full
  659. #define __deref_opt_out_bcount_full(size)
  660. #endif
  661. #ifndef __deref_opt_inout
  662. #define __nvapi_undef__deref_opt_inout
  663. #define __deref_opt_inout
  664. #endif
  665. #ifndef __deref_opt_inout_ecount
  666. #define __nvapi_undef__deref_opt_inout_ecount
  667. #define __deref_opt_inout_ecount(size)
  668. #endif
  669. #ifndef __deref_opt_inout_bcount
  670. #define __nvapi_undef__deref_opt_inout_bcount
  671. #define __deref_opt_inout_bcount(size)
  672. #endif
  673. #ifndef __deref_opt_inout_ecount_part
  674. #define __nvapi_undef__deref_opt_inout_ecount_part
  675. #define __deref_opt_inout_ecount_part(size,length)
  676. #endif
  677. #ifndef __deref_opt_inout_bcount_part
  678. #define __nvapi_undef__deref_opt_inout_bcount_part
  679. #define __deref_opt_inout_bcount_part(size,length)
  680. #endif
  681. #ifndef __deref_opt_inout_ecount_full
  682. #define __nvapi_undef__deref_opt_inout_ecount_full
  683. #define __deref_opt_inout_ecount_full(size)
  684. #endif
  685. #ifndef __deref_opt_inout_bcount_full
  686. #define __nvapi_undef__deref_opt_inout_bcount_full
  687. #define __deref_opt_inout_bcount_full(size)
  688. #endif
  689. #ifndef __deref_opt_inout_z
  690. #define __nvapi_undef__deref_opt_inout_z
  691. #define __deref_opt_inout_z
  692. #endif
  693. #ifndef __deref_opt_inout_ecount_z
  694. #define __nvapi_undef__deref_opt_inout_ecount_z
  695. #define __deref_opt_inout_ecount_z(size)
  696. #endif
  697. #ifndef __deref_opt_inout_bcount_z
  698. #define __nvapi_undef__deref_opt_inout_bcount_z
  699. #define __deref_opt_inout_bcount_z(size)
  700. #endif
  701. #ifndef __deref_opt_inout_nz
  702. #define __nvapi_undef__deref_opt_inout_nz
  703. #define __deref_opt_inout_nz
  704. #endif
  705. #ifndef __deref_opt_inout_ecount_nz
  706. #define __nvapi_undef__deref_opt_inout_ecount_nz
  707. #define __deref_opt_inout_ecount_nz(size)
  708. #endif
  709. #ifndef __deref_opt_inout_bcount_nz
  710. #define __nvapi_undef__deref_opt_inout_bcount_nz
  711. #define __deref_opt_inout_bcount_nz(size)
  712. #endif
  713. #ifndef __deref_opt_ecount_opt
  714. #define __nvapi_undef__deref_opt_ecount_opt
  715. #define __deref_opt_ecount_opt(size)
  716. #endif
  717. #ifndef __deref_opt_bcount_opt
  718. #define __nvapi_undef__deref_opt_bcount_opt
  719. #define __deref_opt_bcount_opt(size)
  720. #endif
  721. #ifndef __deref_opt_out_opt
  722. #define __nvapi_undef__deref_opt_out_opt
  723. #define __deref_opt_out_opt
  724. #endif
  725. #ifndef __deref_opt_out_ecount_opt
  726. #define __nvapi_undef__deref_opt_out_ecount_opt
  727. #define __deref_opt_out_ecount_opt(size)
  728. #endif
  729. #ifndef __deref_opt_out_bcount_opt
  730. #define __nvapi_undef__deref_opt_out_bcount_opt
  731. #define __deref_opt_out_bcount_opt(size)
  732. #endif
  733. #ifndef __deref_opt_out_ecount_part_opt
  734. #define __nvapi_undef__deref_opt_out_ecount_part_opt
  735. #define __deref_opt_out_ecount_part_opt(size,length)
  736. #endif
  737. #ifndef __deref_opt_out_bcount_part_opt
  738. #define __nvapi_undef__deref_opt_out_bcount_part_opt
  739. #define __deref_opt_out_bcount_part_opt(size,length)
  740. #endif
  741. #ifndef __deref_opt_out_ecount_full_opt
  742. #define __nvapi_undef__deref_opt_out_ecount_full_opt
  743. #define __deref_opt_out_ecount_full_opt(size)
  744. #endif
  745. #ifndef __deref_opt_out_bcount_full_opt
  746. #define __nvapi_undef__deref_opt_out_bcount_full_opt
  747. #define __deref_opt_out_bcount_full_opt(size)
  748. #endif
  749. #ifndef __deref_opt_out_z_opt
  750. #define __nvapi_undef__deref_opt_out_z_opt
  751. #define __deref_opt_out_z_opt
  752. #endif
  753. #ifndef __deref_opt_out_ecount_z_opt
  754. #define __nvapi_undef__deref_opt_out_ecount_z_opt
  755. #define __deref_opt_out_ecount_z_opt(size)
  756. #endif
  757. #ifndef __deref_opt_out_bcount_z_opt
  758. #define __nvapi_undef__deref_opt_out_bcount_z_opt
  759. #define __deref_opt_out_bcount_z_opt(size)
  760. #endif
  761. #ifndef __deref_opt_out_nz_opt
  762. #define __nvapi_undef__deref_opt_out_nz_opt
  763. #define __deref_opt_out_nz_opt
  764. #endif
  765. #ifndef __deref_opt_out_ecount_nz_opt
  766. #define __nvapi_undef__deref_opt_out_ecount_nz_opt
  767. #define __deref_opt_out_ecount_nz_opt(size)
  768. #endif
  769. #ifndef __deref_opt_out_bcount_nz_opt
  770. #define __nvapi_undef__deref_opt_out_bcount_nz_opt
  771. #define __deref_opt_out_bcount_nz_opt(size)
  772. #endif
  773. #ifndef __deref_opt_inout_opt
  774. #define __nvapi_undef__deref_opt_inout_opt
  775. #define __deref_opt_inout_opt
  776. #endif
  777. #ifndef __deref_opt_inout_ecount_opt
  778. #define __nvapi_undef__deref_opt_inout_ecount_opt
  779. #define __deref_opt_inout_ecount_opt(size)
  780. #endif
  781. #ifndef __deref_opt_inout_bcount_opt
  782. #define __nvapi_undef__deref_opt_inout_bcount_opt
  783. #define __deref_opt_inout_bcount_opt(size)
  784. #endif
  785. #ifndef __deref_opt_inout_ecount_part_opt
  786. #define __nvapi_undef__deref_opt_inout_ecount_part_opt
  787. #define __deref_opt_inout_ecount_part_opt(size,length)
  788. #endif
  789. #ifndef __deref_opt_inout_bcount_part_opt
  790. #define __nvapi_undef__deref_opt_inout_bcount_part_opt
  791. #define __deref_opt_inout_bcount_part_opt(size,length)
  792. #endif
  793. #ifndef __deref_opt_inout_ecount_full_opt
  794. #define __nvapi_undef__deref_opt_inout_ecount_full_opt
  795. #define __deref_opt_inout_ecount_full_opt(size)
  796. #endif
  797. #ifndef __deref_opt_inout_bcount_full_opt
  798. #define __nvapi_undef__deref_opt_inout_bcount_full_opt
  799. #define __deref_opt_inout_bcount_full_opt(size)
  800. #endif
  801. #ifndef __deref_opt_inout_z_opt
  802. #define __nvapi_undef__deref_opt_inout_z_opt
  803. #define __deref_opt_inout_z_opt
  804. #endif
  805. #ifndef __deref_opt_inout_ecount_z_opt
  806. #define __nvapi_undef__deref_opt_inout_ecount_z_opt
  807. #define __deref_opt_inout_ecount_z_opt(size)
  808. #endif
  809. #ifndef __deref_opt_inout_bcount_z_opt
  810. #define __nvapi_undef__deref_opt_inout_bcount_z_opt
  811. #define __deref_opt_inout_bcount_z_opt(size)
  812. #endif
  813. #ifndef __deref_opt_inout_nz_opt
  814. #define __nvapi_undef__deref_opt_inout_nz_opt
  815. #define __deref_opt_inout_nz_opt
  816. #endif
  817. #ifndef __deref_opt_inout_ecount_nz_opt
  818. #define __nvapi_undef__deref_opt_inout_ecount_nz_opt
  819. #define __deref_opt_inout_ecount_nz_opt(size)
  820. #endif
  821. #ifndef __deref_opt_inout_bcount_nz_opt
  822. #define __nvapi_undef__deref_opt_inout_bcount_nz_opt
  823. #define __deref_opt_inout_bcount_nz_opt(size)
  824. #endif
  825. #define NVAPI_INTERFACE extern NvAPI_Status __cdecl
  826. #if (defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) && (_MSC_VER > 1399) && !defined(NVAPI_INTERNAL) && !defined(NVAPI_DEPRECATED_OLD)
  827. #ifndef __nvapi_deprecated_function
  828. #define __nvapi_deprecated_function(message) __declspec(deprecated(message))
  829. #endif
  830. #ifndef __nvapi_deprecated_datatype
  831. #define __nvapi_deprecated_datatype(FirstRelease) __declspec(deprecated("Do not use this data type - it is deprecated in release " #FirstRelease "."))
  832. #endif
  833. #else
  834. #ifndef __nvapi_deprecated_function
  835. #define __nvapi_deprecated_function(message)
  836. #endif
  837. #ifndef __nvapi_deprecated_datatype
  838. #define __nvapi_deprecated_datatype(FirstRelease)
  839. #endif
  840. #endif
  841. /* 64-bit types for compilers that support them, plus some obsolete variants */
  842. #if defined(__GNUC__) || defined(__arm) || defined(__IAR_SYSTEMS_ICC__) || defined(__ghs__) || defined(_WIN64)
  843. typedef unsigned long long NvU64; /* 0 to 18446744073709551615 */
  844. typedef long long NvS64; /* -9223372036854775808 to 9223372036854775807 */
  845. #else
  846. typedef unsigned __int64 NvU64; /* 0 to 18446744073709551615 */
  847. typedef __int64 NvS64; /* -9223372036854775808 to 9223372036854775807 */
  848. #endif
  849. // mac os 32-bit still needs this
  850. #if (defined(macintosh) || defined(__APPLE__)) && !defined(__LP64__)
  851. typedef signed long NvS32; /* -2147483648 to 2147483647 */
  852. #else
  853. typedef signed int NvS32; /* -2147483648 to 2147483647 */
  854. #endif
  855. // mac os 32-bit still needs this
  856. #if ( (defined(macintosh) && defined(__LP64__) && (__NVAPI_RESERVED0__)) || \
  857. (!defined(macintosh) && defined(__NVAPI_RESERVED0__)) )
  858. typedef unsigned int NvU32; /* 0 to 4294967295 */
  859. #else
  860. typedef unsigned long NvU32; /* 0 to 4294967295 */
  861. #endif
  862. typedef signed short NvS16;
  863. typedef unsigned short NvU16;
  864. typedef unsigned char NvU8;
  865. typedef struct _NV_RECT
  866. {
  867. NvU32 left;
  868. NvU32 top;
  869. NvU32 right;
  870. NvU32 bottom;
  871. } NV_RECT;
  872. #define NV_DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
  873. //! \addtogroup nvapihandles
  874. //! NVAPI Handles - These handles are retrieved from various calls and passed in to others in NvAPI
  875. //! These are meant to be opaque types. Do not assume they correspond to indices, HDCs,
  876. //! display indexes or anything else.
  877. //!
  878. //! Most handles remain valid until a display re-configuration (display mode set) or GPU
  879. //! reconfiguration (going into or out of SLI modes) occurs. If NVAPI_HANDLE_INVALIDATED
  880. //! is received by an app, it should discard all handles, and re-enumerate them.
  881. //! @{
  882. NV_DECLARE_HANDLE(NvDisplayHandle); //!< Display Device driven by NVIDIA GPU(s) (an attached display)
  883. NV_DECLARE_HANDLE(NvMonitorHandle); //!< Monitor handle
  884. NV_DECLARE_HANDLE(NvUnAttachedDisplayHandle); //!< Unattached Display Device driven by NVIDIA GPU(s)
  885. NV_DECLARE_HANDLE(NvLogicalGpuHandle); //!< One or more physical GPUs acting in concert (SLI)
  886. NV_DECLARE_HANDLE(NvPhysicalGpuHandle); //!< A single physical GPU
  887. NV_DECLARE_HANDLE(NvEventHandle); //!< A handle to an event registration instance
  888. NV_DECLARE_HANDLE(NvVisualComputingDeviceHandle); //!< A handle to a Visual Computing Device
  889. NV_DECLARE_HANDLE(NvHICHandle); //!< A handle to a Host Interface Card
  890. NV_DECLARE_HANDLE(NvGSyncDeviceHandle); //!< A handle to a G-Sync device
  891. NV_DECLARE_HANDLE(NvVioHandle); //!< A handle to an SDI device
  892. NV_DECLARE_HANDLE(NvTransitionHandle); //!< A handle to address a single transition request
  893. NV_DECLARE_HANDLE(NvAudioHandle); //!< NVIDIA HD Audio Device
  894. NV_DECLARE_HANDLE(Nv3DVPContextHandle); //!< A handle for a 3D Vision Pro (3DVP) context
  895. NV_DECLARE_HANDLE(Nv3DVPTransceiverHandle); //!< A handle for a 3DVP RF transceiver
  896. NV_DECLARE_HANDLE(Nv3DVPGlassesHandle); //!< A handle for a pair of 3DVP RF shutter glasses
  897. typedef void* StereoHandle; //!< A stereo handle, that corresponds to the device interface
  898. NV_DECLARE_HANDLE(NvSourceHandle); //!< Unique source handle on the system
  899. NV_DECLARE_HANDLE(NvTargetHandle); //!< Unique target handle on the system
  900. NV_DECLARE_HANDLE(NVDX_SwapChainHandle); //!< DirectX SwapChain objects
  901. static const NVDX_SwapChainHandle NVDX_SWAPCHAIN_NONE = 0;
  902. //! @}
  903. //! \ingroup nvapihandles
  904. //! @{
  905. #define NVAPI_DEFAULT_HANDLE 0
  906. #define NV_BIT(x) (1 << (x))
  907. //! @}
  908. //! \addtogroup nvapitypes
  909. //! @{
  910. #define NVAPI_GENERIC_STRING_MAX 4096
  911. #define NVAPI_LONG_STRING_MAX 256
  912. #define NVAPI_SHORT_STRING_MAX 64
  913. typedef struct
  914. {
  915. NvS32 sX;
  916. NvS32 sY;
  917. NvS32 sWidth;
  918. NvS32 sHeight;
  919. } NvSBox;
  920. #ifndef NvGUID_Defined
  921. #define NvGUID_Defined
  922. typedef struct
  923. {
  924. NvU32 data1;
  925. NvU16 data2;
  926. NvU16 data3;
  927. NvU8 data4[8];
  928. } NvGUID, NvLUID;
  929. #endif //#ifndef NvGUID_Defined
  930. #define NVAPI_MAX_PHYSICAL_GPUS 64
  931. #define NVAPI_PHYSICAL_GPUS 32
  932. #define NVAPI_MAX_LOGICAL_GPUS 64
  933. #define NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES 256
  934. #define NVAPI_MAX_AVAILABLE_SLI_GROUPS 256
  935. #define NVAPI_MAX_GPU_TOPOLOGIES NVAPI_MAX_PHYSICAL_GPUS
  936. #define NVAPI_MAX_GPU_PER_TOPOLOGY 8
  937. #define NVAPI_MAX_DISPLAY_HEADS 2
  938. #define NVAPI_ADVANCED_DISPLAY_HEADS 4
  939. #define NVAPI_MAX_DISPLAYS NVAPI_PHYSICAL_GPUS * NVAPI_ADVANCED_DISPLAY_HEADS
  940. #define NVAPI_MAX_ACPI_IDS 16
  941. #define NVAPI_MAX_VIEW_MODES 8
  942. #define NV_MAX_HEADS 4 //!< Maximum heads, each with NVAPI_DESKTOP_RES resolution
  943. #define NVAPI_MAX_HEADS_PER_GPU 32
  944. #define NV_MAX_HEADS 4 //!< Maximum number of heads, each with #NVAPI_DESKTOP_RES resolution
  945. #define NV_MAX_VID_STREAMS 4 //!< Maximum number of input video streams, each with a #NVAPI_VIDEO_SRC_INFO
  946. #define NV_MAX_VID_PROFILES 4 //!< Maximum number of output video profiles supported
  947. #define NVAPI_SYSTEM_MAX_DISPLAYS NVAPI_MAX_PHYSICAL_GPUS * NV_MAX_HEADS
  948. #define NVAPI_SYSTEM_MAX_HWBCS 128
  949. #define NVAPI_SYSTEM_HWBC_INVALID_ID 0xffffffff
  950. #define NVAPI_MAX_AUDIO_DEVICES 16
  951. typedef char NvAPI_String[NVAPI_GENERIC_STRING_MAX];
  952. typedef char NvAPI_LongString[NVAPI_LONG_STRING_MAX];
  953. typedef char NvAPI_ShortString[NVAPI_SHORT_STRING_MAX];
  954. //! @}
  955. // =========================================================================================
  956. //! NvAPI Version Definition \n
  957. //! Maintain per structure specific version define using the MAKE_NVAPI_VERSION macro. \n
  958. //! Usage: #define NV_GENLOCK_STATUS_VER MAKE_NVAPI_VERSION(NV_GENLOCK_STATUS, 1)
  959. //! \ingroup nvapitypes
  960. // =========================================================================================
  961. #define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16))
  962. //! \ingroup nvapitypes
  963. #define GET_NVAPI_VERSION(ver) (NvU32)((ver)>>16)
  964. //! \ingroup nvapitypes
  965. #define GET_NVAPI_SIZE(ver) (NvU32)((ver) & 0xffff)
  966. // ====================================================
  967. //! NvAPI Status Values
  968. //! All NvAPI functions return one of these codes.
  969. //! \ingroup nvapistatus
  970. // ====================================================
  971. typedef enum _NvAPI_Status
  972. {
  973. NVAPI_OK = 0, //!< Success. Request is completed.
  974. NVAPI_ERROR = -1, //!< Generic error
  975. NVAPI_LIBRARY_NOT_FOUND = -2, //!< NVAPI support library cannot be loaded.
  976. NVAPI_NO_IMPLEMENTATION = -3, //!< not implemented in current driver installation
  977. NVAPI_API_NOT_INITIALIZED = -4, //!< NvAPI_Initialize has not been called (successfully)
  978. NVAPI_INVALID_ARGUMENT = -5, //!< The argument/parameter value is not valid or NULL.
  979. NVAPI_NVIDIA_DEVICE_NOT_FOUND = -6, //!< No NVIDIA display driver, or NVIDIA GPU driving a display, was found.
  980. NVAPI_END_ENUMERATION = -7, //!< No more items to enumerate
  981. NVAPI_INVALID_HANDLE = -8, //!< Invalid handle
  982. NVAPI_INCOMPATIBLE_STRUCT_VERSION = -9, //!< An argument's structure version is not supported
  983. NVAPI_HANDLE_INVALIDATED = -10, //!< The handle is no longer valid (likely due to GPU or display re-configuration)
  984. NVAPI_OPENGL_CONTEXT_NOT_CURRENT = -11, //!< No NVIDIA OpenGL context is current (but needs to be)
  985. NVAPI_INVALID_POINTER = -14, //!< An invalid pointer, usually NULL, was passed as a parameter
  986. NVAPI_NO_GL_EXPERT = -12, //!< OpenGL Expert is not supported by the current drivers
  987. NVAPI_INSTRUMENTATION_DISABLED = -13, //!< OpenGL Expert is supported, but driver instrumentation is currently disabled
  988. NVAPI_NO_GL_NSIGHT = -15, //!< OpenGL does not support Nsight
  989. NVAPI_EXPECTED_LOGICAL_GPU_HANDLE = -100, //!< Expected a logical GPU handle for one or more parameters
  990. NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE = -101, //!< Expected a physical GPU handle for one or more parameters
  991. NVAPI_EXPECTED_DISPLAY_HANDLE = -102, //!< Expected an NV display handle for one or more parameters
  992. NVAPI_INVALID_COMBINATION = -103, //!< The combination of parameters is not valid.
  993. NVAPI_NOT_SUPPORTED = -104, //!< Requested feature is not supported in the selected GPU
  994. NVAPI_PORTID_NOT_FOUND = -105, //!< No port ID was found for the I2C transaction
  995. NVAPI_EXPECTED_UNATTACHED_DISPLAY_HANDLE = -106, //!< Expected an unattached display handle as one of the input parameters.
  996. NVAPI_INVALID_PERF_LEVEL = -107, //!< Invalid perf level
  997. NVAPI_DEVICE_BUSY = -108, //!< Device is busy; request not fulfilled
  998. NVAPI_NV_PERSIST_FILE_NOT_FOUND = -109, //!< NV persist file is not found
  999. NVAPI_PERSIST_DATA_NOT_FOUND = -110, //!< NV persist data is not found
  1000. NVAPI_EXPECTED_TV_DISPLAY = -111, //!< Expected a TV output display
  1001. NVAPI_EXPECTED_TV_DISPLAY_ON_DCONNECTOR = -112, //!< Expected a TV output on the D Connector - HDTV_EIAJ4120.
  1002. NVAPI_NO_ACTIVE_SLI_TOPOLOGY = -113, //!< SLI is not active on this device.
  1003. NVAPI_SLI_RENDERING_MODE_NOTALLOWED = -114, //!< Setup of SLI rendering mode is not possible right now.
  1004. NVAPI_EXPECTED_DIGITAL_FLAT_PANEL = -115, //!< Expected a digital flat panel.
  1005. NVAPI_ARGUMENT_EXCEED_MAX_SIZE = -116, //!< Argument exceeds the expected size.
  1006. NVAPI_DEVICE_SWITCHING_NOT_ALLOWED = -117, //!< Inhibit is ON due to one of the flags in NV_GPU_DISPLAY_CHANGE_INHIBIT or SLI active.
  1007. NVAPI_TESTING_CLOCKS_NOT_SUPPORTED = -118, //!< Testing of clocks is not supported.
  1008. NVAPI_UNKNOWN_UNDERSCAN_CONFIG = -119, //!< The specified underscan config is from an unknown source (e.g. INF)
  1009. NVAPI_TIMEOUT_RECONFIGURING_GPU_TOPO = -120, //!< Timeout while reconfiguring GPUs
  1010. NVAPI_DATA_NOT_FOUND = -121, //!< Requested data was not found
  1011. NVAPI_EXPECTED_ANALOG_DISPLAY = -122, //!< Expected an analog display
  1012. NVAPI_NO_VIDLINK = -123, //!< No SLI video bridge is present
  1013. NVAPI_REQUIRES_REBOOT = -124, //!< NVAPI requires a reboot for the settings to take effect
  1014. NVAPI_INVALID_HYBRID_MODE = -125, //!< The function is not supported with the current Hybrid mode.
  1015. NVAPI_MIXED_TARGET_TYPES = -126, //!< The target types are not all the same
  1016. NVAPI_SYSWOW64_NOT_SUPPORTED = -127, //!< The function is not supported from 32-bit on a 64-bit system.
  1017. NVAPI_IMPLICIT_SET_GPU_TOPOLOGY_CHANGE_NOT_ALLOWED = -128, //!< There is no implicit GPU topology active. Use NVAPI_SetHybridMode to change topology.
  1018. NVAPI_REQUEST_USER_TO_CLOSE_NON_MIGRATABLE_APPS = -129, //!< Prompt the user to close all non-migratable applications.
  1019. NVAPI_OUT_OF_MEMORY = -130, //!< Could not allocate sufficient memory to complete the call.
  1020. NVAPI_WAS_STILL_DRAWING = -131, //!< The previous operation that is transferring information to or from this surface is incomplete.
  1021. NVAPI_FILE_NOT_FOUND = -132, //!< The file was not found.
  1022. NVAPI_TOO_MANY_UNIQUE_STATE_OBJECTS = -133, //!< There are too many unique instances of a particular type of state object.
  1023. NVAPI_INVALID_CALL = -134, //!< The method call is invalid. For example, a method's parameter may not be a valid pointer.
  1024. NVAPI_D3D10_1_LIBRARY_NOT_FOUND = -135, //!< d3d10_1.dll cannot be loaded.
  1025. NVAPI_FUNCTION_NOT_FOUND = -136, //!< Couldn't find the function in the loaded DLL.
  1026. NVAPI_INVALID_USER_PRIVILEGE = -137, //!< Current User is not Admin.
  1027. NVAPI_EXPECTED_NON_PRIMARY_DISPLAY_HANDLE = -138, //!< The handle corresponds to GDIPrimary.
  1028. NVAPI_EXPECTED_COMPUTE_GPU_HANDLE = -139, //!< Setting Physx GPU requires that the GPU is compute-capable.
  1029. NVAPI_STEREO_NOT_INITIALIZED = -140, //!< The Stereo part of NVAPI failed to initialize completely. Check if the stereo driver is installed.
  1030. NVAPI_STEREO_REGISTRY_ACCESS_FAILED = -141, //!< Access to stereo-related registry keys or values has failed.
  1031. NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED = -142, //!< The given registry profile type is not supported.
  1032. NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED = -143, //!< The given registry value is not supported.
  1033. NVAPI_STEREO_NOT_ENABLED = -144, //!< Stereo is not enabled and the function needed it to execute completely.
  1034. NVAPI_STEREO_NOT_TURNED_ON = -145, //!< Stereo is not turned on and the function needed it to execute completely.
  1035. NVAPI_STEREO_INVALID_DEVICE_INTERFACE = -146, //!< Invalid device interface.
  1036. NVAPI_STEREO_PARAMETER_OUT_OF_RANGE = -147, //!< Separation percentage or JPEG image capture quality is out of [0-100] range.
  1037. NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED = -148, //!< The given frustum adjust mode is not supported.
  1038. NVAPI_TOPO_NOT_POSSIBLE = -149, //!< The mosaic topology is not possible given the current state of the hardware.
  1039. NVAPI_MODE_CHANGE_FAILED = -150, //!< An attempt to do a display resolution mode change has failed.
  1040. NVAPI_D3D11_LIBRARY_NOT_FOUND = -151, //!< d3d11.dll/d3d11_beta.dll cannot be loaded.
  1041. NVAPI_INVALID_ADDRESS = -152, //!< Address is outside of valid range.
  1042. NVAPI_STRING_TOO_SMALL = -153, //!< The pre-allocated string is too small to hold the result.
  1043. NVAPI_MATCHING_DEVICE_NOT_FOUND = -154, //!< The input does not match any of the available devices.
  1044. NVAPI_DRIVER_RUNNING = -155, //!< Driver is running.
  1045. NVAPI_DRIVER_NOTRUNNING = -156, //!< Driver is not running.
  1046. NVAPI_ERROR_DRIVER_RELOAD_REQUIRED = -157, //!< A driver reload is required to apply these settings.
  1047. NVAPI_SET_NOT_ALLOWED = -158, //!< Intended setting is not allowed.
  1048. NVAPI_ADVANCED_DISPLAY_TOPOLOGY_REQUIRED = -159, //!< Information can't be returned due to "advanced display topology".
  1049. NVAPI_SETTING_NOT_FOUND = -160, //!< Setting is not found.
  1050. NVAPI_SETTING_SIZE_TOO_LARGE = -161, //!< Setting size is too large.
  1051. NVAPI_TOO_MANY_SETTINGS_IN_PROFILE = -162, //!< There are too many settings for a profile.
  1052. NVAPI_PROFILE_NOT_FOUND = -163, //!< Profile is not found.
  1053. NVAPI_PROFILE_NAME_IN_USE = -164, //!< Profile name is duplicated.
  1054. NVAPI_PROFILE_NAME_EMPTY = -165, //!< Profile name is empty.
  1055. NVAPI_EXECUTABLE_NOT_FOUND = -166, //!< Application not found in the Profile.
  1056. NVAPI_EXECUTABLE_ALREADY_IN_USE = -167, //!< Application already exists in the other profile.
  1057. NVAPI_DATATYPE_MISMATCH = -168, //!< Data Type mismatch
  1058. NVAPI_PROFILE_REMOVED = -169, //!< The profile passed as parameter has been removed and is no longer valid.
  1059. NVAPI_UNREGISTERED_RESOURCE = -170, //!< An unregistered resource was passed as a parameter.
  1060. NVAPI_ID_OUT_OF_RANGE = -171, //!< The DisplayId corresponds to a display which is not within the normal outputId range.
  1061. NVAPI_DISPLAYCONFIG_VALIDATION_FAILED = -172, //!< Display topology is not valid so the driver cannot do a mode set on this configuration.
  1062. NVAPI_DPMST_CHANGED = -173, //!< Display Port Multi-Stream topology has been changed.
  1063. NVAPI_INSUFFICIENT_BUFFER = -174, //!< Input buffer is insufficient to hold the contents.
  1064. NVAPI_ACCESS_DENIED = -175, //!< No access to the caller.
  1065. NVAPI_MOSAIC_NOT_ACTIVE = -176, //!< The requested action cannot be performed without Mosaic being enabled.
  1066. NVAPI_SHARE_RESOURCE_RELOCATED = -177, //!< The surface is relocated away from video memory.
  1067. NVAPI_REQUEST_USER_TO_DISABLE_DWM = -178, //!< The user should disable DWM before calling NvAPI.
  1068. NVAPI_D3D_DEVICE_LOST = -179, //!< D3D device status is D3DERR_DEVICELOST or D3DERR_DEVICENOTRESET - the user has to reset the device.
  1069. NVAPI_INVALID_CONFIGURATION = -180, //!< The requested action cannot be performed in the current state.
  1070. NVAPI_STEREO_HANDSHAKE_NOT_DONE = -181, //!< Call failed as stereo handshake not completed.
  1071. NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS = -182, //!< The path provided was too short to determine the correct NVDRS_APPLICATION
  1072. NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED = -183, //!< Default stereo profile is not currently defined
  1073. NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST = -184, //!< Default stereo profile does not exist
  1074. NVAPI_CLUSTER_ALREADY_EXISTS = -185, //!< A cluster is already defined with the given configuration.
  1075. NVAPI_DPMST_DISPLAY_ID_EXPECTED = -186, //!< The input display id is not that of a multi stream enabled connector or a display device in a multi stream topology
  1076. NVAPI_INVALID_DISPLAY_ID = -187, //!< The input display id is not valid or the monitor associated to it does not support the current operation
  1077. NVAPI_STREAM_IS_OUT_OF_SYNC = -188, //!< While playing secure audio stream, stream goes out of sync
  1078. NVAPI_INCOMPATIBLE_AUDIO_DRIVER = -189, //!< Older audio driver version than required
  1079. NVAPI_VALUE_ALREADY_SET = -190, //!< Value already set, setting again not allowed.
  1080. NVAPI_TIMEOUT = -191, //!< Requested operation timed out
  1081. NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE = -192, //!< The requested workstation feature set has incomplete driver internal allocation resources
  1082. NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE = -193, //!< Call failed because InitActivation was not called.
  1083. } NvAPI_Status;
  1084. //! @}
  1085. //! \ingroup nvapistatus
  1086. #define NVAPI_API_NOT_INTIALIZED NVAPI_API_NOT_INITIALIZED //!< Fix typo in error code
  1087. //! \ingroup nvapistatus
  1088. #define NVAPI_INVALID_USER_PRIVILEDGE NVAPI_INVALID_USER_PRIVILEGE //!< Fix typo in error code
  1089. ///////////////////////////////////////////////////////////////////////////////
  1090. //
  1091. // FUNCTION NAME: NvAPI_Initialize
  1092. //
  1093. //! This function initializes the NvAPI library.
  1094. //! This must be called before calling other NvAPI_ functions.
  1095. //!
  1096. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1097. //!
  1098. //!
  1099. //! \since Release: 80
  1100. //!
  1101. //! \retval NVAPI_ERROR An error occurred during the initialization process (generic error)
  1102. //! \retval NVAPI_LIBRARYNOTFOUND Failed to load the NVAPI support library
  1103. //! \retval NVAPI_OK Initialized
  1104. //! \sa nvapistatus
  1105. //! \ingroup nvapifunctions
  1106. ///////////////////////////////////////////////////////////////////////////////
  1107. NVAPI_INTERFACE NvAPI_Initialize();
  1108. ///////////////////////////////////////////////////////////////////////////////
  1109. //
  1110. // FUNCTION NAME: NvAPI_Unload
  1111. //
  1112. //! DESCRIPTION: Unloads NVAPI library. This must be the last function called.
  1113. //!
  1114. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1115. //!
  1116. //!
  1117. //! !! This is not thread safe. In a multithreaded environment, calling NvAPI_Unload !! \n
  1118. //! !! while another thread is executing another NvAPI_XXX function, results in !! \n
  1119. //! !! undefined behaviour and might even cause the application to crash. Developers !! \n
  1120. //! !! must make sure that they are not in any other function before calling NvAPI_Unload. !! \n
  1121. //!
  1122. //!
  1123. //! Unloading NvAPI library is not supported when the library is in a resource locked state.
  1124. //! Some functions in the NvAPI library initiates an operation or allocates certain resources
  1125. //! and there are corresponding functions available, to complete the operation or free the
  1126. //! allocated resources. All such function pairs are designed to prevent unloading NvAPI library.
  1127. //!
  1128. //! For example, if NvAPI_Unload is called after NvAPI_XXX which locks a resource, it fails with
  1129. //! NVAPI_ERROR. Developers need to call the corresponding NvAPI_YYY to unlock the resources,
  1130. //! before calling NvAPI_Unload again.
  1131. //!
  1132. //! \retval ::NVAPI_ERROR One or more resources are locked and hence cannot unload NVAPI library
  1133. //! \retval ::NVAPI_OK NVAPI library unloaded
  1134. //!
  1135. //! \ingroup nvapifunctions
  1136. ///////////////////////////////////////////////////////////////////////////////
  1137. NVAPI_INTERFACE NvAPI_Unload();
  1138. ///////////////////////////////////////////////////////////////////////////////
  1139. //
  1140. // FUNCTION NAME: NvAPI_GetErrorMessage
  1141. //
  1142. //! This function converts an NvAPI error code into a null terminated string.
  1143. //!
  1144. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1145. //!
  1146. //!
  1147. //! \since Release: 80
  1148. //!
  1149. //! \param nr The error code to convert
  1150. //! \param szDesc The string corresponding to the error code
  1151. //!
  1152. //! \return NULL terminated string (always, never NULL)
  1153. //! \ingroup nvapifunctions
  1154. ///////////////////////////////////////////////////////////////////////////////
  1155. NVAPI_INTERFACE NvAPI_GetErrorMessage(NvAPI_Status nr,NvAPI_ShortString szDesc);
  1156. ///////////////////////////////////////////////////////////////////////////////
  1157. //
  1158. // FUNCTION NAME: NvAPI_GetInterfaceVersionString
  1159. //
  1160. //! This function returns a string describing the version of the NvAPI library.
  1161. //! The contents of the string are human readable. Do not assume a fixed
  1162. //! format.
  1163. //!
  1164. //!
  1165. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1166. //!
  1167. //!
  1168. //! \since Release: 80
  1169. //!
  1170. //! \param szDesc User readable string giving NvAPI version information
  1171. //!
  1172. //! \return See \ref nvapistatus for the list of possible return values.
  1173. //! \ingroup nvapifunctions
  1174. ///////////////////////////////////////////////////////////////////////////////
  1175. NVAPI_INTERFACE NvAPI_GetInterfaceVersionString(NvAPI_ShortString szDesc);
  1176. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1177. // All display port related data types definition starts
  1178. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1179. // This category is intentionally added before the #ifdef. The #endif should also be in the same scope
  1180. #ifndef DISPLAYPORT_STRUCTS_DEFINED
  1181. #define DISPLAYPORT_STRUCTS_DEFINED
  1182. //! \ingroup dispcontrol
  1183. //! Used in NV_DISPLAY_PORT_INFO.
  1184. typedef enum
  1185. {
  1186. NV_DP_1_62GBPS = 6,
  1187. NV_DP_2_70GBPS = 0xA,
  1188. } NV_DP_LINK_RATE;
  1189. //! \ingroup dispcontrol
  1190. //! Used in NV_DISPLAY_PORT_INFO.
  1191. typedef enum
  1192. {
  1193. NV_DP_1_LANE = 1,
  1194. NV_DP_2_LANE = 2,
  1195. NV_DP_4_LANE = 4,
  1196. } NV_DP_LANE_COUNT;
  1197. //! \ingroup dispcontrol
  1198. //! Used in NV_DISPLAY_PORT_INFO.
  1199. typedef enum
  1200. {
  1201. NV_DP_COLOR_FORMAT_RGB = 0,
  1202. NV_DP_COLOR_FORMAT_YCbCr422,
  1203. NV_DP_COLOR_FORMAT_YCbCr444,
  1204. } NV_DP_COLOR_FORMAT;
  1205. //! \ingroup dispcontrol
  1206. //! Used in NV_DISPLAY_PORT_INFO.
  1207. typedef enum
  1208. {
  1209. NV_DP_COLORIMETRY_RGB = 0,
  1210. NV_DP_COLORIMETRY_YCbCr_ITU601,
  1211. NV_DP_COLORIMETRY_YCbCr_ITU709,
  1212. } NV_DP_COLORIMETRY;
  1213. //! \ingroup dispcontrol
  1214. //! Used in NV_DISPLAY_PORT_INFO.
  1215. typedef enum
  1216. {
  1217. NV_DP_DYNAMIC_RANGE_VESA = 0,
  1218. NV_DP_DYNAMIC_RANGE_CEA,
  1219. } NV_DP_DYNAMIC_RANGE;
  1220. //! \ingroup dispcontrol
  1221. //! Used in NV_DISPLAY_PORT_INFO.
  1222. typedef enum
  1223. {
  1224. NV_DP_BPC_DEFAULT = 0,
  1225. NV_DP_BPC_6,
  1226. NV_DP_BPC_8,
  1227. NV_DP_BPC_10,
  1228. NV_DP_BPC_12,
  1229. NV_DP_BPC_16,
  1230. } NV_DP_BPC;
  1231. #endif //#ifndef DISPLAYPORT_STRUCTS_DEFINED
  1232. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1233. // All display port related data types definitions end
  1234. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1235. ///////////////////////////////////////////////////////////////////////////////
  1236. //
  1237. // FUNCTION NAME: NvAPI_GPU_GetEDID
  1238. //
  1239. //! \fn NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID)
  1240. //! This function returns the EDID data for the specified GPU handle and connection bit mask.
  1241. //! displayOutputId should have exactly 1 bit set to indicate a single display. See \ref handles.
  1242. //!
  1243. //! SUPPORTED OS: Windows XP and higher
  1244. //!
  1245. //!
  1246. //! \since Release: 85
  1247. //!
  1248. //! \retval NVAPI_INVALID_ARGUMENT pEDID is NULL; displayOutputId has 0 or > 1 bits set
  1249. //! \retval NVAPI_OK *pEDID contains valid data.
  1250. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1251. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1252. //! \retval NVAPI_DATA_NOT_FOUND The requested display does not contain an EDID.
  1253. //
  1254. ///////////////////////////////////////////////////////////////////////////////
  1255. //! \ingroup gpu
  1256. //! @{
  1257. #define NV_EDID_V1_DATA_SIZE 256
  1258. #define NV_EDID_DATA_SIZE NV_EDID_V1_DATA_SIZE
  1259. typedef struct
  1260. {
  1261. NvU32 version; //structure version
  1262. NvU8 EDID_Data[NV_EDID_DATA_SIZE];
  1263. } NV_EDID_V1;
  1264. //! Used in NvAPI_GPU_GetEDID()
  1265. typedef struct
  1266. {
  1267. NvU32 version; //!< Structure version
  1268. NvU8 EDID_Data[NV_EDID_DATA_SIZE];
  1269. NvU32 sizeofEDID;
  1270. } NV_EDID_V2;
  1271. //! Used in NvAPI_GPU_GetEDID()
  1272. typedef struct
  1273. {
  1274. NvU32 version; //!< Structure version
  1275. NvU8 EDID_Data[NV_EDID_DATA_SIZE];
  1276. NvU32 sizeofEDID;
  1277. NvU32 edidId; //!< ID which always returned in a monotonically increasing counter.
  1278. //!< Across a split-EDID read we need to verify that all calls returned the same edidId.
  1279. //!< This counter is incremented if we get the updated EDID.
  1280. NvU32 offset; //!< Which 256-byte page of the EDID we want to read. Start at 0.
  1281. //!< If the read succeeds with edidSize > NV_EDID_DATA_SIZE,
  1282. //!< call back again with offset+256 until we have read the entire buffer
  1283. } NV_EDID_V3;
  1284. typedef NV_EDID_V3 NV_EDID;
  1285. #define NV_EDID_VER1 MAKE_NVAPI_VERSION(NV_EDID_V1,1)
  1286. #define NV_EDID_VER2 MAKE_NVAPI_VERSION(NV_EDID_V2,2)
  1287. #define NV_EDID_VER3 MAKE_NVAPI_VERSION(NV_EDID_V3,3)
  1288. #define NV_EDID_VER NV_EDID_VER3
  1289. //! @}
  1290. //! \ingroup gpu
  1291. NVAPI_INTERFACE NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID);
  1292. //! \ingroup gpu
  1293. //! Used in NV_GPU_CONNECTOR_DATA
  1294. typedef enum _NV_GPU_CONNECTOR_TYPE
  1295. {
  1296. NVAPI_GPU_CONNECTOR_VGA_15_PIN = 0x00000000,
  1297. NVAPI_GPU_CONNECTOR_TV_COMPOSITE = 0x00000010,
  1298. NVAPI_GPU_CONNECTOR_TV_SVIDEO = 0x00000011,
  1299. NVAPI_GPU_CONNECTOR_TV_HDTV_COMPONENT = 0x00000013,
  1300. NVAPI_GPU_CONNECTOR_TV_SCART = 0x00000014,
  1301. NVAPI_GPU_CONNECTOR_TV_COMPOSITE_SCART_ON_EIAJ4120 = 0x00000016,
  1302. NVAPI_GPU_CONNECTOR_TV_HDTV_EIAJ4120 = 0x00000017,
  1303. NVAPI_GPU_CONNECTOR_PC_POD_HDTV_YPRPB = 0x00000018,
  1304. NVAPI_GPU_CONNECTOR_PC_POD_SVIDEO = 0x00000019,
  1305. NVAPI_GPU_CONNECTOR_PC_POD_COMPOSITE = 0x0000001A,
  1306. NVAPI_GPU_CONNECTOR_DVI_I_TV_SVIDEO = 0x00000020,
  1307. NVAPI_GPU_CONNECTOR_DVI_I_TV_COMPOSITE = 0x00000021,
  1308. NVAPI_GPU_CONNECTOR_DVI_I = 0x00000030,
  1309. NVAPI_GPU_CONNECTOR_DVI_D = 0x00000031,
  1310. NVAPI_GPU_CONNECTOR_ADC = 0x00000032,
  1311. NVAPI_GPU_CONNECTOR_LFH_DVI_I_1 = 0x00000038,
  1312. NVAPI_GPU_CONNECTOR_LFH_DVI_I_2 = 0x00000039,
  1313. NVAPI_GPU_CONNECTOR_SPWG = 0x00000040,
  1314. NVAPI_GPU_CONNECTOR_OEM = 0x00000041,
  1315. NVAPI_GPU_CONNECTOR_DISPLAYPORT_EXTERNAL = 0x00000046,
  1316. NVAPI_GPU_CONNECTOR_DISPLAYPORT_INTERNAL = 0x00000047,
  1317. NVAPI_GPU_CONNECTOR_DISPLAYPORT_MINI_EXT = 0x00000048,
  1318. NVAPI_GPU_CONNECTOR_HDMI_A = 0x00000061,
  1319. NVAPI_GPU_CONNECTOR_HDMI_C_MINI = 0x00000063,
  1320. NVAPI_GPU_CONNECTOR_LFH_DISPLAYPORT_1 = 0x00000064,
  1321. NVAPI_GPU_CONNECTOR_LFH_DISPLAYPORT_2 = 0x00000065,
  1322. NVAPI_GPU_CONNECTOR_UNKNOWN = 0xFFFFFFFF,
  1323. } NV_GPU_CONNECTOR_TYPE;
  1324. ////////////////////////////////////////////////////////////////////////////////
  1325. //
  1326. // NvAPI_TVOutput Information
  1327. //
  1328. ///////////////////////////////////////////////////////////////////////////////
  1329. //! \ingroup tvapi
  1330. //! Used in NV_DISPLAY_TV_OUTPUT_INFO
  1331. typedef enum _NV_DISPLAY_TV_FORMAT
  1332. {
  1333. NV_DISPLAY_TV_FORMAT_NONE = 0,
  1334. NV_DISPLAY_TV_FORMAT_SD_NTSCM = 0x00000001,
  1335. NV_DISPLAY_TV_FORMAT_SD_NTSCJ = 0x00000002,
  1336. NV_DISPLAY_TV_FORMAT_SD_PALM = 0x00000004,
  1337. NV_DISPLAY_TV_FORMAT_SD_PALBDGH = 0x00000008,
  1338. NV_DISPLAY_TV_FORMAT_SD_PALN = 0x00000010,
  1339. NV_DISPLAY_TV_FORMAT_SD_PALNC = 0x00000020,
  1340. NV_DISPLAY_TV_FORMAT_SD_576i = 0x00000100,
  1341. NV_DISPLAY_TV_FORMAT_SD_480i = 0x00000200,
  1342. NV_DISPLAY_TV_FORMAT_ED_480p = 0x00000400,
  1343. NV_DISPLAY_TV_FORMAT_ED_576p = 0x00000800,
  1344. NV_DISPLAY_TV_FORMAT_HD_720p = 0x00001000,
  1345. NV_DISPLAY_TV_FORMAT_HD_1080i = 0x00002000,
  1346. NV_DISPLAY_TV_FORMAT_HD_1080p = 0x00004000,
  1347. NV_DISPLAY_TV_FORMAT_HD_720p50 = 0x00008000,
  1348. NV_DISPLAY_TV_FORMAT_HD_1080p24 = 0x00010000,
  1349. NV_DISPLAY_TV_FORMAT_HD_1080i50 = 0x00020000,
  1350. NV_DISPLAY_TV_FORMAT_HD_1080p50 = 0x00040000,
  1351. NV_DISPLAY_TV_FORMAT_SD_OTHER = 0x01000000,
  1352. NV_DISPLAY_TV_FORMAT_ED_OTHER = 0x02000000,
  1353. NV_DISPLAY_TV_FORMAT_HD_OTHER = 0x04000000,
  1354. NV_DISPLAY_TV_FORMAT_ANY = 0x80000000,
  1355. } NV_DISPLAY_TV_FORMAT;
  1356. //! \ingroup dispcontrol
  1357. //! @{
  1358. #define NVAPI_MAX_VIEW_TARGET 2
  1359. #define NVAPI_ADVANCED_MAX_VIEW_TARGET 4
  1360. #ifndef _NV_TARGET_VIEW_MODE_
  1361. #define _NV_TARGET_VIEW_MODE_
  1362. //! Used in NvAPI_SetView().
  1363. typedef enum _NV_TARGET_VIEW_MODE
  1364. {
  1365. NV_VIEW_MODE_STANDARD = 0,
  1366. NV_VIEW_MODE_CLONE = 1,
  1367. NV_VIEW_MODE_HSPAN = 2,
  1368. NV_VIEW_MODE_VSPAN = 3,
  1369. NV_VIEW_MODE_DUALVIEW = 4,
  1370. NV_VIEW_MODE_MULTIVIEW = 5,
  1371. } NV_TARGET_VIEW_MODE;
  1372. #endif
  1373. //! @}
  1374. // Following definitions are used in NvAPI_SetViewEx.
  1375. //! Scaling modes - used in NvAPI_SetViewEx().
  1376. //! \ingroup dispcontrol
  1377. typedef enum _NV_SCALING
  1378. {
  1379. NV_SCALING_DEFAULT = 0, //!< No change
  1380. // New Scaling Declarations
  1381. NV_SCALING_GPU_SCALING_TO_CLOSEST = 1, //!< Balanced - Full Screen
  1382. NV_SCALING_GPU_SCALING_TO_NATIVE = 2, //!< Force GPU - Full Screen
  1383. NV_SCALING_GPU_SCANOUT_TO_NATIVE = 3, //!< Force GPU - Centered\No Scaling
  1384. NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_NATIVE = 5, //!< Force GPU - Aspect Ratio
  1385. NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_CLOSEST = 6, //!< Balanced - Aspect Ratio
  1386. NV_SCALING_GPU_SCANOUT_TO_CLOSEST = 7, //!< Balanced - Centered\No Scaling
  1387. // Legacy Declarations
  1388. NV_SCALING_MONITOR_SCALING = NV_SCALING_GPU_SCALING_TO_CLOSEST,
  1389. NV_SCALING_ADAPTER_SCALING = NV_SCALING_GPU_SCALING_TO_NATIVE,
  1390. NV_SCALING_CENTERED = NV_SCALING_GPU_SCANOUT_TO_NATIVE,
  1391. NV_SCALING_ASPECT_SCALING = NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_NATIVE,
  1392. NV_SCALING_CUSTOMIZED = 255 //!< For future use
  1393. } NV_SCALING;
  1394. //! Rotate modes- used in NvAPI_SetViewEx().
  1395. //! \ingroup dispcontrol
  1396. typedef enum _NV_ROTATE
  1397. {
  1398. NV_ROTATE_0 = 0,
  1399. NV_ROTATE_90 = 1,
  1400. NV_ROTATE_180 = 2,
  1401. NV_ROTATE_270 = 3,
  1402. NV_ROTATE_IGNORED = 4,
  1403. } NV_ROTATE;
  1404. //! Color formats- used in NvAPI_SetViewEx().
  1405. //! \ingroup dispcontrol
  1406. #define NVFORMAT_MAKEFOURCC(ch0, ch1, ch2, ch3) \
  1407. ((NvU32)(NvU8)(ch0) | ((NvU32)(NvU8)(ch1) << 8) | \
  1408. ((NvU32)(NvU8)(ch2) << 16) | ((NvU32)(NvU8)(ch3) << 24 ))
  1409. //! Color formats- used in NvAPI_SetViewEx().
  1410. //! \ingroup dispcontrol
  1411. typedef enum _NV_FORMAT
  1412. {
  1413. NV_FORMAT_UNKNOWN = 0, //!< unknown. Driver will choose one as following value.
  1414. NV_FORMAT_P8 = 41, //!< for 8bpp mode
  1415. NV_FORMAT_R5G6B5 = 23, //!< for 16bpp mode
  1416. NV_FORMAT_A8R8G8B8 = 21, //!< for 32bpp mode
  1417. NV_FORMAT_A16B16G16R16F = 113, //!< for 64bpp(floating point) mode.
  1418. } NV_FORMAT;
  1419. // TV standard
  1420. typedef enum _NV_TIMING_OVERRIDE
  1421. {
  1422. NV_TIMING_OVERRIDE_CURRENT = 0, //!< get the current timing
  1423. NV_TIMING_OVERRIDE_AUTO, //!< the timing the driver will use based the current policy
  1424. NV_TIMING_OVERRIDE_EDID, //!< EDID timing
  1425. NV_TIMING_OVERRIDE_DMT, //!< VESA DMT timing
  1426. NV_TIMING_OVERRIDE_DMT_RB, //!< VESA DMT timing with reduced blanking
  1427. NV_TIMING_OVERRIDE_CVT, //!< VESA CVT timing
  1428. NV_TIMING_OVERRIDE_CVT_RB, //!< VESA CVT timing with reduced blanking
  1429. NV_TIMING_OVERRIDE_GTF, //!< VESA GTF timing
  1430. NV_TIMING_OVERRIDE_EIA861, //!< EIA 861x pre-defined timing
  1431. NV_TIMING_OVERRIDE_ANALOG_TV, //!< analog SD/HDTV timing
  1432. NV_TIMING_OVERRIDE_CUST, //!< NV custom timings
  1433. NV_TIMING_OVERRIDE_NV_PREDEFINED, //!< NV pre-defined timing (basically the PsF timings)
  1434. NV_TIMING_OVERRIDE_NV_PSF = NV_TIMING_OVERRIDE_NV_PREDEFINED,
  1435. NV_TIMING_OVERRIDE_NV_ASPR,
  1436. NV_TIMING_OVERRIDE_SDI, //!< Override for SDI timing
  1437. NV_TIMING_OVRRIDE_MAX,
  1438. }NV_TIMING_OVERRIDE;
  1439. #ifndef NV_TIMING_STRUCTS_DEFINED
  1440. #define NV_TIMING_STRUCTS_DEFINED
  1441. //***********************
  1442. // The Timing Structure
  1443. //***********************
  1444. //
  1445. //! \ingroup dispcontrol
  1446. //! NVIDIA-specific timing extras \n
  1447. //! Used in NV_TIMING.
  1448. typedef struct tagNV_TIMINGEXT
  1449. {
  1450. NvU32 flag; //!< Reserved for NVIDIA hardware-based enhancement, such as double-scan.
  1451. NvU16 rr; //!< Logical refresh rate to present
  1452. NvU32 rrx1k; //!< Physical vertical refresh rate in 0.001Hz
  1453. NvU32 aspect; //!< Display aspect ratio Hi(aspect):horizontal-aspect, Low(aspect):vertical-aspect
  1454. NvU16 rep; //!< Bit-wise pixel repetition factor: 0x1:no pixel repetition; 0x2:each pixel repeats twice horizontally,..
  1455. NvU32 status; //!< Timing standard
  1456. NvU8 name[40]; //!< Timing name
  1457. }NV_TIMINGEXT;
  1458. //! \ingroup dispcontrol
  1459. //!The very basic timing structure based on the VESA standard:
  1460. //! \code
  1461. //! |<----------------------------htotal--------------------------->|
  1462. //! ---------"active" video-------->|<-------blanking------>|<-----
  1463. //! |<-------hvisible-------->|<-hb->|<-hfp->|<-hsw->|<-hbp->|<-hb->|
  1464. //! --------- -+-------------------------+ | | | | |
  1465. //! A A | | | | | | |
  1466. //! : : | | | | | | |
  1467. //! : : | | | | | | |
  1468. //! :vertical| addressable video | | | | | |
  1469. //! : visible| | | | | | |
  1470. //! : : | | | | | | |
  1471. //! : : | | | | | | |
  1472. //! vertical V | | | | | | |
  1473. //! total --+-------------------------+ | | | | |
  1474. //! : vb border | | | | |
  1475. //! : -----------------------------------+ | | | |
  1476. //! : vfp front porch | | | |
  1477. //! : -------------------------------------------+ | | |
  1478. //! : vsw sync width | | |
  1479. //! : ---------------------------------------------------+ | |
  1480. //! : vbp back porch | |
  1481. //! : -----------------------------------------------------------+ |
  1482. //! V vb border |
  1483. //! ---------------------------------------------------------------------------+
  1484. //! \endcode
  1485. typedef struct tagNV_TIMING
  1486. {
  1487. // VESA scan out timing parameters:
  1488. NvU16 HVisible; //!< horizontal visible
  1489. NvU16 HBorder; //!< horizontal border
  1490. NvU16 HFrontPorch; //!< horizontal front porch
  1491. NvU16 HSyncWidth; //!< horizontal sync width
  1492. NvU16 HTotal; //!< horizontal total
  1493. NvU8 HSyncPol; //!< horizontal sync polarity: 1-negative, 0-positive
  1494. NvU16 VVisible; //!< vertical visible
  1495. NvU16 VBorder; //!< vertical border
  1496. NvU16 VFrontPorch; //!< vertical front porch
  1497. NvU16 VSyncWidth; //!< vertical sync width
  1498. NvU16 VTotal; //!< vertical total
  1499. NvU8 VSyncPol; //!< vertical sync polarity: 1-negative, 0-positive
  1500. NvU16 interlaced; //!< 1-interlaced, 0-progressive
  1501. NvU32 pclk; //!< pixel clock in 10KHz
  1502. //other timing related extras
  1503. NV_TIMINGEXT etc;
  1504. }NV_TIMING;
  1505. #endif //NV_TIMING_STRUCTS_DEFINED
  1506. ///////////////////////////////////////////////////////////////////////////////
  1507. //
  1508. // FUNCTION NAME: NvAPI_SetView
  1509. //
  1510. //! \fn NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView)
  1511. //! This function lets the caller modify the target display arrangement of the selected source display handle in any nView mode.
  1512. //! It can also modify or extend the source display in Dualview mode.
  1513. //! \note Maps the selected source to the associated target Ids.
  1514. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs cannot be enabled with this API.
  1515. //!
  1516. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.
  1517. //! SUPPORTED OS: Windows Vista and higher
  1518. //!
  1519. //!
  1520. //! \since Release: 90
  1521. //!
  1522. //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle().
  1523. //! \param [in] pTargetInfo Pointer to array of NV_VIEW_TARGET_INFO, specifying device properties in this view.
  1524. //! The first device entry in the array is the physical primary.
  1525. //! The device entry with the lowest source id is the desktop primary.
  1526. //! \param [in] targetCount Count of target devices specified in pTargetInfo.
  1527. //! \param [in] targetView Target view selected from NV_TARGET_VIEW_MODE.
  1528. //!
  1529. //! \retval NVAPI_OK Completed request
  1530. //! \retval NVAPI_ERROR Miscellaneous error occurred
  1531. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  1532. //
  1533. ///////////////////////////////////////////////////////////////////////////////
  1534. //! \ingroup dispcontrol
  1535. //! Used in NvAPI_SetView() and NvAPI_GetView()
  1536. typedef struct
  1537. {
  1538. NvU32 version; //!< (IN) structure version
  1539. NvU32 count; //!< (IN) target count
  1540. struct
  1541. {
  1542. NvU32 deviceMask; //!< (IN/OUT) Device mask
  1543. NvU32 sourceId; //!< (IN/OUT) Source ID - values will be based on the number of heads exposed per GPU.
  1544. NvU32 bPrimary:1; //!< (OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary.
  1545. //!< NvAPI_SetView automatically selects the first target in NV_VIEW_TARGET_INFO index 0 as the GPU's primary view.
  1546. NvU32 bInterlaced:1; //!< (IN/OUT) Indicates if the timing being used on this monitor is interlaced.
  1547. NvU32 bGDIPrimary:1; //!< (IN/OUT) Indicates if this is the desktop GDI primary.
  1548. NvU32 bForceModeSet:1;//!< (IN) Used only on Win7 and higher during a call to NvAPI_SetView(). Turns off optimization & forces OS to set supplied mode.
  1549. } target[NVAPI_MAX_VIEW_TARGET];
  1550. } NV_VIEW_TARGET_INFO;
  1551. //! \ingroup dispcontrol
  1552. #define NV_VIEW_TARGET_INFO_VER MAKE_NVAPI_VERSION(NV_VIEW_TARGET_INFO,2)
  1553. //! \ingroup dispcontrol
  1554. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.")
  1555. NVAPI_INTERFACE NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView);
  1556. ///////////////////////////////////////////////////////////////////////////////
  1557. //
  1558. // FUNCTION NAME: NvAPI_SetViewEx
  1559. //
  1560. //! \fn NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView)
  1561. //! This function lets caller to modify the display arrangement for selected source display handle in any of the nview modes.
  1562. //! It also allows to modify or extend the source display in dualview mode.
  1563. //! \note Maps the selected source to the associated target Ids.
  1564. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs cannot be enabled with this API.
  1565. //!
  1566. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.
  1567. //! SUPPORTED OS: Windows Vista and higher
  1568. //!
  1569. //!
  1570. //! \since Release: 95
  1571. //!
  1572. //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with
  1573. //! NvAPI_EnumNVidiaDisplayHandle().
  1574. //! \param [in] pPathInfo Pointer to array of NV_VIEW_PATH_INFO, specifying device properties in this view.
  1575. //! The first device entry in the array is the physical primary.
  1576. //! The device entry with the lowest source id is the desktop primary.
  1577. //! \param [in] pathCount Count of paths specified in pPathInfo.
  1578. //! \param [in] displayView Display view selected from NV_TARGET_VIEW_MODE.
  1579. //!
  1580. //! \retval NVAPI_OK Completed request
  1581. //! \retval NVAPI_ERROR Miscellaneous error occurred
  1582. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  1583. //
  1584. ///////////////////////////////////////////////////////////////////////////////
  1585. //! \ingroup dispcontrol
  1586. #define NVAPI_MAX_DISPLAY_PATH NVAPI_MAX_VIEW_TARGET
  1587. //! \ingroup dispcontrol
  1588. #define NVAPI_ADVANCED_MAX_DISPLAY_PATH NVAPI_ADVANCED_MAX_VIEW_TARGET
  1589. //! \ingroup dispcontrol
  1590. //! Used in NV_DISPLAY_PATH_INFO.
  1591. typedef struct
  1592. {
  1593. NvU32 deviceMask; //!< (IN) Device mask
  1594. NvU32 sourceId; //!< (IN) Values will be based on the number of heads exposed per GPU(0, 1?)
  1595. NvU32 bPrimary:1; //!< (IN/OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary.
  1596. //!< NvAPI_SetViewEx() automatically selects the first target in NV_DISPLAY_PATH_INFO index 0 as the GPU's primary view.
  1597. NV_GPU_CONNECTOR_TYPE connector; //!< (IN) Specify connector type. For TV only.
  1598. // source mode information
  1599. NvU32 width; //!< (IN) Width of the mode
  1600. NvU32 height; //!< (IN) Height of the mode
  1601. NvU32 depth; //!< (IN) Depth of the mode
  1602. NV_FORMAT colorFormat; //!< Color format if it needs to be specified. Not used now.
  1603. //rotation setting of the mode
  1604. NV_ROTATE rotation; //!< (IN) Rotation setting.
  1605. // the scaling mode
  1606. NV_SCALING scaling; //!< (IN) Scaling setting
  1607. // Timing info
  1608. NvU32 refreshRate; //!< (IN) Refresh rate of the mode
  1609. NvU32 interlaced:1; //!< (IN) Interlaced mode flag
  1610. NV_DISPLAY_TV_FORMAT tvFormat; //!< (IN) To choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE
  1611. // Windows desktop position
  1612. NvU32 posx; //!< (IN/OUT) X-offset of this display on the Windows desktop
  1613. NvU32 posy; //!< (IN/OUT) Y-offset of this display on the Windows desktop
  1614. NvU32 bGDIPrimary:1; //!< (IN/OUT) Indicates if this is the desktop GDI primary.
  1615. NvU32 bForceModeSet:1;//!< (IN) Used only on Win7 and higher during a call to NvAPI_SetViewEx(). Turns off optimization & forces OS to set supplied mode.
  1616. NvU32 bFocusDisplay:1;//!< (IN) If set, this display path should have the focus after the GPU topology change
  1617. NvU32 gpuId:24; //!< (IN) the physical display/target Gpu id which is the owner of the scan out (for SLI multimon, display from the slave Gpu)
  1618. } NV_DISPLAY_PATH;
  1619. //! \ingroup dispcontrol
  1620. //! Used in NvAPI_SetViewEx() and NvAPI_GetViewEx().
  1621. typedef struct
  1622. {
  1623. NvU32 version; //!< (IN) Structure version
  1624. NvU32 count; //!< (IN) Path count
  1625. NV_DISPLAY_PATH path[NVAPI_MAX_DISPLAY_PATH];
  1626. } NV_DISPLAY_PATH_INFO_V3;
  1627. //! \ingroup dispcontrol
  1628. //! Used in NvAPI_SetViewEx() and NvAPI_GetViewEx().
  1629. typedef struct
  1630. {
  1631. NvU32 version; //!< (IN) Structure version
  1632. NvU32 count; //!< (IN) Path count
  1633. NV_DISPLAY_PATH path[NVAPI_ADVANCED_MAX_DISPLAY_PATH];
  1634. } NV_DISPLAY_PATH_INFO;
  1635. //! \addtogroup dispcontrol
  1636. //! Macro for constructing the version fields of NV_DISPLAY_PATH_INFO
  1637. //! @{
  1638. #define NV_DISPLAY_PATH_INFO_VER NV_DISPLAY_PATH_INFO_VER4
  1639. #define NV_DISPLAY_PATH_INFO_VER4 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,4)
  1640. #define NV_DISPLAY_PATH_INFO_VER3 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,3)
  1641. #define NV_DISPLAY_PATH_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,2)
  1642. #define NV_DISPLAY_PATH_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,1)
  1643. //! @}
  1644. //! \ingroup dispcontrol
  1645. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.")
  1646. NVAPI_INTERFACE NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView);
  1647. ///////////////////////////////////////////////////////////////////////////////
  1648. // SetDisplayConfig/GetDisplayConfig
  1649. ///////////////////////////////////////////////////////////////////////////////
  1650. //! \ingroup dispcontrol
  1651. typedef struct _NV_POSITION
  1652. {
  1653. NvS32 x;
  1654. NvS32 y;
  1655. } NV_POSITION;
  1656. //! \ingroup dispcontrol
  1657. typedef struct _NV_RESOLUTION
  1658. {
  1659. NvU32 width;
  1660. NvU32 height;
  1661. NvU32 colorDepth;
  1662. } NV_RESOLUTION;
  1663. //! \ingroup dispcontrol
  1664. typedef struct _NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1
  1665. {
  1666. NvU32 version;
  1667. // Rotation and Scaling
  1668. NV_ROTATE rotation; //!< (IN) rotation setting.
  1669. NV_SCALING scaling; //!< (IN) scaling setting.
  1670. // Refresh Rate
  1671. NvU32 refreshRate1K; //!< (IN) Non-interlaced Refresh Rate of the mode, multiplied by 1000, 0 = ignored
  1672. //!< This is the value which driver reports to the OS.
  1673. // Flags
  1674. NvU32 interlaced:1; //!< (IN) Interlaced mode flag, ignored if refreshRate == 0
  1675. NvU32 primary:1; //!< (IN) Declares primary display in clone configuration. This is *NOT* GDI Primary.
  1676. //!< Only one target can be primary per source. If no primary is specified, the first
  1677. //!< target will automatically be primary.
  1678. #ifdef NV_PAN_AND_SCAN_DEFINED
  1679. NvU32 isPanAndScanTarget:1; //!< Whether on this target Pan and Scan is enabled or has to be enabled. Valid only
  1680. //!< when the target is part of clone topology.
  1681. NvU32 reserved:29;
  1682. #else
  1683. NvU32 reserved:30;
  1684. #endif
  1685. // TV format information
  1686. NV_GPU_CONNECTOR_TYPE connector; //!< Specify connector type. For TV only, ignored if tvFormat == NV_DISPLAY_TV_FORMAT_NONE
  1687. NV_DISPLAY_TV_FORMAT tvFormat; //!< (IN) to choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE
  1688. // Backend (raster) timing standard
  1689. NV_TIMING_OVERRIDE timingOverride; //!< Ignored if timingOverride == NV_TIMING_OVERRIDE_CURRENT
  1690. NV_TIMING timing; //!< Scan out timing, valid only if timingOverride == NV_TIMING_OVERRIDE_CUST
  1691. //!< The value NV_TIMING::NV_TIMINGEXT::rrx1k is obtained from the EDID. The driver may
  1692. //!< tweak this value for HDTV, stereo, etc., before reporting it to the OS.
  1693. } NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1;
  1694. //! \ingroup dispcontrol
  1695. typedef NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1 NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO;
  1696. //! \ingroup dispcontrol
  1697. #define NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1,1)
  1698. //! \ingroup dispcontrol
  1699. #define NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER1
  1700. //! \ingroup dispcontrol
  1701. typedef struct _NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1
  1702. {
  1703. NvU32 displayId; //!< Display ID
  1704. NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO* details; //!< May be NULL if no advanced settings are required. NULL for Non-NVIDIA Display.
  1705. } NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1;
  1706. //! \ingroup dispcontrol
  1707. typedef struct _NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2
  1708. {
  1709. NvU32 displayId; //!< Display ID
  1710. NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO* details; //!< May be NULL if no advanced settings are required
  1711. NvU32 targetId; //!< Windows CCD target ID. Must be present only for non-NVIDIA adapter, for NVIDIA adapter this parameter is ignored.
  1712. } NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2;
  1713. //! \ingroup dispcontrol
  1714. //! As version is not defined for this structure we will be using version of NV_DISPLAYCONFIG_PATH_INFO
  1715. typedef NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2 NV_DISPLAYCONFIG_PATH_TARGET_INFO;
  1716. //! \ingroup dispcontrol
  1717. typedef enum _NV_DISPLAYCONFIG_SPANNING_ORIENTATION
  1718. {
  1719. NV_DISPLAYCONFIG_SPAN_NONE = 0,
  1720. NV_DISPLAYCONFIG_SPAN_HORIZONTAL = 1,
  1721. NV_DISPLAYCONFIG_SPAN_VERTICAL = 2,
  1722. } NV_DISPLAYCONFIG_SPANNING_ORIENTATION;
  1723. //! \ingroup dispcontrol
  1724. typedef struct _NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1
  1725. {
  1726. NV_RESOLUTION resolution;
  1727. NV_FORMAT colorFormat; //!< Ignored at present, must be NV_FORMAT_UNKNOWN (0)
  1728. NV_POSITION position; //!< Is all positions are 0 or invalid, displays will be automatically
  1729. //!< positioned from left to right with GDI Primary at 0,0, and all
  1730. //!< other displays in the order of the path array.
  1731. NV_DISPLAYCONFIG_SPANNING_ORIENTATION spanningOrientation; //!< Spanning is only supported on XP
  1732. NvU32 bGDIPrimary : 1;
  1733. NvU32 bSLIFocus : 1;
  1734. NvU32 reserved : 30; //!< Must be 0
  1735. } NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1;
  1736. //! \ingroup dispcontrol
  1737. //! As version is not defined for this structure we will be using version of NV_DISPLAYCONFIG_PATH_INFO
  1738. typedef NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1 NV_DISPLAYCONFIG_SOURCE_MODE_INFO;
  1739. //! \ingroup dispcontrol
  1740. typedef struct _NV_DISPLAYCONFIG_PATH_INFO_V1
  1741. {
  1742. NvU32 version;
  1743. NvU32 reserved_sourceId; //!< This field is reserved. There is ongoing debate if we need this field.
  1744. //!< Identifies sourceIds used by Windows. If all sourceIds are 0,
  1745. //!< these will be computed automatically.
  1746. NvU32 targetInfoCount; //!< Number of elements in targetInfo array
  1747. NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1* targetInfo;
  1748. NV_DISPLAYCONFIG_SOURCE_MODE_INFO* sourceModeInfo; //!< May be NULL if mode info is not important
  1749. } NV_DISPLAYCONFIG_PATH_INFO_V1;
  1750. //! \ingroup dispcontrol
  1751. //! This define is temporary and must be removed once DVS failure is fixed.
  1752. #define _NV_DISPLAYCONFIG_PATH_INFO_V2 _NV_DISPLAYCONFIG_PATH_INFO
  1753. //! \ingroup dispcontrol
  1754. typedef struct _NV_DISPLAYCONFIG_PATH_INFO_V2
  1755. {
  1756. NvU32 version;
  1757. union {
  1758. NvU32 sourceId; //!< Identifies sourceId used by Windows CCD. This can be optionally set.
  1759. NvU32 reserved_sourceId; //!< Only for compatibility
  1760. };
  1761. NvU32 targetInfoCount; //!< Number of elements in targetInfo array
  1762. NV_DISPLAYCONFIG_PATH_TARGET_INFO* targetInfo;
  1763. NV_DISPLAYCONFIG_SOURCE_MODE_INFO* sourceModeInfo; //!< May be NULL if mode info is not important
  1764. NvU32 IsNonNVIDIAAdapter : 1; //!< True for non-NVIDIA adapter.
  1765. NvU32 reserved : 31; //!< Must be 0
  1766. void *pOSAdapterID; //!< Used by Non-NVIDIA adapter for pointer to OS Adapter of LUID
  1767. //!< type, type casted to void *.
  1768. } NV_DISPLAYCONFIG_PATH_INFO_V2;
  1769. //! \ingroup dispcontrol
  1770. typedef NV_DISPLAYCONFIG_PATH_INFO_V2 NV_DISPLAYCONFIG_PATH_INFO;
  1771. //! \ingroup dispcontrol
  1772. #define NV_DISPLAYCONFIG_PATH_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_INFO_V1,1)
  1773. //! \ingroup dispcontrol
  1774. #define NV_DISPLAYCONFIG_PATH_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_INFO_V2,2)
  1775. //! \ingroup dispcontrol
  1776. #define NV_DISPLAYCONFIG_PATH_INFO_VER NV_DISPLAYCONFIG_PATH_INFO_VER2
  1777. //! \ingroup dispcontrol
  1778. typedef enum _NV_DISPLAYCONFIG_FLAGS
  1779. {
  1780. NV_DISPLAYCONFIG_VALIDATE_ONLY = 0x00000001,
  1781. NV_DISPLAYCONFIG_SAVE_TO_PERSISTENCE = 0x00000002,
  1782. NV_DISPLAYCONFIG_DRIVER_RELOAD_ALLOWED = 0x00000004, //!< Driver reload is permitted if necessary
  1783. NV_DISPLAYCONFIG_FORCE_MODE_ENUMERATION = 0x00000008, //!< Refresh OS mode list.
  1784. } NV_DISPLAYCONFIG_FLAGS;
  1785. ///////////////////////////////////////////////////////////////////////////////
  1786. // FUNCTION NAME: NvAPI_DISP_GetDisplayConfig
  1787. //
  1788. //! DESCRIPTION: This API lets caller retrieve the current global display
  1789. //! configuration. \n
  1790. //! USAGE: The caller might have to call this three times to fetch all the required configuration details as follows: \n
  1791. //! First Pass: Caller should Call NvAPI_DISP_GetDisplayConfig() with pathInfo set to NULL to fetch pathInfoCount. \n
  1792. //! Second Pass: Allocate memory for pathInfo with respect to the number of pathInfoCount(from First Pass) to fetch //! //! targetInfoCount. If sourceModeInfo is needed allocate memory or it can be initialized to NULL. \n
  1793. //! Third Pass(Optional, only required if target information is required): Allocate memory for targetInfo with respect
  1794. //! to number of targetInfoCount(from Second Pass).
  1795. //! SUPPORTED OS: Windows Vista and higher
  1796. //!
  1797. //!
  1798. //! \param [in,out] pathInfoCount Number of elements in pathInfo array, returns number of valid topologies, this cannot be null.
  1799. //! \param [in,out] pathInfo Array of path information
  1800. //!
  1801. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  1802. //! specific meaning for this API, they are listed below.
  1803. //!
  1804. //! \retval NVAPI_INVALID_ARGUMENT - Invalid input parameter. Following can be the reason for this return value:
  1805. //! -# pathInfoCount is NULL.
  1806. //! -# *pathInfoCount is 0 and pathInfo is not NULL.
  1807. //! -# *pathInfoCount is not 0 and pathInfo is NULL.
  1808. //!
  1809. //! \ingroup dispcontrol
  1810. ///////////////////////////////////////////////////////////////////////////////
  1811. NVAPI_INTERFACE NvAPI_DISP_GetDisplayConfig(__inout NvU32 *pathInfoCount, __out_ecount_full_opt(*pathInfoCount) NV_DISPLAYCONFIG_PATH_INFO *pathInfo);
  1812. //! \addtogroup drsapi
  1813. //! @{
  1814. // GPU Profile APIs
  1815. #define NVAPI_UNICODE_STRING_MAX 2048
  1816. #define NVAPI_BINARY_DATA_MAX 4096
  1817. #define NVAPI_SETTING_MAX_VALUES 100
  1818. NV_DECLARE_HANDLE(NvDRSSessionHandle);
  1819. NV_DECLARE_HANDLE(NvDRSProfileHandle);
  1820. #define NVAPI_DRS_GLOBAL_PROFILE ((NvDRSProfileHandle) -1)
  1821. typedef NvU16 NvAPI_UnicodeString[NVAPI_UNICODE_STRING_MAX];
  1822. typedef enum _NVDRS_SETTING_TYPE
  1823. {
  1824. NVDRS_DWORD_TYPE,
  1825. NVDRS_BINARY_TYPE,
  1826. NVDRS_STRING_TYPE,
  1827. NVDRS_WSTRING_TYPE
  1828. } NVDRS_SETTING_TYPE;
  1829. typedef enum _NVDRS_SETTING_LOCATION
  1830. {
  1831. NVDRS_CURRENT_PROFILE_LOCATION,
  1832. NVDRS_GLOBAL_PROFILE_LOCATION,
  1833. NVDRS_BASE_PROFILE_LOCATION
  1834. } NVDRS_SETTING_LOCATION;
  1835. typedef struct _NVDRS_GPU_SUPPORT
  1836. {
  1837. NvU32 geforce : 1;
  1838. NvU32 quadro : 1;
  1839. NvU32 nvs : 1;
  1840. NvU32 reserved4 : 1;
  1841. NvU32 reserved5 : 1;
  1842. NvU32 reserved6 : 1;
  1843. NvU32 reserved7 : 1;
  1844. NvU32 reserved8 : 1;
  1845. NvU32 reserved9 : 1;
  1846. NvU32 reserved10 : 1;
  1847. NvU32 reserved11 : 1;
  1848. NvU32 reserved12 : 1;
  1849. NvU32 reserved13 : 1;
  1850. NvU32 reserved14 : 1;
  1851. NvU32 reserved15 : 1;
  1852. NvU32 reserved16 : 1;
  1853. NvU32 reserved17 : 1;
  1854. NvU32 reserved18 : 1;
  1855. NvU32 reserved19 : 1;
  1856. NvU32 reserved20 : 1;
  1857. NvU32 reserved21 : 1;
  1858. NvU32 reserved22 : 1;
  1859. NvU32 reserved23 : 1;
  1860. NvU32 reserved24 : 1;
  1861. NvU32 reserved25 : 1;
  1862. NvU32 reserved26 : 1;
  1863. NvU32 reserved27 : 1;
  1864. NvU32 reserved28 : 1;
  1865. NvU32 reserved29 : 1;
  1866. NvU32 reserved30 : 1;
  1867. NvU32 reserved31 : 1;
  1868. NvU32 reserved32 : 1;
  1869. } NVDRS_GPU_SUPPORT;
  1870. //! Enum to decide on the datatype of setting value.
  1871. typedef struct _NVDRS_BINARY_SETTING
  1872. {
  1873. NvU32 valueLength; //!< valueLength should always be in number of bytes.
  1874. NvU8 valueData[NVAPI_BINARY_DATA_MAX];
  1875. } NVDRS_BINARY_SETTING;
  1876. typedef struct _NVDRS_SETTING_VALUES
  1877. {
  1878. NvU32 version; //!< Structure Version
  1879. NvU32 numSettingValues; //!< Total number of values available in a setting.
  1880. NVDRS_SETTING_TYPE settingType; //!< Type of setting value.
  1881. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
  1882. {
  1883. NvU32 u32DefaultValue; //!< Accessing default DWORD value of this setting.
  1884. NVDRS_BINARY_SETTING binaryDefaultValue; //!< Accessing default Binary value of this setting.
  1885. //!< Must be allocated by caller with valueLength specifying buffer size, or only valueLength will be filled in.
  1886. NvAPI_UnicodeString wszDefaultValue; //!< Accessing default unicode string value of this setting.
  1887. };
  1888. union //!< Setting values can be of either DWORD, Binary values or String type,
  1889. { //!< NOT mixed types.
  1890. NvU32 u32Value; //!< All possible DWORD values for a setting
  1891. NVDRS_BINARY_SETTING binaryValue; //!< All possible Binary values for a setting
  1892. NvAPI_UnicodeString wszValue; //!< Accessing current unicode string value of this setting.
  1893. }settingValues[NVAPI_SETTING_MAX_VALUES];
  1894. } NVDRS_SETTING_VALUES;
  1895. //! Macro for constructing the version field of ::_NVDRS_SETTING_VALUES
  1896. #define NVDRS_SETTING_VALUES_VER MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1)
  1897. typedef struct _NVDRS_SETTING
  1898. {
  1899. NvU32 version; //!< Structure Version
  1900. NvAPI_UnicodeString settingName; //!< String name of setting
  1901. NvU32 settingId; //!< 32 bit setting Id
  1902. NVDRS_SETTING_TYPE settingType; //!< Type of setting value.
  1903. NVDRS_SETTING_LOCATION settingLocation; //!< Describes where the value in CurrentValue comes from.
  1904. NvU32 isCurrentPredefined; //!< It is different than 0 if the currentValue is a predefined Value,
  1905. //!< 0 if the currentValue is a user value.
  1906. NvU32 isPredefinedValid; //!< It is different than 0 if the PredefinedValue union contains a valid value.
  1907. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
  1908. {
  1909. NvU32 u32PredefinedValue; //!< Accessing default DWORD value of this setting.
  1910. NVDRS_BINARY_SETTING binaryPredefinedValue; //!< Accessing default Binary value of this setting.
  1911. //!< Must be allocated by caller with valueLength specifying buffer size,
  1912. //!< or only valueLength will be filled in.
  1913. NvAPI_UnicodeString wszPredefinedValue; //!< Accessing default unicode string value of this setting.
  1914. };
  1915. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
  1916. {
  1917. NvU32 u32CurrentValue; //!< Accessing current DWORD value of this setting.
  1918. NVDRS_BINARY_SETTING binaryCurrentValue; //!< Accessing current Binary value of this setting.
  1919. //!< Must be allocated by caller with valueLength specifying buffer size,
  1920. //!< or only valueLength will be filled in.
  1921. NvAPI_UnicodeString wszCurrentValue; //!< Accessing current unicode string value of this setting.
  1922. };
  1923. } NVDRS_SETTING;
  1924. //! Macro for constructing the version field of ::_NVDRS_SETTING
  1925. #define NVDRS_SETTING_VER MAKE_NVAPI_VERSION(NVDRS_SETTING,1)
  1926. typedef struct _NVDRS_APPLICATION_V1
  1927. {
  1928. NvU32 version; //!< Structure Version
  1929. NvU32 isPredefined; //!< Is the application userdefined/predefined
  1930. NvAPI_UnicodeString appName; //!< String name of the Application
  1931. NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application
  1932. NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the application
  1933. } NVDRS_APPLICATION_V1;
  1934. typedef struct _NVDRS_APPLICATION_V2
  1935. {
  1936. NvU32 version; //!< Structure Version
  1937. NvU32 isPredefined; //!< Is the application userdefined/predefined
  1938. NvAPI_UnicodeString appName; //!< String name of the Application
  1939. NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application
  1940. NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application
  1941. NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found.
  1942. //!< When specifying multiple files, separate them using the ':' character.
  1943. } NVDRS_APPLICATION_V2;
  1944. #define NVDRS_APPLICATION_VER_V1 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V1,1)
  1945. #define NVDRS_APPLICATION_VER_V2 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V2,2)
  1946. typedef NVDRS_APPLICATION_V2 NVDRS_APPLICATION;
  1947. #define NVDRS_APPLICATION_VER NVDRS_APPLICATION_VER_V2
  1948. typedef struct _NVDRS_PROFILE
  1949. {
  1950. NvU32 version; //!< Structure Version
  1951. NvAPI_UnicodeString profileName; //!< String name of the Profile
  1952. NVDRS_GPU_SUPPORT gpuSupport; //!< This read-only flag indicates the profile support on either
  1953. //!< Quadro, or Geforce, or both.
  1954. NvU32 isPredefined; //!< Is the Profile user-defined, or predefined
  1955. NvU32 numOfApps; //!< Total number of applications that belong to this profile. Read-only
  1956. NvU32 numOfSettings; //!< Total number of settings applied for this Profile. Read-only
  1957. } NVDRS_PROFILE;
  1958. //! Macro for constructing the version field of ::_NVDRS_PROFILE
  1959. #define NVDRS_PROFILE_VER MAKE_NVAPI_VERSION(NVDRS_PROFILE,1)
  1960. ///////////////////////////////////////////////////////////////////////////////
  1961. //
  1962. // FUNCTION NAME: NvAPI_DRS_CreateSession
  1963. //
  1964. //! DESCRIPTION: This API allocates memory and initializes the session.
  1965. //!
  1966. //! SUPPORTED OS: Windows XP and higher
  1967. //!
  1968. //!
  1969. //! \param [out] *phSession Return pointer to the session handle.
  1970. //!
  1971. //! \retval ::NVAPI_OK SUCCESS
  1972. //! \retval ::NVAPI_ERROR: For miscellaneous errors.
  1973. //
  1974. ///////////////////////////////////////////////////////////////////////////////
  1975. NVAPI_INTERFACE NvAPI_DRS_CreateSession(NvDRSSessionHandle *phSession);
  1976. ///////////////////////////////////////////////////////////////////////////////
  1977. //
  1978. // FUNCTION NAME: NvAPI_GetDisplayDriverVersion
  1979. //! \fn NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion)
  1980. //! This function returns a struct that describes aspects of the display driver
  1981. //! build.
  1982. //!
  1983. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_SYS_GetDriverAndBranchVersion.
  1984. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1985. //!
  1986. //!
  1987. //! \since Release: 80
  1988. //!
  1989. //! \param [in] hNvDisplay NVIDIA display handle.
  1990. //! \param [out] pVersion Pointer to NV_DISPLAY_DRIVER_VERSION struc
  1991. //!
  1992. //! \retval NVAPI_ERROR
  1993. //! \retval NVAPI_OK
  1994. ///////////////////////////////////////////////////////////////////////////////
  1995. //! \ingroup driverapi
  1996. //! Used in NvAPI_GetDisplayDriverVersion()
  1997. typedef struct
  1998. {
  1999. NvU32 version; // Structure version
  2000. NvU32 drvVersion;
  2001. NvU32 bldChangeListNum;
  2002. NvAPI_ShortString szBuildBranchString;
  2003. NvAPI_ShortString szAdapterString;
  2004. } NV_DISPLAY_DRIVER_VERSION;
  2005. //! \ingroup driverapi
  2006. #define NV_DISPLAY_DRIVER_VERSION_VER MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_VERSION,1)
  2007. //! \ingroup driverapi
  2008. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_SYS_GetDriverAndBranchVersion.")
  2009. NVAPI_INTERFACE NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion);
  2010. ///////////////////////////////////////////////////////////////////////////////
  2011. //
  2012. // FUNCTION NAME: NvAPI_SYS_GetDriverAndBranchVersion
  2013. //
  2014. //! DESCRIPTION: This API returns display driver version and driver-branch string.
  2015. //!
  2016. //! SUPPORTED OS: Windows XP and higher
  2017. //!
  2018. //!
  2019. //! \param [out] pDriverVersion Contains the driver version after successful return.
  2020. //! \param [out] szBuildBranchString Contains the driver-branch string after successful return.
  2021. //!
  2022. //! \retval ::NVAPI_INVALID_ARGUMENT: either pDriverVersion is NULL or enum index too big
  2023. //! \retval ::NVAPI_OK - completed request
  2024. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
  2025. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  2026. //!
  2027. //! \ingroup driverapi
  2028. ///////////////////////////////////////////////////////////////////////////////
  2029. NVAPI_INTERFACE NvAPI_SYS_GetDriverAndBranchVersion(NvU32* pDriverVersion, NvAPI_ShortString szBuildBranchString);
  2030. ///////////////////////////////////////////////////////////////////////////////
  2031. //
  2032. // FUNCTION NAME: NvAPI_OGL_ExpertModeSet[Get]
  2033. //
  2034. //! \name NvAPI_OGL_ExpertModeSet[Get] Functions
  2035. //@{
  2036. //! This function configures OpenGL Expert Mode, an API usage feedback and
  2037. //! advice reporting mechanism. The effects of this call are
  2038. //! applied only to the current context, and are reset to the
  2039. //! defaults when the context is destroyed.
  2040. //!
  2041. //! \note This feature is valid at runtime only when GLExpert
  2042. //! functionality has been built into the OpenGL driver
  2043. //! installed on the system. All Windows Vista OpenGL
  2044. //! drivers provided by NVIDIA have this instrumentation
  2045. //! included by default. Windows XP, however, requires a
  2046. //! special display driver available with the NVIDIA
  2047. //! PerfSDK found at developer.nvidia.com.
  2048. //!
  2049. //! \note These functions are valid only for the current OpenGL
  2050. //! context. Calling these functions prior to creating a
  2051. //! context and calling MakeCurrent with it will result
  2052. //! in errors and undefined behavior.
  2053. //!
  2054. //! SUPPORTED OS: Windows XP and higher
  2055. //!
  2056. //!
  2057. //! \since Release: 80
  2058. //!
  2059. //! \param expertDetailMask Mask made up of NVAPI_OGLEXPERT_DETAIL bits,
  2060. //! this parameter specifies the detail level in
  2061. //! the feedback stream.
  2062. //!
  2063. //! \param expertReportMask Mask made up of NVAPI_OGLEXPERT_REPORT bits,
  2064. //! this parameter specifies the areas of
  2065. //! functional interest.
  2066. //!
  2067. //! \param expertOutputMask Mask made up of NVAPI_OGLEXPERT_OUTPUT bits,
  2068. //! this parameter specifies the feedback output
  2069. //! location.
  2070. //!
  2071. //! \param expertCallback Used in conjunction with OUTPUT_TO_CALLBACK,
  2072. //! this is a simple callback function the user
  2073. //! may use to obtain the feedback stream. The
  2074. //! function will be called once per fully
  2075. //! qualified feedback stream extry.
  2076. //!
  2077. //! \retval NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  2078. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU found
  2079. //! \retval NVAPI_OPENGL_CONTEXT_NOT_CURRENT No NVIDIA OpenGL context
  2080. //! which supports GLExpert
  2081. //! has been made current
  2082. //! \retval NVAPI_ERROR OpenGL driver failed to load properly
  2083. //! \retval NVAPI_OK Success
  2084. //
  2085. ///////////////////////////////////////////////////////////////////////////////
  2086. //! \addtogroup oglapi
  2087. //! @{
  2088. #define NVAPI_OGLEXPERT_DETAIL_NONE 0x00000000
  2089. #define NVAPI_OGLEXPERT_DETAIL_ERROR 0x00000001
  2090. #define NVAPI_OGLEXPERT_DETAIL_SWFALLBACK 0x00000002
  2091. #define NVAPI_OGLEXPERT_DETAIL_BASIC_INFO 0x00000004
  2092. #define NVAPI_OGLEXPERT_DETAIL_DETAILED_INFO 0x00000008
  2093. #define NVAPI_OGLEXPERT_DETAIL_PERFORMANCE_WARNING 0x00000010
  2094. #define NVAPI_OGLEXPERT_DETAIL_QUALITY_WARNING 0x00000020
  2095. #define NVAPI_OGLEXPERT_DETAIL_USAGE_WARNING 0x00000040
  2096. #define NVAPI_OGLEXPERT_DETAIL_ALL 0xFFFFFFFF
  2097. #define NVAPI_OGLEXPERT_REPORT_NONE 0x00000000
  2098. #define NVAPI_OGLEXPERT_REPORT_ERROR 0x00000001
  2099. #define NVAPI_OGLEXPERT_REPORT_SWFALLBACK 0x00000002
  2100. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_VERTEX 0x00000004
  2101. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_GEOMETRY 0x00000008
  2102. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_XFB 0x00000010
  2103. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_RASTER 0x00000020
  2104. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAGMENT 0x00000040
  2105. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_ROP 0x00000080
  2106. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAMEBUFFER 0x00000100
  2107. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_PIXEL 0x00000200
  2108. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_TEXTURE 0x00000400
  2109. #define NVAPI_OGLEXPERT_REPORT_OBJECT_BUFFEROBJECT 0x00000800
  2110. #define NVAPI_OGLEXPERT_REPORT_OBJECT_TEXTURE 0x00001000
  2111. #define NVAPI_OGLEXPERT_REPORT_OBJECT_PROGRAM 0x00002000
  2112. #define NVAPI_OGLEXPERT_REPORT_OBJECT_FBO 0x00004000
  2113. #define NVAPI_OGLEXPERT_REPORT_FEATURE_SLI 0x00008000
  2114. #define NVAPI_OGLEXPERT_REPORT_ALL 0xFFFFFFFF
  2115. #define NVAPI_OGLEXPERT_OUTPUT_TO_NONE 0x00000000
  2116. #define NVAPI_OGLEXPERT_OUTPUT_TO_CONSOLE 0x00000001
  2117. #define NVAPI_OGLEXPERT_OUTPUT_TO_DEBUGGER 0x00000004
  2118. #define NVAPI_OGLEXPERT_OUTPUT_TO_CALLBACK 0x00000008
  2119. #define NVAPI_OGLEXPERT_OUTPUT_TO_ALL 0xFFFFFFFF
  2120. //! @}
  2121. ///////////////////////////////////////////////////////////////////////////////
  2122. //
  2123. // FUNCTION TYPE: NVAPI_OGLEXPERT_CALLBACK
  2124. //
  2125. //! DESCRIPTION: Used in conjunction with OUTPUT_TO_CALLBACK, this is a simple
  2126. //! callback function the user may use to obtain the feedback
  2127. //! stream. The function will be called once per fully qualified
  2128. //! feedback stream entry.
  2129. //!
  2130. //! \param categoryId Contains the bit from the NVAPI_OGLEXPERT_REPORT
  2131. //! mask that corresponds to the current message
  2132. //! \param messageId Unique ID for the current message
  2133. //! \param detailLevel Contains the bit from the NVAPI_OGLEXPERT_DETAIL
  2134. //! mask that corresponds to the current message
  2135. //! \param objectId Unique ID of the object that corresponds to the
  2136. //! current message
  2137. //! \param messageStr Text string from the current message
  2138. //!
  2139. //! \ingroup oglapi
  2140. ///////////////////////////////////////////////////////////////////////////////
  2141. typedef void (* NVAPI_OGLEXPERT_CALLBACK) (unsigned int categoryId, unsigned int messageId, unsigned int detailLevel, int objectId, const char *messageStr);
  2142. //! \ingroup oglapi
  2143. //! SUPPORTED OS: Windows XP and higher
  2144. //!
  2145. NVAPI_INTERFACE NvAPI_OGL_ExpertModeSet(NvU32 expertDetailLevel,
  2146. NvU32 expertReportMask,
  2147. NvU32 expertOutputMask,
  2148. NVAPI_OGLEXPERT_CALLBACK expertCallback);
  2149. //! \addtogroup oglapi
  2150. //! SUPPORTED OS: Windows XP and higher
  2151. //!
  2152. NVAPI_INTERFACE NvAPI_OGL_ExpertModeGet(NvU32 *pExpertDetailLevel,
  2153. NvU32 *pExpertReportMask,
  2154. NvU32 *pExpertOutputMask,
  2155. NVAPI_OGLEXPERT_CALLBACK *pExpertCallback);
  2156. //@}
  2157. ///////////////////////////////////////////////////////////////////////////////
  2158. //
  2159. //! \name NvAPI_OGL_ExpertModeDefaultsSet[Get] Functions
  2160. //!
  2161. //@{
  2162. //! This function configures OpenGL Expert Mode global defaults. These settings
  2163. //! apply to any OpenGL application which starts up after these
  2164. //! values are applied (i.e. these settings *do not* apply to
  2165. //! currently running applications).
  2166. //!
  2167. //! SUPPORTED OS: Windows XP and higher
  2168. //!
  2169. //!
  2170. //! \since Release: 80
  2171. //!
  2172. //! \param expertDetailLevel Value which specifies the detail level in
  2173. //! the feedback stream. This is a mask made up
  2174. //! of NVAPI_OGLEXPERT_LEVEL bits.
  2175. //!
  2176. //! \param expertReportMask Mask made up of NVAPI_OGLEXPERT_REPORT bits,
  2177. //! this parameter specifies the areas of
  2178. //! functional interest.
  2179. //!
  2180. //! \param expertOutputMask Mask made up of NVAPI_OGLEXPERT_OUTPUT bits,
  2181. //! this parameter specifies the feedback output
  2182. //! location. Note that using OUTPUT_TO_CALLBACK
  2183. //! here is meaningless and has no effect, but
  2184. //! using it will not cause an error.
  2185. //!
  2186. //! \return ::NVAPI_ERROR or ::NVAPI_OK
  2187. //
  2188. ///////////////////////////////////////////////////////////////////////////////
  2189. //! \ingroup oglapi
  2190. //! SUPPORTED OS: Windows XP and higher
  2191. //!
  2192. NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsSet(NvU32 expertDetailLevel,
  2193. NvU32 expertReportMask,
  2194. NvU32 expertOutputMask);
  2195. //! \addtogroup oglapi
  2196. //! SUPPORTED OS: Windows XP and higher
  2197. //!
  2198. NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsGet(NvU32 *pExpertDetailLevel,
  2199. NvU32 *pExpertReportMask,
  2200. NvU32 *pExpertOutputMask);
  2201. //@}
  2202. ///////////////////////////////////////////////////////////////////////////////
  2203. //
  2204. // FUNCTION NAME: NvAPI_EnumPhysicalGPUs
  2205. //
  2206. //! This function returns an array of physical GPU handles.
  2207. //! Each handle represents a physical GPU present in the system.
  2208. //! That GPU may be part of an SLI configuration, or may not be visible to the OS directly.
  2209. //!
  2210. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2211. //!
  2212. //! The array nvGPUHandle will be filled with physical GPU handle values. The returned
  2213. //! gpuCount determines how many entries in the array are valid.
  2214. //!
  2215. //! \note In drivers older than 105.00, all physical GPU handles get invalidated on a
  2216. //! modeset. So the calling applications need to renum the handles after every modeset.\n
  2217. //! With drivers 105.00 and up, all physical GPU handles are constant.
  2218. //! Physical GPU handles are constant as long as the GPUs are not physically moved and
  2219. //! the SBIOS VGA order is unchanged.
  2220. //!
  2221. //! For TCC GPU handles please use NvAPI_EnumTCCPhysicalGPUs()
  2222. //!
  2223. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2224. //!
  2225. //!
  2226. //! \par Introduced in
  2227. //! \since Release: 80
  2228. //!
  2229. //! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL
  2230. //! \retval NVAPI_OK One or more handles were returned
  2231. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2232. //! \ingroup gpu
  2233. ///////////////////////////////////////////////////////////////////////////////
  2234. NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs(NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
  2235. ///////////////////////////////////////////////////////////////////////////////
  2236. //
  2237. // FUNCTION NAME: NvAPI_EnumLogicalGPUs
  2238. //
  2239. //! This function returns an array of logical GPU handles.
  2240. //!
  2241. //! Each handle represents one or more GPUs acting in concert as a single graphics device.
  2242. //!
  2243. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2244. //!
  2245. //! The array nvGPUHandle will be filled with logical GPU handle values. The returned
  2246. //! gpuCount determines how many entries in the array are valid.
  2247. //!
  2248. //! \note All logical GPUs handles get invalidated on a GPU topology change, so the calling
  2249. //! application is required to renum the logical GPU handles to get latest physical handle
  2250. //! mapping after every GPU topology change activated by a call to NvAPI_SetGpuTopologies().
  2251. //!
  2252. //! To detect if SLI rendering is enabled, use NvAPI_D3D_GetCurrentSLIState().
  2253. //!
  2254. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2255. //!
  2256. //!
  2257. //! \since Release: 80
  2258. //!
  2259. //! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL
  2260. //! \retval NVAPI_OK One or more handles were returned
  2261. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2262. //! \ingroup gpu
  2263. ///////////////////////////////////////////////////////////////////////////////
  2264. NVAPI_INTERFACE NvAPI_EnumLogicalGPUs(NvLogicalGpuHandle nvGPUHandle[NVAPI_MAX_LOGICAL_GPUS], NvU32 *pGpuCount);
  2265. ///////////////////////////////////////////////////////////////////////////////
  2266. //
  2267. // FUNCTION NAME: NvAPI_GetPhysicalGPUsFromDisplay
  2268. //
  2269. //! This function returns an array of physical GPU handles associated with the specified display.
  2270. //!
  2271. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2272. //!
  2273. //! The array nvGPUHandle will be filled with physical GPU handle values. The returned
  2274. //! gpuCount determines how many entries in the array are valid.
  2275. //!
  2276. //! If the display corresponds to more than one physical GPU, the first GPU returned
  2277. //! is the one with the attached active output.
  2278. //!
  2279. //! SUPPORTED OS: Windows XP and higher
  2280. //!
  2281. //!
  2282. //! \since Release: 80
  2283. //!
  2284. //! \retval NVAPI_INVALID_ARGUMENT hNvDisp is not valid; nvGPUHandle or pGpuCount is NULL
  2285. //! \retval NVAPI_OK One or more handles were returned
  2286. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND no NVIDIA GPU driving a display was found
  2287. //! \ingroup gpu
  2288. ///////////////////////////////////////////////////////////////////////////////
  2289. NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromDisplay(NvDisplayHandle hNvDisp, NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
  2290. ///////////////////////////////////////////////////////////////////////////////
  2291. //
  2292. // FUNCTION NAME: NvAPI_GetPhysicalGPUFromUnAttachedDisplay
  2293. //
  2294. //! This function returns a physical GPU handle associated with the specified unattached display.
  2295. //! The source GPU is a physical render GPU which renders the frame buffer but may or may not drive the scan out.
  2296. //!
  2297. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2298. //!
  2299. //! SUPPORTED OS: Windows XP and higher
  2300. //!
  2301. //!
  2302. //! \since Release: 80
  2303. //!
  2304. //! \retval NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pPhysicalGpu is NULL.
  2305. //! \retval NVAPI_OK One or more handles were returned
  2306. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2307. //! \ingroup gpu
  2308. ///////////////////////////////////////////////////////////////////////////////
  2309. NVAPI_INTERFACE NvAPI_GetPhysicalGPUFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvPhysicalGpuHandle *pPhysicalGpu);
  2310. ///////////////////////////////////////////////////////////////////////////////
  2311. //
  2312. // FUNCTION NAME: NvAPI_GetLogicalGPUFromDisplay
  2313. //
  2314. //! This function returns the logical GPU handle associated with the specified display.
  2315. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2316. //!
  2317. //! SUPPORTED OS: Windows XP and higher
  2318. //!
  2319. //!
  2320. //! \since Release: 80
  2321. //!
  2322. //! \retval NVAPI_INVALID_ARGUMENT hNvDisp is not valid; pLogicalGPU is NULL
  2323. //! \retval NVAPI_OK One or more handles were returned
  2324. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2325. //! \ingroup gpu
  2326. ///////////////////////////////////////////////////////////////////////////////
  2327. NVAPI_INTERFACE NvAPI_GetLogicalGPUFromDisplay(NvDisplayHandle hNvDisp, NvLogicalGpuHandle *pLogicalGPU);
  2328. ///////////////////////////////////////////////////////////////////////////////
  2329. //
  2330. // FUNCTION NAME: NvAPI_GetLogicalGPUFromPhysicalGPU
  2331. //
  2332. //! This function returns the logical GPU handle associated with specified physical GPU handle.
  2333. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2334. //!
  2335. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2336. //!
  2337. //!
  2338. //! \since Release: 80
  2339. //!
  2340. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGPU is not valid; pLogicalGPU is NULL
  2341. //! \retval NVAPI_OK One or more handles were returned
  2342. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2343. //! \ingroup gpu
  2344. ///////////////////////////////////////////////////////////////////////////////
  2345. NVAPI_INTERFACE NvAPI_GetLogicalGPUFromPhysicalGPU(NvPhysicalGpuHandle hPhysicalGPU, NvLogicalGpuHandle *pLogicalGPU);
  2346. ///////////////////////////////////////////////////////////////////////////////
  2347. //
  2348. // FUNCTION NAME: NvAPI_GetPhysicalGPUsFromLogicalGPU
  2349. //
  2350. //! This function returns the physical GPU handles associated with the specified logical GPU handle.
  2351. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  2352. //!
  2353. //! The array hPhysicalGPU will be filled with physical GPU handle values. The returned
  2354. //! gpuCount determines how many entries in the array are valid.
  2355. //!
  2356. //! SUPPORTED OS: Windows XP and higher
  2357. //!
  2358. //!
  2359. //! \since Release: 80
  2360. //!
  2361. //! \retval NVAPI_INVALID_ARGUMENT hLogicalGPU is not valid; hPhysicalGPU is NULL
  2362. //! \retval NVAPI_OK One or more handles were returned
  2363. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2364. //! \retval NVAPI_EXPECTED_LOGICAL_GPU_HANDLE hLogicalGPU was not a logical GPU handle
  2365. //! \ingroup gpu
  2366. ///////////////////////////////////////////////////////////////////////////////
  2367. NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromLogicalGPU(NvLogicalGpuHandle hLogicalGPU,NvPhysicalGpuHandle hPhysicalGPU[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
  2368. ///////////////////////////////////////////////////////////////////////////////
  2369. //
  2370. // FUNCTION NAME: NvAPI_GPU_GetGpuCoreCount
  2371. //
  2372. //! DESCRIPTION: Retrieves the total number of cores defined for a GPU.
  2373. //! Returns 0 on architectures that don't define GPU cores.
  2374. //!
  2375. //! SUPPORTED OS: Windows XP and higher
  2376. //!
  2377. //!
  2378. //! \retval ::NVAPI_INVALID_ARGUMENT pCount is NULL
  2379. //! \retval ::NVAPI_OK *pCount is set
  2380. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND no NVIDIA GPU driving a display was found
  2381. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  2382. //! \retval ::NVAPI_NOT_SUPPORTED API call is not supported on current architecture
  2383. //!
  2384. //! \ingroup gpu
  2385. ///////////////////////////////////////////////////////////////////////////////
  2386. NVAPI_INTERFACE NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount);
  2387. ///////////////////////////////////////////////////////////////////////////////
  2388. //
  2389. // FUNCTION NAME: NvAPI_GPU_GetAllOutputs
  2390. //
  2391. //! This function returns set of all GPU-output identifiers as a bitmask.
  2392. //!
  2393. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetAllDisplayIds.
  2394. //! SUPPORTED OS: Windows XP and higher
  2395. //!
  2396. //!
  2397. //! \since Release: 85
  2398. //!
  2399. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL.
  2400. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers.
  2401. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2402. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2403. //! \ingroup gpu
  2404. ///////////////////////////////////////////////////////////////////////////////
  2405. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetAllDisplayIds.")
  2406. NVAPI_INTERFACE NvAPI_GPU_GetAllOutputs(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pOutputsMask);
  2407. ///////////////////////////////////////////////////////////////////////////////
  2408. //
  2409. // FUNCTION NAME: NvAPI_GPU_GetConnectedOutputs
  2410. //
  2411. //! This function is the same as NvAPI_GPU_GetAllOutputs() but returns only the set of GPU output
  2412. //! identifiers that are connected to display devices.
  2413. //!
  2414. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  2415. //! SUPPORTED OS: Windows XP and higher
  2416. //!
  2417. //!
  2418. //! \since Release: 80
  2419. //!
  2420. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL.
  2421. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers.
  2422. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2423. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2424. //! \ingroup gpu
  2425. ///////////////////////////////////////////////////////////////////////////////
  2426. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  2427. NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  2428. ///////////////////////////////////////////////////////////////////////////////
  2429. //
  2430. // FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputs
  2431. //
  2432. //! DESCRIPTION: This function is the same as NvAPI_GPU_GetConnectedOutputs() but returns only the set of GPU-output
  2433. //! identifiers that can be selected in an SLI configuration.
  2434. //! NOTE: This function matches NvAPI_GPU_GetConnectedOutputs()
  2435. //! - On systems which are not SLI capable.
  2436. //! - If the queried GPU is not part of a valid SLI group.
  2437. //!
  2438. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  2439. //! SUPPORTED OS: Windows XP and higher
  2440. //!
  2441. //!
  2442. //! \since Release: 170
  2443. //!
  2444. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  2445. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers
  2446. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2447. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  2448. //!
  2449. //! \ingroup gpu
  2450. ///////////////////////////////////////////////////////////////////////////////
  2451. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  2452. NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  2453. //! \ingroup gpu
  2454. typedef enum
  2455. {
  2456. NV_MONITOR_CONN_TYPE_UNINITIALIZED = 0,
  2457. NV_MONITOR_CONN_TYPE_VGA,
  2458. NV_MONITOR_CONN_TYPE_COMPONENT,
  2459. NV_MONITOR_CONN_TYPE_SVIDEO,
  2460. NV_MONITOR_CONN_TYPE_HDMI,
  2461. NV_MONITOR_CONN_TYPE_DVI,
  2462. NV_MONITOR_CONN_TYPE_LVDS,
  2463. NV_MONITOR_CONN_TYPE_DP,
  2464. NV_MONITOR_CONN_TYPE_COMPOSITE,
  2465. NV_MONITOR_CONN_TYPE_UNKNOWN = -1
  2466. } NV_MONITOR_CONN_TYPE;
  2467. //! \addtogroup gpu
  2468. //! @{
  2469. #define NV_GPU_CONNECTED_IDS_FLAG_UNCACHED NV_BIT(0) //!< Get uncached connected devices
  2470. #define NV_GPU_CONNECTED_IDS_FLAG_SLI NV_BIT(1) //!< Get devices such that those can be selected in an SLI configuration
  2471. #define NV_GPU_CONNECTED_IDS_FLAG_LIDSTATE NV_BIT(2) //!< Get devices such that to reflect the Lid State
  2472. #define NV_GPU_CONNECTED_IDS_FLAG_FAKE NV_BIT(3) //!< Get devices that includes the fake connected monitors
  2473. #define NV_GPU_CONNECTED_IDS_FLAG_EXCLUDE_MST NV_BIT(4) //!< Excludes devices that are part of the multi stream topology.
  2474. //! @}
  2475. //! \ingroup gpu
  2476. typedef struct _NV_GPU_DISPLAYIDS
  2477. {
  2478. NvU32 version;
  2479. NV_MONITOR_CONN_TYPE connectorType; //!< out: vga, tv, dvi, hdmi and dp. This is reserved for future use and clients should not rely on this information. Instead get the
  2480. //!< GPU connector type from NvAPI_GPU_GetConnectorInfo/NvAPI_GPU_GetConnectorInfoEx
  2481. NvU32 displayId; //!< this is a unique identifier for each device
  2482. NvU32 isDynamic:1; //!< if bit is set then this display is part of MST topology and it's a dynamic
  2483. NvU32 isMultiStreamRootNode:1; //!< if bit is set then this displayID belongs to a multi stream enabled connector(root node). Note that when multi stream is enabled and
  2484. //!< a single multi stream capable monitor is connected to it, the monitor will share the display id with the RootNode.
  2485. //!< When there is more than one monitor connected in a multi stream topology, then the root node will have a separate displayId.
  2486. NvU32 isActive:1; //!< if bit is set then this display is being actively driven
  2487. NvU32 isCluster:1; //!< if bit is set then this display is the representative display for a stream clone
  2488. NvU32 isOSVisible:1; //!< if bit is set, then this display is reported to the OS
  2489. NvU32 reserved: 27; //!< must be zero
  2490. } NV_GPU_DISPLAYIDS;
  2491. //! \ingroup gpu
  2492. //! Macro for constructing the version field of ::_NV_GPU_DISPLAYIDS
  2493. #define NV_GPU_DISPLAYIDS_VER MAKE_NVAPI_VERSION(NV_GPU_DISPLAYIDS,1)
  2494. ///////////////////////////////////////////////////////////////////////////////
  2495. //
  2496. // FUNCTION NAME: NvAPI_GPU_GetConnectedDisplayIds
  2497. //
  2498. //! \code
  2499. //! DESCRIPTION: Due to space limitation NvAPI_GPU_GetConnectedOutputs can return maximum 32 devices, but
  2500. //! this is no longer true for DPMST. NvAPI_GPU_GetConnectedDisplayIds will return all
  2501. //! the connected display devices in the form of displayIds for the associated hPhysicalGpu.
  2502. //! This function can accept set of flags to request cached, uncached, sli and lid to get the connected devices.
  2503. //! Default value for flags will be cached .
  2504. //! HOW TO USE: 1) for each PhysicalGpu, make a call to get the number of connected displayId's
  2505. //! using NvAPI_GPU_GetConnectedDisplayIds by passing the pDisplayIds as NULL
  2506. //! On call success:
  2507. //! 2) Allocate memory based on pDisplayIdCount then make a call NvAPI_GPU_GetConnectedDisplayIds to populate DisplayIds
  2508. //! SUPPORTED OS: Windows XP and higher
  2509. //!
  2510. //! PARAMETERS: hPhysicalGpu (IN) - GPU selection
  2511. //! flags (IN) - One or more defines from NV_GPU_CONNECTED_IDS_FLAG_* as valid flags.
  2512. //! pDisplayIds (IN/OUT) - Pointer to an NV_GPU_DISPLAYIDS struct, each entry represents a one displayID and its attributes
  2513. //! pDisplayIdCount(OUT)- Number of displayId's.
  2514. //!
  2515. //! RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pDisplayIds or pDisplayIdCount is NULL
  2516. //! NVAPI_OK: *pDisplayIds contains a set of GPU-output identifiers
  2517. //! NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
  2518. //! NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  2519. //! \endcode
  2520. //! \ingroup gpu
  2521. ///////////////////////////////////////////////////////////////////////////////
  2522. NVAPI_INTERFACE NvAPI_GPU_GetConnectedDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __out_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS* pDisplayIds, __inout NvU32* pDisplayIdCount, __in NvU32 flags);
  2523. ///////////////////////////////////////////////////////////////////////////////
  2524. //
  2525. // FUNCTION NAME: NvAPI_GPU_GetAllDisplayIds
  2526. //
  2527. //! DESCRIPTION: This API returns display IDs for all possible outputs on the GPU.
  2528. //! For DPMST connector, it will return display IDs for all the video sinks in the topology. \n
  2529. //! HOW TO USE: 1. The first call should be made to get the all display ID count. To get the display ID count, send in \n
  2530. //! a) hPhysicalGpu - a valid GPU handle(enumerated using NvAPI_EnumPhysicalGPUs()) as input, \n
  2531. //! b) pDisplayIds - NULL, as we just want to get the display ID count. \n
  2532. //! c) pDisplayIdCount - a valid pointer to NvU32, whose value is set to ZERO. \n
  2533. //! If all parameters are correct and this call is successful, this call will return the display ID's count. \n
  2534. //! 2. To get the display ID array, make the second call to NvAPI_GPU_GetAllDisplayIds() with \n
  2535. //! a) hPhysicalGpu - should be same value which was sent in first call, \n
  2536. //! b) pDisplayIds - pointer to the display ID array allocated by caller based on display ID count, \n
  2537. //! eg. malloc(sizeof(NV_GPU_DISPLAYIDS) * pDisplayIdCount). \n
  2538. //! c) pDisplayIdCount - a valid pointer to NvU32. This indicates for how many display IDs \n
  2539. //! the memory is allocated(pDisplayIds) by the caller. \n
  2540. //! If all parameters are correct and this call is successful, this call will return the display ID array and actual
  2541. //! display ID count (which was obtained in the first call to NvAPI_GPU_GetAllDisplayIds). If the input display ID count is
  2542. //! less than the actual display ID count, it will overwrite the input and give the pDisplayIdCount as actual count and the
  2543. //! API will return NVAPI_INSUFFICIENT_BUFFER.
  2544. //!
  2545. //! SUPPORTED OS: Windows XP and higher
  2546. //!
  2547. //!
  2548. //! \param [in] hPhysicalGpu GPU selection.
  2549. //! \param [in,out] DisplayIds Pointer to an array of NV_GPU_DISPLAYIDS structures, each entry represents one displayID
  2550. //! and its attributes.
  2551. //! \param [in,out] pDisplayIdCount As input, this parameter indicates the number of display's id's for which caller has
  2552. //! allocated the memory. As output, it will return the actual number of display IDs.
  2553. //!
  2554. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  2555. //! specific meaning for this API, they are listed below.
  2556. //!
  2557. //! \retval NVAPI_INSUFFICIENT_BUFFER When the input buffer(pDisplayIds) is less than the actual number of display IDs, this API
  2558. //! will return NVAPI_INSUFFICIENT_BUFFER.
  2559. //!
  2560. //! \ingroup gpu
  2561. ///////////////////////////////////////////////////////////////////////////////
  2562. NVAPI_INTERFACE NvAPI_GPU_GetAllDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __out_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS* pDisplayIds, __inout NvU32* pDisplayIdCount);
  2563. ///////////////////////////////////////////////////////////////////////////////
  2564. //
  2565. // FUNCTION NAME: NvAPI_GPU_GetConnectedOutputsWithLidState
  2566. //
  2567. //! This function is similar to NvAPI_GPU_GetConnectedOutputs(), and returns the connected display identifiers that are connected
  2568. //! as an output mask but unlike NvAPI_GPU_GetConnectedOutputs() this API "always" reflects the Lid State in the output mask.
  2569. //! Thus if you expect the LID close state to be available in the connection mask use this API.
  2570. //! - If LID is closed then this API will remove the LID panel from the connected display identifiers.
  2571. //! - If LID is open then this API will reflect the LID panel in the connected display identifiers.
  2572. //!
  2573. //! \note This API should be used on notebook systems and on systems where the LID state is required in the connection
  2574. //! output mask. On desktop systems the returned identifiers will match NvAPI_GPU_GetConnectedOutputs().
  2575. //!
  2576. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  2577. //! SUPPORTED OS: Windows XP and higher
  2578. //!
  2579. //!
  2580. //! \since Release: 95
  2581. //!
  2582. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  2583. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers
  2584. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2585. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  2586. //! \ingroup gpu
  2587. ///////////////////////////////////////////////////////////////////////////////
  2588. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  2589. NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  2590. ///////////////////////////////////////////////////////////////////////////////
  2591. //
  2592. // FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputsWithLidState
  2593. //
  2594. //! DESCRIPTION: This function is the same as NvAPI_GPU_GetConnectedOutputsWithLidState() but returns only the set
  2595. //! of GPU-output identifiers that can be selected in an SLI configuration. With SLI disabled,
  2596. //! this function matches NvAPI_GPU_GetConnectedOutputsWithLidState().
  2597. //!
  2598. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  2599. //! SUPPORTED OS: Windows XP and higher
  2600. //!
  2601. //!
  2602. //! \since Release: 170
  2603. //!
  2604. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  2605. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers
  2606. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2607. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  2608. //!
  2609. //! \ingroup gpu
  2610. ///////////////////////////////////////////////////////////////////////////////
  2611. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  2612. NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  2613. ///////////////////////////////////////////////////////////////////////////////
  2614. //
  2615. // FUNCTION NAME: NvAPI_GPU_GetSystemType
  2616. //
  2617. //! \fn NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType)
  2618. //! This function identifies whether the GPU is a notebook GPU or a desktop GPU.
  2619. //!
  2620. //! SUPPORTED OS: Windows XP and higher
  2621. //!
  2622. //!
  2623. //! \since Release: 95
  2624. //!
  2625. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  2626. //! \retval NVAPI_OK *pSystemType contains the GPU system type
  2627. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2628. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  2629. //
  2630. ///////////////////////////////////////////////////////////////////////////////
  2631. //! \ingroup gpu
  2632. //! Used in NvAPI_GPU_GetSystemType()
  2633. typedef enum
  2634. {
  2635. NV_SYSTEM_TYPE_UNKNOWN = 0,
  2636. NV_SYSTEM_TYPE_LAPTOP = 1,
  2637. NV_SYSTEM_TYPE_DESKTOP = 2,
  2638. } NV_SYSTEM_TYPE;
  2639. //! \ingroup gpu
  2640. NVAPI_INTERFACE NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType);
  2641. ///////////////////////////////////////////////////////////////////////////////
  2642. //
  2643. // FUNCTION NAME: NvAPI_GPU_GetActiveOutputs
  2644. //
  2645. //! This function is the same as NvAPI_GPU_GetAllOutputs but returns only the set of GPU output
  2646. //! identifiers that are actively driving display devices.
  2647. //!
  2648. //! SUPPORTED OS: Windows XP and higher
  2649. //!
  2650. //!
  2651. //! \since Release: 85
  2652. //!
  2653. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL.
  2654. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers.
  2655. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2656. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2657. //! \ingroup gpu
  2658. ///////////////////////////////////////////////////////////////////////////////
  2659. NVAPI_INTERFACE NvAPI_GPU_GetActiveOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  2660. ///////////////////////////////////////////////////////////////////////////////
  2661. //
  2662. // FUNCTION NAME: NvAPI_GPU_SetEDID
  2663. //
  2664. //! Thus function sets the EDID data for the specified GPU handle and connection bit mask.
  2665. //! displayOutputId should have exactly 1 bit set to indicate a single display. See \ref handles.
  2666. //! \note The EDID will be cached across the boot session and will be enumerated to the OS in this call.
  2667. //! To remove the EDID set sizeofEDID to zero.
  2668. //! OS and NVAPI connection status APIs will reflect the newly set or removed EDID dynamically.
  2669. //!
  2670. //! This feature will NOT be supported on the following boards:
  2671. //! - GeForce
  2672. //! - Quadro VX
  2673. //! - Tesla
  2674. //!
  2675. //! SUPPORTED OS: Windows XP and higher
  2676. //!
  2677. //!
  2678. //! \since Release: 100
  2679. //!
  2680. //! \retval NVAPI_INVALID_ARGUMENT pEDID is NULL; displayOutputId has 0 or > 1 bits set
  2681. //! \retval NVAPI_OK *pEDID data was applied to the requested displayOutputId.
  2682. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2683. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle.
  2684. //! \retval NVAPI_NOT_SUPPORTED For the above mentioned GPUs
  2685. //! \ingroup gpu
  2686. ///////////////////////////////////////////////////////////////////////////////
  2687. NVAPI_INTERFACE NvAPI_GPU_SetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID);
  2688. ///////////////////////////////////////////////////////////////////////////////
  2689. //
  2690. // FUNCTION NAME: NvAPI_GPU_GetOutputType
  2691. //
  2692. //! \fn NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType)
  2693. //! This function returns the output type for a specific physical GPU handle and outputId (exactly 1 bit set - see \ref handles).
  2694. //!
  2695. //! SUPPORTED OS: Windows XP and higher
  2696. //!
  2697. //!
  2698. //! \Version Earliest supported ForceWare version: 82.61
  2699. //!
  2700. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu, outputId, or pOutputsMask is NULL; or outputId has > 1 bit set
  2701. //! \retval NVAPI_OK *pOutputType contains a NvGpuOutputType value
  2702. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2703. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  2704. //
  2705. ///////////////////////////////////////////////////////////////////////////////
  2706. //! \ingroup gpu
  2707. //! used in NvAPI_GPU_GetOutputType()
  2708. typedef enum _NV_GPU_OUTPUT_TYPE
  2709. {
  2710. NVAPI_GPU_OUTPUT_UNKNOWN = 0,
  2711. NVAPI_GPU_OUTPUT_CRT = 1, //!< CRT display device
  2712. NVAPI_GPU_OUTPUT_DFP = 2, //!< Digital Flat Panel display device
  2713. NVAPI_GPU_OUTPUT_TV = 3, //!< TV display device
  2714. } NV_GPU_OUTPUT_TYPE;
  2715. //! \ingroup gpu
  2716. NVAPI_INTERFACE NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType);
  2717. ///////////////////////////////////////////////////////////////////////////////
  2718. //
  2719. // FUNCTION NAME: NvAPI_GPU_ValidateOutputCombination
  2720. //
  2721. //! This function determines if a set of GPU outputs can be active
  2722. //! simultaneously. While a GPU may have <n> outputs, typically they cannot
  2723. //! all be active at the same time due to internal resource sharing.
  2724. //!
  2725. //! Given a physical GPU handle and a mask of candidate outputs, this call
  2726. //! will return NVAPI_OK if all of the specified outputs can be driven
  2727. //! simultaneously. It will return NVAPI_INVALID_COMBINATION if they cannot.
  2728. //!
  2729. //! Use NvAPI_GPU_GetAllOutputs() to determine which outputs are candidates.
  2730. //!
  2731. //! SUPPORTED OS: Windows XP and higher
  2732. //!
  2733. //!
  2734. //! \since Release: 85
  2735. //!
  2736. //! \retval NVAPI_OK Combination of outputs in outputsMask are valid (can be active simultaneously).
  2737. //! \retval NVAPI_INVALID_COMBINATION Combination of outputs in outputsMask are NOT valid.
  2738. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or outputsMask does not have at least 2 bits set.
  2739. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2740. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2741. //! \ingroup gpu
  2742. ///////////////////////////////////////////////////////////////////////////////
  2743. NVAPI_INTERFACE NvAPI_GPU_ValidateOutputCombination(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputsMask);
  2744. ///////////////////////////////////////////////////////////////////////////////
  2745. //
  2746. // FUNCTION NAME: NvAPI_GPU_GetFullName
  2747. //
  2748. //! This function retrieves the full GPU name as an ASCII string - for example, "Quadro FX 1400".
  2749. //!
  2750. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2751. //!
  2752. //!
  2753. //! \since Release: 90
  2754. //!
  2755. //! \return NVAPI_ERROR or NVAPI_OK
  2756. //! \ingroup gpu
  2757. ///////////////////////////////////////////////////////////////////////////////
  2758. NVAPI_INTERFACE NvAPI_GPU_GetFullName(NvPhysicalGpuHandle hPhysicalGpu, NvAPI_ShortString szName);
  2759. ///////////////////////////////////////////////////////////////////////////////
  2760. //
  2761. // FUNCTION NAME: NvAPI_GPU_GetPCIIdentifiers
  2762. //
  2763. //! This function returns the PCI identifiers associated with this GPU.
  2764. //!
  2765. //! SUPPORTED OS: Windows XP and higher
  2766. //!
  2767. //!
  2768. //! \since Release: 90
  2769. //!
  2770. //! \param DeviceId The internal PCI device identifier for the GPU.
  2771. //! \param SubSystemId The internal PCI subsystem identifier for the GPU.
  2772. //! \param RevisionId The internal PCI device-specific revision identifier for the GPU.
  2773. //! \param ExtDeviceId The external PCI device identifier for the GPU.
  2774. //!
  2775. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or an argument is NULL
  2776. //! \retval NVAPI_OK Arguments are populated with PCI identifiers
  2777. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2778. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  2779. //! \ingroup gpu
  2780. ///////////////////////////////////////////////////////////////////////////////
  2781. NVAPI_INTERFACE NvAPI_GPU_GetPCIIdentifiers(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pDeviceId,NvU32 *pSubSystemId,NvU32 *pRevisionId,NvU32 *pExtDeviceId);
  2782. //! \ingroup gpu
  2783. //! Used in NvAPI_GPU_GetGPUType().
  2784. typedef enum _NV_GPU_TYPE
  2785. {
  2786. NV_SYSTEM_TYPE_GPU_UNKNOWN = 0,
  2787. NV_SYSTEM_TYPE_IGPU = 1, //!< Integrated GPU
  2788. NV_SYSTEM_TYPE_DGPU = 2, //!< Discrete GPU
  2789. } NV_GPU_TYPE;
  2790. ///////////////////////////////////////////////////////////////////////////////
  2791. //
  2792. // FUNCTION NAME: NvAPI_GPU_GetGPUType
  2793. //
  2794. //! DESCRIPTION: This function returns the GPU type (integrated or discrete).
  2795. //! See ::NV_GPU_TYPE.
  2796. //!
  2797. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2798. //!
  2799. //!
  2800. //! \since Release: 173
  2801. //!
  2802. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu
  2803. //! \retval NVAPI_OK *pGpuType contains the GPU type
  2804. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2805. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  2806. //!
  2807. //! \ingroup gpu
  2808. ///////////////////////////////////////////////////////////////////////////////
  2809. NVAPI_INTERFACE NvAPI_GPU_GetGPUType(__in NvPhysicalGpuHandle hPhysicalGpu, __out NV_GPU_TYPE *pGpuType);
  2810. //! \ingroup gpu
  2811. //! Used in NvAPI_GPU_GetBusType()
  2812. typedef enum _NV_GPU_BUS_TYPE
  2813. {
  2814. NVAPI_GPU_BUS_TYPE_UNDEFINED = 0,
  2815. NVAPI_GPU_BUS_TYPE_PCI = 1,
  2816. NVAPI_GPU_BUS_TYPE_AGP = 2,
  2817. NVAPI_GPU_BUS_TYPE_PCI_EXPRESS = 3,
  2818. NVAPI_GPU_BUS_TYPE_FPCI = 4,
  2819. NVAPI_GPU_BUS_TYPE_AXI = 5,
  2820. } NV_GPU_BUS_TYPE;
  2821. ///////////////////////////////////////////////////////////////////////////////
  2822. //
  2823. // FUNCTION NAME: NvAPI_GPU_GetBusType
  2824. //
  2825. //! This function returns the type of bus associated with this GPU.
  2826. //!
  2827. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2828. //!
  2829. //!
  2830. //! \since Release: 90
  2831. //!
  2832. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  2833. //! specific meaning for this API, they are listed below.
  2834. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusType is NULL.
  2835. //! \retval NVAPI_OK *pBusType contains bus identifier.
  2836. //! \ingroup gpu
  2837. ///////////////////////////////////////////////////////////////////////////////
  2838. NVAPI_INTERFACE NvAPI_GPU_GetBusType(NvPhysicalGpuHandle hPhysicalGpu,NV_GPU_BUS_TYPE *pBusType);
  2839. ///////////////////////////////////////////////////////////////////////////////
  2840. //
  2841. // FUNCTION NAME: NvAPI_GPU_GetBusId
  2842. //
  2843. //! DESCRIPTION: Returns the ID of the bus associated with this GPU.
  2844. //!
  2845. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2846. //!
  2847. //!
  2848. //! \since Release: 167
  2849. //!
  2850. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusId is NULL.
  2851. //! \retval NVAPI_OK *pBusId contains the bus ID.
  2852. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2853. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2854. //!
  2855. //! \ingroup gpu
  2856. ///////////////////////////////////////////////////////////////////////////////
  2857. NVAPI_INTERFACE NvAPI_GPU_GetBusId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusId);
  2858. ///////////////////////////////////////////////////////////////////////////////
  2859. //
  2860. // FUNCTION NAME: NvAPI_GPU_GetBusSlotId
  2861. //
  2862. //! DESCRIPTION: Returns the ID of the bus slot associated with this GPU.
  2863. //!
  2864. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2865. //!
  2866. //!
  2867. //! \since Release: 167
  2868. //!
  2869. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusSlotId is NULL.
  2870. //! \retval NVAPI_OK *pBusSlotId contains the bus slot ID.
  2871. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2872. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2873. //!
  2874. //! \ingroup gpu
  2875. ///////////////////////////////////////////////////////////////////////////////
  2876. NVAPI_INTERFACE NvAPI_GPU_GetBusSlotId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusSlotId);
  2877. ///////////////////////////////////////////////////////////////////////////////
  2878. //
  2879. // FUNCTION NAME: NvAPI_GPU_GetIRQ
  2880. //
  2881. //! This function returns the interrupt number associated with this GPU.
  2882. //!
  2883. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2884. //!
  2885. //!
  2886. //! \since Release: 90
  2887. //!
  2888. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pIRQ is NULL.
  2889. //! \retval NVAPI_OK *pIRQ contains interrupt number.
  2890. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2891. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2892. //! \ingroup gpu
  2893. ///////////////////////////////////////////////////////////////////////////////
  2894. NVAPI_INTERFACE NvAPI_GPU_GetIRQ(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pIRQ);
  2895. ///////////////////////////////////////////////////////////////////////////////
  2896. //
  2897. // FUNCTION NAME: NvAPI_GPU_GetVbiosRevision
  2898. //
  2899. //! This function returns the revision of the video BIOS associated with this GPU.
  2900. //!
  2901. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2902. //!
  2903. //!
  2904. //! \since Release: 90
  2905. //!
  2906. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBiosRevision is NULL.
  2907. //! \retval NVAPI_OK *pBiosRevision contains revision number.
  2908. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2909. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2910. //! \ingroup gpu
  2911. ///////////////////////////////////////////////////////////////////////////////
  2912. NVAPI_INTERFACE NvAPI_GPU_GetVbiosRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision);
  2913. ///////////////////////////////////////////////////////////////////////////////
  2914. //
  2915. // FUNCTION NAME: NvAPI_GPU_GetVbiosOEMRevision
  2916. //
  2917. //! This function returns the OEM revision of the video BIOS associated with this GPU.
  2918. //!
  2919. //! SUPPORTED OS: Windows XP and higher
  2920. //!
  2921. //!
  2922. //! \since Release: 90
  2923. //!
  2924. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBiosRevision is NULL
  2925. //! \retval NVAPI_OK *pBiosRevision contains revision number
  2926. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  2927. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  2928. //! \ingroup gpu
  2929. ///////////////////////////////////////////////////////////////////////////////
  2930. NVAPI_INTERFACE NvAPI_GPU_GetVbiosOEMRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision);
  2931. ///////////////////////////////////////////////////////////////////////////////
  2932. //
  2933. // FUNCTION NAME: NvAPI_GPU_GetVbiosVersionString
  2934. //
  2935. //! This function returns the full video BIOS version string in the form of xx.xx.xx.xx.yy where
  2936. //! - xx numbers come from NvAPI_GPU_GetVbiosRevision() and
  2937. //! - yy comes from NvAPI_GPU_GetVbiosOEMRevision().
  2938. //!
  2939. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2940. //!
  2941. //!
  2942. //! \since Release: 90
  2943. //!
  2944. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu is NULL.
  2945. //! \retval NVAPI_OK szBiosRevision contains version string.
  2946. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2947. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2948. //! \ingroup gpu
  2949. ///////////////////////////////////////////////////////////////////////////////
  2950. NVAPI_INTERFACE NvAPI_GPU_GetVbiosVersionString(NvPhysicalGpuHandle hPhysicalGpu,NvAPI_ShortString szBiosRevision);
  2951. ///////////////////////////////////////////////////////////////////////////////
  2952. //
  2953. // FUNCTION NAME: NvAPI_GPU_GetAGPAperture
  2954. //
  2955. //! This function returns the AGP aperture in megabytes.
  2956. //!
  2957. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2958. //!
  2959. //!
  2960. //! \since Release: 90
  2961. //!
  2962. //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL.
  2963. //! \retval NVAPI_OK Call successful.
  2964. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2965. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2966. //! \ingroup gpu
  2967. ///////////////////////////////////////////////////////////////////////////////
  2968. NVAPI_INTERFACE NvAPI_GPU_GetAGPAperture(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
  2969. ///////////////////////////////////////////////////////////////////////////////
  2970. //
  2971. // FUNCTION NAME: NvAPI_GPU_GetCurrentAGPRate
  2972. //
  2973. //! This function returns the current AGP Rate (0 = AGP not present, 1 = 1x, 2 = 2x, etc.).
  2974. //!
  2975. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2976. //!
  2977. //!
  2978. //! \since Release: 90
  2979. //!
  2980. //! \retval NVAPI_INVALID_ARGUMENT pRate is NULL.
  2981. //! \retval NVAPI_OK Call successful.
  2982. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  2983. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  2984. //! \ingroup gpu
  2985. ///////////////////////////////////////////////////////////////////////////////
  2986. NVAPI_INTERFACE NvAPI_GPU_GetCurrentAGPRate(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pRate);
  2987. ///////////////////////////////////////////////////////////////////////////////
  2988. //
  2989. // FUNCTION NAME: NvAPI_GPU_GetCurrentPCIEDownstreamWidth
  2990. //
  2991. //! This function returns the number of PCIE lanes being used for the PCIE interface
  2992. //! downstream from the GPU.
  2993. //!
  2994. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2995. //!
  2996. //!
  2997. //! \since Release: 90
  2998. //!
  2999. //! \retval NVAPI_INVALID_ARGUMENT pWidth is NULL.
  3000. //! \retval NVAPI_OK Call successful.
  3001. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  3002. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  3003. //! \ingroup gpu
  3004. ///////////////////////////////////////////////////////////////////////////////
  3005. NVAPI_INTERFACE NvAPI_GPU_GetCurrentPCIEDownstreamWidth(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pWidth);
  3006. ///////////////////////////////////////////////////////////////////////////////
  3007. //
  3008. // FUNCTION NAME: NvAPI_GPU_GetPhysicalFrameBufferSize
  3009. //
  3010. //! This function returns the physical size of framebuffer in KB. This does NOT include any
  3011. //! system RAM that may be dedicated for use by the GPU.
  3012. //!
  3013. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3014. //!
  3015. //!
  3016. //! \since Release: 90
  3017. //!
  3018. //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL
  3019. //! \retval NVAPI_OK Call successful
  3020. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  3021. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  3022. //! \ingroup gpu
  3023. ///////////////////////////////////////////////////////////////////////////////
  3024. NVAPI_INTERFACE NvAPI_GPU_GetPhysicalFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
  3025. ///////////////////////////////////////////////////////////////////////////////
  3026. //
  3027. // FUNCTION NAME: NvAPI_GPU_GetVirtualFrameBufferSize
  3028. //
  3029. //! This function returns the virtual size of framebuffer in KB. This includes the physical RAM plus any
  3030. //! system RAM that has been dedicated for use by the GPU.
  3031. //!
  3032. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3033. //!
  3034. //!
  3035. //! \since Release: 90
  3036. //!
  3037. //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL.
  3038. //! \retval NVAPI_OK Call successful.
  3039. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  3040. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  3041. //! \ingroup gpu
  3042. ///////////////////////////////////////////////////////////////////////////////
  3043. NVAPI_INTERFACE NvAPI_GPU_GetVirtualFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
  3044. //! \ingroup gpu
  3045. typedef struct _NV_BOARD_INFO
  3046. {
  3047. NvU32 version; //!< structure version
  3048. NvU8 BoardNum[16]; //!< Board Serial Number
  3049. }NV_BOARD_INFO_V1;
  3050. //! \ingroup gpu
  3051. typedef NV_BOARD_INFO_V1 NV_BOARD_INFO;
  3052. //! \ingroup gpu
  3053. #define NV_BOARD_INFO_VER1 MAKE_NVAPI_VERSION(NV_BOARD_INFO_V1,1)
  3054. //! \ingroup gpu
  3055. #define NV_BOARD_INFO_VER NV_BOARD_INFO_VER1
  3056. //! SUPPORTED OS: Windows XP and higher
  3057. //!
  3058. ///////////////////////////////////////////////////////////////////////////////
  3059. //
  3060. // FUNCTION NAME: NvAPI_GPU_GetBoardInfo
  3061. //
  3062. //! DESCRIPTION: This API Retrieves the Board information (a unique GPU Board Serial Number) stored in the InfoROM.
  3063. //!
  3064. //! \param [in] hPhysicalGpu Physical GPU Handle.
  3065. //! \param [in,out] NV_BOARD_INFO Board Information.
  3066. //!
  3067. //! \retval ::NVAPI_OK completed request
  3068. //! \retval ::NVAPI_ERROR miscellaneous error occurred
  3069. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE handle passed is not a physical GPU handle
  3070. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  3071. //! \retval ::NVAPI_INVALID_POINTER pBoardInfo is NULL
  3072. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION the version of the INFO struct is not supported
  3073. //!
  3074. //! \ingroup gpu
  3075. ///////////////////////////////////////////////////////////////////////////////
  3076. NVAPI_INTERFACE NvAPI_GPU_GetBoardInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_BOARD_INFO *pBoardInfo);
  3077. ///////////////////////////////////////////////////////////////////////////////
  3078. //
  3079. // GPU Clock Control
  3080. //
  3081. // These APIs allow the user to get and set individual clock domains
  3082. // on a per-GPU basis.
  3083. //
  3084. ///////////////////////////////////////////////////////////////////////////////
  3085. //! \ingroup gpuclock
  3086. //! @{
  3087. #define NVAPI_MAX_GPU_CLOCKS 32
  3088. #define NVAPI_MAX_GPU_PUBLIC_CLOCKS 32
  3089. #define NVAPI_MAX_GPU_PERF_CLOCKS 32
  3090. #define NVAPI_MAX_GPU_PERF_VOLTAGES 16
  3091. #define NVAPI_MAX_GPU_PERF_PSTATES 16
  3092. //! @}
  3093. //! \ingroup gpuclock
  3094. typedef enum _NV_GPU_PUBLIC_CLOCK_ID
  3095. {
  3096. NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS = 0,
  3097. NVAPI_GPU_PUBLIC_CLOCK_MEMORY = 4,
  3098. NVAPI_GPU_PUBLIC_CLOCK_PROCESSOR = 7,
  3099. NVAPI_GPU_PUBLIC_CLOCK_UNDEFINED = NVAPI_MAX_GPU_PUBLIC_CLOCKS,
  3100. } NV_GPU_PUBLIC_CLOCK_ID;
  3101. //! \ingroup gpuclock
  3102. typedef enum _NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID
  3103. {
  3104. NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_CORE = 0,
  3105. NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_UNDEFINED = NVAPI_MAX_GPU_PERF_VOLTAGES,
  3106. } NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID;
  3107. //! \addtogroup gpupstate
  3108. //! @{
  3109. typedef enum _NV_GPU_PERF_PSTATE_ID
  3110. {
  3111. NVAPI_GPU_PERF_PSTATE_P0 = 0,
  3112. NVAPI_GPU_PERF_PSTATE_P1,
  3113. NVAPI_GPU_PERF_PSTATE_P2,
  3114. NVAPI_GPU_PERF_PSTATE_P3,
  3115. NVAPI_GPU_PERF_PSTATE_P4,
  3116. NVAPI_GPU_PERF_PSTATE_P5,
  3117. NVAPI_GPU_PERF_PSTATE_P6,
  3118. NVAPI_GPU_PERF_PSTATE_P7,
  3119. NVAPI_GPU_PERF_PSTATE_P8,
  3120. NVAPI_GPU_PERF_PSTATE_P9,
  3121. NVAPI_GPU_PERF_PSTATE_P10,
  3122. NVAPI_GPU_PERF_PSTATE_P11,
  3123. NVAPI_GPU_PERF_PSTATE_P12,
  3124. NVAPI_GPU_PERF_PSTATE_P13,
  3125. NVAPI_GPU_PERF_PSTATE_P14,
  3126. NVAPI_GPU_PERF_PSTATE_P15,
  3127. NVAPI_GPU_PERF_PSTATE_UNDEFINED = NVAPI_MAX_GPU_PERF_PSTATES,
  3128. NVAPI_GPU_PERF_PSTATE_ALL,
  3129. } NV_GPU_PERF_PSTATE_ID;
  3130. //! @}
  3131. //! \ingroup gpupstate
  3132. //! Used in NvAPI_GPU_GetPstatesInfoEx()
  3133. typedef struct
  3134. {
  3135. NvU32 version;
  3136. NvU32 flags; //!< - bit 0 indicates if perfmon is enabled or not
  3137. //!< - bit 1 indicates if dynamic Pstate is capable or not
  3138. //!< - bit 2 indicates if dynamic Pstate is enable or not
  3139. //!< - all other bits must be set to 0
  3140. NvU32 numPstates; //!< The number of available p-states
  3141. NvU32 numClocks; //!< The number of clock domains supported by each P-State
  3142. struct
  3143. {
  3144. NV_GPU_PERF_PSTATE_ID pstateId; //!< ID of the p-state.
  3145. NvU32 flags; //!< - bit 0 indicates if the PCIE limit is GEN1 or GEN2
  3146. //!< - bit 1 indicates if the Pstate is overclocked or not
  3147. //!< - bit 2 indicates if the Pstate is overclockable or not
  3148. //!< - all other bits must be set to 0
  3149. struct
  3150. {
  3151. NV_GPU_PUBLIC_CLOCK_ID domainId; //!< ID of the clock domain
  3152. NvU32 flags; //!< Reserved. Must be set to 0
  3153. NvU32 freq; //!< Clock frequency in kHz
  3154. } clocks[NVAPI_MAX_GPU_PERF_CLOCKS];
  3155. } pstates[NVAPI_MAX_GPU_PERF_PSTATES];
  3156. } NV_GPU_PERF_PSTATES_INFO_V1;
  3157. //! \ingroup gpupstate
  3158. typedef struct
  3159. {
  3160. NvU32 version;
  3161. NvU32 flags; //!< - bit 0 indicates if perfmon is enabled or not
  3162. //!< - bit 1 indicates if dynamic Pstate is capable or not
  3163. //!< - bit 2 indicates if dynamic Pstate is enable or not
  3164. //!< - all other bits must be set to 0
  3165. NvU32 numPstates; //!< The number of available p-states
  3166. NvU32 numClocks; //!< The number of clock domains supported by each P-State
  3167. NvU32 numVoltages;
  3168. struct
  3169. {
  3170. NV_GPU_PERF_PSTATE_ID pstateId; //!< ID of the p-state.
  3171. NvU32 flags; //!< - bit 0 indicates if the PCIE limit is GEN1 or GEN2
  3172. //!< - bit 1 indicates if the Pstate is overclocked or not
  3173. //!< - bit 2 indicates if the Pstate is overclockable or not
  3174. //!< - all other bits must be set to 0
  3175. struct
  3176. {
  3177. NV_GPU_PUBLIC_CLOCK_ID domainId;
  3178. NvU32 flags; //!< bit 0 indicates if this clock is overclockable
  3179. //!< all other bits must be set to 0
  3180. NvU32 freq;
  3181. } clocks[NVAPI_MAX_GPU_PERF_CLOCKS];
  3182. struct
  3183. {
  3184. NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //!< ID of the voltage domain, containing flags and mvolt info
  3185. NvU32 flags; //!< Reserved for future use. Must be set to 0
  3186. NvU32 mvolt; //!< Voltage in mV
  3187. } voltages[NVAPI_MAX_GPU_PERF_VOLTAGES];
  3188. } pstates[NVAPI_MAX_GPU_PERF_PSTATES]; //!< Valid index range is 0 to numVoltages-1
  3189. } NV_GPU_PERF_PSTATES_INFO_V2;
  3190. //! \ingroup gpupstate
  3191. typedef NV_GPU_PERF_PSTATES_INFO_V2 NV_GPU_PERF_PSTATES_INFO;
  3192. //! \ingroup gpupstate
  3193. //! @{
  3194. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V1
  3195. #define NV_GPU_PERF_PSTATES_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V1,1)
  3196. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V2
  3197. #define NV_GPU_PERF_PSTATES_INFO_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V2,2)
  3198. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO
  3199. #define NV_GPU_PERF_PSTATES_INFO_VER NV_GPU_PERF_PSTATES_INFO_VER2
  3200. //! @}
  3201. ///////////////////////////////////////////////////////////////////////////////
  3202. //
  3203. // FUNCTION NAME: NvAPI_GPU_GetPstatesInfoEx
  3204. //
  3205. //! DESCRIPTION: This API retrieves all performance states (P-States) information. This is the same as
  3206. //! NvAPI_GPU_GetPstatesInfo(), but supports an input flag for various options.
  3207. //!
  3208. //! P-States are GPU active/executing performance capability and power consumption states.
  3209. //!
  3210. //! P-States ranges from P0 to P15, with P0 being the highest performance/power state, and
  3211. //! P15 being the lowest performance/power state. Each P-State, if available, maps to a
  3212. //! performance level. Not all P-States are available on a given system. The definitions
  3213. //! of each P-State are currently as follows: \n
  3214. //! - P0/P1 - Maximum 3D performance
  3215. //! - P2/P3 - Balanced 3D performance-power
  3216. //! - P8 - Basic HD video playback
  3217. //! - P10 - DVD playback
  3218. //! - P12 - Minimum idle power consumption
  3219. //!
  3220. //! \deprecated Do not use this function - it is deprecated in release 304. Instead, use NvAPI_GPU_GetPstates20.
  3221. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3222. //!
  3223. //!
  3224. //! \param [in] hPhysicalGPU GPU selection.
  3225. //! \param [out] pPerfPstatesInfo P-States information retrieved, as detailed below: \n
  3226. //! - flags is reserved for future use.
  3227. //! - numPstates is the number of available P-States
  3228. //! - numClocks is the number of clock domains supported by each P-State
  3229. //! - pstates has valid index range from 0 to numPstates - 1
  3230. //! - pstates[i].pstateId is the ID of the P-State,
  3231. //! containing the following info:
  3232. //! - pstates[i].flags containing the following info:
  3233. //! - bit 0 indicates if the PCIE limit is GEN1 or GEN2
  3234. //! - bit 1 indicates if the Pstate is overclocked or not
  3235. //! - bit 2 indicates if the Pstate is overclockable or not
  3236. //! - pstates[i].clocks has valid index range from 0 to numClocks -1
  3237. //! - pstates[i].clocks[j].domainId is the public ID of the clock domain,
  3238. //! containing the following info:
  3239. //! - pstates[i].clocks[j].flags containing the following info:
  3240. //! bit 0 indicates if the clock domain is overclockable or not
  3241. //! - pstates[i].clocks[j].freq is the clock frequency in kHz
  3242. //! - pstates[i].voltages has a valid index range from 0 to numVoltages - 1
  3243. //! - pstates[i].voltages[j].domainId is the ID of the voltage domain,
  3244. //! containing the following info:
  3245. //! - pstates[i].voltages[j].flags is reserved for future use.
  3246. //! - pstates[i].voltages[j].mvolt is the voltage in mV
  3247. //! inputFlags(IN) - This can be used to select various options:
  3248. //! - if bit 0 is set, pPerfPstatesInfo would contain the default settings
  3249. //! instead of the current, possibily overclocked settings.
  3250. //! - if bit 1 is set, pPerfPstatesInfo would contain the maximum clock
  3251. //! frequencies instead of the nominal frequencies.
  3252. //! - if bit 2 is set, pPerfPstatesInfo would contain the minimum clock
  3253. //! frequencies instead of the nominal frequencies.
  3254. //! - all other bits must be set to 0.
  3255. //!
  3256. //! \retval ::NVAPI_OK Completed request
  3257. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  3258. //! \retval ::NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide)
  3259. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle
  3260. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_GPU_PERF_PSTATES struct is not supported
  3261. //!
  3262. //! \ingroup gpupstate
  3263. ///////////////////////////////////////////////////////////////////////////////
  3264. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 304. Instead, use NvAPI_GPU_GetPstates20.")
  3265. NVAPI_INTERFACE NvAPI_GPU_GetPstatesInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATES_INFO *pPerfPstatesInfo, NvU32 inputFlags);
  3266. //! \addtogroup gpupstate
  3267. //! @{
  3268. #define NVAPI_MAX_GPU_PSTATE20_PSTATES 16
  3269. #define NVAPI_MAX_GPU_PSTATE20_CLOCKS 8
  3270. #define NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES 4
  3271. //! Used to identify clock type
  3272. typedef enum
  3273. {
  3274. //! Clock domains that use single frequency value within given pstate
  3275. NVAPI_GPU_PERF_PSTATE20_CLOCK_TYPE_SINGLE = 0,
  3276. //! Clock domains that allow range of frequency values within given pstate
  3277. NVAPI_GPU_PERF_PSTATE20_CLOCK_TYPE_RANGE,
  3278. } NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID;
  3279. //! Used to describe both voltage and frequency deltas
  3280. typedef struct
  3281. {
  3282. //! Value of parameter delta (in respective units [kHz, uV])
  3283. NvS32 value;
  3284. struct
  3285. {
  3286. //! Min value allowed for parameter delta (in respective units [kHz, uV])
  3287. NvS32 min;
  3288. //! Max value allowed for parameter delta (in respective units [kHz, uV])
  3289. NvS32 max;
  3290. } valueRange;
  3291. } NV_GPU_PERF_PSTATES20_PARAM_DELTA;
  3292. //! Used to describe single clock entry
  3293. typedef struct
  3294. {
  3295. //! ID of the clock domain
  3296. NV_GPU_PUBLIC_CLOCK_ID domainId;
  3297. //! Clock type ID
  3298. NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID typeId;
  3299. NvU32 bIsEditable:1;
  3300. //! These bits are reserved for future use (must be always 0)
  3301. NvU32 reserved:31;
  3302. //! Current frequency delta from nominal settings in [kHz]
  3303. NV_GPU_PERF_PSTATES20_PARAM_DELTA freqDelta_kHz;
  3304. //! Clock domain type dependant information
  3305. union
  3306. {
  3307. struct
  3308. {
  3309. //! Clock frequency within given pstate in [kHz]
  3310. NvU32 freq_kHz;
  3311. } single;
  3312. struct
  3313. {
  3314. //! Min clock frequency within given pstate in [kHz]
  3315. NvU32 minFreq_kHz;
  3316. //! Max clock frequency within given pstate in [kHz]
  3317. NvU32 maxFreq_kHz;
  3318. //! Voltage domain ID and value range (in [uV]) required for this clock
  3319. NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId;
  3320. NvU32 minVoltage_uV;
  3321. NvU32 maxVoltage_uV;
  3322. } range;
  3323. } data;
  3324. } NV_GPU_PSTATE20_CLOCK_ENTRY_V1;
  3325. //! Used to describe single base voltage entry
  3326. typedef struct
  3327. {
  3328. //! ID of the voltage domain
  3329. NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId;
  3330. NvU32 bIsEditable:1;
  3331. //! These bits are reserved for future use (must be always 0)
  3332. NvU32 reserved:31;
  3333. //! Current base voltage settings in [uV]
  3334. NvU32 volt_uV;
  3335. NV_GPU_PERF_PSTATES20_PARAM_DELTA voltDelta_uV; // Current base voltage delta from nominal settings in [uV]
  3336. } NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1;
  3337. //! Used in NvAPI_GPU_GetPstates20() interface call.
  3338. typedef struct
  3339. {
  3340. //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER<n>)
  3341. NvU32 version;
  3342. NvU32 bIsEditable:1;
  3343. //! These bits are reserved for future use (must be always 0)
  3344. NvU32 reserved:31;
  3345. //! Number of populated pstates
  3346. NvU32 numPstates;
  3347. //! Number of populated clocks (per pstate)
  3348. NvU32 numClocks;
  3349. //! Number of populated base voltages (per pstate)
  3350. NvU32 numBaseVoltages;
  3351. //! Performance state (P-State) settings
  3352. //! Valid index range is 0 to numPstates-1
  3353. struct
  3354. {
  3355. //! ID of the P-State
  3356. NV_GPU_PERF_PSTATE_ID pstateId;
  3357. NvU32 bIsEditable:1;
  3358. //! These bits are reserved for future use (must be always 0)
  3359. NvU32 reserved:31;
  3360. //! Array of clock entries
  3361. //! Valid index range is 0 to numClocks-1
  3362. NV_GPU_PSTATE20_CLOCK_ENTRY_V1 clocks[NVAPI_MAX_GPU_PSTATE20_CLOCKS];
  3363. //! Array of baseVoltage entries
  3364. //! Valid index range is 0 to numBaseVoltages-1
  3365. NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 baseVoltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES];
  3366. } pstates[NVAPI_MAX_GPU_PSTATE20_PSTATES];
  3367. } NV_GPU_PERF_PSTATES20_INFO_V1;
  3368. typedef NV_GPU_PERF_PSTATES20_INFO_V1 NV_GPU_PERF_PSTATES20_INFO;
  3369. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V1
  3370. #define NV_GPU_PERF_PSTATES20_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V1,1)
  3371. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO
  3372. #define NV_GPU_PERF_PSTATES20_INFO_VER NV_GPU_PERF_PSTATES20_INFO_VER1
  3373. //! @}
  3374. ///////////////////////////////////////////////////////////////////////////////
  3375. //
  3376. // FUNCTION NAME: NvAPI_GPU_GetPstates20
  3377. //
  3378. //! DESCRIPTION: This API retrieves all performance states (P-States) 2.0 information.
  3379. //!
  3380. //! P-States are GPU active/executing performance capability states.
  3381. //! They range from P0 to P15, with P0 being the highest performance state,
  3382. //! and P15 being the lowest performance state. Each P-State, if available,
  3383. //! maps to a performance level. Not all P-States are available on a given system.
  3384. //! The definition of each P-States are currently as follow:
  3385. //! - P0/P1 - Maximum 3D performance
  3386. //! - P2/P3 - Balanced 3D performance-power
  3387. //! - P8 - Basic HD video playback
  3388. //! - P10 - DVD playback
  3389. //! - P12 - Minimum idle power consumption
  3390. //!
  3391. //! \since Release: 295
  3392. //!
  3393. //! SUPPORTED OS: Windows XP and higher
  3394. //!
  3395. //!
  3396. //! \param [in] hPhysicalGPU GPU selection
  3397. //! \param [out] pPstatesInfo P-States information retrieved, as documented in declaration above
  3398. //!
  3399. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  3400. //! If there are return error codes with specific meaning for this API,
  3401. //! they are listed below.
  3402. //!
  3403. //! \ingroup gpupstate
  3404. ///////////////////////////////////////////////////////////////////////////////
  3405. NVAPI_INTERFACE NvAPI_GPU_GetPstates20(__in NvPhysicalGpuHandle hPhysicalGpu, __out NV_GPU_PERF_PSTATES20_INFO *pPstatesInfo);
  3406. ///////////////////////////////////////////////////////////////////////////////
  3407. //
  3408. // FUNCTION NAME: NvAPI_GPU_GetCurrentPstate
  3409. //
  3410. //! DESCRIPTION: This function retrieves the current performance state (P-State).
  3411. //!
  3412. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3413. //!
  3414. //!
  3415. //! \since Release: 165
  3416. //!
  3417. //! \param [in] hPhysicalGPU GPU selection
  3418. //! \param [out] pCurrentPstate The ID of the current P-State of the GPU - see \ref NV_GPU_PERF_PSTATES.
  3419. //!
  3420. //! \retval NVAPI_OK Completed request
  3421. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  3422. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  3423. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  3424. //! \retval NVAPI_NOT_SUPPORTED P-States is not supported on this setup.
  3425. //!
  3426. //! \ingroup gpupstate
  3427. ///////////////////////////////////////////////////////////////////////////////
  3428. NVAPI_INTERFACE NvAPI_GPU_GetCurrentPstate(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATE_ID *pCurrentPstate);
  3429. //! \ingroup gpupstate
  3430. #define NVAPI_MAX_GPU_UTILIZATIONS 8
  3431. //! \ingroup gpupstate
  3432. //! Used in NvAPI_GPU_GetDynamicPstatesInfoEx().
  3433. typedef struct
  3434. {
  3435. NvU32 version; //!< Structure version
  3436. NvU32 flags; //!< bit 0 indicates if the dynamic Pstate is enabled or not
  3437. struct
  3438. {
  3439. NvU32 bIsPresent:1; //!< Set if this utilization domain is present on this GPU
  3440. NvU32 percentage; //!< Percentage of time where the domain is considered busy in the last 1 second interval
  3441. } utilization[NVAPI_MAX_GPU_UTILIZATIONS];
  3442. } NV_GPU_DYNAMIC_PSTATES_INFO_EX;
  3443. //! \ingroup gpupstate
  3444. //! Macro for constructing the version field of NV_GPU_DYNAMIC_PSTATES_INFO_EX
  3445. #define NV_GPU_DYNAMIC_PSTATES_INFO_EX_VER MAKE_NVAPI_VERSION(NV_GPU_DYNAMIC_PSTATES_INFO_EX,1)
  3446. ///////////////////////////////////////////////////////////////////////////////
  3447. //
  3448. // FUNCTION NAME: NvAPI_GPU_GetDynamicPstatesInfoEx
  3449. //
  3450. //! DESCRIPTION: This API retrieves the NV_GPU_DYNAMIC_PSTATES_INFO_EX structure for the specified physical GPU.
  3451. //! Each domain's info is indexed in the array. For example:
  3452. //! - pDynamicPstatesInfo->utilization[NVAPI_GPU_UTILIZATION_DOMAIN_GPU] holds the info for the GPU domain. \p
  3453. //! There are currently 4 domains for which GPU utilization and dynamic P-State thresholds can be retrieved:
  3454. //! graphic engine (GPU), frame buffer (FB), video engine (VID), and bus interface (BUS).
  3455. //!
  3456. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3457. //!
  3458. //!
  3459. //! \since Release: 185
  3460. //!
  3461. //! \retval ::NVAPI_OK
  3462. //! \retval ::NVAPI_ERROR
  3463. //! \retval ::NVAPI_INVALID_ARGUMENT pDynamicPstatesInfo is NULL
  3464. //! \retval ::NVAPI_HANDLE_INVALIDATED
  3465. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE
  3466. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the INFO struct is not supported
  3467. //!
  3468. //! \ingroup gpupstate
  3469. ///////////////////////////////////////////////////////////////////////////////
  3470. NVAPI_INTERFACE NvAPI_GPU_GetDynamicPstatesInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_DYNAMIC_PSTATES_INFO_EX *pDynamicPstatesInfoEx);
  3471. ///////////////////////////////////////////////////////////////////////////////////
  3472. // Thermal API
  3473. // Provides ability to get temperature levels from the various thermal sensors associated with the GPU
  3474. //! \ingroup gputhermal
  3475. #define NVAPI_MAX_THERMAL_SENSORS_PER_GPU 3
  3476. //! \ingroup gputhermal
  3477. //! Used in NV_GPU_THERMAL_SETTINGS
  3478. typedef enum
  3479. {
  3480. NVAPI_THERMAL_TARGET_NONE = 0,
  3481. NVAPI_THERMAL_TARGET_GPU = 1, //!< GPU core temperature requires NvPhysicalGpuHandle
  3482. NVAPI_THERMAL_TARGET_MEMORY = 2, //!< GPU memory temperature requires NvPhysicalGpuHandle
  3483. NVAPI_THERMAL_TARGET_POWER_SUPPLY = 4, //!< GPU power supply temperature requires NvPhysicalGpuHandle
  3484. NVAPI_THERMAL_TARGET_BOARD = 8, //!< GPU board ambient temperature requires NvPhysicalGpuHandle
  3485. NVAPI_THERMAL_TARGET_VCD_BOARD = 9, //!< Visual Computing Device Board temperature requires NvVisualComputingDeviceHandle
  3486. NVAPI_THERMAL_TARGET_VCD_INLET = 10, //!< Visual Computing Device Inlet temperature requires NvVisualComputingDeviceHandle
  3487. NVAPI_THERMAL_TARGET_VCD_OUTLET = 11, //!< Visual Computing Device Outlet temperature requires NvVisualComputingDeviceHandle
  3488. NVAPI_THERMAL_TARGET_ALL = 15,
  3489. NVAPI_THERMAL_TARGET_UNKNOWN = -1,
  3490. } NV_THERMAL_TARGET;
  3491. //! \ingroup gputhermal
  3492. //! Used in NV_GPU_THERMAL_SETTINGS
  3493. typedef enum
  3494. {
  3495. NVAPI_THERMAL_CONTROLLER_NONE = 0,
  3496. NVAPI_THERMAL_CONTROLLER_GPU_INTERNAL,
  3497. NVAPI_THERMAL_CONTROLLER_ADM1032,
  3498. NVAPI_THERMAL_CONTROLLER_MAX6649,
  3499. NVAPI_THERMAL_CONTROLLER_MAX1617,
  3500. NVAPI_THERMAL_CONTROLLER_LM99,
  3501. NVAPI_THERMAL_CONTROLLER_LM89,
  3502. NVAPI_THERMAL_CONTROLLER_LM64,
  3503. NVAPI_THERMAL_CONTROLLER_ADT7473,
  3504. NVAPI_THERMAL_CONTROLLER_SBMAX6649,
  3505. NVAPI_THERMAL_CONTROLLER_VBIOSEVT,
  3506. NVAPI_THERMAL_CONTROLLER_OS,
  3507. NVAPI_THERMAL_CONTROLLER_UNKNOWN = -1,
  3508. } NV_THERMAL_CONTROLLER;
  3509. //! \ingroup gputhermal
  3510. //! Used in NvAPI_GPU_GetThermalSettings()
  3511. typedef struct
  3512. {
  3513. NvU32 version; //!< structure version
  3514. NvU32 count; //!< number of associated thermal sensors
  3515. struct
  3516. {
  3517. NV_THERMAL_CONTROLLER controller; //!< internal, ADM1032, MAX6649...
  3518. NvU32 defaultMinTemp; //!< The min default temperature value of the thermal sensor in degrees centigrade
  3519. NvU32 defaultMaxTemp; //!< The max default temperature value of the thermal sensor in degrees centigrade
  3520. NvU32 currentTemp; //!< The current temperature value of the thermal sensor in degrees centigrade
  3521. NV_THERMAL_TARGET target; //!< Thermal sensor targeted @ GPU, memory, chipset, powersupply, Visual Computing Device, etc.
  3522. } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU];
  3523. } NV_GPU_THERMAL_SETTINGS_V1;
  3524. //! \ingroup gputhermal
  3525. typedef struct
  3526. {
  3527. NvU32 version; //!< structure version
  3528. NvU32 count; //!< number of associated thermal sensors
  3529. struct
  3530. {
  3531. NV_THERMAL_CONTROLLER controller; //!< internal, ADM1032, MAX6649...
  3532. NvS32 defaultMinTemp; //!< Minimum default temperature value of the thermal sensor in degrees C
  3533. NvS32 defaultMaxTemp; //!< Maximum default temperature value of the thermal sensor in degrees C
  3534. NvS32 currentTemp; //!< Current temperature value of the thermal sensor in degrees C
  3535. NV_THERMAL_TARGET target; //!< Thermal sensor targeted - GPU, memory, chipset, powersupply, Visual Computing Device, etc
  3536. } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU];
  3537. } NV_GPU_THERMAL_SETTINGS_V2;
  3538. //! \ingroup gputhermal
  3539. typedef NV_GPU_THERMAL_SETTINGS_V2 NV_GPU_THERMAL_SETTINGS;
  3540. //! \ingroup gputhermal
  3541. //! @{
  3542. //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS_V1
  3543. #define NV_GPU_THERMAL_SETTINGS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS_V1,1)
  3544. //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS_V2
  3545. #define NV_GPU_THERMAL_SETTINGS_VER_2 MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS_V2,2)
  3546. //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS
  3547. #define NV_GPU_THERMAL_SETTINGS_VER NV_GPU_THERMAL_SETTINGS_VER_2
  3548. //! @}
  3549. ///////////////////////////////////////////////////////////////////////////////
  3550. //
  3551. // FUNCTION NAME: NvAPI_GPU_GetThermalSettings
  3552. //
  3553. //! This function retrieves the thermal information of all thermal sensors or specific thermal sensor associated with the selected GPU.
  3554. //! Thermal sensors are indexed 0 to NVAPI_MAX_THERMAL_SENSORS_PER_GPU-1.
  3555. //!
  3556. //! - To retrieve specific thermal sensor info, set the sensorIndex to the required thermal sensor index.
  3557. //! - To retrieve info for all sensors, set sensorIndex to NVAPI_THERMAL_TARGET_ALL.
  3558. //!
  3559. //! SUPPORTED OS: Windows XP and higher
  3560. //!
  3561. //!
  3562. //! \since Release: 85
  3563. //!
  3564. //! \param [in] hPhysicalGPU GPU selection.
  3565. //! \param [in] sensorIndex Explicit thermal sensor index selection.
  3566. //! \param [out] pThermalSettings Array of thermal settings.
  3567. //!
  3568. //! \retval NVAPI_OK Completed request
  3569. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  3570. //! \retval NVAPI_INVALID_ARGUMENT pThermalInfo is NULL.
  3571. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  3572. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  3573. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the INFO struct is not supported.
  3574. //! \ingroup gputhermal
  3575. ///////////////////////////////////////////////////////////////////////////////
  3576. NVAPI_INTERFACE NvAPI_GPU_GetThermalSettings(NvPhysicalGpuHandle hPhysicalGpu, NvU32 sensorIndex, NV_GPU_THERMAL_SETTINGS *pThermalSettings);
  3577. ///////////////////////////////////////////////////////////////////////////////////
  3578. // I2C API
  3579. // Provides ability to read or write data using I2C protocol.
  3580. // These APIs allow I2C access only to DDC monitors
  3581. //! \addtogroup i2capi
  3582. //! @{
  3583. #define NVAPI_MAX_SIZEOF_I2C_DATA_BUFFER 4096
  3584. #define NVAPI_MAX_SIZEOF_I2C_REG_ADDRESS 4
  3585. #define NVAPI_DISPLAY_DEVICE_MASK_MAX 24
  3586. #define NVAPI_I2C_SPEED_DEPRECATED 0xFFFF
  3587. typedef enum
  3588. {
  3589. NVAPI_I2C_SPEED_DEFAULT, //!< Set i2cSpeedKhz to I2C_SPEED_DEFAULT if default I2C speed is to be chosen, ie.use the current frequency setting.
  3590. NVAPI_I2C_SPEED_3KHZ,
  3591. NVAPI_I2C_SPEED_10KHZ,
  3592. NVAPI_I2C_SPEED_33KHZ,
  3593. NVAPI_I2C_SPEED_100KHZ,
  3594. NVAPI_I2C_SPEED_200KHZ,
  3595. NVAPI_I2C_SPEED_400KHZ,
  3596. } NV_I2C_SPEED;
  3597. //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite()
  3598. typedef struct
  3599. {
  3600. NvU32 version; //!< The structure version.
  3601. NvU32 displayMask; //!< The Display Mask of the concerned display.
  3602. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port
  3603. //!< (FALSE) of the concerned display.
  3604. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For
  3605. //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored
  3606. //!< here as 0xA0. This matches the position within the byte sent by the master, as
  3607. //!< the last bit is reserved to specify the read or write direction.
  3608. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register
  3609. //!< address should be sent.
  3610. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this
  3611. //!< field must be 0.
  3612. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command).
  3613. NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written.
  3614. NvU32 i2cSpeed; //!< The target speed of the transaction (between 28kbps to 40kbps; not guaranteed).
  3615. } NV_I2C_INFO_V1;
  3616. //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite()
  3617. typedef struct
  3618. {
  3619. NvU32 version; //!< The structure version.
  3620. NvU32 displayMask; //!< The Display Mask of the concerned display.
  3621. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port
  3622. //!< (FALSE) of the concerned display.
  3623. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For
  3624. //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored
  3625. //!< here as 0xA0. This matches the position within the byte sent by the master, as
  3626. //!< the last bit is reserved to specify the read or write direction.
  3627. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register
  3628. //!< address should be sent.
  3629. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this
  3630. //!< field must be 0.
  3631. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command).
  3632. NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written.
  3633. NvU32 i2cSpeed; //!< Deprecated, Must be set to NVAPI_I2C_SPEED_DEPRECATED.
  3634. NV_I2C_SPEED i2cSpeedKhz; //!< The target speed of the transaction in KHz (Chosen from the enum NV_I2C_SPEED).
  3635. } NV_I2C_INFO_V2;
  3636. //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite()
  3637. typedef struct
  3638. {
  3639. NvU32 version; //!< The structure version.
  3640. NvU32 displayMask; //!< The Display Mask of the concerned display.
  3641. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port
  3642. //!< (FALSE) of the concerned display.
  3643. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For
  3644. //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored
  3645. //!< here as 0xA0. This matches the position within the byte sent by the master, as
  3646. //!< the last bit is reserved to specify the read or write direction.
  3647. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register
  3648. //!< address should be sent.
  3649. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this
  3650. //!< field must be 0.
  3651. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command).
  3652. NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written.
  3653. NvU32 i2cSpeed; //!< Deprecated, Must be set to NVAPI_I2C_SPEED_DEPRECATED.
  3654. NV_I2C_SPEED i2cSpeedKhz; //!< The target speed of the transaction in KHz (Chosen from the enum NV_I2C_SPEED).
  3655. NvU8 portId; //!< The portid on which device is connected (remember to set bIsPortIdSet if this value is set)
  3656. //!< Optional for pre-Kepler
  3657. NvU32 bIsPortIdSet; //!< set this flag on if and only if portid value is set
  3658. } NV_I2C_INFO_V3;
  3659. typedef NV_I2C_INFO_V3 NV_I2C_INFO;
  3660. #define NV_I2C_INFO_VER3 MAKE_NVAPI_VERSION(NV_I2C_INFO_V3,3)
  3661. #define NV_I2C_INFO_VER2 MAKE_NVAPI_VERSION(NV_I2C_INFO_V2,2)
  3662. #define NV_I2C_INFO_VER1 MAKE_NVAPI_VERSION(NV_I2C_INFO_V1,1)
  3663. #define NV_I2C_INFO_VER NV_I2C_INFO_VER3
  3664. //! @}
  3665. /***********************************************************************************/
  3666. ///////////////////////////////////////////////////////////////////////////////
  3667. //
  3668. // FUNCTION NAME: NvAPI_I2CRead
  3669. //
  3670. //! This function reads the data buffer from the I2C port.
  3671. //! The I2C request must be for a DDC port: pI2cInfo->bIsDDCPort = 1.
  3672. //!
  3673. //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case,
  3674. //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned.
  3675. //!
  3676. //! If a register address is specified (i.e. regAddrSize is positive), then the transaction will be performed in
  3677. //! the combined format described in the I2C specification. The register address will be written, followed by
  3678. //! reading into the data buffer.
  3679. //!
  3680. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3681. //!
  3682. //!
  3683. //! \since Release: 85
  3684. //!
  3685. //! \param [in] hPhysicalGPU GPU selection.
  3686. //! \param [out] NV_I2C_INFO *pI2cInfo The I2C data input structure
  3687. //!
  3688. //! \retval NVAPI_OK Completed request
  3689. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  3690. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  3691. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  3692. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported.
  3693. //! \retval NVAPI_INVALID_ARGUMENT - argument does not meet specified requirements
  3694. //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE - an argument exceeds the maximum
  3695. //!
  3696. //! \ingroup i2capi
  3697. ///////////////////////////////////////////////////////////////////////////////
  3698. NVAPI_INTERFACE NvAPI_I2CRead(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo);
  3699. ///////////////////////////////////////////////////////////////////////////////
  3700. //
  3701. // FUNCTION NAME: NvAPI_I2CWrite
  3702. //
  3703. //! This function writes the data buffer to the I2C port.
  3704. //!
  3705. //! The I2C request must be for a DDC port: pI2cInfo->bIsDDCPort = 1.
  3706. //!
  3707. //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case,
  3708. //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned.
  3709. //!
  3710. //! If a register address is specified (i.e. regAddrSize is positive), then the register address will be written
  3711. //! and the data buffer will immediately follow without a restart.
  3712. //!
  3713. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  3714. //!
  3715. //!
  3716. //! \since Release: 85
  3717. //!
  3718. //! \param [in] hPhysicalGPU GPU selection.
  3719. //! \param [in] pI2cInfo The I2C data input structure
  3720. //!
  3721. //! \retval NVAPI_OK Completed request
  3722. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  3723. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  3724. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  3725. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported.
  3726. //! \retval NVAPI_INVALID_ARGUMENT Argument does not meet specified requirements
  3727. //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE Argument exceeds the maximum
  3728. //!
  3729. //! \ingroup i2capi
  3730. ///////////////////////////////////////////////////////////////////////////////
  3731. NVAPI_INTERFACE NvAPI_I2CWrite(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo);
  3732. ///////////////////////////////////////////////////////////////////////////////
  3733. //
  3734. // FUNCTION NAME: NvAPI_GPU_WorkstationFeatureSetup
  3735. //
  3736. //! \fn NvAPI_GPU_WorkstationFeatureSetup(NvPhysicalGpuHandle hPhysicalGpu, NvU32 featureEnableMask, NvU32 featureDisableMask)
  3737. //! DESCRIPTION: This API configures the driver for a set of workstation features.
  3738. //! The driver can allocate the memory resources accordingly.
  3739. //!
  3740. //! SUPPORTED OS: Windows 7
  3741. //!
  3742. //!
  3743. //! \param [in] hPhysicalGpu Physical GPU Handle of the display adapter to be configured. GPU handles may be retrieved
  3744. //! using NvAPI_EnumPhysicalGPUs. A value of NULL is permitted and applies the same operation
  3745. //! to all GPU handles enumerated by NvAPI_EnumPhysicalGPUs.
  3746. //! \param [in] featureEnableMask Mask of features the caller requests to enable for use
  3747. //! \param [in] featureDisableMask Mask of features the caller requests to disable
  3748. //!
  3749. //! As a general rule, features in the enable and disable masks are expected to be disjoint, although the disable
  3750. //! mask has precedence and a feature flagged in both masks will be disabled.
  3751. //!
  3752. //! \retval ::NVAPI_OK configuration request succeeded
  3753. //! \retval ::NVAPI_ERROR configuration request failed
  3754. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu is not a physical GPU handle.
  3755. //! \retval ::NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE requested feature set does not have all resources allocated for completeness.
  3756. //! \retval ::NVAPI_NO_IMPLEMENTATION only implemented for Win7
  3757. //
  3758. ///////////////////////////////////////////////////////////////////////////////
  3759. //! \ingroup gpu
  3760. typedef enum
  3761. {
  3762. NVAPI_GPU_WORKSTATION_FEATURE_MASK_SWAPGROUP = 0x00000001,
  3763. NVAPI_GPU_WORKSTATION_FEATURE_MASK_STEREO = 0x00000010,
  3764. NVAPI_GPU_WORKSTATION_FEATURE_MASK_WARPING = 0x00000100,
  3765. NVAPI_GPU_WORKSTATION_FEATURE_MASK_PIXINTENSITY = 0x00000200,
  3766. NVAPI_GPU_WORKSTATION_FEATURE_MASK_GRAYSCALE = 0x00000400,
  3767. NVAPI_GPU_WORKSTATION_FEATURE_MASK_BPC10 = 0x00001000
  3768. } NVAPI_GPU_WORKSTATION_FEATURE_MASK;
  3769. //! \ingroup gpu
  3770. NVAPI_INTERFACE NvAPI_GPU_WorkstationFeatureSetup(__in NvPhysicalGpuHandle hPhysicalGpu, __in NvU32 featureEnableMask, __in NvU32 featureDisableMask);
  3771. ///////////////////////////////////////////////////////////////////////////////
  3772. //
  3773. // FUNCTION NAME: NvAPI_GPU_WorkstationFeatureQuery
  3774. //
  3775. //! DESCRIPTION: This API queries the current set of workstation features.
  3776. //!
  3777. //! SUPPORTED OS: Windows 7
  3778. //!
  3779. //!
  3780. //! \param [in] hPhysicalGpu Physical GPU Handle of the display adapter to be configured. GPU handles may be retrieved
  3781. //! using NvAPI_EnumPhysicalGPUs.
  3782. //! \param [out] pConfiguredFeatureMask Mask of features requested for use by client drivers
  3783. //! \param [out] pConsistentFeatureMask Mask of features that have all resources allocated for completeness.
  3784. //!
  3785. //! \retval ::NVAPI_OK configuration request succeeded
  3786. //! \retval ::NVAPI_ERROR configuration request failed
  3787. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu is not a physical GPU handle.
  3788. //! \retval ::NVAPI_NO_IMPLEMENTATION only implemented for Win7
  3789. //
  3790. ///////////////////////////////////////////////////////////////////////////////
  3791. //! \ingroup gpu
  3792. NVAPI_INTERFACE NvAPI_GPU_WorkstationFeatureQuery(__in NvPhysicalGpuHandle hPhysicalGpu, __out NvU32 *pConfiguredFeatureMask, __out NvU32 *pConsistentFeatureMask);
  3793. ///////////////////////////////////////////////////////////////////////////////
  3794. //
  3795. // FUNCTION NAME: NvAPI_GPU_GetHDCPSupportStatus
  3796. //
  3797. //! \fn NvAPI_GPU_GetHDCPSupportStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GET_HDCP_SUPPORT_STATUS *pGetHDCPSupportStatus)
  3798. //! DESCRIPTION: This function returns a GPU's HDCP support status.
  3799. //!
  3800. //! SUPPORTED OS: Windows XP and higher
  3801. //!
  3802. //!
  3803. //! \since Release: 175
  3804. //!
  3805. //! \retval ::NVAPI_OK
  3806. //! \retval ::NVAPI_ERROR
  3807. //! \retval ::NVAPI_INVALID_ARGUMENT
  3808. //! \retval ::NVAPI_HANDLE_INVALIDATED
  3809. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE
  3810. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION
  3811. //
  3812. ////////////////////////////////////////////////////////////////////////////////
  3813. //! \addtogroup gpu
  3814. //! @{
  3815. //! HDCP fuse states - used in NV_GPU_GET_HDCP_SUPPORT_STATUS
  3816. typedef enum _NV_GPU_HDCP_FUSE_STATE
  3817. {
  3818. NV_GPU_HDCP_FUSE_STATE_UNKNOWN = 0,
  3819. NV_GPU_HDCP_FUSE_STATE_DISABLED = 1,
  3820. NV_GPU_HDCP_FUSE_STATE_ENABLED = 2,
  3821. } NV_GPU_HDCP_FUSE_STATE;
  3822. //! HDCP key sources - used in NV_GPU_GET_HDCP_SUPPORT_STATUS
  3823. typedef enum _NV_GPU_HDCP_KEY_SOURCE
  3824. {
  3825. NV_GPU_HDCP_KEY_SOURCE_UNKNOWN = 0,
  3826. NV_GPU_HDCP_KEY_SOURCE_NONE = 1,
  3827. NV_GPU_HDCP_KEY_SOURCE_CRYPTO_ROM = 2,
  3828. NV_GPU_HDCP_KEY_SOURCE_SBIOS = 3,
  3829. NV_GPU_HDCP_KEY_SOURCE_I2C_ROM = 4,
  3830. NV_GPU_HDCP_KEY_SOURCE_FUSES = 5,
  3831. } NV_GPU_HDCP_KEY_SOURCE;
  3832. //! HDCP key source states - used in NV_GPU_GET_HDCP_SUPPORT_STATUS
  3833. typedef enum _NV_GPU_HDCP_KEY_SOURCE_STATE
  3834. {
  3835. NV_GPU_HDCP_KEY_SOURCE_STATE_UNKNOWN = 0,
  3836. NV_GPU_HDCP_KEY_SOURCE_STATE_ABSENT = 1,
  3837. NV_GPU_HDCP_KEY_SOURCE_STATE_PRESENT = 2,
  3838. } NV_GPU_HDCP_KEY_SOURCE_STATE;
  3839. //! HDPC support status - used in NvAPI_GPU_GetHDCPSupportStatus()
  3840. typedef struct
  3841. {
  3842. NvU32 version; //! Structure version constucted by macro #NV_GPU_GET_HDCP_SUPPORT_STATUS
  3843. NV_GPU_HDCP_FUSE_STATE hdcpFuseState; //! GPU's HDCP fuse state
  3844. NV_GPU_HDCP_KEY_SOURCE hdcpKeySource; //! GPU's HDCP key source
  3845. NV_GPU_HDCP_KEY_SOURCE_STATE hdcpKeySourceState; //! GPU's HDCP key source state
  3846. } NV_GPU_GET_HDCP_SUPPORT_STATUS;
  3847. //! Macro for constructing the version for structure NV_GPU_GET_HDCP_SUPPORT_STATUS
  3848. #define NV_GPU_GET_HDCP_SUPPORT_STATUS_VER MAKE_NVAPI_VERSION(NV_GPU_GET_HDCP_SUPPORT_STATUS,1)
  3849. //! @}
  3850. //! \ingroup gpu
  3851. NVAPI_INTERFACE NvAPI_GPU_GetHDCPSupportStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GET_HDCP_SUPPORT_STATUS *pGetHDCPSupportStatus);
  3852. ///////////////////////////////////////////////////////////////////////////////
  3853. //
  3854. // FUNCTION NAME: NvAPI_GPU_GetTachReading
  3855. //
  3856. //! DESCRIPTION: This API retrieves the fan speed tachometer reading for the specified physical GPU.
  3857. //!
  3858. //! HOW TO USE:
  3859. //! - NvU32 Value = 0;
  3860. //! - ret = NvAPI_GPU_GetTachReading(hPhysicalGpu, &Value);
  3861. //! - On call success:
  3862. //! - Value contains the tachometer reading
  3863. //!
  3864. //! SUPPORTED OS: Windows XP and higher
  3865. //!
  3866. //!
  3867. //! \param [in] hPhysicalGpu GPU selection.
  3868. //! \param [out] pValue Pointer to a variable to get the tachometer reading
  3869. //!
  3870. //! \retval ::NVAPI_OK - completed request
  3871. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  3872. //! \retval ::NVAPI_NOT_SUPPORTED - functionality not supported
  3873. //! \retval ::NVAPI_API_NOT_INTIALIZED - nvapi not initialized
  3874. //! \retval ::NVAPI_INVALID_ARGUMENT - invalid argument passed
  3875. //! \retval ::NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide)
  3876. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle
  3877. //!
  3878. //! \ingroup gpucooler
  3879. ///////////////////////////////////////////////////////////////////////////////
  3880. NVAPI_INTERFACE NvAPI_GPU_GetTachReading(NvPhysicalGpuHandle hPhysicalGPU, NvU32 *pValue);
  3881. ///////////////////////////////////////////////////////////////////////////////
  3882. //
  3883. // FUNCTION NAME: NvAPI_GPU_GetECCStatusInfo
  3884. //
  3885. //! \fn NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu,
  3886. //! NV_GPU_ECC_STATUS_INFO *pECCStatusInfo);
  3887. //! DESCRIPTION: This function returns ECC memory status information.
  3888. //!
  3889. //! SUPPORTED OS: Windows XP and higher
  3890. //!
  3891. //!
  3892. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for which ECC
  3893. //! status information is to be retrieved.
  3894. //! \param [out] pECCStatusInfo A pointer to an ECC status structure.
  3895. //!
  3896. //! \retval ::NVAPI_OK The request was completed successfully.
  3897. //! \retval ::NVAPI_ERROR An unknown error occurred.
  3898. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  3899. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid.
  3900. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  3901. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided.
  3902. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  3903. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  3904. //
  3905. ///////////////////////////////////////////////////////////////////////////////
  3906. //! \addtogroup gpuecc
  3907. //! Used in NV_GPU_ECC_STATUS_INFO.
  3908. typedef enum _NV_ECC_CONFIGURATION
  3909. {
  3910. NV_ECC_CONFIGURATION_NOT_SUPPORTED = 0,
  3911. NV_ECC_CONFIGURATION_DEFERRED, //!< Changes require a POST to take effect
  3912. NV_ECC_CONFIGURATION_IMMEDIATE, //!< Changes can optionally be made to take effect immediately
  3913. } NV_ECC_CONFIGURATION;
  3914. //! \ingroup gpuecc
  3915. //! Used in NvAPI_GPU_GetECCStatusInfo().
  3916. typedef struct
  3917. {
  3918. NvU32 version; //!< Structure version
  3919. NvU32 isSupported : 1; //!< ECC memory feature support
  3920. NV_ECC_CONFIGURATION configurationOptions; //!< Supported ECC memory feature configuration options
  3921. NvU32 isEnabled : 1; //!< Active ECC memory setting
  3922. } NV_GPU_ECC_STATUS_INFO;
  3923. //! \ingroup gpuecc
  3924. //! Macro for constructing the version field of NV_GPU_ECC_STATUS_INFO
  3925. #define NV_GPU_ECC_STATUS_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_STATUS_INFO,1)
  3926. //! \ingroup gpuecc
  3927. NVAPI_INTERFACE NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu,
  3928. NV_GPU_ECC_STATUS_INFO *pECCStatusInfo);
  3929. ///////////////////////////////////////////////////////////////////////////////
  3930. //
  3931. // FUNCTION NAME: NvAPI_GPU_GetECCErrorInfo
  3932. //
  3933. //! \fn NvAPI_GPU_GetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu,
  3934. //! NV_GPU_ECC_ERROR_INFO *pECCErrorInfo);
  3935. //!
  3936. //! DESCRIPTION: This function returns ECC memory error information.
  3937. //!
  3938. //! SUPPORTED OS: Windows XP and higher
  3939. //!
  3940. //!
  3941. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  3942. //! which ECC error information is to be
  3943. //! retrieved.
  3944. //! \param [out] pECCErrorInfo A pointer to an ECC error structure.
  3945. //!
  3946. //! \retval ::NVAPI_OK The request was completed successfully.
  3947. //! \retval ::NVAPI_ERROR An unknown error occurred.
  3948. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  3949. //! \retval ::NVAPI_INVALID_ARGUMENT incorrect param value
  3950. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided.
  3951. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION structure version is not supported, initialize to NV_GPU_ECC_ERROR_INFO_VER.
  3952. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  3953. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  3954. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  3955. //
  3956. ///////////////////////////////////////////////////////////////////////////////
  3957. //! \ingroup gpuecc
  3958. //! Used in NvAPI_GPU_GetECCErrorInfo()/
  3959. typedef struct
  3960. {
  3961. NvU32 version; //!< Structure version
  3962. struct {
  3963. NvU64 singleBitErrors; //!< Number of single-bit ECC errors detected since last boot
  3964. NvU64 doubleBitErrors; //!< Number of double-bit ECC errors detected since last boot
  3965. } current;
  3966. struct {
  3967. NvU64 singleBitErrors; //!< Number of single-bit ECC errors detected since last counter reset
  3968. NvU64 doubleBitErrors; //!< Number of double-bit ECC errors detected since last counter reset
  3969. } aggregate;
  3970. } NV_GPU_ECC_ERROR_INFO;
  3971. //! \ingroup gpuecc
  3972. //! Macro for constructing the version field of NV_GPU_ECC_ERROR_INFO
  3973. #define NV_GPU_ECC_ERROR_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_ERROR_INFO,1)
  3974. //! \ingroup gpuecc
  3975. NVAPI_INTERFACE NvAPI_GPU_GetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu,
  3976. NV_GPU_ECC_ERROR_INFO *pECCErrorInfo);
  3977. ///////////////////////////////////////////////////////////////////////////////
  3978. //
  3979. // FUNCTION NAME: NvAPI_GPU_ResetECCErrorInfo
  3980. //
  3981. //! DESCRIPTION: This function resets ECC memory error counters.
  3982. //!
  3983. //! SUPPORTED OS: Windows XP and higher
  3984. //!
  3985. //!
  3986. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  3987. //! which ECC error information is to be
  3988. //! cleared.
  3989. //! \param [in] bResetCurrent Reset the current ECC error counters.
  3990. //! \param [in] bResetAggregate Reset the aggregate ECC error counters.
  3991. //!
  3992. //! \retval ::NVAPI_OK The request was completed successfully.
  3993. //! \retval ::NVAPI_ERROR An unknown error occurred.
  3994. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  3995. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid.
  3996. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  3997. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  3998. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  3999. //!
  4000. //! \ingroup gpuecc
  4001. ///////////////////////////////////////////////////////////////////////////////
  4002. NVAPI_INTERFACE NvAPI_GPU_ResetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bResetCurrent,
  4003. NvU8 bResetAggregate);
  4004. ///////////////////////////////////////////////////////////////////////////////
  4005. //
  4006. // FUNCTION NAME: NvAPI_GPU_GetECCConfigurationInfo
  4007. //
  4008. //! \fn NvAPI_GPU_GetECCConfigurationInfo(NvPhysicalGpuHandle hPhysicalGpu,
  4009. //! NV_GPU_ECC_CONFIGURATION_INFO *pECCConfigurationInfo);
  4010. //! DESCRIPTION: This function returns ECC memory configuration information.
  4011. //!
  4012. //! SUPPORTED OS: Windows XP and higher
  4013. //!
  4014. //!
  4015. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  4016. //! which ECC configuration information
  4017. //! is to be retrieved.
  4018. //! \param [out] pECCConfigurationInfo A pointer to an ECC
  4019. //! configuration structure.
  4020. //!
  4021. //! \retval ::NVAPI_OK The request was completed successfully.
  4022. //! \retval ::NVAPI_ERROR An unknown error occurred.
  4023. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  4024. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid.
  4025. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  4026. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided.
  4027. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  4028. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  4029. //
  4030. ///////////////////////////////////////////////////////////////////////////////
  4031. //! \ingroup gpuecc
  4032. //! Used in NvAPI_GPU_GetECCConfigurationInfo().
  4033. typedef struct
  4034. {
  4035. NvU32 version; //! Structure version
  4036. NvU32 isEnabled : 1; //! Current ECC configuration stored in non-volatile memory
  4037. NvU32 isEnabledByDefault : 1; //! Factory default ECC configuration (static)
  4038. } NV_GPU_ECC_CONFIGURATION_INFO;
  4039. //! \ingroup gpuecc
  4040. //! Macro for consstructing the verion field of NV_GPU_ECC_CONFIGURATION_INFO
  4041. #define NV_GPU_ECC_CONFIGURATION_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_CONFIGURATION_INFO,1)
  4042. //! \ingroup gpuecc
  4043. NVAPI_INTERFACE NvAPI_GPU_GetECCConfigurationInfo(NvPhysicalGpuHandle hPhysicalGpu,
  4044. NV_GPU_ECC_CONFIGURATION_INFO *pECCConfigurationInfo);
  4045. ///////////////////////////////////////////////////////////////////////////////
  4046. //
  4047. // FUNCTION NAME: NvAPI_GPU_SetECCConfiguration
  4048. //
  4049. //! DESCRIPTION: This function updates the ECC memory configuration setting.
  4050. //!
  4051. //! SUPPORTED OS: Windows XP and higher
  4052. //!
  4053. //!
  4054. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  4055. //! which to update the ECC configuration
  4056. //! setting.
  4057. //! \param [in] bEnable The new ECC configuration setting.
  4058. //! \param [in] bEnableImmediately Request that the new setting take effect immediately.
  4059. //!
  4060. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4061. //! specific meaning for this API, they are listed below.
  4062. //! \retval ::NVAPI_INVALID_CONFIGURATION Possibly SLI is enabled. Disable SLI and retry.
  4063. //!
  4064. //! \ingroup gpuecc
  4065. ///////////////////////////////////////////////////////////////////////////////
  4066. NVAPI_INTERFACE NvAPI_GPU_SetECCConfiguration(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bEnable,
  4067. NvU8 bEnableImmediately);
  4068. //! Used in NvAPI_GPU_GetPerfDecreaseInfo.
  4069. //! Bit masks for knowing the exact reason for performance decrease
  4070. typedef enum _NVAPI_GPU_PERF_DECREASE
  4071. {
  4072. NV_GPU_PERF_DECREASE_NONE = 0, //!< No Slowdown detected
  4073. NV_GPU_PERF_DECREASE_REASON_THERMAL_PROTECTION = 0x00000001, //!< Thermal slowdown/shutdown/POR thermal protection
  4074. NV_GPU_PERF_DECREASE_REASON_POWER_CONTROL = 0x00000002, //!< Power capping / pstate cap
  4075. NV_GPU_PERF_DECREASE_REASON_AC_BATT = 0x00000004, //!< AC->BATT event
  4076. NV_GPU_PERF_DECREASE_REASON_API_TRIGGERED = 0x00000008, //!< API triggered slowdown
  4077. NV_GPU_PERF_DECREASE_REASON_INSUFFICIENT_POWER = 0x00000010, //!< Power connector missing
  4078. NV_GPU_PERF_DECREASE_REASON_UNKNOWN = 0x80000000, //!< Unknown reason
  4079. } NVAPI_GPU_PERF_DECREASE;
  4080. ///////////////////////////////////////////////////////////////////////////////
  4081. //
  4082. // FUNCTION NAME: NvAPI_GPU_GetPerfDecreaseInfo
  4083. //
  4084. //! DESCRIPTION: This function retrieves - in NvU32 variable - reasons for the current performance decrease.
  4085. //!
  4086. //! SUPPORTED OS: Windows XP and higher
  4087. //!
  4088. //! \param [in] hPhysicalGPU (IN) - GPU for which performance decrease is to be evaluated.
  4089. //! \param [out] pPerfDecrInfo (OUT) - Pointer to a NvU32 variable containing performance decrease info
  4090. //!
  4091. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  4092. //!
  4093. //! \ingroup gpu
  4094. ///////////////////////////////////////////////////////////////////////////////
  4095. NVAPI_INTERFACE NvAPI_GPU_GetPerfDecreaseInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NvU32 *pPerfDecrInfo);
  4096. //! \ingroup gpu
  4097. typedef enum _NV_GPU_ILLUMINATION_ATTRIB
  4098. {
  4099. NV_GPU_IA_LOGO_BRIGHTNESS = 0,
  4100. NV_GPU_IA_SLI_BRIGHTNESS = 1,
  4101. } NV_GPU_ILLUMINATION_ATTRIB;
  4102. ///////////////////////////////////////////////////////////////////////////////
  4103. //
  4104. // FUNCTION NAME: NvAPI_GPU_QueryIlluminationSupport
  4105. //
  4106. //! \fn NvAPI_GPU_QueryIlluminationSupport(__inout NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM *pIlluminationSupportInfo)
  4107. //! DESCRIPTION: This function reports if the specified illumination attribute is supported.
  4108. //!
  4109. //! \note Only a single GPU can manage an given attribute on a given HW element,
  4110. //! regardless of how many are attatched. I.E. only one GPU will be used to control
  4111. //! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached.
  4112. //! You should enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  4113. //!
  4114. //! SUPPORTED OS: Windows Vista and higher
  4115. //!
  4116. //! \since Version: 300.05
  4117. //!
  4118. //! \param [in] hPhysicalGpu Physical GPU handle
  4119. //! \param Attribute An enumeration value specifying the Illumination attribute to be querried
  4120. //! \param [out] pSupported A boolean indicating if the attribute is supported.
  4121. //!
  4122. //! \return See \ref nvapistatus for the list of possible return values.
  4123. //
  4124. //////////////////////////////////////////////////////////////////////////////
  4125. //! \ingroup gpu
  4126. typedef struct _NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1 {
  4127. // IN
  4128. NvU32 version; //!< Version of this structure
  4129. NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute.
  4130. //!< note that this is the GPU that is managing the attribute.
  4131. //!< Only a single GPU can manage an given attribute on a given HW element,
  4132. //!< regardless of how many are attatched.
  4133. //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge,
  4134. //!< regardless of how many are physicaly attached.
  4135. //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  4136. NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried.
  4137. //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB.
  4138. // OUT
  4139. NvU32 bSupported; //!< A boolean indicating if the attribute is supported.
  4140. } NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1;
  4141. //! \ingroup gpu
  4142. typedef NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1 NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM;
  4143. //! \ingroup gpu
  4144. #define NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1,1)
  4145. //! \ingroup gpu
  4146. #define NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER_1
  4147. //! \ingroup gpu
  4148. NVAPI_INTERFACE NvAPI_GPU_QueryIlluminationSupport(__inout NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM *pIlluminationSupportInfo);
  4149. ///////////////////////////////////////////////////////////////////////////////
  4150. //
  4151. // FUNCTION NAME: NvAPI_GPU_GetIllumination
  4152. //
  4153. //! \fn NvAPI_GPU_GetIllumination(NV_GPU_GET_ILLUMINATION_PARM *pIlluminationInfo)
  4154. //! DESCRIPTION: This function reports value of the specified illumination attribute.
  4155. //!
  4156. //! \note Only a single GPU can manage an given attribute on a given HW element,
  4157. //! regardless of how many are attatched. I.E. only one GPU will be used to control
  4158. //! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached.
  4159. //! You should enumerate thru the GPUs with the \ref NvAPI_GPU_QueryIlluminationSupport call to
  4160. //! determine which GPU is managing the attribute.
  4161. //!
  4162. //! SUPPORTED OS: Windows Vista and higher
  4163. //!
  4164. //! \since Version: 300.05
  4165. //!
  4166. //! \param [in] hPhysicalGpu Physical GPU handle
  4167. //! \param Attribute An enumeration value specifying the Illumination attribute to be querried
  4168. //! \param [out] Value A DWORD containing the current value for the specified attribute.
  4169. //! This is specified as a percentage of the full range of the attribute
  4170. //! (0-100; 0 = off, 100 = full brightness)
  4171. //!
  4172. //! \return See \ref nvapistatus for the list of possible return values. Return values of special interest are:
  4173. //! NVAPI_INVALID_ARGUMENT The specified attibute is not known to the driver.
  4174. //! NVAPI_NOT_SUPPORTED: The specified attribute is not supported on the specified GPU
  4175. //
  4176. //////////////////////////////////////////////////////////////////////////////
  4177. //! \ingroup gpu
  4178. typedef struct _NV_GPU_GET_ILLUMINATION_PARM_V1 {
  4179. // IN
  4180. NvU32 version; //!< Version of this structure
  4181. NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute.
  4182. //!< Note that this is the GPU that is managing the attribute.
  4183. //!< Only a single GPU can manage an given attribute on a given HW element,
  4184. //!< regardless of how many are attatched.
  4185. //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge,
  4186. //!< regardless of how many are physicaly attached.
  4187. //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  4188. NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried.
  4189. //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB.
  4190. // OUT
  4191. NvU32 Value; //!< A DWORD that will contain the current value of the specified attribute.
  4192. //! This is specified as a percentage of the full range of the attribute
  4193. //! (0-100; 0 = off, 100 = full brightness)
  4194. } NV_GPU_GET_ILLUMINATION_PARM_V1;
  4195. //! \ingroup gpu
  4196. typedef NV_GPU_GET_ILLUMINATION_PARM_V1 NV_GPU_GET_ILLUMINATION_PARM;
  4197. //! \ingroup gpu
  4198. #define NV_GPU_GET_ILLUMINATION_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_GET_ILLUMINATION_PARM_V1,1)
  4199. //! \ingroup gpu
  4200. #define NV_GPU_GET_ILLUMINATION_PARM_VER NV_GPU_GET_ILLUMINATION_PARM_VER_1
  4201. //! \ingroup gpu
  4202. NVAPI_INTERFACE NvAPI_GPU_GetIllumination(NV_GPU_GET_ILLUMINATION_PARM *pIlluminationInfo);
  4203. ///////////////////////////////////////////////////////////////////////////////
  4204. //
  4205. // FUNCTION NAME: NvAPI_GPU_SetIllumination
  4206. //
  4207. //! \fn NvAPI_GPU_SetIllumination(NV_GPU_SET_ILLUMINATION_PARM *pIlluminationInfo)
  4208. //! DESCRIPTION: This function sets the value of the specified illumination attribute.
  4209. //!
  4210. //! \note Only a single GPU can manage an given attribute on a given HW element,
  4211. //! regardless of how many are attatched. I.E. only one GPU will be used to control
  4212. //! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached.
  4213. //! You should enumerate thru the GPUs with the \ref NvAPI_GPU_QueryIlluminationSupport call to
  4214. //! determine which GPU is managing the attribute.
  4215. //!
  4216. //! SUPPORTED OS: Windows Vista and higher
  4217. //!
  4218. //! \since Version: 300.05
  4219. //!
  4220. //! \param [in] hPhysicalGpu Physical GPU handle
  4221. //! \param Attribute An enumeration value specifying the Illumination attribute to be set
  4222. //! \param Value The new value for the specified attribute.
  4223. //! This should be specified as a percentage of the full range of the attribute
  4224. //! (0-100; 0 = off, 100 = full brightness)
  4225. //! If a value is specified outside this range, NVAPI_INVALID_ARGUMENT will be returned.
  4226. //!
  4227. //! \return See \ref nvapistatus for the list of possible return values. Return values of special interest are:
  4228. //! NVAPI_INVALID_ARGUMENT The specified attibute is not known to the driver, or the specified value is out of range.
  4229. //! NVAPI_NOT_SUPPORTED The specified attribute is not supported on the specified GPU.
  4230. //
  4231. ///////////////////////////////////////////////////////////////////////////////
  4232. //! \ingroup gpu
  4233. typedef struct _NV_GPU_SET_ILLUMINATION_PARM_V1 {
  4234. // IN
  4235. NvU32 version; //!< Version of this structure
  4236. NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute.
  4237. //!< Note that this is the GPU that is managing the attribute.
  4238. //!< Only a single GPU can manage an given attribute on a given HW element,
  4239. //!< regardless of how many are attatched.
  4240. //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge,
  4241. //!< regardless of how many are physicaly attached.
  4242. //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  4243. NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried.
  4244. //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB.
  4245. NvU32 Value; //!< A DWORD containing the new value for the specified attribute.
  4246. //!< This should be specified as a percentage of the full range of the attribute
  4247. //!< (0-100; 0 = off, 100 = full brightness)
  4248. //!< If a value is specified outside this range, NVAPI_INVALID_ARGUMENT will be returned.
  4249. // OUT
  4250. } NV_GPU_SET_ILLUMINATION_PARM_V1;
  4251. //! \ingroup gpu
  4252. typedef NV_GPU_SET_ILLUMINATION_PARM_V1 NV_GPU_SET_ILLUMINATION_PARM;
  4253. //! \ingroup gpu
  4254. #define NV_GPU_SET_ILLUMINATION_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_SET_ILLUMINATION_PARM_V1,1)
  4255. //! \ingroup gpu
  4256. #define NV_GPU_SET_ILLUMINATION_PARM_VER NV_GPU_SET_ILLUMINATION_PARM_VER_1
  4257. //! \ingroup gpu
  4258. NVAPI_INTERFACE NvAPI_GPU_SetIllumination(NV_GPU_SET_ILLUMINATION_PARM *pIlluminationInfo);
  4259. ///////////////////////////////////////////////////////////////////////////////
  4260. //
  4261. // FUNCTION NAME: NvAPI_EnumNvidiaDisplayHandle
  4262. //
  4263. //! This function returns the handle of the NVIDIA display specified by the enum
  4264. //! index (thisEnum). The client should keep enumerating until it
  4265. //! returns NVAPI_END_ENUMERATION.
  4266. //!
  4267. //! Note: Display handles can get invalidated on a modeset, so the calling applications need to
  4268. //! renum the handles after every modeset.
  4269. //!
  4270. //! SUPPORTED OS: Windows XP and higher
  4271. //!
  4272. //!
  4273. //! \since Release: 80
  4274. //!
  4275. //! \param [in] thisEnum The index of the NVIDIA display.
  4276. //! \param [out] pNvDispHandle Pointer to the NVIDIA display handle.
  4277. //!
  4278. //! \retval NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big
  4279. //! \retval NVAPI_OK Return a valid NvDisplayHandle based on the enum index
  4280. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system
  4281. //! \retval NVAPI_END_ENUMERATION No more display device to enumerate
  4282. //! \ingroup disphandle
  4283. ///////////////////////////////////////////////////////////////////////////////
  4284. NVAPI_INTERFACE NvAPI_EnumNvidiaDisplayHandle(NvU32 thisEnum, NvDisplayHandle *pNvDispHandle);
  4285. ///////////////////////////////////////////////////////////////////////////////
  4286. //
  4287. // FUNCTION NAME: NvAPI_EnumNvidiaUnAttachedDisplayHandle
  4288. //
  4289. //! This function returns the handle of the NVIDIA unattached display specified by the enum
  4290. //! index (thisEnum). The client should keep enumerating until it
  4291. //! returns error.
  4292. //! Note: Display handles can get invalidated on a modeset, so the calling applications need to
  4293. //! renum the handles after every modeset.
  4294. //!
  4295. //! SUPPORTED OS: Windows XP and higher
  4296. //!
  4297. //!
  4298. //! \since Release: 80
  4299. //!
  4300. //! \param [in] thisEnum The index of the NVIDIA display.
  4301. //! \param [out] pNvUnAttachedDispHandle Pointer to the NVIDIA display handle of the unattached display.
  4302. //!
  4303. //! \retval NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big
  4304. //! \retval NVAPI_OK Return a valid NvDisplayHandle based on the enum index
  4305. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system
  4306. //! \retval NVAPI_END_ENUMERATION No more display device to enumerate.
  4307. //! \ingroup disphandle
  4308. ///////////////////////////////////////////////////////////////////////////////
  4309. NVAPI_INTERFACE NvAPI_EnumNvidiaUnAttachedDisplayHandle(NvU32 thisEnum, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle);
  4310. ///////////////////////////////////////////////////////////////////////////////
  4311. //
  4312. // FUNCTION NAME: NvAPI_CreateDisplayFromUnAttachedDisplay
  4313. //
  4314. //! This function converts the unattached display handle to an active attached display handle.
  4315. //!
  4316. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  4317. //!
  4318. //! SUPPORTED OS: Windows XP and higher
  4319. //!
  4320. //!
  4321. //! \since Release: 80
  4322. //!
  4323. //! \retval NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pNvDisplay is NULL.
  4324. //! \retval NVAPI_OK One or more handles were returned
  4325. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  4326. //! \ingroup dispcontrol
  4327. ///////////////////////////////////////////////////////////////////////////////
  4328. NVAPI_INTERFACE NvAPI_CreateDisplayFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvDisplayHandle *pNvDisplay);
  4329. ///////////////////////////////////////////////////////////////////////////////
  4330. //
  4331. // FUNCTION NAME: NvAPI_GetAssociatedNVidiaDisplayHandle
  4332. //
  4333. //! This function returns the handle of the NVIDIA display that is associated
  4334. //! with the given display "name" (such as "\\.\DISPLAY1").
  4335. //!
  4336. //! SUPPORTED OS: Windows XP and higher
  4337. //!
  4338. //!
  4339. //! \since Release: 80
  4340. //!
  4341. //! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL
  4342. //! \retval NVAPI_OK *pNvDispHandle is now valid
  4343. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name
  4344. //! \ingroup disphandle
  4345. ///////////////////////////////////////////////////////////////////////////////
  4346. NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayHandle(const char *szDisplayName, NvDisplayHandle *pNvDispHandle);
  4347. ///////////////////////////////////////////////////////////////////////////////
  4348. //
  4349. // FUNCTION NAME: NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle
  4350. //
  4351. //! DESCRIPTION: This function returns the handle of an unattached NVIDIA display that is
  4352. //! associated with the given display name (such as "\\DISPLAY1").
  4353. //!
  4354. //! SUPPORTED OS: Windows XP and higher
  4355. //!
  4356. //!
  4357. //! \since Release: 185
  4358. //!
  4359. //! \retval ::NVAPI_INVALID_ARGUMENT Either argument is NULL.
  4360. //! \retval ::NVAPI_OK *pNvUnAttachedDispHandle is now valid.
  4361. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name.
  4362. //!
  4363. //! \ingroup disphandle
  4364. ///////////////////////////////////////////////////////////////////////////////
  4365. NVAPI_INTERFACE NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle(const char *szDisplayName, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle);
  4366. ///////////////////////////////////////////////////////////////////////////////
  4367. //
  4368. // FUNCTION NAME: NvAPI_GetAssociatedNVidiaDisplayName
  4369. //
  4370. //! For a given NVIDIA display handle, this function returns a string (such as "\\.\DISPLAY1") to identify the display.
  4371. //!
  4372. //! SUPPORTED OS: Windows XP and higher
  4373. //!
  4374. //!
  4375. //! \since Release: 80
  4376. //!
  4377. //! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL
  4378. //! \retval NVAPI_OK *pNvDispHandle is now valid
  4379. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name
  4380. //! \ingroup dispcontrol
  4381. ///////////////////////////////////////////////////////////////////////////////
  4382. NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayName(NvDisplayHandle NvDispHandle, NvAPI_ShortString szDisplayName);
  4383. ///////////////////////////////////////////////////////////////////////////////
  4384. //
  4385. // FUNCTION NAME: NvAPI_GetUnAttachedAssociatedDisplayName
  4386. //
  4387. //! This function returns the display name given, for example, "\\DISPLAY1", using the unattached NVIDIA display handle
  4388. //!
  4389. //! SUPPORTED OS: Windows XP and higher
  4390. //!
  4391. //!
  4392. //! \since Release: 95
  4393. //!
  4394. //! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL
  4395. //! \retval NVAPI_OK *pNvDispHandle is now valid
  4396. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name
  4397. //! \ingroup dispcontrol
  4398. ///////////////////////////////////////////////////////////////////////////////
  4399. NVAPI_INTERFACE NvAPI_GetUnAttachedAssociatedDisplayName(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvAPI_ShortString szDisplayName);
  4400. ///////////////////////////////////////////////////////////////////////////////
  4401. //
  4402. // FUNCTION NAME: NvAPI_EnableHWCursor
  4403. //
  4404. //! This function enables hardware cursor support
  4405. //!
  4406. //! SUPPORTED OS: Windows XP
  4407. //!
  4408. //!
  4409. //!
  4410. //! \since Release: 80
  4411. //!
  4412. //! \return NVAPI_ERROR or NVAPI_OK
  4413. //! \ingroup dispcontrol
  4414. ///////////////////////////////////////////////////////////////////////////////
  4415. NVAPI_INTERFACE NvAPI_EnableHWCursor(NvDisplayHandle hNvDisplay);
  4416. ///////////////////////////////////////////////////////////////////////////////
  4417. //
  4418. // FUNCTION NAME: NvAPI_DisableHWCursor
  4419. //
  4420. //! This function disables hardware cursor support
  4421. //!
  4422. //! SUPPORTED OS: Windows XP
  4423. //!
  4424. //!
  4425. //! \since Release: 80
  4426. //!
  4427. //! \return NVAPI_ERROR or NVAPI_OK
  4428. //! \ingroup dispcontrol
  4429. ///////////////////////////////////////////////////////////////////////////////
  4430. NVAPI_INTERFACE NvAPI_DisableHWCursor(NvDisplayHandle hNvDisplay);
  4431. ///////////////////////////////////////////////////////////////////////////////
  4432. //
  4433. // FUNCTION NAME: NvAPI_GetVBlankCounter
  4434. //
  4435. //! This function gets the V-blank counter
  4436. //!
  4437. //! SUPPORTED OS: Windows XP and higher
  4438. //!
  4439. //!
  4440. //! \since Release: 80
  4441. //!
  4442. //! \return NVAPI_ERROR or NVAPI_OK
  4443. //! \ingroup dispcontrol
  4444. ///////////////////////////////////////////////////////////////////////////////
  4445. NVAPI_INTERFACE NvAPI_GetVBlankCounter(NvDisplayHandle hNvDisplay, NvU32 *pCounter);
  4446. ///////////////////////////////////////////////////////////////////////////////
  4447. // FUNCTION NAME: NvAPI_SetRefreshRateOverride
  4448. //
  4449. //! This function overrides the refresh rate on the given display/outputsMask.
  4450. //! The new refresh rate can be applied right away in this API call or deferred to be applied with the
  4451. //! next OS modeset. The override is good for only one modeset (regardless whether it's deferred or immediate).
  4452. //!
  4453. //!
  4454. //! SUPPORTED OS: Windows XP
  4455. //!
  4456. //!
  4457. //! \since Release: 80
  4458. //!
  4459. //! \param [in] hNvDisplay The NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle
  4460. //! enumerated from NvAPI_EnumNVidiaDisplayHandle().
  4461. //! \param [in] outputsMask A set of bits that identify all target outputs which are associated with the NVIDIA
  4462. //! display handle to apply the refresh rate override. When SLI is enabled, the
  4463. //! outputsMask only applies to the GPU that is driving the display output.
  4464. //! \param [in] refreshRate The override value. "0.0" means cancel the override.
  4465. //! \param [in] bSetDeferred
  4466. //! - "0": Apply the refresh rate override immediately in this API call.\p
  4467. //! - "1": Apply refresh rate at the next OS modeset.
  4468. //!
  4469. //! \retval NVAPI_INVALID_ARGUMENT hNvDisplay or outputsMask is invalid
  4470. //! \retval NVAPI_OK The refresh rate override is correct set
  4471. //! \retval NVAPI_ERROR The operation failed
  4472. //! \ingroup dispcontrol
  4473. ///////////////////////////////////////////////////////////////////////////////
  4474. NVAPI_INTERFACE NvAPI_SetRefreshRateOverride(NvDisplayHandle hNvDisplay, NvU32 outputsMask, float refreshRate, NvU32 bSetDeferred);
  4475. ///////////////////////////////////////////////////////////////////////////////
  4476. //
  4477. // FUNCTION NAME: NvAPI_GetAssociatedDisplayOutputId
  4478. //
  4479. //! This function gets the active outputId associated with the display handle.
  4480. //!
  4481. //! SUPPORTED OS: Windows XP and higher
  4482. //!
  4483. //!
  4484. //! \since Release: 90
  4485. //!
  4486. //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
  4487. //! \param [out] outputId The active display output ID associated with the selected display handle hNvDisplay.
  4488. //! The outputid will have only one bit set. In the case of Clone or Span mode, this will indicate the
  4489. //! display outputId of the primary display that the GPU is driving. See \ref handles.
  4490. //!
  4491. //! \retval NVAPI_OK Call successful.
  4492. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  4493. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle.
  4494. //! \ingroup dispcontrol
  4495. ///////////////////////////////////////////////////////////////////////////////
  4496. NVAPI_INTERFACE NvAPI_GetAssociatedDisplayOutputId(NvDisplayHandle hNvDisplay, NvU32 *pOutputId);
  4497. //! \ingroup dispcontrol
  4498. //! Used in NvAPI_GetDisplayPortInfo().
  4499. typedef struct
  4500. {
  4501. NvU32 version; //!< Structure version
  4502. NvU32 dpcd_ver; //!< DPCD version of the monitor
  4503. NV_DP_LINK_RATE maxLinkRate; //!< Maximum supported link rate
  4504. NV_DP_LANE_COUNT maxLaneCount; //!< Maximum supported lane count
  4505. NV_DP_LINK_RATE curLinkRate; //!< Current link rate
  4506. NV_DP_LANE_COUNT curLaneCount; //!< Current lane count
  4507. NV_DP_COLOR_FORMAT colorFormat; //!< Current color format
  4508. NV_DP_DYNAMIC_RANGE dynamicRange; //!< Dynamic range
  4509. NV_DP_COLORIMETRY colorimetry; //!< Ignored in RGB space
  4510. NV_DP_BPC bpc; //!< Current bit-per-component;
  4511. NvU32 isDp : 1; //!< If the monitor is driven by a DisplayPort
  4512. NvU32 isInternalDp : 1; //!< If the monitor is driven by an NV Dp transmitter
  4513. NvU32 isColorCtrlSupported : 1; //!< If the color format change is supported
  4514. NvU32 is6BPCSupported : 1; //!< If 6 bpc is supported
  4515. NvU32 is8BPCSupported : 1; //!< If 8 bpc is supported
  4516. NvU32 is10BPCSupported : 1; //!< If 10 bpc is supported
  4517. NvU32 is12BPCSupported : 1; //!< If 12 bpc is supported
  4518. NvU32 is16BPCSupported : 1; //!< If 16 bpc is supported
  4519. NvU32 isYCrCb422Supported : 1; //!< If YCrCb422 is supported
  4520. NvU32 isYCrCb444Supported : 1; //!< If YCrCb444 is supported
  4521. } NV_DISPLAY_PORT_INFO;
  4522. //! Macro for constructing the version field of NV_DISPLAY_PORT_INFO.
  4523. #define NV_DISPLAY_PORT_INFO_VER MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_INFO,1)
  4524. ///////////////////////////////////////////////////////////////////////////////
  4525. // FUNCTION NAME: NvAPI_GetDisplayPortInfo
  4526. //
  4527. //! \fn NvAPI_GetDisplayPortInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_INFO *pInfo)
  4528. //! DESCRIPTION: This function returns the current DisplayPort-related information on the specified device (monitor).
  4529. //!
  4530. //! SUPPORTED OS: Windows XP and higher
  4531. //!
  4532. //!
  4533. //! \since Release: 165
  4534. //!
  4535. //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from
  4536. //! NvAPI_EnumNVidiaDisplayHandle().
  4537. //! \param [in] outputId The display output ID. If "0", then the default outputId from
  4538. //! NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles.
  4539. //! \param [out] pInfo The DisplayPort information
  4540. //!
  4541. //! \retval NVAPI_OK Completed request
  4542. //! \retval NVAPI_ERROR Miscellaneous error occurred
  4543. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  4544. //
  4545. ///////////////////////////////////////////////////////////////////////////////
  4546. //! \ingroup dispcontrol
  4547. NVAPI_INTERFACE NvAPI_GetDisplayPortInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_INFO *pInfo);
  4548. ///////////////////////////////////////////////////////////////////////////////
  4549. // FUNCTION NAME: NvAPI_SetDisplayPort
  4550. //
  4551. //! \fn NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg)
  4552. //! DESCRIPTION: This function sets up DisplayPort-related configurations.
  4553. //!
  4554. //! SUPPORTED OS: Windows XP and higher
  4555. //!
  4556. //!
  4557. //! \since Release: 165
  4558. //!
  4559. //! \param [in] hNvDisplay NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from
  4560. //! NvAPI_EnumNVidiaDisplayHandle().
  4561. //! \param [in] outputId This display output ID, when it's "0" it means the default outputId generated from the return of
  4562. //! NvAPI_GetAssociatedDisplayOutputId(). See \ref handles.
  4563. //! \param [in] pCfg The display port config structure. If pCfg is NULL, it means to use the driver's default value to setup.
  4564. //!
  4565. //! \retval NVAPI_OK Completed request
  4566. //! \retval NVAPI_ERROR Miscellaneous error occurred
  4567. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter
  4568. ///////////////////////////////////////////////////////////////////////////////
  4569. //! \ingroup dispcontrol
  4570. //! DisplayPort configuration settings - used in NvAPI_SetDisplayPort().
  4571. typedef struct
  4572. {
  4573. NvU32 version; //!< Structure version - 2 is the latest
  4574. NV_DP_LINK_RATE linkRate; //!< Link rate
  4575. NV_DP_LANE_COUNT laneCount; //!< Lane count
  4576. NV_DP_COLOR_FORMAT colorFormat; //!< Color format to set
  4577. NV_DP_DYNAMIC_RANGE dynamicRange; //!< Dynamic range
  4578. NV_DP_COLORIMETRY colorimetry; //!< Ignored in RGB space
  4579. NV_DP_BPC bpc; //!< Bit-per-component
  4580. NvU32 isHPD : 1; //!< If the control panel is making this call due to HPD
  4581. NvU32 isSetDeferred : 1; //!< Requires an OS modeset to finalize the setup if set
  4582. NvU32 isChromaLpfOff : 1; //!< Force the chroma low_pass_filter to be off
  4583. NvU32 isDitherOff : 1; //!< Force to turn off dither
  4584. NvU32 testLinkTrain : 1; //!< If testing mode, skip validation
  4585. NvU32 testColorChange : 1; //!< If testing mode, skip validation
  4586. } NV_DISPLAY_PORT_CONFIG;
  4587. //! \addtogroup dispcontrol
  4588. //! @{
  4589. //! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG
  4590. #define NV_DISPLAY_PORT_CONFIG_VER MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2)
  4591. //! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG
  4592. #define NV_DISPLAY_PORT_CONFIG_VER_1 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,1)
  4593. //! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG
  4594. #define NV_DISPLAY_PORT_CONFIG_VER_2 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2)
  4595. //! @}
  4596. //! \ingroup dispcontrol
  4597. NVAPI_INTERFACE NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg);
  4598. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4599. ///////////////////////////////////////////////////////////////////////////////
  4600. // FUNCTION NAME: NvAPI_GetHDMISupportInfo
  4601. //
  4602. //! \fn NvAPI_GetHDMISupportInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_HDMI_SUPPORT_INFO *pInfo)
  4603. //! This API returns the current infoframe data on the specified device(monitor).
  4604. //!
  4605. //! SUPPORTED OS: Windows Vista and higher
  4606. //!
  4607. //!
  4608. //! \since Release: 95
  4609. //!
  4610. //! \param [in] hvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
  4611. //! \param [in] outputId The display output id. If it's "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles.
  4612. //! \param [out] pInfo The monitor and GPU's HDMI support info
  4613. //!
  4614. //! \retval NVAPI_OK Completed request
  4615. //! \retval NVAPI_ERROR Miscellaneous error occurred
  4616. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  4617. ///////////////////////////////////////////////////////////////////////////////
  4618. //! \ingroup dispcontrol
  4619. //! Used in NvAPI_GetHDMISupportInfo().
  4620. typedef struct
  4621. {
  4622. NvU32 version; //!< Structure version
  4623. NvU32 isGpuHDMICapable : 1; //!< If the GPU can handle HDMI
  4624. NvU32 isMonUnderscanCapable : 1; //!< If the monitor supports underscan
  4625. NvU32 isMonBasicAudioCapable : 1; //!< If the monitor supports basic audio
  4626. NvU32 isMonYCbCr444Capable : 1; //!< If YCbCr 4:4:4 is supported
  4627. NvU32 isMonYCbCr422Capable : 1; //!< If YCbCr 4:2:2 is supported
  4628. NvU32 isMonxvYCC601Capable : 1; //!< If xvYCC 601 is supported
  4629. NvU32 isMonxvYCC709Capable : 1; //!< If xvYCC 709 is supported
  4630. NvU32 isMonHDMI : 1; //!< If the monitor is HDMI (with IEEE's HDMI registry ID)
  4631. NvU32 EDID861ExtRev; //!< Revision number of the EDID 861 extension
  4632. } NV_HDMI_SUPPORT_INFO;
  4633. //! \ingroup dispcontrol
  4634. #define NV_HDMI_SUPPORT_INFO_VER MAKE_NVAPI_VERSION(NV_HDMI_SUPPORT_INFO,1)
  4635. //! \ingroup dispcontrol
  4636. NVAPI_INTERFACE NvAPI_GetHDMISupportInfo(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_HDMI_SUPPORT_INFO *pInfo);
  4637. //! \ingroup dispcontrol
  4638. //! @{
  4639. ///////////////////////////////////////////////////////////////////////////////
  4640. // FUNCTION NAME: NvAPI_Disp_InfoFrameControl
  4641. //
  4642. //! \fn NvAPI_Disp_InfoFrameControl(NvU32 displayId, NV_INFOFRAME_DATA *pInfoframeData)
  4643. //! DESCRIPTION: This API controls the InfoFrame values.
  4644. //!
  4645. //! SUPPORTED OS: Windows Vista and higher
  4646. //!
  4647. //!
  4648. //! \param [in] displayId Monitor Identifier
  4649. //! \param [in,out] pInfoframeData Contains data corresponding to InfoFrame
  4650. //!
  4651. //! \return
  4652. //! ::NVAPI_OK,
  4653. //! ::NVAPI_ERROR,
  4654. //! ::NVAPI_INVALID_ARGUMENT
  4655. //
  4656. ///////////////////////////////////////////////////////////////////////////////
  4657. typedef enum
  4658. {
  4659. NV_INFOFRAME_CMD_GET_DEFAULT = 0, //!< Returns the fields in the infoframe with values set by the manufacturer - NVIDIA/OEM.
  4660. NV_INFOFRAME_CMD_RESET, //!< Sets the fields in the infoframe to auto, and infoframe to the default infoframe for use in a set.
  4661. NV_INFOFRAME_CMD_GET, //!< Get the current infoframe state.
  4662. NV_INFOFRAME_CMD_SET, //!< Set the current infoframe state (flushed to the monitor), the values are one time and do not persist.
  4663. NV_INFOFRAME_CMD_GET_OVERRIDE, //!< Get the override infoframe state, non-override fields will be set to value = AUTO, overridden fields will have the current override values.
  4664. NV_INFOFRAME_CMD_SET_OVERRIDE, //!< Set the override infoframe state, non-override fields will be set to value = AUTO, other values indicate override; persist across modeset/reboot
  4665. NV_INFOFRAME_CMD_GET_PROPERTY, //!< get properties associated with infoframe (each of the infoframe type will have properties)
  4666. NV_INFOFRAME_CMD_SET_PROPERTY, //!< set properties associated with infoframe
  4667. } NV_INFOFRAME_CMD;
  4668. typedef enum
  4669. {
  4670. NV_INFOFRAME_PROPERTY_MODE_AUTO = 0, //!< Driver determines whether to send infoframes.
  4671. NV_INFOFRAME_PROPERTY_MODE_ENABLE, //!< Driver always sends infoframe.
  4672. NV_INFOFRAME_PROPERTY_MODE_DISABLE, //!< Driver never sends infoframe.
  4673. NV_INFOFRAME_PROPERTY_MODE_ALLOW_OVERRIDE, //!< Driver only sends infoframe when client requests it via infoframe escape call.
  4674. } NV_INFOFRAME_PROPERTY_MODE;
  4675. //! Returns whether the current monitor is in blacklist or force this monitor to be in blacklist.
  4676. typedef enum
  4677. {
  4678. NV_INFOFRAME_PROPERTY_BLACKLIST_FALSE = 0,
  4679. NV_INFOFRAME_PROPERTY_BLACKLIST_TRUE,
  4680. } NV_INFOFRAME_PROPERTY_BLACKLIST;
  4681. typedef struct
  4682. {
  4683. NvU32 mode : 4;
  4684. NvU32 blackList : 2;
  4685. NvU32 reserved : 10;
  4686. NvU32 version : 8;
  4687. NvU32 length : 8;
  4688. } NV_INFOFRAME_PROPERTY;
  4689. //! Byte1 related
  4690. typedef enum
  4691. {
  4692. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_NODATA = 0,
  4693. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_OVERSCAN,
  4694. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_UNDERSCAN,
  4695. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_FUTURE,
  4696. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_AUTO = 7
  4697. } NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO;
  4698. typedef enum
  4699. {
  4700. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_NOT_PRESENT = 0,
  4701. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_VERTICAL_PRESENT,
  4702. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_HORIZONTAL_PRESENT,
  4703. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_BOTH_PRESENT,
  4704. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_AUTO = 7
  4705. } NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA;
  4706. typedef enum
  4707. {
  4708. NV_INFOFRAME_FIELD_VALUE_AVI_AFI_ABSENT = 0,
  4709. NV_INFOFRAME_FIELD_VALUE_AVI_AFI_PRESENT,
  4710. NV_INFOFRAME_FIELD_VALUE_AVI_AFI_AUTO = 3
  4711. } NV_INFOFRAME_FIELD_VALUE_AVI_ACTIVEFORMATINFO;
  4712. typedef enum
  4713. {
  4714. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_RGB = 0,
  4715. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_YCbCr422,
  4716. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_YCbCr444,
  4717. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_FUTURE,
  4718. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_AUTO = 7
  4719. } NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT;
  4720. typedef enum
  4721. {
  4722. NV_INFOFRAME_FIELD_VALUE_AVI_F17_FALSE = 0,
  4723. NV_INFOFRAME_FIELD_VALUE_AVI_F17_TRUE,
  4724. NV_INFOFRAME_FIELD_VALUE_AVI_F17_AUTO = 3
  4725. } NV_INFOFRAME_FIELD_VALUE_AVI_F17;
  4726. //! Byte2 related
  4727. typedef enum
  4728. {
  4729. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_NO_AFD = 0,
  4730. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE01,
  4731. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE02,
  4732. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE03,
  4733. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_LETTERBOX_GT16x9,
  4734. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE05,
  4735. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE06,
  4736. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE07,
  4737. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_EQUAL_CODEDFRAME = 8,
  4738. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_4x3,
  4739. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_16x9,
  4740. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_14x9,
  4741. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE12,
  4742. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_4x3_ON_14x9,
  4743. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_16x9_ON_14x9,
  4744. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_16x9_ON_4x3,
  4745. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_AUTO = 31,
  4746. } NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION;
  4747. typedef enum
  4748. {
  4749. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_NO_DATA = 0,
  4750. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_4x3,
  4751. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_16x9,
  4752. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_FUTURE,
  4753. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_AUTO = 7
  4754. } NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME;
  4755. typedef enum
  4756. {
  4757. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_NO_DATA = 0,
  4758. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_SMPTE_170M,
  4759. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_ITUR_BT709,
  4760. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_USE_EXTENDED_COLORIMETRY,
  4761. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_AUTO = 7
  4762. } NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY;
  4763. //! Byte 3 related
  4764. typedef enum
  4765. {
  4766. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_NO_DATA = 0,
  4767. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_HORIZONTAL,
  4768. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_VERTICAL,
  4769. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_BOTH,
  4770. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_AUTO = 7
  4771. } NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING;
  4772. typedef enum
  4773. {
  4774. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_DEFAULT = 0,
  4775. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_LIMITED_RANGE,
  4776. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_FULL_RANGE,
  4777. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_RESERVED,
  4778. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_AUTO = 7
  4779. } NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION;
  4780. typedef enum
  4781. {
  4782. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_XVYCC601 = 0,
  4783. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_XVYCC709,
  4784. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_SYCC601,
  4785. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_ADOBEYCC601,
  4786. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_ADOBERGB,
  4787. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED05,
  4788. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED06,
  4789. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED07,
  4790. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_AUTO = 15
  4791. } NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY;
  4792. typedef enum
  4793. {
  4794. NV_INFOFRAME_FIELD_VALUE_AVI_ITC_VIDEO_CONTENT = 0,
  4795. NV_INFOFRAME_FIELD_VALUE_AVI_ITC_ITCONTENT,
  4796. NV_INFOFRAME_FIELD_VALUE_AVI_ITC_AUTO = 3
  4797. } NV_INFOFRAME_FIELD_VALUE_AVI_ITC;
  4798. //! Byte 4 related
  4799. typedef enum
  4800. {
  4801. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_NONE = 0,
  4802. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X02,
  4803. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X03,
  4804. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X04,
  4805. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X05,
  4806. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X06,
  4807. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X07,
  4808. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X08,
  4809. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X09,
  4810. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X10,
  4811. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED10,
  4812. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED11,
  4813. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED12,
  4814. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED13,
  4815. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED14,
  4816. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED15,
  4817. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_AUTO = 31
  4818. } NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION;
  4819. typedef enum
  4820. {
  4821. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_GRAPHICS = 0,
  4822. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_PHOTO,
  4823. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_CINEMA,
  4824. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_GAME,
  4825. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_AUTO = 7
  4826. } NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE;
  4827. typedef enum
  4828. {
  4829. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_LIMITED_RANGE = 0,
  4830. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_FULL_RANGE,
  4831. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_RESERVED02,
  4832. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_RESERVED03,
  4833. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_AUTO = 7
  4834. } NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION;
  4835. //! Adding an Auto bit to each field
  4836. typedef struct
  4837. {
  4838. NvU32 vic : 8;
  4839. NvU32 pixelRepeat : 5;
  4840. NvU32 colorSpace : 3;
  4841. NvU32 colorimetry : 3;
  4842. NvU32 extendedColorimetry : 4;
  4843. NvU32 rgbQuantizationRange : 3;
  4844. NvU32 yccQuantizationRange : 3;
  4845. NvU32 itContent : 2;
  4846. NvU32 contentTypes : 3;
  4847. NvU32 scanInfo : 3;
  4848. NvU32 activeFormatInfoPresent : 2;
  4849. NvU32 activeFormatAspectRatio : 5;
  4850. NvU32 picAspectRatio : 3;
  4851. NvU32 nonuniformScaling : 3;
  4852. NvU32 barInfo : 3;
  4853. NvU32 top_bar : 17;
  4854. NvU32 bottom_bar : 17;
  4855. NvU32 left_bar : 17;
  4856. NvU32 right_bar : 17;
  4857. NvU32 Future17 : 2;
  4858. NvU32 Future47 : 2;
  4859. } NV_INFOFRAME_VIDEO;
  4860. //! Byte 1 related
  4861. typedef enum
  4862. {
  4863. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_IN_HEADER = 0,
  4864. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_2,
  4865. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_3,
  4866. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_4,
  4867. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_5,
  4868. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_6,
  4869. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_7,
  4870. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_8,
  4871. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_AUTO = 15
  4872. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT;
  4873. typedef enum
  4874. {
  4875. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_IN_HEADER = 0,
  4876. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_PCM,
  4877. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AC3,
  4878. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MPEG1,
  4879. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MP3,
  4880. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MPEG2,
  4881. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AACLC,
  4882. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DTS,
  4883. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_ATRAC,
  4884. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DSD,
  4885. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_EAC3,
  4886. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DTSHD,
  4887. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MLP,
  4888. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DST,
  4889. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_WMAPRO,
  4890. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_USE_CODING_EXTENSION_TYPE,
  4891. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AUTO = 31
  4892. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE;
  4893. //! Byte 2 related
  4894. typedef enum
  4895. {
  4896. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_IN_HEADER = 0,
  4897. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_16BITS,
  4898. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_20BITS,
  4899. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_24BITS,
  4900. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_AUTO = 7
  4901. } NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE;
  4902. typedef enum
  4903. {
  4904. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_IN_HEADER = 0,
  4905. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_32000HZ,
  4906. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_44100HZ,
  4907. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_48000HZ,
  4908. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_88200KHZ,
  4909. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_96000KHZ,
  4910. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_176400KHZ,
  4911. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_192000KHZ,
  4912. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_AUTO = 15
  4913. } NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY;
  4914. //! Byte 3 related
  4915. typedef enum
  4916. {
  4917. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_USE_CODING_TYPE = 0,
  4918. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_HEAAC,
  4919. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_HEAACV2,
  4920. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_MPEGSURROUND,
  4921. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE04,
  4922. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE05,
  4923. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE06,
  4924. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE07,
  4925. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE08,
  4926. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE09,
  4927. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE10,
  4928. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE11,
  4929. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE12,
  4930. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE13,
  4931. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE14,
  4932. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE15,
  4933. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE16,
  4934. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE17,
  4935. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE18,
  4936. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE19,
  4937. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE20,
  4938. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE21,
  4939. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE22,
  4940. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE23,
  4941. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE24,
  4942. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE25,
  4943. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE26,
  4944. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE27,
  4945. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE28,
  4946. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE29,
  4947. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE30,
  4948. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE31,
  4949. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_AUTO = 63
  4950. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE;
  4951. //! Byte 4 related
  4952. typedef enum
  4953. {
  4954. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_X_X_FR_FL =0,
  4955. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_X_LFE_FR_FL,
  4956. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_FC_X_FR_FL,
  4957. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_FC_LFE_FR_FL,
  4958. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_X_X_FR_FL,
  4959. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_X_LFE_FR_FL,
  4960. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_FC_X_FR_FL,
  4961. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_FC_LFE_FR_FL,
  4962. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_X_X_FR_FL,
  4963. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_X_LFE_FR_FL,
  4964. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_FC_X_FR_FL,
  4965. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_FC_LFE_FR_FL,
  4966. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_X_X_FR_FL,
  4967. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_X_LFE_FR_FL,
  4968. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_FC_X_FR_FL,
  4969. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_FC_LFE_FR_FL,
  4970. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_X_X_FR_FL,
  4971. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_X_LFE_FR_FL,
  4972. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_FC_X_FR_FL,
  4973. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_FC_LFE_FR_FL,
  4974. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_X_X_FR_FL,
  4975. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_X_LFE_FR_FL,
  4976. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_FC_X_FR_FL,
  4977. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_FC_LFE_FR_FL,
  4978. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_X_X_FR_FL,
  4979. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_X_LFE_FR_FL,
  4980. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_FC_X_FR_FL,
  4981. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_FC_LFE_FR_FL,
  4982. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_X_X_FR_FL,
  4983. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_X_LFE_FR_FL,
  4984. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_FC_X_FR_FL,
  4985. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_FC_LFE_FR_FL,
  4986. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_FCH_RR_RL_FC_X_FR_FL,
  4987. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_FCH_RR_RL_FC_LFE_FR_FL,
  4988. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_X_RR_RL_FC_X_FR_FL,
  4989. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_X_RR_RL_FC_LFE_FR_FL,
  4990. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_X_X_FR_FL,
  4991. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_X_LFE_FR_FL,
  4992. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_X_X_FR_FL,
  4993. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_X_LFE_FR_FL,
  4994. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_RC_RR_RL_FC_X_FR_FL,
  4995. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_RC_RR_RL_FC_LFE_FR_FL,
  4996. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FCH_RC_RR_RL_FC_X_FR_FL,
  4997. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FCH_RC_RR_RL_FC_LFE_FR_FL,
  4998. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_FCH_RR_RL_FC_X_FR_FL,
  4999. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_FCH_RR_RL_FC_LFE_FR_FL,
  5000. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_FC_X_FR_FL,
  5001. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_FC_LFE_FR_FL,
  5002. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_FC_X_FR_FL,
  5003. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_FC_LFE_FR_FL = 0X31,
  5004. // all other values should default to auto
  5005. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_AUTO = 0x1FF
  5006. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION;
  5007. //! Byte 5 related
  5008. typedef enum
  5009. {
  5010. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_NO_DATA = 0,
  5011. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_0DB,
  5012. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_PLUS10DB,
  5013. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_RESERVED03,
  5014. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_AUTO = 7
  5015. } NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL;
  5016. typedef enum
  5017. {
  5018. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_0DB = 0,
  5019. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_1DB,
  5020. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_2DB,
  5021. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_3DB,
  5022. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_4DB,
  5023. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_5DB,
  5024. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_6DB,
  5025. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_7DB,
  5026. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_8DB,
  5027. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_9DB,
  5028. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_10DB,
  5029. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_11DB,
  5030. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_12DB,
  5031. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_13DB,
  5032. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_14DB,
  5033. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_15DB,
  5034. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_AUTO = 31
  5035. } NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES;
  5036. typedef enum
  5037. {
  5038. NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_PERMITTED = 0,
  5039. NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_PROHIBITED,
  5040. NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_AUTO = 3
  5041. } NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX;
  5042. typedef struct
  5043. {
  5044. NvU32 codingType : 5;
  5045. NvU32 codingExtensionType : 6;
  5046. NvU32 sampleSize : 3;
  5047. NvU32 sampleRate : 4;
  5048. NvU32 channelCount : 4;
  5049. NvU32 speakerPlacement : 9;
  5050. NvU32 downmixInhibit : 2;
  5051. NvU32 lfePlaybackLevel : 3;
  5052. NvU32 levelShift : 5;
  5053. NvU32 Future12 : 2;
  5054. NvU32 Future2x : 4;
  5055. NvU32 Future3x : 4;
  5056. NvU32 Future52 : 2;
  5057. NvU32 Future6 : 9;
  5058. NvU32 Future7 : 9;
  5059. NvU32 Future8 : 9;
  5060. NvU32 Future9 : 9;
  5061. NvU32 Future10 : 9;
  5062. } NV_INFOFRAME_AUDIO;
  5063. typedef struct
  5064. {
  5065. NvU32 version; //!< version of this structure
  5066. NvU16 size; //!< size of this structure
  5067. NvU8 cmd; //!< The actions to perform from NV_INFOFRAME_CMD
  5068. NvU8 type; //!< type of infoframe
  5069. union
  5070. {
  5071. NV_INFOFRAME_PROPERTY property; //!< This is NVIDIA-specific and corresponds to the property cmds and associated infoframe.
  5072. NV_INFOFRAME_AUDIO audio;
  5073. NV_INFOFRAME_VIDEO video;
  5074. } infoframe;
  5075. } NV_INFOFRAME_DATA;
  5076. //! Macro for constructing the version field of ::NV_INFOFRAME_DATA
  5077. #define NV_INFOFRAME_DATA_VER MAKE_NVAPI_VERSION(NV_INFOFRAME_DATA,1)
  5078. NVAPI_INTERFACE NvAPI_Disp_InfoFrameControl(NvU32 displayId, NV_INFOFRAME_DATA *pInfoframeData);
  5079. //! @}
  5080. //! \ingroup dispcontrol
  5081. //! @{
  5082. ///////////////////////////////////////////////////////////////////////////////
  5083. // FUNCTION NAME: NvAPI_Disp_ColorControl
  5084. //
  5085. //! \fn NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData)
  5086. //! DESCRIPTION: This API controls the Color values.
  5087. //!
  5088. //! SUPPORTED OS: Windows Vista and higher
  5089. //!
  5090. //!
  5091. //! \param [in] displayId Monitor Identifier
  5092. //! \param [in,out] pColorData Contains data corresponding to color information
  5093. //!
  5094. //! \return RETURN STATUS:
  5095. //! ::NVAPI_OK,
  5096. //! ::NVAPI_ERROR,
  5097. //! ::NVAPI_INVALID_ARGUMENT
  5098. //
  5099. ///////////////////////////////////////////////////////////////////////////////
  5100. typedef enum
  5101. {
  5102. NV_COLOR_CMD_GET = 1,
  5103. NV_COLOR_CMD_SET,
  5104. NV_COLOR_CMD_IS_SUPPORTED_COLOR,
  5105. NV_COLOR_CMD_GET_DEFAULT
  5106. } NV_COLOR_CMD;
  5107. //! See Table 14 of CEA-861E. Not all of this is supported by the GPU.
  5108. typedef enum
  5109. {
  5110. NV_COLOR_FORMAT_RGB = 0,
  5111. NV_COLOR_FORMAT_YUV422,
  5112. NV_COLOR_FORMAT_YUV444,
  5113. NV_COLOR_FORMAT_DEFAULT = 0xFE,
  5114. NV_COLOR_FORMAT_AUTO = 0xFF
  5115. } NV_COLOR_FORMAT;
  5116. typedef enum
  5117. {
  5118. NV_COLOR_COLORIMETRY_RGB = 0,
  5119. NV_COLOR_COLORIMETRY_YCC601,
  5120. NV_COLOR_COLORIMETRY_YCC709,
  5121. NV_COLOR_COLORIMETRY_XVYCC601,
  5122. NV_COLOR_COLORIMETRY_XVYCC709,
  5123. NV_COLOR_COLORIMETRY_SYCC601,
  5124. NV_COLOR_COLORIMETRY_ADOBEYCC601,
  5125. NV_COLOR_COLORIMETRY_ADOBERGB,
  5126. NV_COLOR_COLORIMETRY_DEFAULT = 0xFE,
  5127. NV_COLOR_COLORIMETRY_AUTO = 0xFF
  5128. } NV_COLOR_COLORIMETRY;
  5129. typedef struct
  5130. {
  5131. NvU32 version; //!< Version of this structure
  5132. NvU16 size; //!< Size of this structure
  5133. NvU8 cmd;
  5134. struct
  5135. {
  5136. NvU8 colorFormat;
  5137. NvU8 colorimetry;
  5138. } data;
  5139. } NV_COLOR_DATA;
  5140. NVAPI_INTERFACE NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData);
  5141. //! Macro for constructing the version field of ::NV_COLOR_DATA
  5142. #define NV_COLOR_DATA_VER MAKE_NVAPI_VERSION(NV_COLOR_DATA,1)
  5143. //! @}
  5144. ///////////////////////////////////////////////////////////////////////////////
  5145. // FUNCTION NAME: NvAPI_DISP_GetMonitorCapabilities
  5146. //
  5147. //! \fn NvAPI_DISP_GetMonitorCapabilities(NvU32 displayId, NV_MONITOR_CAPABILITIES *pMonitorCapabilities)
  5148. //! DESCRIPTION: This API returns the Monitor capabilities
  5149. //!
  5150. //! SUPPORTED OS: Windows Vista and higher
  5151. //!
  5152. //!
  5153. //! \param [in] displayId Monitor Identifier
  5154. //! \param [out] pMonitorCapabilities The monitor support info
  5155. //!
  5156. //! \return ::NVAPI_OK,
  5157. //! ::NVAPI_ERROR,
  5158. //! ::NVAPI_INVALID_ARGUMENT
  5159. //
  5160. ///////////////////////////////////////////////////////////////////////////////
  5161. //! \ingroup dispcontrol
  5162. //! @{
  5163. //! HDMI-related and extended CAPs
  5164. typedef enum
  5165. {
  5166. // hdmi related caps
  5167. NV_MONITOR_CAPS_TYPE_HDMI_VSDB = 0x1000,
  5168. NV_MONITOR_CAPS_TYPE_HDMI_VCDB = 0x1001,
  5169. } NV_MONITOR_CAPS_TYPE;
  5170. typedef struct _NV_MONITOR_CAPS_VCDB
  5171. {
  5172. NvU8 quantizationRangeYcc : 1;
  5173. NvU8 quantizationRangeRgb : 1;
  5174. NvU8 scanInfoPreferredVideoFormat : 2;
  5175. NvU8 scanInfoITVideoFormats : 2;
  5176. NvU8 scanInfoCEVideoFormats : 2;
  5177. } NV_MONITOR_CAPS_VCDB;
  5178. //! See NvAPI_DISP_GetMonitorCapabilities().
  5179. typedef struct _NV_MONITOR_CAPS_VSDB
  5180. {
  5181. // byte 1
  5182. NvU8 sourcePhysicalAddressB : 4; //!< Byte 1
  5183. NvU8 sourcePhysicalAddressA : 4; //!< Byte 1
  5184. // byte 2
  5185. NvU8 sourcePhysicalAddressD : 4; //!< Byte 2
  5186. NvU8 sourcePhysicalAddressC : 4; //!< Byte 2
  5187. // byte 3
  5188. NvU8 supportDualDviOperation : 1; //!< Byte 3
  5189. NvU8 reserved6 : 2; //!< Byte 3
  5190. NvU8 supportDeepColorYCbCr444 : 1; //!< Byte 3
  5191. NvU8 supportDeepColor30bits : 1; //!< Byte 3
  5192. NvU8 supportDeepColor36bits : 1; //!< Byte 3
  5193. NvU8 supportDeepColor48bits : 1; //!< Byte 3
  5194. NvU8 supportAI : 1; //!< Byte 3
  5195. // byte 4
  5196. NvU8 maxTmdsClock; //!< Bye 4
  5197. // byte 5
  5198. NvU8 cnc0SupportGraphicsTextContent : 1; //!< Byte 5
  5199. NvU8 cnc1SupportPhotoContent : 1; //!< Byte 5
  5200. NvU8 cnc2SupportCinemaContent : 1; //!< Byte 5
  5201. NvU8 cnc3SupportGameContent : 1; //!< Byte 5
  5202. NvU8 reserved8 : 1; //!< Byte 5
  5203. NvU8 hasVicEntries : 1; //!< Byte 5
  5204. NvU8 hasInterlacedLatencyField : 1; //!< Byte 5
  5205. NvU8 hasLatencyField : 1; //!< Byte 5
  5206. // byte 6
  5207. NvU8 videoLatency; //!< Byte 6
  5208. // byte 7
  5209. NvU8 audioLatency; //!< Byte 7
  5210. // byte 8
  5211. NvU8 interlacedVideoLatency; //!< Byte 8
  5212. // byte 9
  5213. NvU8 interlacedAudioLatency; //!< Byte 9
  5214. // byte 10
  5215. NvU8 reserved13 : 7; //!< Byte 10
  5216. NvU8 has3dEntries : 1; //!< Byte 10
  5217. // byte 11
  5218. NvU8 hdmi3dLength : 5; //!< Byte 11
  5219. NvU8 hdmiVicLength : 3; //!< Byte 11
  5220. // Remaining bytes
  5221. NvU8 hdmi_vic[7]; //!< Keeping maximum length for 3 bits
  5222. NvU8 hdmi_3d[31]; //!< Keeping maximum length for 5 bits
  5223. } NV_MONITOR_CAPS_VSDB;
  5224. //! See NvAPI_DISP_GetMonitorCapabilities().
  5225. typedef struct _NV_MONITOR_CAPABILITIES
  5226. {
  5227. NvU32 version;
  5228. NvU16 size;
  5229. NvU32 infoType;
  5230. NvU32 connectorType; //!< Out: VGA, TV, DVI, HDMI, DP
  5231. NvU8 bIsValidInfo : 1; //!< Boolean : Returns invalid if requested info is not present such as VCDB not present
  5232. union {
  5233. NV_MONITOR_CAPS_VSDB vsdb;
  5234. NV_MONITOR_CAPS_VCDB vcdb;
  5235. } data;
  5236. } NV_MONITOR_CAPABILITIES;
  5237. //! Macro for constructing the version field of ::NV_MONITOR_CAPABILITIES
  5238. #define NV_MONITOR_CAPABILITIES_VER MAKE_NVAPI_VERSION(NV_MONITOR_CAPABILITIES,1)
  5239. //! @}
  5240. //! SUPPORTED OS: Windows Vista and higher
  5241. //!
  5242. //! \ingroup dispcontrol
  5243. NVAPI_INTERFACE NvAPI_DISP_GetMonitorCapabilities(NvU32 displayId, NV_MONITOR_CAPABILITIES *pMonitorCapabilities);
  5244. ///////////////////////////////////////////////////////////////////////////////
  5245. // FUNCTION NAME: NvAPI_GetView
  5246. //
  5247. //! This API lets caller retrieve the target display arrangement for selected source display handle.
  5248. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW.
  5249. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs.
  5250. //!
  5251. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.
  5252. //! SUPPORTED OS: Windows Vista and higher
  5253. //!
  5254. //!
  5255. //! \since Release: 85
  5256. //!
  5257. //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from
  5258. //! NvAPI_EnumNVidiaDisplayHandle().
  5259. //! \param [out] pTargets User allocated storage to retrieve an array of NV_VIEW_TARGET_INFO. Can be NULL to retrieve
  5260. //! the targetCount.
  5261. //! \param [in,out] targetMaskCount Count of target device mask specified in pTargetMask.
  5262. //! \param [out] targetView Target view selected from NV_TARGET_VIEW_MODE.
  5263. //!
  5264. //! \retval NVAPI_OK Completed request
  5265. //! \retval NVAPI_ERROR Miscellaneous error occurred
  5266. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  5267. //! \ingroup dispcontrol
  5268. ///////////////////////////////////////////////////////////////////////////////
  5269. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.")
  5270. NVAPI_INTERFACE NvAPI_GetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargets, NvU32 *pTargetMaskCount, NV_TARGET_VIEW_MODE *pTargetView);
  5271. ///////////////////////////////////////////////////////////////////////////////
  5272. // FUNCTION NAME: NvAPI_GetViewEx
  5273. //
  5274. //! DESCRIPTION: This API lets caller retrieve the target display arrangement for selected source display handle.
  5275. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW.
  5276. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs.
  5277. //!
  5278. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.
  5279. //! SUPPORTED OS: Windows Vista and higher
  5280. //!
  5281. //!
  5282. //! \since Release: 165
  5283. //!
  5284. //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with
  5285. //! NvAPI_EnumNVidiaDisplayHandle().
  5286. //! \param [in,out] pPathInfo Count field should be set to NVAPI_MAX_DISPLAY_PATH. Can be NULL to retrieve just the pathCount.
  5287. //! \param [in,out] pPathCount Number of elements in array pPathInfo->path.
  5288. //! \param [out] pTargetViewMode Display view selected from NV_TARGET_VIEW_MODE.
  5289. //!
  5290. //! \retval NVAPI_OK Completed request
  5291. //! \retval NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  5292. //! \retval NVAPI_ERROR Miscellaneous error occurred
  5293. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  5294. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle.
  5295. //!
  5296. //! \ingroup dispcontrol
  5297. ///////////////////////////////////////////////////////////////////////////////
  5298. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.")
  5299. NVAPI_INTERFACE NvAPI_GetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NvU32 *pPathCount, NV_TARGET_VIEW_MODE *pTargetViewMode);
  5300. ///////////////////////////////////////////////////////////////////////////////
  5301. // FUNCTION NAME: NvAPI_GetSupportedViews
  5302. //
  5303. //! This API lets caller enumerate all the supported NVIDIA display views - nView and Dualview modes.
  5304. //!
  5305. //! SUPPORTED OS: Windows XP and higher
  5306. //!
  5307. //!
  5308. //! \since Release: 85
  5309. //!
  5310. //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from
  5311. //! NvAPI_EnumNVidiaDisplayHandle().
  5312. //! \param [out] pTargetViews Array of supported views. Can be NULL to retrieve the pViewCount first.
  5313. //! \param [in,out] pViewCount Count of supported views.
  5314. //!
  5315. //! \retval NVAPI_OK Completed request
  5316. //! \retval NVAPI_ERROR Miscellaneous error occurred
  5317. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  5318. //! \ingroup dispcontrol
  5319. ///////////////////////////////////////////////////////////////////////////////
  5320. NVAPI_INTERFACE NvAPI_GetSupportedViews(NvDisplayHandle hNvDisplay, NV_TARGET_VIEW_MODE *pTargetViews, NvU32 *pViewCount);
  5321. //! SUPPORTED OS: Windows XP and higher
  5322. //!
  5323. ///////////////////////////////////////////////////////////////////////////////
  5324. //
  5325. // FUNCTION NAME: NvAPI_DISP_GetDisplayIdByDisplayName
  5326. //
  5327. //! DESCRIPTION: This API retrieves the Display Id of a given display by
  5328. //! display name. The display must be active to retrieve the
  5329. //! displayId. In the case of clone mode or Surround gaming,
  5330. //! the primary or top-left display will be returned.
  5331. //!
  5332. //! \param [in] displayName Name of display (Eg: "\\DISPLAY1" to
  5333. //! retrieve the displayId for.
  5334. //! \param [out] displayId Display ID of the requested display.
  5335. //!
  5336. //! retval ::NVAPI_OK: Capabilties have been returned.
  5337. //! retval ::NVAPI_INVALID_ARGUMENT: One or more args passed in are invalid.
  5338. //! retval ::NVAPI_API_NOT_INTIALIZED: The NvAPI API needs to be initialized first
  5339. //! retval ::NVAPI_NO_IMPLEMENTATION: This entrypoint not available
  5340. //! retval ::NVAPI_ERROR: Miscellaneous error occurred
  5341. //!
  5342. //! \ingroup dispcontrol
  5343. ///////////////////////////////////////////////////////////////////////////////
  5344. NVAPI_INTERFACE NvAPI_DISP_GetDisplayIdByDisplayName(const char *displayName, NvU32* displayId);
  5345. //! SUPPORTED OS: Windows XP and higher
  5346. //!
  5347. ///////////////////////////////////////////////////////////////////////////////
  5348. //
  5349. // FUNCTION NAME: NvAPI_DISP_GetGDIPrimaryDisplayId
  5350. //
  5351. //! DESCRIPTION: This API returns the Display ID of the GDI Primary.
  5352. //!
  5353. //! \param [out] displayId Display ID of the GDI Primary display.
  5354. //!
  5355. //! \retval ::NVAPI_OK: Capabilties have been returned.
  5356. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND: GDI Primary not on an NVIDIA GPU.
  5357. //! \retval ::NVAPI_INVALID_ARGUMENT: One or more args passed in are invalid.
  5358. //! \retval ::NVAPI_API_NOT_INTIALIZED: The NvAPI API needs to be initialized first
  5359. //! \retval ::NVAPI_NO_IMPLEMENTATION: This entrypoint not available
  5360. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred
  5361. //!
  5362. //! \ingroup dispcontrol
  5363. ///////////////////////////////////////////////////////////////////////////////
  5364. NVAPI_INTERFACE NvAPI_DISP_GetGDIPrimaryDisplayId(NvU32* displayId);
  5365. ///////////////////////////////////////////////////////////////////////////////
  5366. // FUNCTION NAME: NvAPI_DISP_SetDisplayConfig
  5367. //
  5368. //
  5369. //! DESCRIPTION: This API lets caller apply a global display configuration
  5370. //! across multiple GPUs.
  5371. //!
  5372. //! If all sourceIds are zero, then NvAPI will pick up sourceId's based on the following criteria :
  5373. //! - If user provides sourceModeInfo then we are trying to assign 0th sourceId always to GDIPrimary.
  5374. //! This is needed since active windows always moves along with 0th sourceId.
  5375. //! - For rest of the paths, we are incrementally assigning the sourceId per adapter basis.
  5376. //! - If user doesn't provide sourceModeInfo then NVAPI just picks up some default sourceId's in incremental order.
  5377. //! Note : NVAPI will not intelligently choose the sourceIDs for any configs that does not need a modeset.
  5378. //!
  5379. //! SUPPORTED OS: Windows Vista and higher
  5380. //!
  5381. //!
  5382. //! \param [in] pathInfoCount Number of supplied elements in pathInfo
  5383. //! \param [in] pathInfo Array of path information
  5384. //! \param [in] flags Flags for applying settings
  5385. //!
  5386. //! \retval ::NVAPI_OK - completed request
  5387. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
  5388. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  5389. //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter.
  5390. //!
  5391. //! \ingroup dispcontrol
  5392. ///////////////////////////////////////////////////////////////////////////////
  5393. NVAPI_INTERFACE NvAPI_DISP_SetDisplayConfig(__in NvU32 pathInfoCount, __in_ecount(pathInfoCount) NV_DISPLAYCONFIG_PATH_INFO* pathInfo, __in NvU32 flags);
  5394. ////////////////////////////////////////////////////////////////////////////////////////
  5395. //
  5396. // MOSAIC allows a multi display target output scanout on a single source.
  5397. //
  5398. // SAMPLE of MOSAIC 1x4 topo with 8 pixel horizontal overlap
  5399. //
  5400. //+-------------------------++-------------------------++-------------------------++-------------------------+
  5401. //| || || || |
  5402. //| || || || |
  5403. //| || || || |
  5404. //| DVI1 || DVI2 || DVI3 || DVI4 |
  5405. //| || || || |
  5406. //| || || || |
  5407. //| || || || |
  5408. //| || || || |
  5409. //+-------------------------++-------------------------++-------------------------++-------------------------+
  5410. //! \addtogroup mosaicapi
  5411. //! @{
  5412. #define NVAPI_MAX_MOSAIC_DISPLAY_ROWS 8
  5413. #define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS 8
  5414. #define NV_MOSAIC_MAX_DISPLAYS (64)
  5415. //
  5416. // These bits are used to describe the validity of a topo.
  5417. //
  5418. #define NV_MOSAIC_TOPO_VALIDITY_VALID 0x00000000 //!< The topology is valid
  5419. #define NV_MOSAIC_TOPO_VALIDITY_MISSING_GPU 0x00000001 //!< Not enough SLI GPUs were found to fill the entire
  5420. //! topology. hPhysicalGPU will be 0 for these.
  5421. #define NV_MOSAIC_TOPO_VALIDITY_MISSING_DISPLAY 0x00000002 //!< Not enough displays were found to fill the entire
  5422. //! topology. displayOutputId will be 0 for these.
  5423. #define NV_MOSAIC_TOPO_VALIDITY_MIXED_DISPLAY_TYPES 0x00000004 //!< The topoogy is only possible with displays of the same
  5424. //! NV_GPU_OUTPUT_TYPE. Check displayOutputIds to make
  5425. //! sure they are all CRTs, or all DFPs.
  5426. //
  5427. //! This structure defines the topology details.
  5428. typedef struct
  5429. {
  5430. NvU32 version; //!< Version of this structure
  5431. NvLogicalGpuHandle hLogicalGPU; //!< Logical GPU for this topology
  5432. NvU32 validityMask; //!< 0 means topology is valid with the current hardware.
  5433. //! If not 0, inspect bits against NV_MOSAIC_TOPO_VALIDITY_*.
  5434. NvU32 rowCount; //!< Number of displays in a row
  5435. NvU32 colCount; //!< Number of displays in a column
  5436. struct
  5437. {
  5438. NvPhysicalGpuHandle hPhysicalGPU; //!< Physical GPU to be used in the topology (0 if GPU missing)
  5439. NvU32 displayOutputId; //!< Connected display target (0 if no display connected)
  5440. NvS32 overlapX; //!< Pixels of overlap on left of target: (+overlap, -gap)
  5441. NvS32 overlapY; //!< Pixels of overlap on top of target: (+overlap, -gap)
  5442. } gpuLayout[NVAPI_MAX_MOSAIC_DISPLAY_ROWS][NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS];
  5443. } NV_MOSAIC_TOPO_DETAILS;
  5444. //! Macro for constructing te vesion field of NV_MOSAIC_TOPO_DETAILS
  5445. #define NVAPI_MOSAIC_TOPO_DETAILS_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_DETAILS,1)
  5446. //
  5447. //! These values refer to the different types of Mosaic topologies that are possible. When
  5448. //! getting the supported Mosaic topologies, you can specify one of these types to narrow down
  5449. //! the returned list to only those that match the given type.
  5450. typedef enum
  5451. {
  5452. NV_MOSAIC_TOPO_TYPE_ALL, //!< All mosaic topologies
  5453. NV_MOSAIC_TOPO_TYPE_BASIC, //!< Basic Mosaic topologies
  5454. NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO, //!< Passive Stereo topologies
  5455. NV_MOSAIC_TOPO_TYPE_SCALED_CLONE, //!< Not supported at this time
  5456. NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO_SCALED_CLONE, //!< Not supported at this time
  5457. NV_MOSAIC_TOPO_TYPE_MAX, //!< Always leave this at end of the enum
  5458. } NV_MOSAIC_TOPO_TYPE;
  5459. //
  5460. //! This is a complete list of supported Mosaic topologies.
  5461. //!
  5462. //! Using a "Basic" topology combines multiple monitors to create a single desktop.
  5463. //!
  5464. //! Using a "Passive" topology combines multiples monitors to create a passive stereo desktop.
  5465. //! In passive stereo, two identical topologies combine - one topology is used for the right eye and the other identical //! topology (targeting different displays) is used for the left eye. \n
  5466. //! NOTE: common\inc\nvEscDef.h shadows a couple PASSIVE_STEREO enums. If this
  5467. //! enum list changes and effects the value of NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO
  5468. //! please update the corresponding value in nvEscDef.h
  5469. typedef enum
  5470. {
  5471. NV_MOSAIC_TOPO_NONE,
  5472. // 'BASIC' topos start here
  5473. //
  5474. // The result of using one of these Mosaic topos is that multiple monitors
  5475. // will combine to create a single desktop.
  5476. //
  5477. NV_MOSAIC_TOPO_BEGIN_BASIC,
  5478. NV_MOSAIC_TOPO_1x2_BASIC = NV_MOSAIC_TOPO_BEGIN_BASIC,
  5479. NV_MOSAIC_TOPO_2x1_BASIC,
  5480. NV_MOSAIC_TOPO_1x3_BASIC,
  5481. NV_MOSAIC_TOPO_3x1_BASIC,
  5482. NV_MOSAIC_TOPO_1x4_BASIC,
  5483. NV_MOSAIC_TOPO_4x1_BASIC,
  5484. NV_MOSAIC_TOPO_2x2_BASIC,
  5485. NV_MOSAIC_TOPO_2x3_BASIC,
  5486. NV_MOSAIC_TOPO_2x4_BASIC,
  5487. NV_MOSAIC_TOPO_3x2_BASIC,
  5488. NV_MOSAIC_TOPO_4x2_BASIC,
  5489. NV_MOSAIC_TOPO_1x5_BASIC,
  5490. NV_MOSAIC_TOPO_1x6_BASIC,
  5491. NV_MOSAIC_TOPO_7x1_BASIC,
  5492. // Add padding for 10 more entries. 6 will be enough room to specify every
  5493. // possible topology with 8 or fewer displays, so this gives us a little
  5494. // extra should we need it.
  5495. NV_MOSAIC_TOPO_END_BASIC = NV_MOSAIC_TOPO_7x1_BASIC + 9,
  5496. // 'PASSIVE_STEREO' topos start here
  5497. //
  5498. // The result of using one of these Mosaic topos is that multiple monitors
  5499. // will combine to create a single PASSIVE STEREO desktop. What this means is
  5500. // that there will be two topos that combine to create the overall desktop.
  5501. // One topo will be used for the left eye, and the other topo (of the
  5502. // same rows x cols), will be used for the right eye. The difference between
  5503. // the two topos is that different GPUs and displays will be used.
  5504. //
  5505. NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO, // value shadowed in nvEscDef.h
  5506. NV_MOSAIC_TOPO_1x2_PASSIVE_STEREO = NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO,
  5507. NV_MOSAIC_TOPO_2x1_PASSIVE_STEREO,
  5508. NV_MOSAIC_TOPO_1x3_PASSIVE_STEREO,
  5509. NV_MOSAIC_TOPO_3x1_PASSIVE_STEREO,
  5510. NV_MOSAIC_TOPO_1x4_PASSIVE_STEREO,
  5511. NV_MOSAIC_TOPO_4x1_PASSIVE_STEREO,
  5512. NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO,
  5513. NV_MOSAIC_TOPO_END_PASSIVE_STEREO = NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO + 4,
  5514. //
  5515. // Total number of topos. Always leave this at the end of the enumeration.
  5516. //
  5517. NV_MOSAIC_TOPO_MAX //! Total number of topologies.
  5518. } NV_MOSAIC_TOPO;
  5519. //
  5520. //! This is a "topology brief" structure. It tells you what you need to know about
  5521. //! a topology at a high level. A list of these is returned when you query for the
  5522. //! supported Mosaic information.
  5523. //!
  5524. //! If you need more detailed information about the topology, call
  5525. //! NvAPI_Mosaic_GetTopoGroup() with the topology value from this structure.
  5526. typedef struct
  5527. {
  5528. NvU32 version; //!< Version of this structure
  5529. NV_MOSAIC_TOPO topo; //!< The topology
  5530. NvU32 enabled; //!< 1 if topo is enabled, else 0
  5531. NvU32 isPossible; //!< 1 if topo *can* be enabled, else 0
  5532. } NV_MOSAIC_TOPO_BRIEF;
  5533. //! Macro for constructing the version field of NV_MOSAIC_TOPO_BRIEF
  5534. #define NVAPI_MOSAIC_TOPO_BRIEF_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_BRIEF,1)
  5535. //
  5536. //! Basic per-display settings that are used in setting/getting the Mosaic mode
  5537. typedef struct
  5538. {
  5539. NvU32 version; //!< Version of this structure
  5540. NvU32 width; //!< Per-display width
  5541. NvU32 height; //!< Per-display height
  5542. NvU32 bpp; //!< Bits per pixel
  5543. NvU32 freq; //!< Display frequency
  5544. } NV_MOSAIC_DISPLAY_SETTING;
  5545. //! Macro for constructing the version field of NV_MOSAIC_DISPLAY_SETTING
  5546. #define NVAPI_MOSAIC_DISPLAY_SETTING_VER MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING,1)
  5547. //
  5548. // Set a reasonable max number of display settings to support
  5549. // so arrays are bound.
  5550. //
  5551. #define NV_MOSAIC_DISPLAY_SETTINGS_MAX 40 //!< Set a reasonable maximum number of display settings to support
  5552. //! so arrays are bound.
  5553. //
  5554. //! This structure is used to contain a list of supported Mosaic topologies
  5555. //! along with the display settings that can be used.
  5556. typedef struct
  5557. {
  5558. NvU32 version; //!< Version of this structure
  5559. NvU32 topoBriefsCount; //!< Number of topologies in below array
  5560. NV_MOSAIC_TOPO_BRIEF topoBriefs[NV_MOSAIC_TOPO_MAX]; //!< List of supported topologies with only brief details
  5561. NvU32 displaySettingsCount; //!< Number of display settings in below array
  5562. NV_MOSAIC_DISPLAY_SETTING displaySettings[NV_MOSAIC_DISPLAY_SETTINGS_MAX]; //!< List of per display settings possible
  5563. } NV_MOSAIC_SUPPORTED_TOPO_INFO;
  5564. //! Macro forconstructing the version field of NV_MOSAIC_SUPPORTED_TOPO_INFO
  5565. #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO,1)
  5566. //
  5567. // Indices to use to access the topos array within the mosaic topology
  5568. #define NV_MOSAIC_TOPO_IDX_DEFAULT 0
  5569. #define NV_MOSAIC_TOPO_IDX_LEFT_EYE 0
  5570. #define NV_MOSAIC_TOPO_IDX_RIGHT_EYE 1
  5571. #define NV_MOSAIC_TOPO_NUM_EYES 2
  5572. //
  5573. //! This defines the maximum number of topos that can be in a topo group.
  5574. //! At this time, it is set to 2 because our largest topo group (passive
  5575. //! stereo) only needs 2 topos (left eye and right eye).
  5576. //!
  5577. //! If a new topo group with more than 2 topos is added above, then this
  5578. //! number will also have to be incremented.
  5579. #define NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP 2
  5580. //
  5581. //! This structure defines a group of topologies that work together to create one
  5582. //! overall layout. All of the supported topologies are represented with this
  5583. //! structure.
  5584. //!
  5585. //! For example, a 'Passive Stereo' topology would be represented with this
  5586. //! structure, and would have separate topology details for the left and right eyes.
  5587. //! The count would be 2. A 'Basic' topology is also represented by this structure,
  5588. //! with a count of 1.
  5589. //!
  5590. //! The structure is primarily used internally, but is exposed to applications in a
  5591. //! read-only fashion because there are some details in it that might be useful
  5592. //! (like the number of rows/cols, or connected display information). A user can
  5593. //! get the filled-in structure by calling NvAPI_Mosaic_GetTopoGroup().
  5594. //!
  5595. //! You can then look at the detailed values within the structure. There are no
  5596. //! entrypoints which take this structure as input (effectively making it read-only).
  5597. typedef struct
  5598. {
  5599. NvU32 version; //!< Version of this structure
  5600. NV_MOSAIC_TOPO_BRIEF brief; //!< The brief details of this topo
  5601. NvU32 count; //!< Number of topos in array below
  5602. NV_MOSAIC_TOPO_DETAILS topos[NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP];
  5603. } NV_MOSAIC_TOPO_GROUP;
  5604. //! Macro for constructing the version field of NV_MOSAIC_TOPO_GROUP
  5605. #define NVAPI_MOSAIC_TOPO_GROUP_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_GROUP,1)
  5606. //! @}
  5607. ///////////////////////////////////////////////////////////////////////////////
  5608. //
  5609. // FUNCTION NAME: NvAPI_Mosaic_GetSupportedTopoInfo
  5610. //
  5611. //! DESCRIPTION: This API returns information on the topologies and display resolutions
  5612. //! supported by Mosaic mode.
  5613. //!
  5614. //! NOTE: Not all topologies returned can be set immediately.
  5615. //! See 'OUT' Notes below.
  5616. //!
  5617. //! Once you get the list of supported topologies, you can call
  5618. //! NvAPI_Mosaic_GetTopoGroup() with one of the Mosaic topologies if you need
  5619. //! more information about it.
  5620. //!
  5621. //! <b>'IN' Notes:</b> pSupportedTopoInfo->version must be set before calling this function.
  5622. //! If the specified version is not supported by this implementation,
  5623. //! an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION).
  5624. //!
  5625. //! <b>'OUT' Notes:</b> Some of the topologies returned might not be valid for one reason or
  5626. //! another. It could be due to mismatched or missing displays. It
  5627. //! could also be because the required number of GPUs is not found.
  5628. //! At a high level, you can see if the topology is valid and can be enabled
  5629. //! by looking at the pSupportedTopoInfo->topoBriefs[xxx].isPossible flag.
  5630. //! If this is true, the topology can be enabled. If it
  5631. //! is false, you can find out why it cannot be enabled by getting the
  5632. //! details of the topology via NvAPI_Mosaic_GetTopoGroup(). From there,
  5633. //! look at the validityMask of the individual topologies. The bits can
  5634. //! be tested against the NV_MOSAIC_TOPO_VALIDITY_* bits.
  5635. //!
  5636. //! It is possible for this function to return NVAPI_OK with no topologies
  5637. //! listed in the return structure. If this is the case, it means that
  5638. //! the current hardware DOES support Mosaic, but with the given configuration
  5639. //! no valid topologies were found. This most likely means that SLI was not
  5640. //! enabled for the hardware. Once enabled, you should see valid topologies
  5641. //! returned from this function.
  5642. //!
  5643. //! SUPPORTED OS: Windows XP and higher
  5644. //!
  5645. //!
  5646. //! \since Release: 185
  5647. //!
  5648. //!
  5649. //! \param [in,out] pSupportedTopoInfo Information about what topologies and display resolutions
  5650. //! are supported for Mosaic.
  5651. //! \param [in] type The type of topologies the caller is interested in
  5652. //! getting. See NV_MOSAIC_TOPO_TYPE for possible values.
  5653. //!
  5654. //! \retval ::NVAPI_OK No errors in returning supported topologies.
  5655. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5656. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid.
  5657. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5658. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5659. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5660. // compatible with this entry point.
  5661. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred.
  5662. //!
  5663. //! \ingroup mosaicapi
  5664. ///////////////////////////////////////////////////////////////////////////////
  5665. NVAPI_INTERFACE NvAPI_Mosaic_GetSupportedTopoInfo(NV_MOSAIC_SUPPORTED_TOPO_INFO *pSupportedTopoInfo, NV_MOSAIC_TOPO_TYPE type);
  5666. ///////////////////////////////////////////////////////////////////////////////
  5667. //
  5668. // FUNCTION NAME: NvAPI_Mosaic_GetTopoGroup
  5669. //
  5670. //! DESCRIPTION: This API returns a structure filled with the details
  5671. //! of the specified Mosaic topology.
  5672. //!
  5673. //! If the pTopoBrief passed in matches the current topology,
  5674. //! then information in the brief and group structures
  5675. //! will reflect what is current. Thus the brief would have
  5676. //! the current 'enable' status, and the group would have the
  5677. //! current overlap values. If there is no match, then the
  5678. //! returned brief has an 'enable' status of FALSE (since it
  5679. //! is obviously not enabled), and the overlap values will be 0.
  5680. //!
  5681. //! <b>'IN' Notes:</b> pTopoGroup->version must be set before calling this function.
  5682. //! If the specified version is not supported by this implementation,
  5683. //! an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION).
  5684. //!
  5685. //!
  5686. //! SUPPORTED OS: Windows XP and higher
  5687. //!
  5688. //!
  5689. //! \since Release: 185
  5690. //!
  5691. //! \param [in] pTopoBrief The topology for getting the details
  5692. //! This must be one of the topology briefs
  5693. //! returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5694. //! \param [in,out] pTopoGroup The topology details matching the brief
  5695. //!
  5696. //! \retval ::NVAPI_OK Details were retrieved successfully.
  5697. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5698. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5699. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5700. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5701. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5702. // compatible with this entry point.
  5703. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred.
  5704. //!
  5705. //! \ingroup mosaicapi
  5706. ///////////////////////////////////////////////////////////////////////////////
  5707. NVAPI_INTERFACE NvAPI_Mosaic_GetTopoGroup(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_TOPO_GROUP *pTopoGroup);
  5708. ///////////////////////////////////////////////////////////////////////////////
  5709. //
  5710. // FUNCTION NAME: NvAPI_Mosaic_GetOverlapLimits
  5711. //
  5712. //! DESCRIPTION: This API returns the X and Y overlap limits required if
  5713. //! the given Mosaic topology and display settings are to be used.
  5714. //!
  5715. //! SUPPORTED OS: Windows XP and higher
  5716. //!
  5717. //!
  5718. //! \since Release: 185
  5719. //!
  5720. //! \param [in] pTopoBrief The topology for getting limits
  5721. //! This must be one of the topo briefs
  5722. //! returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5723. //! \param [in] pDisplaySetting The display settings for getting the limits.
  5724. //! This must be one of the settings
  5725. //! returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5726. //! \param [out] pMinOverlapX X overlap minimum
  5727. //! \param [out] pMaxOverlapX X overlap maximum
  5728. //! \param [out] pMinOverlapY Y overlap minimum
  5729. //! \param [out] pMaxOverlapY Y overlap maximum
  5730. //!
  5731. //! \retval ::NVAPI_OK Details were retrieved successfully.
  5732. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5733. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5734. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5735. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5736. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5737. //! compatible with this entry point.
  5738. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  5739. //!
  5740. //! \ingroup mosaicapi
  5741. ///////////////////////////////////////////////////////////////////////////////
  5742. NVAPI_INTERFACE NvAPI_Mosaic_GetOverlapLimits(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pMinOverlapX, NvS32 *pMaxOverlapX, NvS32 *pMinOverlapY, NvS32 *pMaxOverlapY);
  5743. ///////////////////////////////////////////////////////////////////////////////
  5744. //
  5745. // FUNCTION NAME: NvAPI_Mosaic_SetCurrentTopo
  5746. //
  5747. //! DESCRIPTION: This API sets the Mosaic topology and performs a mode switch
  5748. //! using the given display settings.
  5749. //!
  5750. //! If NVAPI_OK is returned, the current Mosaic topology was set
  5751. //! correctly. Any other status returned means the
  5752. //! topology was not set, and remains what it was before this
  5753. //! function was called.
  5754. //!
  5755. //! SUPPORTED OS: Windows XP and higher
  5756. //!
  5757. //!
  5758. //! \since Release: 185
  5759. //!
  5760. //! \param [in] pTopoBrief The topology to set. This must be one of the topologies returned from
  5761. //! NvAPI_Mosaic_GetSupportedTopoInfo(), and it must have an isPossible value of 1.
  5762. //! \param [in] pDisplaySetting The per display settings to be used in the Mosaic mode. This must be one of the
  5763. //! settings returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5764. //! \param [in] overlapX The pixel overlap to use between horizontal displays (use positive a number for
  5765. //! overlap, or a negative number to create a gap.) If the overlap is out of bounds
  5766. //! for what is possible given the topo and display setting, the overlap will be clamped.
  5767. //! \param [in] overlapY The pixel overlap to use between vertical displays (use positive a number for
  5768. //! overlap, or a negative number to create a gap.) If the overlap is out of bounds for
  5769. //! what is possible given the topo and display setting, the overlap will be clamped.
  5770. //! \param [in] enable If 1, the topology being set will also be enabled, meaning that the mode set will
  5771. //! occur. \n
  5772. //! If 0, you don't want to be in Mosaic mode right now, but want to set the current
  5773. //! Mosaic topology so you can enable it later with NvAPI_Mosaic_EnableCurrentTopo().
  5774. //!
  5775. //! \retval ::NVAPI_OK The Mosaic topology was set.
  5776. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5777. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5778. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE The topology passed in is not currently possible.
  5779. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5780. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5781. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5782. //! compatible with this entrypoint.
  5783. //! \retval ::NVAPI_MODE_CHANGE_FAILED There was an error changing the display mode.
  5784. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  5785. //!
  5786. //! \ingroup mosaicapi
  5787. ///////////////////////////////////////////////////////////////////////////////
  5788. NVAPI_INTERFACE NvAPI_Mosaic_SetCurrentTopo(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 overlapX, NvS32 overlapY, NvU32 enable);
  5789. ///////////////////////////////////////////////////////////////////////////////
  5790. //
  5791. // FUNCTION NAME: NvAPI_Mosaic_GetCurrentTopo
  5792. //
  5793. //! DESCRIPTION: This API returns information for the current Mosaic topology.
  5794. //! This includes topology, display settings, and overlap values.
  5795. //!
  5796. //! You can call NvAPI_Mosaic_GetTopoGroup() with the topology
  5797. //! if you require more information.
  5798. //!
  5799. //! If there isn't a current topology, then pTopoBrief->topo will
  5800. //! be NV_MOSAIC_TOPO_NONE.
  5801. //!
  5802. //! SUPPORTED OS: Windows XP and higher
  5803. //!
  5804. //!
  5805. //! \since Release: 185
  5806. //!
  5807. //! \param [out] pTopoBrief The current Mosaic topology
  5808. //! \param [out] pDisplaySetting The current per-display settings
  5809. //! \param [out] pOverlapX The pixel overlap between horizontal displays
  5810. //! \param [out] pOverlapY The pixel overlap between vertical displays
  5811. //!
  5812. //! \retval ::NVAPI_OK Success getting current info.
  5813. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5814. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5815. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5816. //! \retval ::NVAPI_NO_IMPLEMENTATION This entry point not available.
  5817. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  5818. //!
  5819. //! \ingroup mosaicapi
  5820. ///////////////////////////////////////////////////////////////////////////////
  5821. NVAPI_INTERFACE NvAPI_Mosaic_GetCurrentTopo(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pOverlapX, NvS32 *pOverlapY);
  5822. ///////////////////////////////////////////////////////////////////////////////
  5823. //
  5824. // FUNCTION NAME: NvAPI_Mosaic_EnableCurrentTopo
  5825. //
  5826. //! DESCRIPTION: This API enables or disables the current Mosaic topology
  5827. //! based on the setting of the incoming 'enable' parameter.
  5828. //!
  5829. //! An "enable" setting enables the current (previously set) Mosaic topology.
  5830. //! Note that when the current Mosaic topology is retrieved, it must have an isPossible value of 1 or
  5831. //! an error will occur.
  5832. //!
  5833. //! A "disable" setting disables the current Mosaic topology.
  5834. //! The topology information will persist, even across reboots.
  5835. //! To re-enable the Mosaic topology, call this function
  5836. //! again with the enable parameter set to 1.
  5837. //!
  5838. //! SUPPORTED OS: Windows XP and higher
  5839. //!
  5840. //!
  5841. //! \since Release: 185
  5842. //!
  5843. //! \param [in] enable 1 to enable the current Mosaic topo, 0 to disable it.
  5844. //!
  5845. //! \retval ::NVAPI_OK The Mosaic topo was enabled/disabled.
  5846. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5847. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid.
  5848. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE The current topology is not currently possible.
  5849. //! \retval ::NVAPI_MODE_CHANGE_FAILED There was an error changing the display mode.
  5850. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred.
  5851. //!
  5852. //! \ingroup mosaicapi
  5853. ///////////////////////////////////////////////////////////////////////////////
  5854. NVAPI_INTERFACE NvAPI_Mosaic_EnableCurrentTopo(NvU32 enable);
  5855. //! \ingroup mosaicapi
  5856. //! @{
  5857. typedef struct
  5858. {
  5859. NvU32 displayId; //!< DisplayID of the display
  5860. NvS32 overlapX; //!< (+overlap, -gap)
  5861. NvS32 overlapY; //!< (+overlap, -gap)
  5862. NV_ROTATE rotation; //!< Rotation of display
  5863. NvU32 cloneGroup; //!< Reserved, must be 0
  5864. } NV_MOSAIC_GRID_TOPO_DISPLAY;
  5865. typedef struct
  5866. {
  5867. NvU32 version; //!< Version of this structure
  5868. NvU32 rows; //!< Number of rows
  5869. NvU32 columns; //!< Number of columns
  5870. NvU32 displayCount; //!< Number of display details
  5871. NvU32 applyWithBezelCorrect : 1; //!< When enabling and doing the modeset, do we switch to the bezel-corrected resolution
  5872. NvU32 immersiveGaming : 1; //!< Enable as immersive gaming instead of Mosaic SLI (for Quadro-boards only)
  5873. NvU32 baseMosaic : 1; //!< Enable as Base Mosaic (Panoramic) instead of Mosaic SLI (for NVS and Quadro-boards only)
  5874. NvU32 driverReloadAllowed : 1; //!< If necessary, reloading the driver is permitted (for Vista and above only). Will not be persisted. Value undefined on get.
  5875. NvU32 acceleratePrimaryDisplay : 1; //!< Enable SLI acceleration on the primary display while in single-wide mode (For Immersive Gaming only). Will not be persisted. Value undefined on get.
  5876. NvU32 reserved : 27; //!< Reserved, must be 0
  5877. NV_MOSAIC_GRID_TOPO_DISPLAY displays[NV_MOSAIC_MAX_DISPLAYS]; //!< Displays are done as [(row * columns) + column]
  5878. NV_MOSAIC_DISPLAY_SETTING displaySettings; //!< Display settings
  5879. } NV_MOSAIC_GRID_TOPO;
  5880. //! Macro for constructing the version field of ::NV_MOSAIC_GRID_TOPO
  5881. #define NV_MOSAIC_GRID_TOPO_VER MAKE_NVAPI_VERSION(NV_MOSAIC_GRID_TOPO,1)
  5882. //! @}
  5883. //! since Release R290
  5884. //! SUPPORTED OS: Windows Vista and higher
  5885. //!
  5886. ///////////////////////////////////////////////////////////////////////////////
  5887. //
  5888. // FUNCTION NAME: NvAPI_Mosaic_GetDisplayViewportsByResolution
  5889. //
  5890. //! DESCRIPTION: This API returns the viewports that would be applied on
  5891. //! the requested display.
  5892. //!
  5893. //! \param [in] displayId Display ID of a single display in the active
  5894. //! mosaic topology to query.
  5895. //! \param [in] srcWidth Width of full display topology. If both
  5896. //! width and height are 0, the current
  5897. //! resolution is used.
  5898. //! \param [in] srcHeight Height of full display topology. If both
  5899. //! width and height are 0, the current
  5900. //! resolution is used.
  5901. //! \param [out] viewports Array of NV_RECT viewports which represent
  5902. //! the displays as identified in
  5903. //! NvAPI_Mosaic_EnumGridTopologies. If the
  5904. //! requested resolution is a single-wide
  5905. //! resolution, only viewports[0] will
  5906. //! contain the viewport details, regardless
  5907. //! of which display is driving the display.
  5908. //! \param [out] bezelCorrected Returns 1 if the requested resolution is
  5909. //! bezel corrected. May be NULL.
  5910. //!
  5911. //! \retval ::NVAPI_OK Capabilties have been returned.
  5912. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
  5913. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
  5914. //! \retval ::NVAPI_MOSAIC_NOT_ACTIVE The display does not belong to an active Mosaic Topology
  5915. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
  5916. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  5917. //!
  5918. //! \ingroup mosaicapi
  5919. ///////////////////////////////////////////////////////////////////////////////
  5920. NVAPI_INTERFACE NvAPI_Mosaic_GetDisplayViewportsByResolution(NvU32 displayId, NvU32 srcWidth, NvU32 srcHeight, NV_RECT viewports[NV_MOSAIC_MAX_DISPLAYS], NvU8* bezelCorrected);
  5921. ///////////////////////////////////////////////////////////////////////////////
  5922. //
  5923. // FUNCTION NAME: NvAPI_Mosaic_EnumDisplayModes
  5924. //
  5925. //! DESCRIPTION: Determines the set of available display modes for a given grid topology.
  5926. //!
  5927. //! SUPPORTED OS: Windows 7 and higher
  5928. //!
  5929. //!
  5930. //! \param [in] pGridTopology The grid topology to use.
  5931. //! \param [out] pDisplaySettings A pointer to an array of display settings to populate,
  5932. //! or NULL to find out the total number of available modes.
  5933. //! \param [in,out] pDisplayCount If pDisplaySettings is not NULL, then pDisplayCount
  5934. //! should point to the number of elements in the
  5935. //! pDisplaySettings array. On return, it will contain the
  5936. //! number of modes that were actually returned. If
  5937. //! pDisplaySettings is NULL, then pDisplayCount will receive
  5938. //! the total number of modes that are available.
  5939. //!
  5940. //!
  5941. //! \retval ::NVAPI_OK Capabilities have been returned.
  5942. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
  5943. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
  5944. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
  5945. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  5946. //!
  5947. //! \ingroup mosaciapi
  5948. ///////////////////////////////////////////////////////////////////////////////
  5949. NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayModes(__in NV_MOSAIC_GRID_TOPO *pGridTopology,
  5950. __out_ecount_part_opt(*pDisplayCount, *pDisplayCount) NV_MOSAIC_DISPLAY_SETTING *pDisplaySettings,
  5951. __inout NvU32 *pDisplayCount);
  5952. //! SUPPORTED OS: Windows 7 and higher
  5953. //!
  5954. ///////////////////////////////////////////////////////////////////////////////
  5955. //
  5956. // FUNCTION NAME: NvAPI_Mosaic_EnumDisplayGrids
  5957. //
  5958. //! DESCRIPTION: Enumerates the current active grid topologies. This includes Mosaic, IG, and
  5959. //! Panoramic topologies, as well as single displays.
  5960. //!
  5961. //! If pGridTopologies is NULL, then pGridCount will be set to the number of active
  5962. //! grid topologies.
  5963. //!
  5964. //! If pGridTopologies is not NULL, then pGridCount contains the maximum number of
  5965. //! grid topologies to return. On return, pGridCount will be set to the number of
  5966. //! grid topologies that were returned.
  5967. //!
  5968. //! \param [out] pGridTopologies The list of active grid topologies.
  5969. //! \param [in,out] pGridCount A pointer to the number of grid topologies returned.
  5970. //!
  5971. //! \retval ::NVAPI_OK Capabilties have been returned.
  5972. //! \retval ::NVAPI_END_ENUMERATION There are no more topologies to return.
  5973. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
  5974. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
  5975. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
  5976. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  5977. //!
  5978. //! \ingroup mosaicapi
  5979. ///////////////////////////////////////////////////////////////////////////////
  5980. NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayGrids(
  5981. __out_opt NV_MOSAIC_GRID_TOPO *pGridTopologies,
  5982. __inout NvU32 *pGridCount);
  5983. ////////////////////////////////////////////////////////////////////////////////////////
  5984. //
  5985. // ###########################################################################
  5986. // DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS
  5987. //
  5988. // Below is the Phase 1 Mosaic stuff, the Phase 2 stuff above is what will remain
  5989. // once Phase 2 is complete. For a small amount of time, the two will co-exist. As
  5990. // soon as apps (nvapichk, NvAPITestMosaic, and CPL) are updated to use the Phase 2
  5991. // entrypoints, the code below will be deleted.
  5992. //
  5993. // DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS
  5994. // ###########################################################################
  5995. //
  5996. // Supported topos 1x4, 4x1 and 2x2 to start with.
  5997. //
  5998. // Selected scan out targets can be one per GPU or more than one on the same GPU.
  5999. //
  6000. // SAMPLE of MOSAIC 1x4 SCAN OUT TOPO with 8 pixel horizontal overlap
  6001. //
  6002. //+-------------------------++-------------------------++-------------------------++-------------------------+
  6003. //| || || || |
  6004. //| || || || |
  6005. //| || || || |
  6006. //| DVI1 || DVI2 || DVI3 || DVI4 |
  6007. //| || || || |
  6008. //| || || || |
  6009. //| || || || |
  6010. //| || || || |
  6011. //+-------------------------++-------------------------++-------------------------++-------------------------+
  6012. //! \addtogroup mosaicapi
  6013. //! @{
  6014. //! Used in NV_MOSAIC_TOPOLOGY.
  6015. #define NVAPI_MAX_MOSAIC_DISPLAY_ROWS 8
  6016. //! Used in NV_MOSAIC_TOPOLOGY.
  6017. #define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS 8
  6018. //! Used in NV_MOSAIC_TOPOLOGY.
  6019. #define NVAPI_MAX_MOSAIC_TOPOS 16
  6020. //! Used in NvAPI_GetCurrentMosaicTopology() and NvAPI_SetCurrentMosaicTopology().
  6021. typedef struct
  6022. {
  6023. NvU32 version; //!< Version number of the mosaic topology
  6024. NvU32 rowCount; //!< Horizontal display count
  6025. NvU32 colCount; //!< Vertical display count
  6026. struct
  6027. {
  6028. NvPhysicalGpuHandle hPhysicalGPU; //!< Physical GPU to be used in the topology
  6029. NvU32 displayOutputId; //!< Connected display target
  6030. NvS32 overlapX; //!< Pixels of overlap on the left of target: (+overlap, -gap)
  6031. NvS32 overlapY; //!< Pixels of overlap on the top of target: (+overlap, -gap)
  6032. } gpuLayout[NVAPI_MAX_MOSAIC_DISPLAY_ROWS][NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS];
  6033. } NV_MOSAIC_TOPOLOGY;
  6034. //! Used in NV_MOSAIC_TOPOLOGY.
  6035. #define NVAPI_MOSAIC_TOPOLOGY_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPOLOGY,1)
  6036. //! Used in NvAPI_GetSupportedMosaicTopologies().
  6037. typedef struct
  6038. {
  6039. NvU32 version;
  6040. NvU32 totalCount; //!< Count of valid topologies
  6041. NV_MOSAIC_TOPOLOGY topos[NVAPI_MAX_MOSAIC_TOPOS]; //!< Maximum number of topologies
  6042. } NV_MOSAIC_SUPPORTED_TOPOLOGIES;
  6043. //! Used in NV_MOSAIC_SUPPORTED_TOPOLOGIES.
  6044. #define NVAPI_MOSAIC_SUPPORTED_TOPOLOGIES_VER MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPOLOGIES,1)
  6045. //!@}
  6046. ///////////////////////////////////////////////////////////////////////////////
  6047. //
  6048. // FUNCTION NAME: NvAPI_GetSupportedMosaicTopologies
  6049. //
  6050. //! DESCRIPTION: This API returns all valid Mosaic topologies.
  6051. //!
  6052. //! SUPPORTED OS: Windows XP
  6053. //!
  6054. //!
  6055. //! \since Release: 177
  6056. //!
  6057. //! \param [out] pMosaicTopos An array of valid Mosaic topologies.
  6058. //!
  6059. //! \retval NVAPI_OK Call succeeded; 1 or more topologies were returned
  6060. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  6061. //! \retval NVAPI_MIXED_TARGET_TYPES Mosaic topology is only possible with all targets of the same NV_GPU_OUTPUT_TYPE.
  6062. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  6063. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  6064. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  6065. //!
  6066. //! \ingroup mosaicapi
  6067. ///////////////////////////////////////////////////////////////////////////////
  6068. NVAPI_INTERFACE NvAPI_GetSupportedMosaicTopologies(NV_MOSAIC_SUPPORTED_TOPOLOGIES *pMosaicTopos);
  6069. ///////////////////////////////////////////////////////////////////////////////
  6070. //
  6071. // FUNCTION NAME: NvAPI_GetCurrentMosaicTopology
  6072. //
  6073. //! DESCRIPTION: This API gets the current Mosaic topology.
  6074. //!
  6075. //! SUPPORTED OS: Windows XP
  6076. //!
  6077. //!
  6078. //! \since Release: 177
  6079. //!
  6080. //! \param [out] pMosaicTopo The current Mosaic topology
  6081. //! \param [out] pEnabled TRUE if returned topology is currently enabled, else FALSE
  6082. //!
  6083. //! \retval NVAPI_OK Call succeeded
  6084. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  6085. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  6086. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  6087. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  6088. //!
  6089. //! \ingroup mosaicapi
  6090. ///////////////////////////////////////////////////////////////////////////////
  6091. NVAPI_INTERFACE NvAPI_GetCurrentMosaicTopology(NV_MOSAIC_TOPOLOGY *pMosaicTopo, NvU32 *pEnabled);
  6092. ///////////////////////////////////////////////////////////////////////////////
  6093. //
  6094. // FUNCTION NAME: NvAPI_SetCurrentMosaicTopology
  6095. //
  6096. //! DESCRIPTION: This API sets the Mosaic topology, and enables it so that the
  6097. //! Mosaic display settings are enumerated upon request.
  6098. //!
  6099. //! SUPPORTED OS: Windows XP
  6100. //!
  6101. //!
  6102. //! \since Release: 177
  6103. //!
  6104. //! \param [in] pMosaicTopo A valid Mosaic topology
  6105. //!
  6106. //! \retval NVAPI_OK Call succeeded
  6107. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  6108. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  6109. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  6110. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  6111. //!
  6112. //! \ingroup mosaicapi
  6113. ///////////////////////////////////////////////////////////////////////////////
  6114. NVAPI_INTERFACE NvAPI_SetCurrentMosaicTopology(NV_MOSAIC_TOPOLOGY *pMosaicTopo);
  6115. ///////////////////////////////////////////////////////////////////////////////
  6116. //
  6117. // FUNCTION NAME: NvAPI_EnableCurrentMosaicTopology
  6118. //
  6119. //! DESCRIPTION: This API enables or disables the current Mosaic topology.
  6120. //! When enabling, the last Mosaic topology will be set.
  6121. //!
  6122. //! - If enabled, enumeration of display settings will include valid Mosaic resolutions.
  6123. //! - If disabled, enumeration of display settings will not include Mosaic resolutions.
  6124. //!
  6125. //! SUPPORTED OS: Windows XP
  6126. //!
  6127. //!
  6128. //! \since Release: 177
  6129. //!
  6130. //! \param [in] enable TRUE to enable the Mosaic Topology, FALSE to disable it.
  6131. //!
  6132. //! \retval NVAPI_OK Call succeeded
  6133. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  6134. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  6135. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  6136. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  6137. //!
  6138. //! \ingroup mosaicapi
  6139. ///////////////////////////////////////////////////////////////////////////////
  6140. NVAPI_INTERFACE NvAPI_EnableCurrentMosaicTopology(NvU32 enable);
  6141. //-----------------------------------------------------------------------------
  6142. // DirectX APIs
  6143. //-----------------------------------------------------------------------------
  6144. //! \ingroup dx
  6145. //! Used in NvAPI_D3D10_GetCurrentSLIState(), and NvAPI_D3D_GetCurrentSLIState().
  6146. typedef struct
  6147. {
  6148. NvU32 version; //!< Structure version
  6149. NvU32 maxNumAFRGroups; //!< [OUT] The maximum possible value of numAFRGroups
  6150. NvU32 numAFRGroups; //!< [OUT] The number of AFR groups enabled in the system
  6151. NvU32 currentAFRIndex; //!< [OUT] The AFR group index for the frame currently being rendered
  6152. NvU32 nextFrameAFRIndex; //!< [OUT] What the AFR group index will be for the next frame (i.e. after calling Present)
  6153. NvU32 previousFrameAFRIndex; //!< [OUT] The AFR group index that was used for the previous frame (~0 if more than one frame has not been rendered yet)
  6154. NvU32 bIsCurAFRGroupNew; //!< [OUT] Boolean: Is this frame the first time running on the current AFR group
  6155. } NV_GET_CURRENT_SLI_STATE;
  6156. //! \ingroup dx
  6157. #define NV_GET_CURRENT_SLI_STATE_VER MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE,1)
  6158. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  6159. ///////////////////////////////////////////////////////////////////////////////
  6160. //
  6161. // FUNCTION NAME: NvAPI_D3D_GetCurrentSLIState
  6162. //
  6163. //! DESCRIPTION: This function returns the current SLI state for the specified device. The structure
  6164. //! contains the number of AFR groups, the current AFR group index,
  6165. //! and what the AFR group index will be for the next frame. \p
  6166. //! pDevice can be either a IDirect3DDevice9 or ID3D10Device pointer.
  6167. //!
  6168. //! SUPPORTED OS: Windows XP and higher
  6169. //!
  6170. //!
  6171. //! \since Release: 173
  6172. //!
  6173. //! \retval NVAPI_OK Completed request
  6174. //! \retval NVAPI_ERROR Error occurred
  6175. //!
  6176. //! \ingroup dx
  6177. ///////////////////////////////////////////////////////////////////////////////
  6178. NVAPI_INTERFACE NvAPI_D3D_GetCurrentSLIState(IUnknown *pDevice, NV_GET_CURRENT_SLI_STATE *pSliState);
  6179. #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  6180. #if defined(_D3D9_H_)
  6181. ///////////////////////////////////////////////////////////////////////////////
  6182. //
  6183. // FUNCTION NAME: NvAPI_D3D9_RegisterResource
  6184. //
  6185. //! DESCRIPTION: This API binds a resource (surface/texture) so that it can be retrieved
  6186. //! internally by NVAPI.
  6187. //!
  6188. //! SUPPORTED OS: Windows XP and higher
  6189. //!
  6190. //! \param [in] pResource surface/texture
  6191. //!
  6192. //! \return ::NVAPI_OK, ::NVAPI_ERROR
  6193. //!
  6194. //! \ingroup dx
  6195. ///////////////////////////////////////////////////////////////////////////////
  6196. NVAPI_INTERFACE NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResource);
  6197. #endif //defined(_D3D9_H_)
  6198. #if defined(_D3D9_H_)
  6199. ///////////////////////////////////////////////////////////////////////////////
  6200. //
  6201. // FUNCTION NAME: NvAPI_D3D9_UnregisterResource
  6202. //
  6203. //! DESCRIPTION: This API unbinds a resource (surface/texture) after use.
  6204. //!
  6205. //! SUPPORTED OS: Windows XP and higher
  6206. //!
  6207. //!
  6208. //! \param [in] pResource surface/texture
  6209. //!
  6210. //! \return ::NVAPI_OK, ::NVAPI_ERROR
  6211. //!
  6212. //! \ingroup dx
  6213. ///////////////////////////////////////////////////////////////////////////////
  6214. NVAPI_INTERFACE NvAPI_D3D9_UnregisterResource(IDirect3DResource9* pResource);
  6215. #endif //defined(_D3D9_H_)
  6216. #if defined(_D3D9_H_)
  6217. ///////////////////////////////////////////////////////////////////////////////
  6218. //
  6219. // FUNCTION NAME: NvAPI_D3D9_AliasSurfaceAsTexture
  6220. //
  6221. //! \fn NvAPI_D3D9_AliasSurfaceAsTexture(IDirect3DDevice9* pDev,
  6222. //! IDirect3DSurface9* pSurface,
  6223. //! IDirect3DTexture9 **ppTexture,
  6224. //! DWORD dwFlag);
  6225. //! DESCRIPTION: Create a texture that is an alias of a surface registered with NvAPI. The
  6226. //! new texture can be bound with IDirect3DDevice9::SetTexture(). Note that the texture must
  6227. //! be unbound before drawing to the surface again.
  6228. //! Unless the USE_SUPER flag is passed, MSAA surfaces will be resolved before
  6229. //! being used as a texture. MSAA depth buffers are resolved with a point filter,
  6230. //! and non-depth MSAA surfaces are resolved with a linear filter.
  6231. //!
  6232. //! SUPPORTED OS: Windows XP and higher
  6233. //!
  6234. //!
  6235. //! \param [in] pDev The D3D device that owns the objects
  6236. //! \param [in] pSurface Pointer to a surface that has been registered with NvAPI
  6237. //! to which a texture alias is to be provided
  6238. //! \param [out] ppTexture Fill with the texture created
  6239. //! \param [in] dwFlag NVAPI_ALIAS_SURFACE_FLAG to describe how to handle the texture
  6240. //!
  6241. //! \retval ::NVAPI_OK completed request
  6242. //! \retval ::NVAPI_INVALID_POINTER A null pointer was passed as an argument
  6243. //! \retval ::NVAPI_INVALID_ARGUMENT One of the arguments was invalid, probably dwFlag.
  6244. //! \retval ::NVAPI_UNREGISTERED_RESOURCE pSurface has not been registered with NvAPI
  6245. //! \retval ::NVAPI_ERROR error occurred
  6246. //
  6247. ///////////////////////////////////////////////////////////////////////////////
  6248. //! \ingroup dx
  6249. //! See NvAPI_D3D9_AliasSurfaceAsTexture().
  6250. typedef enum {
  6251. NVAPI_ALIAS_SURFACE_FLAG_NONE = 0x00000000,
  6252. NVAPI_ALIAS_SURFACE_FLAG_USE_SUPER = 0x00000001, //!< Use the surface's msaa buffer directly as a texture, rather than resolving. (This is much slower, but potentially has higher quality.)
  6253. NVAPI_ALIAS_SURFACE_FLAG_MASK = 0x00000001
  6254. } NVAPI_ALIAS_SURFACE_FLAG;
  6255. //! \ingroup dx
  6256. NVAPI_INTERFACE NvAPI_D3D9_AliasSurfaceAsTexture(IDirect3DDevice9* pDev,
  6257. IDirect3DSurface9* pSurface,
  6258. IDirect3DTexture9 **ppTexture,
  6259. DWORD dwFlag);
  6260. #endif //defined(_D3D9_H_)
  6261. #if defined(_D3D9_H_)
  6262. ///////////////////////////////////////////////////////////////////////////////
  6263. //
  6264. // FUNCTION NAME: NvAPI_D3D9_StretchRectEx
  6265. //
  6266. //! DESCRIPTION: This API copies the contents of the source resource to the destination
  6267. //! resource. This function can convert
  6268. //! between a wider range of surfaces than
  6269. //! IDirect3DDevice9::StretchRect. For example, it can copy
  6270. //! from a depth/stencil surface to a texture.
  6271. //!
  6272. //! The source and destination resources *must* be registered
  6273. //! with NvAPI before being used with NvAPI_D3D9_StretchRectEx().
  6274. //!
  6275. //! SUPPORTED OS: Windows XP and higher
  6276. //!
  6277. //!
  6278. //! \param [in] pDevice The D3D device that owns the objects.
  6279. //! \param [in] pSourceResource Pointer to the source resource.
  6280. //! \param [in] pSrcRect Defines the rectangle on the source to copy from. If NULL, copy from the entire resource.
  6281. //! \param [in] pDestResource Pointer to the destination resource.
  6282. //! \param [in] pDstRect Defines the rectangle on the destination to copy to. If NULL, copy to the entire resource.
  6283. //! \param [in] Filter Choose a filtering method: D3DTEXF_NONE, D3DTEXF_POINT, D3DTEXF_LINEAR.
  6284. //!
  6285. //! \retval ::NVAPI_OK completed request
  6286. //! \retval ::NVAPI_INVALID_POINTER An invalid pointer was passed as an argument (probably NULL)
  6287. //! \retval ::NVAPI_INVALID_ARGUMENT One of the arguments was invalid
  6288. //! \retval ::NVAPI_UNREGISTERED_RESOURCE a resource was passed in without being registered
  6289. //! \retval ::NVAPI_ERROR error occurred
  6290. //!
  6291. //! \ingroup dx
  6292. ///////////////////////////////////////////////////////////////////////////////
  6293. NVAPI_INTERFACE NvAPI_D3D9_StretchRectEx(IDirect3DDevice9 * pDevice,
  6294. IDirect3DResource9 * pSourceResource,
  6295. CONST RECT * pSourceRect,
  6296. IDirect3DResource9 * pDestResource,
  6297. CONST RECT * pDestRect,
  6298. D3DTEXTUREFILTERTYPE Filter);
  6299. #endif //defined(_D3D9_H_)
  6300. #if defined(_D3D9_H_)
  6301. ///////////////////////////////////////////////////////////////////////////////
  6302. //
  6303. // FUNCTION NAME: NvAPI_D3D9_ClearRT
  6304. //
  6305. //! DESCRIPTION: This API Clears the currently bound render target(s) with the
  6306. //! given color
  6307. //!
  6308. //!
  6309. //! SUPPORTED OS: Windows XP and higher
  6310. //!
  6311. //!
  6312. //! \param [in] pDevice The D3D device that owns the objects.
  6313. //! \param [in] dwNumRects The no of rectangles to clear. If 0, clear the entire surface (clipped to viewport)
  6314. //! \param [in] pRects Defines the rectangles to clear. Should be NULL if dwNumRects == 0
  6315. //! \param [in] r red component of the clear color
  6316. //! \param [in] g green component of the clear color
  6317. //! \param [in] b blue component of the clear color
  6318. //! \param [in] a alpha component of the clear color
  6319. //!
  6320. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6321. //!
  6322. //! \ingroup dx
  6323. ///////////////////////////////////////////////////////////////////////////////
  6324. NVAPI_INTERFACE NvAPI_D3D9_ClearRT(IDirect3DDevice9 * pDevice,
  6325. NvU32 dwNumRects,
  6326. CONST RECT * pRects,
  6327. float r, float g, float b, float a);
  6328. #endif //if defined(_D3D9_H_)
  6329. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  6330. ///////////////////////////////////////////////////////////////////////////////
  6331. //
  6332. // FUNCTION NAME: NvAPI_D3D_SetFPSIndicatorState
  6333. //
  6334. //! DESCRIPTION: Display an overlay that tracks the number of times the app presents per second, or,
  6335. //! the number of frames-per-second (FPS)
  6336. //!
  6337. //! SUPPORTED OS: Windows XP and higher
  6338. //!
  6339. //!
  6340. //! \param [in] bool Whether or not to enable the fps indicator.
  6341. //!
  6342. //! \return ::NVAPI_OK,
  6343. //! ::NVAPI_ERROR
  6344. //!
  6345. //! \ingroup dx
  6346. ///////////////////////////////////////////////////////////////////////////////
  6347. NVAPI_INTERFACE NvAPI_D3D_SetFPSIndicatorState(IUnknown *pDev, NvU8 doEnable);
  6348. #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  6349. //! \ingroup vidio
  6350. //! Unique identifier for VIO owner (process identifier or NVVIOOWNERID_NONE)
  6351. typedef NvU32 NVVIOOWNERID;
  6352. //! \addtogroup vidio
  6353. //! @{
  6354. #define NVVIOOWNERID_NONE 0 //!< Unregistered ownerId
  6355. //! Owner type for device
  6356. typedef enum _NVVIOOWNERTYPE
  6357. {
  6358. NVVIOOWNERTYPE_NONE , //!< No owner for the device
  6359. NVVIOOWNERTYPE_APPLICATION , //!< Application owns the device
  6360. NVVIOOWNERTYPE_DESKTOP , //!< Desktop transparent mode owns the device (not applicable for video input)
  6361. }NVVIOOWNERTYPE;
  6362. // Access rights for NvAPI_VIO_Open()
  6363. //! Read access (not applicable for video output)
  6364. #define NVVIO_O_READ 0x00000000
  6365. //! Write exclusive access (not applicable for video input)
  6366. #define NVVIO_O_WRITE_EXCLUSIVE 0x00010001
  6367. //!
  6368. #define NVVIO_VALID_ACCESSRIGHTS (NVVIO_O_READ | \
  6369. NVVIO_O_WRITE_EXCLUSIVE )
  6370. //! VIO_DATA.ulOwnerID high-bit is set only if device has been initialized by VIOAPI
  6371. //! examined at NvAPI_GetCapabilities|NvAPI_VIO_Open to determine if settings need to be applied from registry or POR state read
  6372. #define NVVIO_OWNERID_INITIALIZED 0x80000000
  6373. //! VIO_DATA.ulOwnerID next-bit is set only if device is currently in exclusive write access mode from NvAPI_VIO_Open()
  6374. #define NVVIO_OWNERID_EXCLUSIVE 0x40000000
  6375. //! VIO_DATA.ulOwnerID lower bits are:
  6376. //! NVGVOOWNERTYPE_xxx enumerations indicating use context
  6377. #define NVVIO_OWNERID_TYPEMASK 0x0FFFFFFF //!< mask for NVVIOOWNERTYPE_xxx
  6378. //! @}
  6379. //---------------------------------------------------------------------
  6380. // Enumerations
  6381. //---------------------------------------------------------------------
  6382. //! \addtogroup vidio
  6383. //! @{
  6384. //! Video signal format and resolution
  6385. typedef enum _NVVIOSIGNALFORMAT
  6386. {
  6387. NVVIOSIGNALFORMAT_NONE, //!< Invalid signal format
  6388. NVVIOSIGNALFORMAT_487I_59_94_SMPTE259_NTSC, //!< 01 487i 59.94Hz (SMPTE259) NTSC
  6389. NVVIOSIGNALFORMAT_576I_50_00_SMPTE259_PAL, //!< 02 576i 50.00Hz (SMPTE259) PAL
  6390. NVVIOSIGNALFORMAT_1035I_60_00_SMPTE260, //!< 03 1035i 60.00Hz (SMPTE260)
  6391. NVVIOSIGNALFORMAT_1035I_59_94_SMPTE260, //!< 04 1035i 59.94Hz (SMPTE260)
  6392. NVVIOSIGNALFORMAT_1080I_50_00_SMPTE295, //!< 05 1080i 50.00Hz (SMPTE295)
  6393. NVVIOSIGNALFORMAT_1080I_60_00_SMPTE274, //!< 06 1080i 60.00Hz (SMPTE274)
  6394. NVVIOSIGNALFORMAT_1080I_59_94_SMPTE274, //!< 07 1080i 59.94Hz (SMPTE274)
  6395. NVVIOSIGNALFORMAT_1080I_50_00_SMPTE274, //!< 08 1080i 50.00Hz (SMPTE274)
  6396. NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274, //!< 09 1080p 30.00Hz (SMPTE274)
  6397. NVVIOSIGNALFORMAT_1080P_29_97_SMPTE274, //!< 10 1080p 29.97Hz (SMPTE274)
  6398. NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274, //!< 11 1080p 25.00Hz (SMPTE274)
  6399. NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274, //!< 12 1080p 24.00Hz (SMPTE274)
  6400. NVVIOSIGNALFORMAT_1080P_23_976_SMPTE274, //!< 13 1080p 23.976Hz (SMPTE274)
  6401. NVVIOSIGNALFORMAT_720P_60_00_SMPTE296, //!< 14 720p 60.00Hz (SMPTE296)
  6402. NVVIOSIGNALFORMAT_720P_59_94_SMPTE296, //!< 15 720p 59.94Hz (SMPTE296)
  6403. NVVIOSIGNALFORMAT_720P_50_00_SMPTE296, //!< 16 720p 50.00Hz (SMPTE296)
  6404. NVVIOSIGNALFORMAT_1080I_48_00_SMPTE274, //!< 17 1080I 48.00Hz (SMPTE274)
  6405. NVVIOSIGNALFORMAT_1080I_47_96_SMPTE274, //!< 18 1080I 47.96Hz (SMPTE274)
  6406. NVVIOSIGNALFORMAT_720P_30_00_SMPTE296, //!< 19 720p 30.00Hz (SMPTE296)
  6407. NVVIOSIGNALFORMAT_720P_29_97_SMPTE296, //!< 20 720p 29.97Hz (SMPTE296)
  6408. NVVIOSIGNALFORMAT_720P_25_00_SMPTE296, //!< 21 720p 25.00Hz (SMPTE296)
  6409. NVVIOSIGNALFORMAT_720P_24_00_SMPTE296, //!< 22 720p 24.00Hz (SMPTE296)
  6410. NVVIOSIGNALFORMAT_720P_23_98_SMPTE296, //!< 23 720p 23.98Hz (SMPTE296)
  6411. NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372, //!< 24 2048p 30.00Hz (SMPTE372)
  6412. NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372, //!< 25 2048p 29.97Hz (SMPTE372)
  6413. NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372, //!< 26 2048i 60.00Hz (SMPTE372)
  6414. NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372, //!< 27 2048i 59.94Hz (SMPTE372)
  6415. NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372, //!< 28 2048p 25.00Hz (SMPTE372)
  6416. NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372, //!< 29 2048i 50.00Hz (SMPTE372)
  6417. NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372, //!< 30 2048p 24.00Hz (SMPTE372)
  6418. NVVIOSIGNALFORMAT_2048P_23_98_SMPTE372, //!< 31 2048p 23.98Hz (SMPTE372)
  6419. NVVIOSIGNALFORMAT_2048I_48_00_SMPTE372, //!< 32 2048i 48.00Hz (SMPTE372)
  6420. NVVIOSIGNALFORMAT_2048I_47_96_SMPTE372, //!< 33 2048i 47.96Hz (SMPTE372)
  6421. NVVIOSIGNALFORMAT_1080PSF_25_00_SMPTE274, //!< 34 1080PsF 25.00Hz (SMPTE274)
  6422. NVVIOSIGNALFORMAT_1080PSF_29_97_SMPTE274, //!< 35 1080PsF 29.97Hz (SMPTE274)
  6423. NVVIOSIGNALFORMAT_1080PSF_30_00_SMPTE274, //!< 36 1080PsF 30.00Hz (SMPTE274)
  6424. NVVIOSIGNALFORMAT_1080PSF_24_00_SMPTE274, //!< 37 1080PsF 24.00Hz (SMPTE274)
  6425. NVVIOSIGNALFORMAT_1080PSF_23_98_SMPTE274, //!< 38 1080PsF 23.98Hz (SMPTE274)
  6426. NVVIOSIGNALFORMAT_1080P_50_00_SMPTE274_3G_LEVEL_A, //!< 39 1080P 50.00Hz (SMPTE274) 3G Level A
  6427. NVVIOSIGNALFORMAT_1080P_59_94_SMPTE274_3G_LEVEL_A, //!< 40 1080P 59.94Hz (SMPTE274) 3G Level A
  6428. NVVIOSIGNALFORMAT_1080P_60_00_SMPTE274_3G_LEVEL_A, //!< 41 1080P 60.00Hz (SMPTE274) 3G Level A
  6429. NVVIOSIGNALFORMAT_1080P_60_00_SMPTE274_3G_LEVEL_B, //!< 42 1080p 60.00Hz (SMPTE274) 3G Level B
  6430. NVVIOSIGNALFORMAT_1080I_60_00_SMPTE274_3G_LEVEL_B, //!< 43 1080i 60.00Hz (SMPTE274) 3G Level B
  6431. NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372_3G_LEVEL_B, //!< 44 2048i 60.00Hz (SMPTE372) 3G Level B
  6432. NVVIOSIGNALFORMAT_1080P_50_00_SMPTE274_3G_LEVEL_B, //!< 45 1080p 50.00Hz (SMPTE274) 3G Level B
  6433. NVVIOSIGNALFORMAT_1080I_50_00_SMPTE274_3G_LEVEL_B, //!< 46 1080i 50.00Hz (SMPTE274) 3G Level B
  6434. NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372_3G_LEVEL_B, //!< 47 2048i 50.00Hz (SMPTE372) 3G Level B
  6435. NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274_3G_LEVEL_B, //!< 48 1080p 30.00Hz (SMPTE274) 3G Level B
  6436. NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372_3G_LEVEL_B, //!< 49 2048p 30.00Hz (SMPTE372) 3G Level B
  6437. NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274_3G_LEVEL_B, //!< 50 1080p 25.00Hz (SMPTE274) 3G Level B
  6438. NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372_3G_LEVEL_B, //!< 51 2048p 25.00Hz (SMPTE372) 3G Level B
  6439. NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274_3G_LEVEL_B, //!< 52 1080p 24.00Hz (SMPTE274) 3G Level B
  6440. NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372_3G_LEVEL_B, //!< 53 2048p 24.00Hz (SMPTE372) 3G Level B
  6441. NVVIOSIGNALFORMAT_1080I_48_00_SMPTE274_3G_LEVEL_B, //!< 54 1080i 48.00Hz (SMPTE274) 3G Level B
  6442. NVVIOSIGNALFORMAT_2048I_48_00_SMPTE372_3G_LEVEL_B, //!< 55 2048i 48.00Hz (SMPTE372) 3G Level B
  6443. NVVIOSIGNALFORMAT_1080P_59_94_SMPTE274_3G_LEVEL_B, //!< 56 1080p 59.94Hz (SMPTE274) 3G Level B
  6444. NVVIOSIGNALFORMAT_1080I_59_94_SMPTE274_3G_LEVEL_B, //!< 57 1080i 59.94Hz (SMPTE274) 3G Level B
  6445. NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372_3G_LEVEL_B, //!< 58 2048i 59.94Hz (SMPTE372) 3G Level B
  6446. NVVIOSIGNALFORMAT_1080P_29_97_SMPTE274_3G_LEVEL_B, //!< 59 1080p 29.97Hz (SMPTE274) 3G Level B
  6447. NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372_3G_LEVEL_B, //!< 60 2048p 29.97Hz (SMPTE372) 3G Level B
  6448. NVVIOSIGNALFORMAT_1080P_23_98_SMPTE274_3G_LEVEL_B, //!< 61 1080p 29.98Hz (SMPTE274) 3G Level B
  6449. NVVIOSIGNALFORMAT_2048P_23_98_SMPTE372_3G_LEVEL_B, //!< 62 2048p 29.98Hz (SMPTE372) 3G Level B
  6450. NVVIOSIGNALFORMAT_1080I_47_96_SMPTE274_3G_LEVEL_B, //!< 63 1080i 47.96Hz (SMPTE274) 3G Level B
  6451. NVVIOSIGNALFORMAT_2048I_47_96_SMPTE372_3G_LEVEL_B, //!< 64 2048i 47.96Hz (SMPTE372) 3G Level B
  6452. NVVIOSIGNALFORMAT_END //!< 65 To indicate end of signal format list
  6453. }NVVIOSIGNALFORMAT;
  6454. //! SMPTE standards format
  6455. typedef enum _NVVIOVIDEOSTANDARD
  6456. {
  6457. NVVIOVIDEOSTANDARD_SMPTE259 , //!< SMPTE259
  6458. NVVIOVIDEOSTANDARD_SMPTE260 , //!< SMPTE260
  6459. NVVIOVIDEOSTANDARD_SMPTE274 , //!< SMPTE274
  6460. NVVIOVIDEOSTANDARD_SMPTE295 , //!< SMPTE295
  6461. NVVIOVIDEOSTANDARD_SMPTE296 , //!< SMPTE296
  6462. NVVIOVIDEOSTANDARD_SMPTE372 , //!< SMPTE372
  6463. }NVVIOVIDEOSTANDARD;
  6464. //! HD or SD video type
  6465. typedef enum _NVVIOVIDEOTYPE
  6466. {
  6467. NVVIOVIDEOTYPE_SD , //!< Standard-definition (SD)
  6468. NVVIOVIDEOTYPE_HD , //!< High-definition (HD)
  6469. }NVVIOVIDEOTYPE;
  6470. //! Interlace mode
  6471. typedef enum _NVVIOINTERLACEMODE
  6472. {
  6473. NVVIOINTERLACEMODE_PROGRESSIVE , //!< Progressive (p)
  6474. NVVIOINTERLACEMODE_INTERLACE , //!< Interlace (i)
  6475. NVVIOINTERLACEMODE_PSF , //!< Progressive Segment Frame (psf)
  6476. }NVVIOINTERLACEMODE;
  6477. //! Video data format
  6478. typedef enum _NVVIODATAFORMAT
  6479. {
  6480. NVVIODATAFORMAT_UNKNOWN = -1 , //!< Invalid DataFormat
  6481. NVVIODATAFORMAT_R8G8B8_TO_YCRCB444 , //!< R8:G8:B8 => YCrCb (4:4:4)
  6482. NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4444 , //!< R8:G8:B8:A8 => YCrCbA (4:4:4:4)
  6483. NVVIODATAFORMAT_R8G8B8Z10_TO_YCRCBZ4444 , //!< R8:G8:B8:Z10 => YCrCbZ (4:4:4:4)
  6484. NVVIODATAFORMAT_R8G8B8_TO_YCRCB422 , //!< R8:G8:B8 => YCrCb (4:2:2)
  6485. NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4224 , //!< R8:G8:B8:A8 => YCrCbA (4:2:2:4)
  6486. NVVIODATAFORMAT_R8G8B8Z10_TO_YCRCBZ4224 , //!< R8:G8:B8:Z10 => YCrCbZ (4:2:2:4)
  6487. NVVIODATAFORMAT_X8X8X8_444_PASSTHRU , //!< R8:G8:B8 => RGB (4:4:4)
  6488. NVVIODATAFORMAT_X8X8X8A8_4444_PASSTHRU , //!< R8:G8:B8:A8 => RGBA (4:4:4:4)
  6489. NVVIODATAFORMAT_X8X8X8Z10_4444_PASSTHRU , //!< R8:G8:B8:Z10 => RGBZ (4:4:4:4)
  6490. NVVIODATAFORMAT_X10X10X10_444_PASSTHRU , //!< Y10:CR10:CB10 => YCrCb (4:4:4)
  6491. NVVIODATAFORMAT_X10X8X8_444_PASSTHRU , //!< Y10:CR8:CB8 => YCrCb (4:4:4)
  6492. NVVIODATAFORMAT_X10X8X8A10_4444_PASSTHRU , //!< Y10:CR8:CB8:A10 => YCrCbA (4:4:4:4)
  6493. NVVIODATAFORMAT_X10X8X8Z10_4444_PASSTHRU , //!< Y10:CR8:CB8:Z10 => YCrCbZ (4:4:4:4)
  6494. NVVIODATAFORMAT_DUAL_R8G8B8_TO_DUAL_YCRCB422 , //!< R8:G8:B8 + R8:G8:B8 => YCrCb (4:2:2 + 4:2:2)
  6495. NVVIODATAFORMAT_DUAL_X8X8X8_TO_DUAL_422_PASSTHRU , //!< Y8:CR8:CB8 + Y8:CR8:CB8 => YCrCb (4:2:2 + 4:2:2)
  6496. NVVIODATAFORMAT_R10G10B10_TO_YCRCB422 , //!< R10:G10:B10 => YCrCb (4:2:2)
  6497. NVVIODATAFORMAT_R10G10B10_TO_YCRCB444 , //!< R10:G10:B10 => YCrCb (4:4:4)
  6498. NVVIODATAFORMAT_X12X12X12_444_PASSTHRU , //!< X12:X12:X12 => XXX (4:4:4)
  6499. NVVIODATAFORMAT_X12X12X12_422_PASSTHRU , //!< X12:X12:X12 => XXX (4:2:2)
  6500. NVVIODATAFORMAT_Y10CR10CB10_TO_YCRCB422 , //!< Y10:CR10:CB10 => YCrCb (4:2:2)
  6501. NVVIODATAFORMAT_Y8CR8CB8_TO_YCRCB422 , //!< Y8:CR8:CB8 => YCrCb (4:2:2)
  6502. NVVIODATAFORMAT_Y10CR8CB8A10_TO_YCRCBA4224 , //!< Y10:CR8:CB8:A10 => YCrCbA (4:2:2:4)
  6503. NVVIODATAFORMAT_R10G10B10_TO_RGB444 , //!< R10:G10:B10 => RGB (4:4:4)
  6504. NVVIODATAFORMAT_R12G12B12_TO_YCRCB444 , //!< R12:G12:B12 => YCrCb (4:4:4)
  6505. NVVIODATAFORMAT_R12G12B12_TO_YCRCB422 , //!< R12:G12:B12 => YCrCb (4:2:2)
  6506. }NVVIODATAFORMAT;
  6507. //! Video output area
  6508. typedef enum _NVVIOOUTPUTAREA
  6509. {
  6510. NVVIOOUTPUTAREA_FULLSIZE , //!< Output to entire video resolution (full size)
  6511. NVVIOOUTPUTAREA_SAFEACTION , //!< Output to centered 90% of video resolution (safe action)
  6512. NVVIOOUTPUTAREA_SAFETITLE , //!< Output to centered 80% of video resolution (safe title)
  6513. }NVVIOOUTPUTAREA;
  6514. //! Synchronization source
  6515. typedef enum _NVVIOSYNCSOURCE
  6516. {
  6517. NVVIOSYNCSOURCE_SDISYNC , //!< SDI Sync (Digital input)
  6518. NVVIOSYNCSOURCE_COMPSYNC , //!< COMP Sync (Composite input)
  6519. }NVVIOSYNCSOURCE;
  6520. //! Composite synchronization type
  6521. typedef enum _NVVIOCOMPSYNCTYPE
  6522. {
  6523. NVVIOCOMPSYNCTYPE_AUTO , //!< Auto-detect
  6524. NVVIOCOMPSYNCTYPE_BILEVEL , //!< Bi-level signal
  6525. NVVIOCOMPSYNCTYPE_TRILEVEL , //!< Tri-level signal
  6526. }NVVIOCOMPSYNCTYPE;
  6527. //! Video input output status
  6528. typedef enum _NVVIOINPUTOUTPUTSTATUS
  6529. {
  6530. NVINPUTOUTPUTSTATUS_OFF , //!< Not in use
  6531. NVINPUTOUTPUTSTATUS_ERROR , //!< Error detected
  6532. NVINPUTOUTPUTSTATUS_SDI_SD , //!< SDI (standard-definition)
  6533. NVINPUTOUTPUTSTATUS_SDI_HD , //!< SDI (high-definition)
  6534. }NVVIOINPUTOUTPUTSTATUS;
  6535. //! Synchronization input status
  6536. typedef enum _NVVIOSYNCSTATUS
  6537. {
  6538. NVVIOSYNCSTATUS_OFF , //!< Sync not detected
  6539. NVVIOSYNCSTATUS_ERROR , //!< Error detected
  6540. NVVIOSYNCSTATUS_SYNCLOSS , //!< Genlock in use, format mismatch with output
  6541. NVVIOSYNCSTATUS_COMPOSITE , //!< Composite sync
  6542. NVVIOSYNCSTATUS_SDI_SD , //!< SDI sync (standard-definition)
  6543. NVVIOSYNCSTATUS_SDI_HD , //!< SDI sync (high-definition)
  6544. }NVVIOSYNCSTATUS;
  6545. //! Video Capture Status
  6546. typedef enum _NVVIOCAPTURESTATUS
  6547. {
  6548. NVVIOSTATUS_STOPPED , //!< Sync not detected
  6549. NVVIOSTATUS_RUNNING , //!< Error detected
  6550. NVVIOSTATUS_ERROR , //!< Genlock in use, format mismatch with output
  6551. }NVVIOCAPTURESTATUS;
  6552. //! Video Capture Status
  6553. typedef enum _NVVIOSTATUSTYPE
  6554. {
  6555. NVVIOSTATUSTYPE_IN , //!< Input Status
  6556. NVVIOSTATUSTYPE_OUT , //!< Output Status
  6557. }NVVIOSTATUSTYPE;
  6558. //! Assumption, maximum 4 SDI input and 4 SDI output cards supported on a system
  6559. #define NVAPI_MAX_VIO_DEVICES 8
  6560. //! 4 physical jacks supported on each SDI input card.
  6561. #define NVAPI_MAX_VIO_JACKS 4
  6562. //! Each physical jack an on SDI input card can have
  6563. //! two "channels" in the case of "3G" VideoFormats, as specified
  6564. //! by SMPTE 425; for non-3G VideoFormats, only the first channel within
  6565. //! a physical jack is valid.
  6566. #define NVAPI_MAX_VIO_CHANNELS_PER_JACK 2
  6567. //! 4 Streams, 1 per physical jack
  6568. #define NVAPI_MAX_VIO_STREAMS 4
  6569. #define NVAPI_MIN_VIO_STREAMS 1
  6570. //! SDI input supports a max of 2 links per stream
  6571. #define NVAPI_MAX_VIO_LINKS_PER_STREAM 2
  6572. #define NVAPI_MAX_FRAMELOCK_MAPPING_MODES 20
  6573. //! Min number of capture images
  6574. #define NVAPI_GVI_MIN_RAW_CAPTURE_IMAGES 1
  6575. //! Max number of capture images
  6576. #define NVAPI_GVI_MAX_RAW_CAPTURE_IMAGES 32
  6577. //! Default number of capture images
  6578. #define NVAPI_GVI_DEFAULT_RAW_CAPTURE_IMAGES 5
  6579. // Data Signal notification events. These need a event handler in RM.
  6580. // Register/Unregister and PopEvent NVAPI's are already available.
  6581. //! Device configuration
  6582. typedef enum _NVVIOCONFIGTYPE
  6583. {
  6584. NVVIOCONFIGTYPE_IN , //!< Input Status
  6585. NVVIOCONFIGTYPE_OUT , //!< Output Status
  6586. }NVVIOCONFIGTYPE;
  6587. typedef enum _NVVIOCOLORSPACE
  6588. {
  6589. NVVIOCOLORSPACE_UNKNOWN,
  6590. NVVIOCOLORSPACE_YCBCR,
  6591. NVVIOCOLORSPACE_YCBCRA,
  6592. NVVIOCOLORSPACE_YCBCRD,
  6593. NVVIOCOLORSPACE_GBR,
  6594. NVVIOCOLORSPACE_GBRA,
  6595. NVVIOCOLORSPACE_GBRD,
  6596. } NVVIOCOLORSPACE;
  6597. //! Component sampling
  6598. typedef enum _NVVIOCOMPONENTSAMPLING
  6599. {
  6600. NVVIOCOMPONENTSAMPLING_UNKNOWN,
  6601. NVVIOCOMPONENTSAMPLING_4444,
  6602. NVVIOCOMPONENTSAMPLING_4224,
  6603. NVVIOCOMPONENTSAMPLING_444,
  6604. NVVIOCOMPONENTSAMPLING_422
  6605. } NVVIOCOMPONENTSAMPLING;
  6606. typedef enum _NVVIOBITSPERCOMPONENT
  6607. {
  6608. NVVIOBITSPERCOMPONENT_UNKNOWN,
  6609. NVVIOBITSPERCOMPONENT_8,
  6610. NVVIOBITSPERCOMPONENT_10,
  6611. NVVIOBITSPERCOMPONENT_12,
  6612. } NVVIOBITSPERCOMPONENT;
  6613. typedef enum _NVVIOLINKID
  6614. {
  6615. NVVIOLINKID_UNKNOWN,
  6616. NVVIOLINKID_A,
  6617. NVVIOLINKID_B,
  6618. NVVIOLINKID_C,
  6619. NVVIOLINKID_D
  6620. } NVVIOLINKID;
  6621. typedef enum _NVVIOANCPARITYCOMPUTATION
  6622. {
  6623. NVVIOANCPARITYCOMPUTATION_AUTO,
  6624. NVVIOANCPARITYCOMPUTATION_ON,
  6625. NVVIOANCPARITYCOMPUTATION_OFF
  6626. } NVVIOANCPARITYCOMPUTATION;
  6627. //! @}
  6628. //---------------------------------------------------------------------
  6629. // Structures
  6630. //---------------------------------------------------------------------
  6631. //! \addtogroup vidio
  6632. //! @{
  6633. //! Supports Serial Digital Interface (SDI) output
  6634. #define NVVIOCAPS_VIDOUT_SDI 0x00000001
  6635. //! Supports Internal timing source
  6636. #define NVVIOCAPS_SYNC_INTERNAL 0x00000100
  6637. //! Supports Genlock timing source
  6638. #define NVVIOCAPS_SYNC_GENLOCK 0x00000200
  6639. //! Supports Serial Digital Interface (SDI) synchronization input
  6640. #define NVVIOCAPS_SYNCSRC_SDI 0x00001000
  6641. //! Supports Composite synchronization input
  6642. #define NVVIOCAPS_SYNCSRC_COMP 0x00002000
  6643. //! Supports Desktop transparent mode
  6644. #define NVVIOCAPS_OUTPUTMODE_DESKTOP 0x00010000
  6645. //! Supports OpenGL application mode
  6646. #define NVVIOCAPS_OUTPUTMODE_OPENGL 0x00020000
  6647. //! Supports Serial Digital Interface (SDI) input
  6648. #define NVVIOCAPS_VIDIN_SDI 0x00100000
  6649. //! Supports Packed ANC
  6650. #define NVVIOCAPS_PACKED_ANC_SUPPORTED 0x00200000
  6651. //! Supports ANC audio blanking
  6652. #define NVVIOCAPS_AUDIO_BLANKING_SUPPORTED 0x00400000
  6653. //! SDI-class interface: SDI output with two genlock inputs
  6654. #define NVVIOCLASS_SDI 0x00000001
  6655. //! Device capabilities
  6656. typedef struct _NVVIOCAPS
  6657. {
  6658. NvU32 version; //!< Structure version
  6659. NvAPI_String adapterName; //!< Graphics adapter name
  6660. NvU32 adapterClass; //!< Graphics adapter classes (NVVIOCLASS_SDI mask)
  6661. NvU32 adapterCaps; //!< Graphics adapter capabilities (NVVIOCAPS_* mask)
  6662. NvU32 dipSwitch; //!< On-board DIP switch settings bits
  6663. NvU32 dipSwitchReserved; //!< On-board DIP switch settings reserved bits
  6664. NvU32 boardID; //!< Board ID
  6665. //! Driver version
  6666. struct //
  6667. {
  6668. NvU32 majorVersion; //!< Major version. For GVI, majorVersion contains MajorVersion(HIWORD) And MinorVersion(LOWORD)
  6669. NvU32 minorVersion; //!< Minor version. For GVI, minorVersion contains Revison(HIWORD) And Build(LOWORD)
  6670. } driver; //
  6671. //! Firmware version
  6672. struct
  6673. {
  6674. NvU32 majorVersion; //!< Major version. In version 2, for both GVI and GVO, majorVersion contains MajorVersion(HIWORD) And MinorVersion(LOWORD)
  6675. NvU32 minorVersion; //!< Minor version. In version 2, for both GVI and GVO, minorVersion contains Revison(HIWORD) And Build(LOWORD)
  6676. } firmWare; //
  6677. NVVIOOWNERID ownerId; //!< Unique identifier for owner of video output (NVVIOOWNERID_INVALID if free running)
  6678. NVVIOOWNERTYPE ownerType; //!< Owner type (OpenGL application or Desktop mode)
  6679. } NVVIOCAPS;
  6680. //! Macro for constructing the version field of NVVIOCAPS
  6681. #define NVVIOCAPS_VER1 MAKE_NVAPI_VERSION(NVVIOCAPS,1)
  6682. #define NVVIOCAPS_VER2 MAKE_NVAPI_VERSION(NVVIOCAPS,2)
  6683. #define NVVIOCAPS_VER NVVIOCAPS_VER2
  6684. //! Input channel status
  6685. typedef struct _NVVIOCHANNELSTATUS
  6686. {
  6687. NvU32 smpte352; //!< 4-byte SMPTE 352 video payload identifier
  6688. NVVIOSIGNALFORMAT signalFormat; //!< Signal format
  6689. NVVIOBITSPERCOMPONENT bitsPerComponent; //!< Bits per component
  6690. NVVIOCOMPONENTSAMPLING samplingFormat; //!< Sampling format
  6691. NVVIOCOLORSPACE colorSpace; //!< Color space
  6692. NVVIOLINKID linkID; //!< Link ID
  6693. } NVVIOCHANNELSTATUS;
  6694. //! Input device status
  6695. typedef struct _NVVIOINPUTSTATUS
  6696. {
  6697. NVVIOCHANNELSTATUS vidIn[NVAPI_MAX_VIO_JACKS][NVAPI_MAX_VIO_CHANNELS_PER_JACK]; //!< Video input status per channel within a jack
  6698. NVVIOCAPTURESTATUS captureStatus; //!< status of video capture
  6699. } NVVIOINPUTSTATUS;
  6700. //! Output device status
  6701. typedef struct _NVVIOOUTPUTSTATUS
  6702. {
  6703. NVVIOINPUTOUTPUTSTATUS vid1Out; //!< Video 1 output status
  6704. NVVIOINPUTOUTPUTSTATUS vid2Out; //!< Video 2 output status
  6705. NVVIOSYNCSTATUS sdiSyncIn; //!< SDI sync input status
  6706. NVVIOSYNCSTATUS compSyncIn; //!< Composite sync input status
  6707. NvU32 syncEnable; //!< Sync enable (TRUE if using syncSource)
  6708. NVVIOSYNCSOURCE syncSource; //!< Sync source
  6709. NVVIOSIGNALFORMAT syncFormat; //!< Sync format
  6710. NvU32 frameLockEnable; //!< Framelock enable flag
  6711. NvU32 outputVideoLocked; //!< Output locked status
  6712. NvU32 dataIntegrityCheckErrorCount; //!< Data integrity check error count
  6713. NvU32 dataIntegrityCheckEnabled; //!< Data integrity check status enabled
  6714. NvU32 dataIntegrityCheckFailed; //!< Data integrity check status failed
  6715. NvU32 uSyncSourceLocked; //!< genlocked to framelocked to ref signal
  6716. NvU32 uPowerOn; //!< TRUE: indicates there is sufficient power
  6717. } NVVIOOUTPUTSTATUS;
  6718. //! Video device status.
  6719. typedef struct _NVVIOSTATUS
  6720. {
  6721. NvU32 version; //!< Structure version
  6722. NVVIOSTATUSTYPE nvvioStatusType; //!< Input or Output status
  6723. union
  6724. {
  6725. NVVIOINPUTSTATUS inStatus; //!< Input device status
  6726. NVVIOOUTPUTSTATUS outStatus; //!< Output device status
  6727. }vioStatus;
  6728. } NVVIOSTATUS;
  6729. //! Macro for constructingthe version field of NVVIOSTATUS
  6730. #define NVVIOSTATUS_VER MAKE_NVAPI_VERSION(NVVIOSTATUS,1)
  6731. //! Output region
  6732. typedef struct _NVVIOOUTPUTREGION
  6733. {
  6734. NvU32 x; //!< Horizontal origin in pixels
  6735. NvU32 y; //!< Vertical origin in pixels
  6736. NvU32 width; //!< Width of region in pixels
  6737. NvU32 height; //!< Height of region in pixels
  6738. } NVVIOOUTPUTREGION;
  6739. //! Gamma ramp (8-bit index)
  6740. typedef struct _NVVIOGAMMARAMP8
  6741. {
  6742. NvU16 uRed[256]; //!< Red channel gamma ramp (8-bit index, 16-bit values)
  6743. NvU16 uGreen[256]; //!< Green channel gamma ramp (8-bit index, 16-bit values)
  6744. NvU16 uBlue[256]; //!< Blue channel gamma ramp (8-bit index, 16-bit values)
  6745. } NVVIOGAMMARAMP8;
  6746. //! Gamma ramp (10-bit index)
  6747. typedef struct _NVVIOGAMMARAMP10
  6748. {
  6749. NvU16 uRed[1024]; //!< Red channel gamma ramp (10-bit index, 16-bit values)
  6750. NvU16 uGreen[1024]; //!< Green channel gamma ramp (10-bit index, 16-bit values)
  6751. NvU16 uBlue[1024]; //!< Blue channel gamma ramp (10-bit index, 16-bit values)
  6752. } NVVIOGAMMARAMP10;
  6753. //! Sync delay
  6754. typedef struct _NVVIOSYNCDELAY
  6755. {
  6756. NvU32 version; //!< Structure version
  6757. NvU32 horizontalDelay; //!< Horizontal delay in pixels
  6758. NvU32 verticalDelay; //!< Vertical delay in lines
  6759. } NVVIOSYNCDELAY;
  6760. //! Macro for constructing the version field of NVVIOSYNCDELAY
  6761. #define NVVIOSYNCDELAY_VER MAKE_NVAPI_VERSION(NVVIOSYNCDELAY,1)
  6762. //! Video mode information
  6763. typedef struct _NVVIOVIDEOMODE
  6764. {
  6765. NvU32 horizontalPixels; //!< Horizontal resolution (in pixels)
  6766. NvU32 verticalLines; //!< Vertical resolution for frame (in lines)
  6767. float fFrameRate; //!< Frame rate
  6768. NVVIOINTERLACEMODE interlaceMode; //!< Interlace mode
  6769. NVVIOVIDEOSTANDARD videoStandard; //!< SMPTE standards format
  6770. NVVIOVIDEOTYPE videoType; //!< HD or SD signal classification
  6771. } NVVIOVIDEOMODE;
  6772. //! Signal format details
  6773. typedef struct _NVVIOSIGNALFORMATDETAIL
  6774. {
  6775. NVVIOSIGNALFORMAT signalFormat; //!< Signal format enumerated value
  6776. NVVIOVIDEOMODE videoMode; //!< Video mode for signal format
  6777. }NVVIOSIGNALFORMATDETAIL;
  6778. //! R8:G8:B8
  6779. #define NVVIOBUFFERFORMAT_R8G8B8 0x00000001
  6780. //! R8:G8:B8:Z24
  6781. #define NVVIOBUFFERFORMAT_R8G8B8Z24 0x00000002
  6782. //! R8:G8:B8:A8
  6783. #define NVVIOBUFFERFORMAT_R8G8B8A8 0x00000004
  6784. //! R8:G8:B8:A8:Z24
  6785. #define NVVIOBUFFERFORMAT_R8G8B8A8Z24 0x00000008
  6786. //! R16FP:G16FP:B16FP
  6787. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FP 0x00000010
  6788. //! R16FP:G16FP:B16FP:Z24
  6789. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPZ24 0x00000020
  6790. //! R16FP:G16FP:B16FP:A16FP
  6791. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPA16FP 0x00000040
  6792. //! R16FP:G16FP:B16FP:A16FP:Z24
  6793. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPA16FPZ24 0x00000080
  6794. //! Data format details
  6795. typedef struct _NVVIODATAFORMATDETAIL
  6796. {
  6797. NVVIODATAFORMAT dataFormat; //!< Data format enumerated value
  6798. NvU32 vioCaps; //!< Data format capabilities (NVVIOCAPS_* mask)
  6799. }NVVIODATAFORMATDETAIL;
  6800. //! Colorspace conversion
  6801. typedef struct _NVVIOCOLORCONVERSION
  6802. {
  6803. NvU32 version; //!< Structure version
  6804. float colorMatrix[3][3]; //!< Output[n] =
  6805. float colorOffset[3]; //!< Input[0] * colorMatrix[n][0] +
  6806. float colorScale[3]; //!< Input[1] * colorMatrix[n][1] +
  6807. //!< Input[2] * colorMatrix[n][2] +
  6808. //!< OutputRange * colorOffset[n]
  6809. //!< where OutputRange is the standard magnitude of
  6810. //!< Output[n][n] and colorMatrix and colorOffset
  6811. //!< values are within the range -1.0 to +1.0
  6812. NvU32 compositeSafe; //!< compositeSafe constrains luminance range when using composite output
  6813. } NVVIOCOLORCONVERSION;
  6814. //! macro for constructing the version field of _NVVIOCOLORCONVERSION.
  6815. #define NVVIOCOLORCONVERSION_VER MAKE_NVAPI_VERSION(NVVIOCOLORCONVERSION,1)
  6816. //! Gamma correction
  6817. typedef struct _NVVIOGAMMACORRECTION
  6818. {
  6819. NvU32 version; //!< Structure version
  6820. NvU32 vioGammaCorrectionType; //!< Gamma correction type (8-bit or 10-bit)
  6821. //! Gamma correction:
  6822. union
  6823. {
  6824. NVVIOGAMMARAMP8 gammaRamp8; //!< Gamma ramp (8-bit index, 16-bit values)
  6825. NVVIOGAMMARAMP10 gammaRamp10; //!< Gamma ramp (10-bit index, 16-bit values)
  6826. }gammaRamp;
  6827. float fGammaValueR; //!< Red Gamma value within gamma ranges. 0.5 - 6.0
  6828. float fGammaValueG; //!< Green Gamma value within gamma ranges. 0.5 - 6.0
  6829. float fGammaValueB; //!< Blue Gamma value within gamma ranges. 0.5 - 6.0
  6830. } NVVIOGAMMACORRECTION;
  6831. //! Macro for constructing thevesion field of _NVVIOGAMMACORRECTION
  6832. #define NVVIOGAMMACORRECTION_VER MAKE_NVAPI_VERSION(NVVIOGAMMACORRECTION,1)
  6833. //! Maximum number of ranges per channel
  6834. #define MAX_NUM_COMPOSITE_RANGE 2
  6835. typedef struct _NVVIOCOMPOSITERANGE
  6836. {
  6837. NvU32 uRange;
  6838. NvU32 uEnabled;
  6839. NvU32 uMin;
  6840. NvU32 uMax;
  6841. } NVVIOCOMPOSITERANGE;
  6842. // Device configuration (fields masks indicating NVVIOCONFIG fields to use for NvAPI_VIO_GetConfig/NvAPI_VIO_SetConfig() )
  6843. //
  6844. #define NVVIOCONFIG_SIGNALFORMAT 0x00000001 //!< fields: signalFormat
  6845. #define NVVIOCONFIG_DATAFORMAT 0x00000002 //!< fields: dataFormat
  6846. #define NVVIOCONFIG_OUTPUTREGION 0x00000004 //!< fields: outputRegion
  6847. #define NVVIOCONFIG_OUTPUTAREA 0x00000008 //!< fields: outputArea
  6848. #define NVVIOCONFIG_COLORCONVERSION 0x00000010 //!< fields: colorConversion
  6849. #define NVVIOCONFIG_GAMMACORRECTION 0x00000020 //!< fields: gammaCorrection
  6850. #define NVVIOCONFIG_SYNCSOURCEENABLE 0x00000040 //!< fields: syncSource and syncEnable
  6851. #define NVVIOCONFIG_SYNCDELAY 0x00000080 //!< fields: syncDelay
  6852. #define NVVIOCONFIG_COMPOSITESYNCTYPE 0x00000100 //!< fields: compositeSyncType
  6853. #define NVVIOCONFIG_FRAMELOCKENABLE 0x00000200 //!< fields: EnableFramelock
  6854. #define NVVIOCONFIG_422FILTER 0x00000400 //!< fields: bEnable422Filter
  6855. #define NVVIOCONFIG_COMPOSITETERMINATE 0x00000800 //!< fields: bCompositeTerminate (Not supported on Quadro FX 4000 SDI)
  6856. #define NVVIOCONFIG_DATAINTEGRITYCHECK 0x00001000 //!< fields: bEnableDataIntegrityCheck (Not supported on Quadro FX 4000 SDI)
  6857. #define NVVIOCONFIG_CSCOVERRIDE 0x00002000 //!< fields: colorConversion override
  6858. #define NVVIOCONFIG_FLIPQUEUELENGTH 0x00004000 //!< fields: flipqueuelength control
  6859. #define NVVIOCONFIG_ANCTIMECODEGENERATION 0x00008000 //!< fields: bEnableANCTimeCodeGeneration
  6860. #define NVVIOCONFIG_COMPOSITE 0x00010000 //!< fields: bEnableComposite
  6861. #define NVVIOCONFIG_ALPHAKEYCOMPOSITE 0x00020000 //!< fields: bEnableAlphaKeyComposite
  6862. #define NVVIOCONFIG_COMPOSITE_Y 0x00040000 //!< fields: compRange
  6863. #define NVVIOCONFIG_COMPOSITE_CR 0x00080000 //!< fields: compRange
  6864. #define NVVIOCONFIG_COMPOSITE_CB 0x00100000 //!< fields: compRange
  6865. #define NVVIOCONFIG_FULL_COLOR_RANGE 0x00200000 //!< fields: bEnableFullColorRange
  6866. #define NVVIOCONFIG_RGB_DATA 0x00400000 //!< fields: bEnableRGBData
  6867. #define NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE 0x00800000 //!< fields: bEnableSDIOutput
  6868. #define NVVIOCONFIG_STREAMS 0x01000000 //!< fields: streams
  6869. #define NVVIOCONFIG_ANC_PARITY_COMPUTATION 0x02000000 //!< fields: ancParityComputation
  6870. #define NVVIOCONFIG_ANC_AUDIO_REPEAT 0x04000000 //!< fields: enableAudioBlanking
  6871. // Don't forget to update NVVIOCONFIG_VALIDFIELDS in nvapi.spec when NVVIOCONFIG_ALLFIELDS changes.
  6872. #define NVVIOCONFIG_ALLFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  6873. NVVIOCONFIG_DATAFORMAT | \
  6874. NVVIOCONFIG_OUTPUTREGION | \
  6875. NVVIOCONFIG_OUTPUTAREA | \
  6876. NVVIOCONFIG_COLORCONVERSION | \
  6877. NVVIOCONFIG_GAMMACORRECTION | \
  6878. NVVIOCONFIG_SYNCSOURCEENABLE | \
  6879. NVVIOCONFIG_SYNCDELAY | \
  6880. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  6881. NVVIOCONFIG_FRAMELOCKENABLE | \
  6882. NVVIOCONFIG_422FILTER | \
  6883. NVVIOCONFIG_COMPOSITETERMINATE | \
  6884. NVVIOCONFIG_DATAINTEGRITYCHECK | \
  6885. NVVIOCONFIG_CSCOVERRIDE | \
  6886. NVVIOCONFIG_FLIPQUEUELENGTH | \
  6887. NVVIOCONFIG_ANCTIMECODEGENERATION | \
  6888. NVVIOCONFIG_COMPOSITE | \
  6889. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  6890. NVVIOCONFIG_COMPOSITE_Y | \
  6891. NVVIOCONFIG_COMPOSITE_CR | \
  6892. NVVIOCONFIG_COMPOSITE_CB | \
  6893. NVVIOCONFIG_FULL_COLOR_RANGE | \
  6894. NVVIOCONFIG_RGB_DATA | \
  6895. NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \
  6896. NVVIOCONFIG_STREAMS | \
  6897. NVVIOCONFIG_ANC_PARITY_COMPUTATION | \
  6898. NVVIOCONFIG_ANC_AUDIO_REPEAT )
  6899. #define NVVIOCONFIG_VALIDFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  6900. NVVIOCONFIG_DATAFORMAT | \
  6901. NVVIOCONFIG_OUTPUTREGION | \
  6902. NVVIOCONFIG_OUTPUTAREA | \
  6903. NVVIOCONFIG_COLORCONVERSION | \
  6904. NVVIOCONFIG_GAMMACORRECTION | \
  6905. NVVIOCONFIG_SYNCSOURCEENABLE | \
  6906. NVVIOCONFIG_SYNCDELAY | \
  6907. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  6908. NVVIOCONFIG_FRAMELOCKENABLE | \
  6909. NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \
  6910. NVVIOCONFIG_422FILTER | \
  6911. NVVIOCONFIG_COMPOSITETERMINATE | \
  6912. NVVIOCONFIG_DATAINTEGRITYCHECK | \
  6913. NVVIOCONFIG_CSCOVERRIDE | \
  6914. NVVIOCONFIG_FLIPQUEUELENGTH | \
  6915. NVVIOCONFIG_ANCTIMECODEGENERATION | \
  6916. NVVIOCONFIG_COMPOSITE | \
  6917. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  6918. NVVIOCONFIG_COMPOSITE_Y | \
  6919. NVVIOCONFIG_COMPOSITE_CR | \
  6920. NVVIOCONFIG_COMPOSITE_CB | \
  6921. NVVIOCONFIG_FULL_COLOR_RANGE | \
  6922. NVVIOCONFIG_RGB_DATA | \
  6923. NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \
  6924. NVVIOCONFIG_STREAMS | \
  6925. NVVIOCONFIG_ANC_PARITY_COMPUTATION | \
  6926. NVVIOCONFIG_ANC_AUDIO_REPEAT)
  6927. #define NVVIOCONFIG_DRIVERFIELDS ( NVVIOCONFIG_OUTPUTREGION | \
  6928. NVVIOCONFIG_OUTPUTAREA | \
  6929. NVVIOCONFIG_COLORCONVERSION | \
  6930. NVVIOCONFIG_FLIPQUEUELENGTH)
  6931. #define NVVIOCONFIG_GAMMAFIELDS ( NVVIOCONFIG_GAMMACORRECTION )
  6932. #define NVVIOCONFIG_RMCTRLFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  6933. NVVIOCONFIG_DATAFORMAT | \
  6934. NVVIOCONFIG_SYNCSOURCEENABLE | \
  6935. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  6936. NVVIOCONFIG_FRAMELOCKENABLE | \
  6937. NVVIOCONFIG_422FILTER | \
  6938. NVVIOCONFIG_COMPOSITETERMINATE | \
  6939. NVVIOCONFIG_DATAINTEGRITYCHECK | \
  6940. NVVIOCONFIG_COMPOSITE | \
  6941. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  6942. NVVIOCONFIG_COMPOSITE_Y | \
  6943. NVVIOCONFIG_COMPOSITE_CR | \
  6944. NVVIOCONFIG_COMPOSITE_CB)
  6945. #define NVVIOCONFIG_RMSKEWFIELDS ( NVVIOCONFIG_SYNCDELAY )
  6946. #define NVVIOCONFIG_ALLOWSDIRUNNING_FIELDS ( NVVIOCONFIG_DATAINTEGRITYCHECK | \
  6947. NVVIOCONFIG_SYNCDELAY | \
  6948. NVVIOCONFIG_CSCOVERRIDE | \
  6949. NVVIOCONFIG_ANCTIMECODEGENERATION | \
  6950. NVVIOCONFIG_COMPOSITE | \
  6951. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  6952. NVVIOCONFIG_COMPOSITE_Y | \
  6953. NVVIOCONFIG_COMPOSITE_CR | \
  6954. NVVIOCONFIG_COMPOSITE_CB | \
  6955. NVVIOCONFIG_ANC_PARITY_COMPUTATION)
  6956. #define NVVIOCONFIG_RMMODESET_FIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  6957. NVVIOCONFIG_DATAFORMAT | \
  6958. NVVIOCONFIG_SYNCSOURCEENABLE | \
  6959. NVVIOCONFIG_FRAMELOCKENABLE | \
  6960. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  6961. NVVIOCONFIG_ANC_AUDIO_REPEAT)
  6962. //! Output device configuration
  6963. // No members can be deleted from below structure. Only add new members at the
  6964. // end of the structure.
  6965. typedef struct _NVVIOOUTPUTCONFIG_V1
  6966. {
  6967. NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output
  6968. NVVIODATAFORMAT dataFormat; //!< Data format for video output
  6969. NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode)
  6970. NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area)
  6971. NVVIOCOLORCONVERSION colorConversion; //!< Color conversion.
  6972. NVVIOGAMMACORRECTION gammaCorrection;
  6973. NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource)
  6974. NVVIOSYNCSOURCE syncSource; //!< Sync source
  6975. NVVIOSYNCDELAY syncDelay; //!< Sync delay
  6976. NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type
  6977. NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off
  6978. NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format
  6979. NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter
  6980. NvU32 compositeTerminate; //!< Composite termination
  6981. NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable
  6982. NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite
  6983. NvU32 flipQueueLength; //!< Number of buffers used for the internal flipqueue
  6984. NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation
  6985. NvU32 enableComposite; //!< Enable composite
  6986. NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite
  6987. NVVIOCOMPOSITERANGE compRange; //!< Composite ranges
  6988. NvU8 reservedData[256]; //!< Inicates last stored SDI output state TRUE-ON / FALSE-OFF
  6989. NvU32 enableFullColorRange; //!< Flag indicating Full Color Range
  6990. NvU32 enableRGBData; //!< Indicates data is in RGB format
  6991. } NVVIOOUTPUTCONFIG_V1;
  6992. typedef struct _NVVIOOUTPUTCONFIG_V2
  6993. {
  6994. NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output
  6995. NVVIODATAFORMAT dataFormat; //!< Data format for video output
  6996. NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode)
  6997. NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area)
  6998. NVVIOCOLORCONVERSION colorConversion; //!< Color conversion.
  6999. NVVIOGAMMACORRECTION gammaCorrection;
  7000. NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource)
  7001. NVVIOSYNCSOURCE syncSource; //!< Sync source
  7002. NVVIOSYNCDELAY syncDelay; //!< Sync delay
  7003. NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type
  7004. NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off
  7005. NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format
  7006. NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter
  7007. NvU32 compositeTerminate; //!< Composite termination
  7008. NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable
  7009. NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite
  7010. NvU32 flipQueueLength; //!< Number of buffers used for the internal flip queue
  7011. NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation
  7012. NvU32 enableComposite; //!< Enable composite
  7013. NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite
  7014. NVVIOCOMPOSITERANGE compRange; //!< Composite ranges
  7015. NvU8 reservedData[256]; //!< Indicates last stored SDI output state TRUE-ON / FALSE-OFF
  7016. NvU32 enableFullColorRange; //!< Flag indicating Full Color Range
  7017. NvU32 enableRGBData; //!< Indicates data is in RGB format
  7018. NVVIOANCPARITYCOMPUTATION ancParityComputation; //!< Enable HW ANC parity bit computation (auto/on/off)
  7019. } NVVIOOUTPUTCONFIG_V2;
  7020. typedef struct _NVVIOOUTPUTCONFIG_V3
  7021. {
  7022. NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output
  7023. NVVIODATAFORMAT dataFormat; //!< Data format for video output
  7024. NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode)
  7025. NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area)
  7026. NVVIOCOLORCONVERSION colorConversion; //!< Color conversion.
  7027. NVVIOGAMMACORRECTION gammaCorrection;
  7028. NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource)
  7029. NVVIOSYNCSOURCE syncSource; //!< Sync source
  7030. NVVIOSYNCDELAY syncDelay; //!< Sync delay
  7031. NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type
  7032. NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off
  7033. NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format
  7034. NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter
  7035. NvU32 compositeTerminate; //!< Composite termination
  7036. NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable
  7037. NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite
  7038. NvU32 flipQueueLength; //!< Number of buffers used for the internal flip queue
  7039. NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation
  7040. NvU32 enableComposite; //!< Enable composite
  7041. NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite
  7042. NVVIOCOMPOSITERANGE compRange; //!< Composite ranges
  7043. NvU8 reservedData[256]; //!< Indicates last stored SDI output state TRUE-ON / FALSE-OFF
  7044. NvU32 enableFullColorRange; //!< Flag indicating Full Color Range
  7045. NvU32 enableRGBData; //!< Indicates data is in RGB format
  7046. NVVIOANCPARITYCOMPUTATION ancParityComputation; //!< Enable HW ANC parity bit computation (auto/on/off)
  7047. NvU32 enableAudioBlanking; //!< Enable HANC audio blanking on repeat frames
  7048. } NVVIOOUTPUTCONFIG_V3;
  7049. //! Stream configuration
  7050. typedef struct _NVVIOSTREAM
  7051. {
  7052. NvU32 bitsPerComponent; //!< Bits per component
  7053. NVVIOCOMPONENTSAMPLING sampling; //!< Sampling
  7054. NvU32 expansionEnable; //!< Enable/disable 4:2:2->4:4:4 expansion
  7055. NvU32 numLinks; //!< Number of active links
  7056. struct
  7057. {
  7058. NvU32 jack; //!< This stream's link[i] will use the specified (0-based) channel within the
  7059. NvU32 channel; //!< specified (0-based) jack
  7060. } links[NVAPI_MAX_VIO_LINKS_PER_STREAM];
  7061. } NVVIOSTREAM;
  7062. //! Input device configuration
  7063. typedef struct _NVVIOINPUTCONFIG
  7064. {
  7065. NvU32 numRawCaptureImages; //!< numRawCaptureImages is the number of frames to keep in the capture queue.
  7066. //!< must be between NVAPI_GVI_MIN_RAW_CAPTURE_IMAGES and NVAPI_GVI_MAX_RAW_CAPTURE_IMAGES,
  7067. NVVIOSIGNALFORMAT signalFormat; //!< Signal format.
  7068. //!< Please note that both numRawCaptureImages and signalFormat should be set together.
  7069. NvU32 numStreams; //!< Number of active streams.
  7070. NVVIOSTREAM streams[NVAPI_MAX_VIO_STREAMS]; //!< Stream configurations
  7071. NvU32 bTestMode; //!< This attribute controls the GVI test mode.
  7072. //!< Possible values 0/1. When testmode enabled, the
  7073. //!< GVI device will generate fake data as quickly as possible.
  7074. } NVVIOINPUTCONFIG;
  7075. typedef struct _NVVIOCONFIG_V1
  7076. {
  7077. NvU32 version; //!< Structure version
  7078. NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use
  7079. NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration
  7080. union
  7081. {
  7082. NVVIOINPUTCONFIG inConfig; //!< Input device configuration
  7083. NVVIOOUTPUTCONFIG_V1 outConfig; //!< Output device configuration
  7084. }vioConfig;
  7085. } NVVIOCONFIG_V1;
  7086. typedef struct _NVVIOCONFIG_V2
  7087. {
  7088. NvU32 version; //!< Structure version
  7089. NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use
  7090. NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration
  7091. union
  7092. {
  7093. NVVIOINPUTCONFIG inConfig; //!< Input device configuration
  7094. NVVIOOUTPUTCONFIG_V2 outConfig; //!< Output device configuration
  7095. }vioConfig;
  7096. } NVVIOCONFIG_V2;
  7097. typedef struct _NVVIOCONFIG_V3
  7098. {
  7099. NvU32 version; //!< Structure version
  7100. NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use
  7101. NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration
  7102. union
  7103. {
  7104. NVVIOINPUTCONFIG inConfig; //!< Input device configuration
  7105. NVVIOOUTPUTCONFIG_V3 outConfig; //!< Output device configuration
  7106. }vioConfig;
  7107. } NVVIOCONFIG_V3;
  7108. typedef NVVIOOUTPUTCONFIG_V3 NVVIOOUTPUTCONFIG;
  7109. typedef NVVIOCONFIG_V3 NVVIOCONFIG;
  7110. #define NVVIOCONFIG_VER1 MAKE_NVAPI_VERSION(NVVIOCONFIG_V1,1)
  7111. #define NVVIOCONFIG_VER2 MAKE_NVAPI_VERSION(NVVIOCONFIG_V2,2)
  7112. #define NVVIOCONFIG_VER3 MAKE_NVAPI_VERSION(NVVIOCONFIG_V3,3)
  7113. #define NVVIOCONFIG_VER NVVIOCONFIG_VER3
  7114. typedef struct
  7115. {
  7116. NvPhysicalGpuHandle hPhysicalGpu; //!< Handle to Physical GPU (This could be NULL for GVI device if its not binded)
  7117. NvVioHandle hVioHandle; //!<handle to SDI Input/Output device
  7118. NvU32 vioId; //!<device Id of SDI Input/Output device
  7119. NvU32 outputId; //!<deviceMask of the SDI display connected to GVO device.
  7120. //!<outputId will be 0 for GVI device.
  7121. } NVVIOTOPOLOGYTARGET;
  7122. typedef struct _NV_VIO_TOPOLOGY
  7123. {
  7124. NvU32 version;
  7125. NvU32 vioTotalDeviceCount; //!<How many video I/O targets are valid
  7126. NVVIOTOPOLOGYTARGET vioTarget[NVAPI_MAX_VIO_DEVICES]; //!<Array of video I/O targets
  7127. }NV_VIO_TOPOLOGY, NVVIOTOPOLOGY;
  7128. //! Macro for constructing the version field of NV_VIO_TOPOLOGY
  7129. #define NV_VIO_TOPOLOGY_VER MAKE_NVAPI_VERSION(NV_VIO_TOPOLOGY,1)
  7130. //! Macro for constructing the version field of NVVIOTOPOLOGY
  7131. #define NVVIOTOPOLOGY_VER MAKE_NVAPI_VERSION(NVVIOTOPOLOGY,1)
  7132. //! @}
  7133. //! \addtogroup vidio
  7134. //! @{
  7135. ///////////////////////////////////////////////////////////////////////////////
  7136. //!
  7137. //! Function: NvAPI_VIO_GetCapabilities
  7138. //!
  7139. //! Description: This API determine the graphics adapter video I/O capabilities.
  7140. //!
  7141. //! SUPPORTED OS: Windows XP and higher
  7142. //!
  7143. //!
  7144. //! \since Release: 190
  7145. //!
  7146. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7147. //! \param [out] pAdapterCaps Pointer to receive capabilities
  7148. //!
  7149. //! \retval ::NVAPI_OK Success
  7150. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7151. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7152. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NVVIOCAPS struct version used by the app is not compatible
  7153. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7154. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7155. ///////////////////////////////////////////////////////////////////////////////
  7156. NVAPI_INTERFACE NvAPI_VIO_GetCapabilities(NvVioHandle hVioHandle,
  7157. NVVIOCAPS *pAdapterCaps);
  7158. ////////////////////////////////////////////////////////////////////////////////
  7159. //! Function: NvAPI_VIO_Open
  7160. //!
  7161. //! Description: This API opens the graphics adapter for video I/O operations
  7162. //! using the OpenGL application interface. Read operations
  7163. //! are permitted in this mode by multiple clients, but Write
  7164. //! operations are application exclusive.
  7165. //!
  7166. //! SUPPORTED OS: Windows XP and higher
  7167. //!
  7168. //!
  7169. //! \since Release: 190
  7170. //!
  7171. //! \param [in] NvVioHandle The caller provides the SDI output device handle as input.
  7172. //! \param [in] vioClass Class interface (NVVIOCLASS_* value)
  7173. //! \param [in] ownerType Specify NVVIOOWNERTYPE_APPLICATION or NVVIOOWNERTYPE_DESKTOP.
  7174. //!
  7175. //! \retval ::NVAPI_OK Success
  7176. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7177. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7178. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7179. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7180. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7181. ///////////////////////////////////////////////////////////////////////////////
  7182. NVAPI_INTERFACE NvAPI_VIO_Open(NvVioHandle hVioHandle,
  7183. NvU32 vioClass,
  7184. NVVIOOWNERTYPE ownerType);
  7185. ///////////////////////////////////////////////////////////////////////////////
  7186. //! Function: NvAPI_VIO_Close
  7187. //!
  7188. //! Description: This API closes the graphics adapter for graphics-to-video operations
  7189. //! using the OpenGL application interface. Closing an
  7190. //! OpenGL handle releases the device.
  7191. //!
  7192. //! SUPPORTED OS: Windows XP and higher
  7193. //!
  7194. //!
  7195. //! \since Release: 190
  7196. //!
  7197. //! \param [in] NvVioHandle The caller provides the SDI output device handle as input.
  7198. //! \param [in] bRelease boolean value to either keep or release ownership
  7199. //!
  7200. //! \retval ::NVAPI_OK Success
  7201. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7202. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7203. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7204. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7205. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7206. ///////////////////////////////////////////////////////////////////////////////
  7207. NVAPI_INTERFACE NvAPI_VIO_Close(NvVioHandle hVioHandle,
  7208. NvU32 bRelease);
  7209. ///////////////////////////////////////////////////////////////////////////////
  7210. //! Function: NvAPI_VIO_Status
  7211. //!
  7212. //! Description: This API gets the Video I/O LED status.
  7213. //!
  7214. //! SUPPORTED OS: Windows XP and higher
  7215. //!
  7216. //!
  7217. //! \since Release: 190
  7218. //!
  7219. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7220. //! \param [out] pStatus Return pointer to NVVIOSTATUS
  7221. //!
  7222. //! \retval ::NVAPI_OK Success
  7223. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7224. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7225. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Invalid structure version
  7226. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7227. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7228. ///////////////////////////////////////////////////////////////////////////////
  7229. NVAPI_INTERFACE NvAPI_VIO_Status(NvVioHandle hVioHandle,
  7230. NVVIOSTATUS *pStatus);
  7231. ////////////////////////////////////////////////////////////////////////////////
  7232. //! Function: NvAPI_VIO_SyncFormatDetect
  7233. //!
  7234. //! Description: This API detects the Video I/O incoming sync video format.
  7235. //!
  7236. //! SUPPORTED OS: Windows XP and higher
  7237. //!
  7238. //!
  7239. //! \since Release: 190
  7240. //!
  7241. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7242. //! \param [out] pWait Pointer to receive how many milliseconds will lapse
  7243. //! before VIOStatus returns the detected syncFormat.
  7244. //!
  7245. //! \retval ::NVAPI_OK Success
  7246. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7247. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7248. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7249. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7250. ///////////////////////////////////////////////////////////////////////////////
  7251. NVAPI_INTERFACE NvAPI_VIO_SyncFormatDetect(NvVioHandle hVioHandle,
  7252. NvU32 *pWait);
  7253. ///////////////////////////////////////////////////////////////////////////////
  7254. //! Function: NvAPI_VIO_GetConfig
  7255. //!
  7256. //! Description: This API gets the graphics-to-video configuration.
  7257. //!
  7258. //! SUPPORTED OS: Windows XP and higher
  7259. //!
  7260. //!
  7261. //! \since Release: 190
  7262. //!
  7263. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7264. //! \param [out] pConfig Pointer to the graphics-to-video configuration
  7265. //!
  7266. //! \retval ::NVAPI_OK Success
  7267. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7268. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7269. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Invalid structure version
  7270. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7271. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7272. ///////////////////////////////////////////////////////////////////////////////
  7273. NVAPI_INTERFACE NvAPI_VIO_GetConfig(NvVioHandle hVioHandle,
  7274. NVVIOCONFIG *pConfig);
  7275. ///////////////////////////////////////////////////////////////////////////////
  7276. //! Function: NvAPI_VIO_SetConfig
  7277. //!
  7278. //! Description: This API sets the graphics-to-video configuration.
  7279. //!
  7280. //! SUPPORTED OS: Windows XP and higher
  7281. //!
  7282. //!
  7283. //! \since Release: 190
  7284. //!
  7285. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7286. //! \param [in] pConfig Pointer to Graphics-to-Video configuration
  7287. //!
  7288. //! \retval ::NVAPI_OK Success
  7289. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7290. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7291. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7292. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7293. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7294. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7295. ///////////////////////////////////////////////////////////////////////////////
  7296. NVAPI_INTERFACE NvAPI_VIO_SetConfig(NvVioHandle hVioHandle,
  7297. const NVVIOCONFIG *pConfig);
  7298. ///////////////////////////////////////////////////////////////////////////////
  7299. //! Function: NvAPI_VIO_SetCSC
  7300. //!
  7301. //! Description: This API sets the colorspace conversion parameters.
  7302. //!
  7303. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.
  7304. //! SUPPORTED OS: Windows XP and higher
  7305. //!
  7306. //!
  7307. //! \since Release: 190
  7308. //!
  7309. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7310. //! \param [in] pCSC Pointer to CSC parameters
  7311. //!
  7312. //! \retval ::NVAPI_OK Success
  7313. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7314. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7315. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7316. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7317. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7318. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7319. ////////////////////////////////////////////////////////////////////////////////----
  7320. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.")
  7321. NVAPI_INTERFACE NvAPI_VIO_SetCSC(NvVioHandle hVioHandle,
  7322. NVVIOCOLORCONVERSION *pCSC);
  7323. ////////////////////////////////////////////////////////////////////////////////
  7324. //! Function: NvAPI_VIO_GetCSC
  7325. //!
  7326. //! Description: This API gets the colorspace conversion parameters.
  7327. //!
  7328. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.
  7329. //! SUPPORTED OS: Windows XP and higher
  7330. //!
  7331. //!
  7332. //! \since Release: 190
  7333. //!
  7334. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7335. //! \param [out] pCSC Pointer to CSC parameters
  7336. //!
  7337. //! \retval ::NVAPI_OK Success
  7338. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7339. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7340. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7341. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7342. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7343. ////////////////////////////////////////////////////////////////////////////////
  7344. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.")
  7345. NVAPI_INTERFACE NvAPI_VIO_GetCSC(NvVioHandle hVioHandle,
  7346. NVVIOCOLORCONVERSION *pCSC);
  7347. ///////////////////////////////////////////////////////////////////////////////
  7348. //! Function: NvAPI_VIO_SetGamma
  7349. //!
  7350. //! Description: This API sets the gamma conversion parameters.
  7351. //!
  7352. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.
  7353. //! SUPPORTED OS: Windows XP and higher
  7354. //!
  7355. //!
  7356. //! \since Release: 190
  7357. //!
  7358. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7359. //! \param [in] pGamma Pointer to gamma parameters
  7360. //!
  7361. //! \retval ::NVAPI_OK Success
  7362. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7363. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7364. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7365. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7366. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7367. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7368. ///////////////////////////////////////////////////////////////////////////////
  7369. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.")
  7370. NVAPI_INTERFACE NvAPI_VIO_SetGamma(NvVioHandle hVioHandle,
  7371. NVVIOGAMMACORRECTION *pGamma);
  7372. ///////////////////////////////////////////////////////////////////////////////
  7373. //! Function: NvAPI_VIO_GetGamma
  7374. //!
  7375. //! Description: This API gets the gamma conversion parameters.
  7376. //!
  7377. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.
  7378. //! SUPPORTED OS: Windows XP and higher
  7379. //!
  7380. //!
  7381. //! \since Release: 190
  7382. //!
  7383. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7384. //! \param [out] pGamma Pointer to gamma parameters
  7385. //!
  7386. //! \retval ::NVAPI_OK Success
  7387. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7388. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7389. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7390. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7391. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7392. ///////////////////////////////////////////////////////////////////////////////
  7393. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.")
  7394. NVAPI_INTERFACE NvAPI_VIO_GetGamma(NvVioHandle hVioHandle,
  7395. NVVIOGAMMACORRECTION* pGamma);
  7396. ////////////////////////////////////////////////////////////////////////////////
  7397. //! Function: NvAPI_VIO_SetSyncDelay
  7398. //!
  7399. //! Description: This API sets the sync delay parameters.
  7400. //!
  7401. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.
  7402. //! SUPPORTED OS: Windows XP and higher
  7403. //!
  7404. //!
  7405. //! \since Release: 190
  7406. //!
  7407. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7408. //! \param [in] pSyncDelay Pointer to sync delay parameters
  7409. //!
  7410. //! \retval ::NVAPI_OK Success
  7411. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7412. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7413. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7414. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7415. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7416. ///////////////////////////////////////////////////////////////////////////////
  7417. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.")
  7418. NVAPI_INTERFACE NvAPI_VIO_SetSyncDelay(NvVioHandle hVioHandle,
  7419. const NVVIOSYNCDELAY *pSyncDelay);
  7420. ////////////////////////////////////////////////////////////////////////////////
  7421. //! Function: NvAPI_VIO_GetSyncDelay
  7422. //!
  7423. //! Description: This API gets the sync delay parameters.
  7424. //!
  7425. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.
  7426. //! SUPPORTED OS: Windows XP and higher
  7427. //!
  7428. //!
  7429. //! \since Release: 190
  7430. //!
  7431. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7432. //! \param [out] pSyncDelay Pointer to sync delay parameters
  7433. //!
  7434. //! \retval ::NVAPI_OK Success
  7435. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7436. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7437. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  7438. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7439. ///////////////////////////////////////////////////////////////////////////////
  7440. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.")
  7441. NVAPI_INTERFACE NvAPI_VIO_GetSyncDelay(NvVioHandle hVioHandle,
  7442. NVVIOSYNCDELAY *pSyncDelay);
  7443. typedef enum _NVVIOPCILINKRATE
  7444. {
  7445. NVVIOPCILINKRATE_UNKNOWN = 0,
  7446. NVVIOPCILINKRATE_GEN1 = 1, //<! 2.5 Gbps.
  7447. NVVIOPCILINKRATE_GEN2 = 2, //<! 5 Gbps.
  7448. NVVIOPCILINKRATE_GEN3 = 3, //<! 8 Gbps.
  7449. }NVVIOPCILINKRATE;
  7450. typedef enum _NVVIOPCILINKWIDTH
  7451. {
  7452. NVVIOPCILINKWIDTH_UNKNOWN = 0,
  7453. NVVIOPCILINKWIDTH_x1 = 1,
  7454. NVVIOPCILINKWIDTH_x2 = 2,
  7455. NVVIOPCILINKWIDTH_x4 = 4,
  7456. NVVIOPCILINKWIDTH_x8 = 8,
  7457. NVVIOPCILINKWIDTH_x16 = 16,
  7458. }NVVIOPCILINKWIDTH;
  7459. typedef struct _NVVIOPCIINFO
  7460. {
  7461. NvU32 version; //!< Structure version
  7462. NvU32 pciDeviceId; //!< specifies the internal PCI device identifier for the GVI.
  7463. NvU32 pciSubSystemId; //!< specifies the internal PCI subsystem identifier for the GVI.
  7464. NvU32 pciRevisionId; //!< specifies the internal PCI device-specific revision identifier for the GVI.
  7465. NvU32 pciDomain; //!< specifies the PCI domain of the GVI device.
  7466. NvU32 pciBus; //!< specifies the PCI bus number of the GVI device.
  7467. NvU32 pciSlot; //!< specifies the PCI slot number of the GVI device.
  7468. NVVIOPCILINKWIDTH pciLinkWidth; //!< specifies the the negotiated PCIE link width.
  7469. NVVIOPCILINKRATE pciLinkRate; //!< specifies the the negotiated PCIE link rate.
  7470. } NVVIOPCIINFO_V1;
  7471. typedef NVVIOPCIINFO_V1 NVVIOPCIINFO;
  7472. #define NVVIOPCIINFO_VER1 MAKE_NVAPI_VERSION(NVVIOPCIINFO_V1,1)
  7473. #define NVVIOPCIINFO_VER NVVIOPCIINFO_VER1
  7474. ///////////////////////////////////////////////////////////////////////////////
  7475. //
  7476. // FUNCTION NAME: NvAPI_VIO_GetPCIInfo()
  7477. //
  7478. // DESCRIPTION: This API gets PCI information of the attached SDI(input) capture card.
  7479. //
  7480. // PARAMETERS: hVioHandle (IN) - Handle to SDI capture card.
  7481. // pVioPCIInfo (OUT) - PCI information of the attached SDI capture card.
  7482. //
  7483. //! SUPPORTED OS: Windows XP and higher
  7484. //!
  7485. //
  7486. // RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  7487. // specific meaning for this API, they are listed below.
  7488. //
  7489. ///////////////////////////////////////////////////////////////////////////////
  7490. NVAPI_INTERFACE NvAPI_VIO_GetPCIInfo(__in NvVioHandle hVioHandle,
  7491. __out NVVIOPCIINFO* pVioPCIInfo);
  7492. ////////////////////////////////////////////////////////////////////////////////
  7493. //! Function: NvAPI_VIO_IsRunning
  7494. //!
  7495. //! Description: This API determines if Video I/O is running.
  7496. //!
  7497. //! SUPPORTED OS: Windows XP and higher
  7498. //!
  7499. //!
  7500. //! \since Release: 190
  7501. //!
  7502. //! \param [in] NvVioHandle[IN] The caller provides the SDI device handle as input.
  7503. //!
  7504. //! \retval ::NVAPI_DRIVER_RUNNING Video I/O running
  7505. //! \retval ::NVAPI_DRIVER_NOTRUNNING Video I/O not running
  7506. ///////////////////////////////////////////////////////////////////////////////
  7507. NVAPI_INTERFACE NvAPI_VIO_IsRunning(NvVioHandle hVioHandle);
  7508. ///////////////////////////////////////////////////////////////////////////////
  7509. //! Function: NvAPI_VIO_Start
  7510. //!
  7511. //! Description: This API starts Video I/O.
  7512. //! This API should be called for NVVIOOWNERTYPE_DESKTOP only and will not work for OGL applications.
  7513. //!
  7514. //! SUPPORTED OS: Windows XP and higher
  7515. //!
  7516. //!
  7517. //! \since Release: 190
  7518. //!
  7519. //! \param [in] NvVioHandle[IN] The caller provides the SDI device handle as input.
  7520. //!
  7521. //! \retval ::NVAPI_OK Success
  7522. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7523. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7524. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7525. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7526. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7527. ///////////////////////////////////////////////////////////////////////////////
  7528. NVAPI_INTERFACE NvAPI_VIO_Start(NvVioHandle hVioHandle);
  7529. ///////////////////////////////////////////////////////////////////////////////
  7530. //! Function: NvAPI_VIO_Stop
  7531. //!
  7532. //! Description: This API stops Video I/O.
  7533. //! This API should be called for NVVIOOWNERTYPE_DESKTOP only and will not work for OGL applications.
  7534. //!
  7535. //! SUPPORTED OS: Windows XP and higher
  7536. //!
  7537. //!
  7538. //! \since Release: 190
  7539. //!
  7540. //! \param [in] NvVioHandle[IN] The caller provides the SDI device handle as input.
  7541. //!
  7542. //! \retval ::NVAPI_OK Success
  7543. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7544. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7545. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7546. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7547. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  7548. ///////////////////////////////////////////////////////////////////////////////
  7549. NVAPI_INTERFACE NvAPI_VIO_Stop(NvVioHandle hVioHandle);
  7550. ///////////////////////////////////////////////////////////////////////////////
  7551. //! Function: NvAPI_VIO_IsFrameLockModeCompatible
  7552. //!
  7553. //! Description: This API checks whether modes are compatible in frame lock mode.
  7554. //!
  7555. //! SUPPORTED OS: Windows XP and higher
  7556. //!
  7557. //!
  7558. //! \since Release: 190
  7559. //!
  7560. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7561. //! \param [in] srcEnumIndex Source Enumeration index
  7562. //! \param [in] destEnumIndex Destination Enumeration index
  7563. //! \param [out] pbCompatible Pointer to receive compatibility
  7564. //!
  7565. //! \retval ::NVAPI_OK Success
  7566. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7567. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7568. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  7569. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7570. ///////////////////////////////////////////////////////////////////////////////
  7571. NVAPI_INTERFACE NvAPI_VIO_IsFrameLockModeCompatible(NvVioHandle hVioHandle,
  7572. NvU32 srcEnumIndex,
  7573. NvU32 destEnumIndex,
  7574. NvU32* pbCompatible);
  7575. ///////////////////////////////////////////////////////////////////////////////
  7576. //! Function: NvAPI_VIO_EnumDevices
  7577. //!
  7578. //! Description: This API enumerate all VIO devices connected to the system.
  7579. //!
  7580. //! SUPPORTED OS: Windows XP and higher
  7581. //!
  7582. //!
  7583. //! \since Release: 190
  7584. //!
  7585. //! \param [out] NvVioHandle User passes the pointer of NvVioHandle[] array to get handles to
  7586. //! all the connected video I/O devices.
  7587. //! \param [out] vioDeviceCount User gets total number of VIO devices connected to the system.
  7588. //!
  7589. //! \retval ::NVAPI_OK Success
  7590. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7591. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7592. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7593. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No SDI Device found
  7594. ///////////////////////////////////////////////////////////////////////////////
  7595. NVAPI_INTERFACE NvAPI_VIO_EnumDevices(NvVioHandle hVioHandle[NVAPI_MAX_VIO_DEVICES],
  7596. NvU32 *vioDeviceCount);
  7597. ///////////////////////////////////////////////////////////////////////////////
  7598. //! Function: NvAPI_VIO_QueryTopology
  7599. //!
  7600. //! Description: This API queries the valid SDI topologies.
  7601. //!
  7602. //! SUPPORTED OS: Windows XP and higher
  7603. //!
  7604. //!
  7605. //! \since Release: 190
  7606. //!
  7607. //! \param [out] pNvVIOTopology User passes the pointer to NVVIOTOPOLOGY to fetch all valid SDI topologies.
  7608. //!
  7609. //! \retval ::NVAPI_OK Success
  7610. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  7611. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  7612. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Invalid structure version
  7613. //! \retval ::NVAPI_ERROR NVAPI Random errors
  7614. ///////////////////////////////////////////////////////////////////////////////
  7615. NVAPI_INTERFACE NvAPI_VIO_QueryTopology(NV_VIO_TOPOLOGY *pNvVIOTopology);
  7616. ///////////////////////////////////////////////////////////////////////////////
  7617. //! Function: NvAPI_VIO_EnumSignalFormats
  7618. //!
  7619. //! Description: This API enumerates signal formats supported by Video I/O.
  7620. //!
  7621. //! SUPPORTED OS: Windows XP and higher
  7622. //!
  7623. //!
  7624. //! \since Release: 190
  7625. //!
  7626. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7627. //! \param [in] enumIndex Enumeration index
  7628. //! \param [out] pSignalFormatDetail Pointer to receive detail or NULL
  7629. //!
  7630. //! \retval ::NVAPI_OK Success
  7631. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  7632. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid argument passed
  7633. //! \retval ::NVAPI_END_ENUMERATION No more signal formats to enumerate
  7634. ///////////////////////////////////////////////////////////////////////////////
  7635. NVAPI_INTERFACE NvAPI_VIO_EnumSignalFormats(NvVioHandle hVioHandle,
  7636. NvU32 enumIndex,
  7637. NVVIOSIGNALFORMATDETAIL *pSignalFormatDetail);
  7638. ///////////////////////////////////////////////////////////////////////////////
  7639. //! Function: NvAPI_VIO_EnumDataFormats
  7640. //!
  7641. //! Description: This API enumerates data formats supported by Video I/O.
  7642. //!
  7643. //! SUPPORTED OS: Windows XP and higher
  7644. //!
  7645. //!
  7646. //! \since Release: 190
  7647. //!
  7648. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  7649. //! \param [in] enumIndex Enumeration index
  7650. //! \param [out] pDataFormatDetail Pointer to receive detail or NULL
  7651. //!
  7652. //! \retval ::NVAPI_OK Success
  7653. //! \retval ::NVAPI_END_ENUMERATION No more data formats to enumerate
  7654. //! \retval ::NVAPI_NOT_SUPPORTED Unsupported NVVIODATAFORMAT_ enumeration
  7655. ///////////////////////////////////////////////////////////////////////////////
  7656. NVAPI_INTERFACE NvAPI_VIO_EnumDataFormats(NvVioHandle hVioHandle,
  7657. NvU32 enumIndex,
  7658. NVVIODATAFORMATDETAIL *pDataFormatDetail);
  7659. //! @}
  7660. ///////////////////////////////////////////////////////////////////////////////////
  7661. // CAMERA TEST API
  7662. // These APIs allows test apps to perform low level camera tests
  7663. //! \addtogroup vidio
  7664. //! @{
  7665. ///////////////////////////////////////////////////////////////////////////////
  7666. //
  7667. // FUNCTION NAME: NvAPI_Stereo_CreateConfigurationProfileRegistryKey
  7668. //
  7669. //! \fn NvAPI_Stereo_CreateConfigurationProfileRegistryKey(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType)
  7670. //!
  7671. //! DESCRIPTION: Creates new configuration registry key for current application.
  7672. //!
  7673. //! If there is no configuration profile prior to the function call,
  7674. //! this API tries to create a new configuration profile registry key
  7675. //! for a given application and fill it with the default values.
  7676. //! If an application already has a configuration profile registry key, the API does nothing.
  7677. //! The name of the key is automatically set to the name of the executable that calls this function.
  7678. //! Because of this, the executable should have a distinct and unique name.
  7679. //! If the application is using only one version of DirectX, then the default profile type will be appropriate.
  7680. //! If the application is using more than one version of DirectX from the same executable,
  7681. //! it should use the appropriate profile type for each configuration profile.
  7682. //!
  7683. //! HOW TO USE: When there is a need for an application to have default stereo parameter values,
  7684. //! use this function to create a key to store the values.
  7685. //!
  7686. //! SUPPORTED OS: Windows Vista and higher
  7687. //!
  7688. //!
  7689. //! \since Release: 180
  7690. //!
  7691. //! \param [in] registryProfileType Type of profile the application wants to create. It should be one of the symbolic constants defined in
  7692. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return
  7693. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  7694. //!
  7695. //! \retval ::NVAPI_OK Key exists in the registry.
  7696. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  7697. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  7698. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7699. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7700. //! \retval ::NVAPI_ERROR
  7701. //!
  7702. ///////////////////////////////////////////////////////////////////////////////
  7703. //! \ingroup stereoapi
  7704. //! Used in NvAPI_Stereo_CreateConfigurationProfileRegistryKey()
  7705. typedef enum _NV_StereoRegistryProfileType
  7706. {
  7707. NVAPI_STEREO_DEFAULT_REGISTRY_PROFILE, //!< Default registry configuration profile.
  7708. NVAPI_STEREO_DX9_REGISTRY_PROFILE, //!< Separate registry configuration profile for a DirectX 9 executable.
  7709. NVAPI_STEREO_DX10_REGISTRY_PROFILE //!< Separate registry configuration profile for a DirectX 10 executable.
  7710. } NV_STEREO_REGISTRY_PROFILE_TYPE;
  7711. //! \ingroup stereoapi
  7712. NVAPI_INTERFACE NvAPI_Stereo_CreateConfigurationProfileRegistryKey(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType);
  7713. ///////////////////////////////////////////////////////////////////////////////
  7714. //
  7715. // FUNCTION NAME: NvAPI_Stereo_DeleteConfigurationProfileRegistryKey
  7716. //
  7717. //! DESCRIPTION: Removes configuration registry key for current application.
  7718. //!
  7719. //! If an application already has a configuration profile prior to this function call,
  7720. //! the function attempts to remove the application's configuration profile registry key from the registry.
  7721. //! If there is no configuration profile registry key prior to the function call,
  7722. //! the function does nothing and does not report an error.
  7723. //!
  7724. //! SUPPORTED OS: Windows Vista and higher
  7725. //!
  7726. //!
  7727. //! \since Release: 180
  7728. //!
  7729. //! \param [in] registryProfileType Type of profile that the application wants to delete. This should be one of the symbolic
  7730. //! constants defined in ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause the function
  7731. //! to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  7732. //!
  7733. //! \retval ::NVAPI_OK Key does not exist in the registry any more.
  7734. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  7735. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  7736. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI is not initialized.
  7737. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI is not initialized.
  7738. //! \retval ::NVAPI_ERROR
  7739. //!
  7740. //! \ingroup stereoapi
  7741. ///////////////////////////////////////////////////////////////////////////////
  7742. NVAPI_INTERFACE NvAPI_Stereo_DeleteConfigurationProfileRegistryKey(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType);
  7743. ///////////////////////////////////////////////////////////////////////////////
  7744. //
  7745. // FUNCTION NAME: NvAPI_Stereo_SetConfigurationProfileValue
  7746. //
  7747. //! \fn NvAPI_Stereo_SetConfigurationProfileValue(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType, NV_STEREO_REGISTRY_ID valueRegistryID, void *pValue)
  7748. //!
  7749. //! DESCRIPTION: This API sets the given parameter value under the application's registry key.
  7750. //!
  7751. //! If the value does not exist under the application's registry key,
  7752. //! the value will be created under the key.
  7753. //!
  7754. //! SUPPORTED OS: Windows Vista and higher
  7755. //!
  7756. //!
  7757. //! \since Release: 180
  7758. //!
  7759. //! \param [in] registryProfileType The type of profile the application wants to access. It should be one of the
  7760. //! symbolic constants defined in ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value
  7761. //! will cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  7762. //! \param [in] valueRegistryID ID of the value that is being set. It should be one of the symbolic constants defined in
  7763. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing
  7764. //! and return ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED.
  7765. //! \param [in] pValue Address of the value that is being set. It should be either address of a DWORD or of a float,
  7766. //! dependent on the type of the stereo parameter whose value is being set. The API will then cast that
  7767. //! address to DWORD* and write whatever is in those 4 bytes as a DWORD to the registry.
  7768. //!
  7769. //! \retval ::NVAPI_OK Value is written to registry.
  7770. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  7771. //! \retval ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED This value is not supported.
  7772. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  7773. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI is not initialized.
  7774. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI is not initialized.
  7775. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  7776. //
  7777. ///////////////////////////////////////////////////////////////////////////////
  7778. //! \ingroup stereoapi
  7779. //! Used in NvAPI_Stereo_SetConfigurationProfileValue()
  7780. typedef enum _NV_StereoRegistryID
  7781. {
  7782. NVAPI_CONVERGENCE_ID, //!< Symbolic constant for convergence registry ID.
  7783. NVAPI_FRUSTUM_ADJUST_MODE_ID, //!< Symbolic constant for frustum adjust mode registry ID.
  7784. } NV_STEREO_REGISTRY_ID;
  7785. //! \ingroup stereoapi
  7786. NVAPI_INTERFACE NvAPI_Stereo_SetConfigurationProfileValue(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType, NV_STEREO_REGISTRY_ID valueRegistryID, void *pValue);
  7787. ///////////////////////////////////////////////////////////////////////////////
  7788. //
  7789. // FUNCTION NAME: NvAPI_Stereo_DeleteConfigurationProfileValue
  7790. //
  7791. //! DESCRIPTION: This API removes the given value from the application's configuration profile registry key.
  7792. //! If there is no such value, the function does nothing and does not report an error.
  7793. //!
  7794. //! SUPPORTED OS: Windows Vista and higher
  7795. //!
  7796. //!
  7797. //! \since Release: 180
  7798. //!
  7799. //! \param [in] registryProfileType The type of profile the application wants to access. It should be one of the
  7800. //! symbolic constants defined in ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will
  7801. //! cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  7802. //! \param [in] valueRegistryID ID of the value that is being deleted. It should be one of the symbolic constants defined in
  7803. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return
  7804. //! ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED.
  7805. //!
  7806. //! \retval ::NVAPI_OK Value does not exist in registry any more.
  7807. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  7808. //! \retval ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED This value is not supported.
  7809. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  7810. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7811. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7812. //! \retval ::NVAPI_ERROR
  7813. //!
  7814. //! \ingroup stereoapi
  7815. ///////////////////////////////////////////////////////////////////////////////
  7816. NVAPI_INTERFACE NvAPI_Stereo_DeleteConfigurationProfileValue(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType, NV_STEREO_REGISTRY_ID valueRegistryID);
  7817. ///////////////////////////////////////////////////////////////////////////////
  7818. //
  7819. // FUNCTION NAME: NvAPI_Stereo_Enable
  7820. //
  7821. //! DESCRIPTION: This APU enables stereo mode in the registry.
  7822. //! Calls to this function affect the entire system.
  7823. //! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect,
  7824. //! and will return the appropriate error code.
  7825. //!
  7826. //! SUPPORTED OS: Windows Vista and higher
  7827. //!
  7828. //!
  7829. //! \since Release: 180
  7830. //!
  7831. //! \retval ::NVAPI_OK Stereo is now enabled.
  7832. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7833. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7834. //! \retval ::NVAPI_ERROR
  7835. //!
  7836. //! \ingroup stereoapi
  7837. ///////////////////////////////////////////////////////////////////////////////
  7838. NVAPI_INTERFACE NvAPI_Stereo_Enable(void);
  7839. ///////////////////////////////////////////////////////////////////////////////
  7840. //
  7841. // FUNCTION NAME: NvAPI_Stereo_Disable
  7842. //
  7843. //! DESCRIPTION: This API disables stereo mode in the registry.
  7844. //! Calls to this function affect the entire system.
  7845. //! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect,
  7846. //! and will return the appropriate error code.
  7847. //!
  7848. //! SUPPORTED OS: Windows Vista and higher
  7849. //!
  7850. //!
  7851. //! \since Release: 180
  7852. //!
  7853. //! \retval ::NVAPI_OK Stereo is now disabled.
  7854. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7855. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7856. //! \retval ::NVAPI_ERROR
  7857. //!
  7858. //! \ingroup stereoapi
  7859. ///////////////////////////////////////////////////////////////////////////////
  7860. NVAPI_INTERFACE NvAPI_Stereo_Disable(void);
  7861. ///////////////////////////////////////////////////////////////////////////////
  7862. //
  7863. // FUNCTION NAME: NvAPI_Stereo_IsEnabled
  7864. //
  7865. //! DESCRIPTION: This API checks if stereo mode is enabled in the registry.
  7866. //!
  7867. //! SUPPORTED OS: Windows Vista and higher
  7868. //!
  7869. //!
  7870. //! \since Release: 180
  7871. //!
  7872. //! \param [out] pIsStereoEnabled Address where the result of the inquiry will be placed.
  7873. //!
  7874. //! \retval ::NVAPI_OK Check was sucessfully completed and result reflects current state of stereo availability.
  7875. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7876. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7877. //! \retval ::NVAPI_ERROR
  7878. //!
  7879. //! \ingroup stereoapi
  7880. ///////////////////////////////////////////////////////////////////////////////
  7881. NVAPI_INTERFACE NvAPI_Stereo_IsEnabled(NvU8 *pIsStereoEnabled);
  7882. //! \addtogroup stereoapi
  7883. //! @{
  7884. typedef struct _NVAPI_STEREO_CAPS
  7885. {
  7886. NvU32 version;
  7887. NvU32 supportsWindowedModeOff : 1;
  7888. NvU32 supportsWindowedModeAutomatic : 1;
  7889. NvU32 supportsWindowedModePersistent : 1;
  7890. NvU32 reserved : 29; // must be 0
  7891. NvU32 reserved2[3]; // must be 0
  7892. } NVAPI_STEREO_CAPS_V1;
  7893. #define NVAPI_STEREO_CAPS_VER1 MAKE_NVAPI_VERSION(NVAPI_STEREO_CAPS,1)
  7894. #define NVAPI_STEREO_CAPS_VER NVAPI_STEREO_CAPS_VER1
  7895. typedef NVAPI_STEREO_CAPS_V1 NVAPI_STEREO_CAPS;
  7896. //! @}
  7897. ///////////////////////////////////////////////////////////////////////////////
  7898. //
  7899. // FUNCTION NAME: NvAPI_Stereo_GetStereoSupport
  7900. //
  7901. //! DESCRIPTION: This API checks what kind of stereo support is currently supported on a particular display.
  7902. //! If the the display is prohibited from showing stereo (e.g. secondary in a multi-mon setup), we will
  7903. //! return 0 for all stereo modes (full screen exclusive, automatic windowed, persistent windowed).
  7904. //! Otherwise, we will check which stereo mode is supported. On 120Hz display, this will be what
  7905. //! the user chooses in control panel. On HDMI 1.4 display, persistent windowed mode is always assumed to be
  7906. //! supported. Note that this function does not check if the CURRENT RESOLUTION/REFRESH RATE can support
  7907. //! stereo. For HDMI 1.4, it is the app's responsibility to change the resolution/refresh rate to one that is
  7908. //! 3D compatible. For 120Hz, the driver will ALWAYS force 120Hz anyway.
  7909. //!
  7910. //! SUPPORTED OS: Windows Vista and higher
  7911. //!
  7912. //!
  7913. //! \since Release: 304
  7914. //!
  7915. //! \param [in] hMonitor handle to monitor that app is going to run on
  7916. //! \param [out] pCaps Address where the result of the inquiry will be placed.
  7917. //! *pCaps is defined in NVAPI_STEREO_CAPS.
  7918. //! \return This API can return any of the following error codes enumerated in #NvAPI_Status
  7919. //! \retval ::NVAPI_OK
  7920. //!
  7921. //! \ingroup stereoapi
  7922. ///////////////////////////////////////////////////////////////////////////////
  7923. NVAPI_INTERFACE NvAPI_Stereo_GetStereoSupport(__in NvMonitorHandle hMonitor, __out NVAPI_STEREO_CAPS *pCaps);
  7924. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  7925. ///////////////////////////////////////////////////////////////////////////////
  7926. //
  7927. // FUNCTION NAME: NvAPI_Stereo_CreateHandleFromIUnknown
  7928. //
  7929. //! DESCRIPTION: This API creates a stereo handle that is used in subsequent calls related to a given device interface.
  7930. //! This must be called before any other NvAPI_Stereo_ function for that handle.
  7931. //! Multiple devices can be used at one time using multiple calls to this function (one per each device).
  7932. //!
  7933. //! HOW TO USE: After the Direct3D device is created, create the stereo handle.
  7934. //! On call success:
  7935. //! -# Use all other NvAPI_Stereo_ functions that have stereo handle as first parameter.
  7936. //! -# After the device interface that corresponds to the the stereo handle is destroyed,
  7937. //! the application should call NvAPI_DestroyStereoHandle() for that stereo handle.
  7938. //!
  7939. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  7940. //!
  7941. //! SUPPORTED OS: Windows Vista and higher
  7942. //!
  7943. //!
  7944. //! \since Release: 180
  7945. //!
  7946. //! \param [in] pDevice Pointer to IUnknown interface that is IDirect3DDevice9* in DX9, ID3D10Device*.
  7947. //! \param [out] pStereoHandle Pointer to the newly created stereo handle.
  7948. //!
  7949. //! \retval ::NVAPI_OK Stereo handle is created for given device interface.
  7950. //! \retval ::NVAPI_INVALID_ARGUMENT Provided device interface is invalid.
  7951. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7952. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7953. //! \retval ::NVAPI_ERROR
  7954. //!
  7955. //! \ingroup stereoapi
  7956. ///////////////////////////////////////////////////////////////////////////////
  7957. NVAPI_INTERFACE NvAPI_Stereo_CreateHandleFromIUnknown(IUnknown *pDevice, StereoHandle *pStereoHandle);
  7958. #endif // defined(_D3D9_H_) || defined(__d3d10_h__)
  7959. ///////////////////////////////////////////////////////////////////////////////
  7960. //
  7961. // FUNCTION NAME: NvAPI_Stereo_DestroyHandle
  7962. //
  7963. //! DESCRIPTION: This API destroys the stereo handle created with one of the NvAPI_Stereo_CreateHandleFrom() functions.
  7964. //! This should be called after the device corresponding to the handle has been destroyed.
  7965. //!
  7966. //! SUPPORTED OS: Windows Vista and higher
  7967. //!
  7968. //!
  7969. //! \since Release: 180
  7970. //!
  7971. //! \param [in] stereoHandle Stereo handle that is to be destroyed.
  7972. //!
  7973. //! \retval ::NVAPI_OK Stereo handle is destroyed.
  7974. //! \retval ::NVAPI_API_NOT_INTIALIZED
  7975. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  7976. //! \retval ::NVAPI_ERROR
  7977. //!
  7978. //! \ingroup stereoapi
  7979. ///////////////////////////////////////////////////////////////////////////////
  7980. NVAPI_INTERFACE NvAPI_Stereo_DestroyHandle(StereoHandle stereoHandle);
  7981. ///////////////////////////////////////////////////////////////////////////////
  7982. //
  7983. // FUNCTION NAME: NvAPI_Stereo_Activate
  7984. //
  7985. //! DESCRIPTION: This API activates stereo for the device interface corresponding to the given stereo handle.
  7986. //! Activating stereo is possible only if stereo was enabled previously in the registry.
  7987. //! If stereo is not activated, then calls to functions that require that stereo is activated have no effect,
  7988. //! and will return the appropriate error code.
  7989. //!
  7990. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  7991. //!
  7992. //! SUPPORTED OS: Windows Vista and higher
  7993. //!
  7994. //!
  7995. //! \since Release: 180
  7996. //!
  7997. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  7998. //!
  7999. //! \retval ::NVAPI_OK Stereo is turned on.
  8000. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8001. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8002. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8003. //! \retval ::NVAPI_ERROR
  8004. //!
  8005. //! \ingroup stereoapi
  8006. ///////////////////////////////////////////////////////////////////////////////
  8007. NVAPI_INTERFACE NvAPI_Stereo_Activate(StereoHandle stereoHandle);
  8008. ///////////////////////////////////////////////////////////////////////////////
  8009. //
  8010. // FUNCTION NAME: NvAPI_Stereo_Deactivate
  8011. //
  8012. //! DESCRIPTION: This API deactivates stereo for the given device interface.
  8013. //! If stereo is not activated, then calls to functions that require that stereo is activated have no effect,
  8014. //! and will return the appropriate error code.
  8015. //!
  8016. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8017. //!
  8018. //! SUPPORTED OS: Windows Vista and higher
  8019. //!
  8020. //!
  8021. //! \since Release: 180
  8022. //!
  8023. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8024. //!
  8025. //! \retval ::NVAPI_OK Stereo is turned off.
  8026. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8027. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8028. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8029. //! \retval ::NVAPI_ERROR
  8030. //!
  8031. //! \ingroup stereoapi
  8032. ///////////////////////////////////////////////////////////////////////////////
  8033. NVAPI_INTERFACE NvAPI_Stereo_Deactivate(StereoHandle stereoHandle);
  8034. ///////////////////////////////////////////////////////////////////////////////
  8035. //
  8036. // FUNCTION NAME: NvAPI_Stereo_IsActivated
  8037. //
  8038. //! DESCRIPTION: This API checks if stereo is activated for the given device interface.
  8039. //!
  8040. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8041. //!
  8042. //! SUPPORTED OS: Windows Vista and higher
  8043. //!
  8044. //!
  8045. //! \since Release: 180
  8046. //!
  8047. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8048. //! \param [in] pIsStereoOn Address where result of the inquiry will be placed.
  8049. //!
  8050. //! \retval ::NVAPI_OK - Check was sucessfully completed and result reflects current state of stereo (on/off).
  8051. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8052. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8053. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8054. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8055. //!
  8056. //! \ingroup stereoapi
  8057. ///////////////////////////////////////////////////////////////////////////////
  8058. NVAPI_INTERFACE NvAPI_Stereo_IsActivated(StereoHandle stereoHandle, NvU8 *pIsStereoOn);
  8059. ///////////////////////////////////////////////////////////////////////////////
  8060. //
  8061. // FUNCTION NAME: NvAPI_Stereo_GetSeparation
  8062. //
  8063. //! DESCRIPTION: This API gets current separation value (in percents).
  8064. //!
  8065. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8066. //!
  8067. //! SUPPORTED OS: Windows Vista and higher
  8068. //!
  8069. //!
  8070. //! \since Release: 180
  8071. //!
  8072. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8073. //! \param [out] pSeparationPercentage Address of @c float type variable to store current separation percentage in.
  8074. //!
  8075. //! \retval ::NVAPI_OK Retrieval of separation percentage was successfull.
  8076. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8077. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8078. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8079. //! \retval ::NVAPI_ERROR
  8080. //!
  8081. //! \ingroup stereoapi
  8082. ///////////////////////////////////////////////////////////////////////////////
  8083. NVAPI_INTERFACE NvAPI_Stereo_GetSeparation(StereoHandle stereoHandle, float *pSeparationPercentage);
  8084. ///////////////////////////////////////////////////////////////////////////////
  8085. //
  8086. // FUNCTION NAME: NvAPI_Stereo_SetSeparation
  8087. //
  8088. //! DESCRIPTION: This API sets separation to given percentage.
  8089. //!
  8090. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8091. //!
  8092. //! SUPPORTED OS: Windows Vista and higher
  8093. //!
  8094. //!
  8095. //! \since Release: 180
  8096. //!
  8097. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8098. //! \param [in] newSeparationPercentage New value for separation percentage.
  8099. //!
  8100. //! \retval ::NVAPI_OK Setting of separation percentage was successfull.
  8101. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8102. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  8103. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8104. //! \retval ::NVAPI_STEREO_PARAMETER_OUT_OF_RANGE Given separation percentage is out of [0..100] range.
  8105. //! \retval ::NVAPI_ERROR
  8106. //!
  8107. //! \ingroup stereoapi
  8108. ///////////////////////////////////////////////////////////////////////////////
  8109. NVAPI_INTERFACE NvAPI_Stereo_SetSeparation(StereoHandle stereoHandle, float newSeparationPercentage);
  8110. ///////////////////////////////////////////////////////////////////////////////
  8111. //
  8112. // FUNCTION NAME: NvAPI_Stereo_DecreaseSeparation
  8113. //
  8114. //! DESCRIPTION: This API decreases separation for the given device interface (just like the Ctrl+F3 hotkey).
  8115. //!
  8116. //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8117. //!
  8118. //! SUPPORTED OS: Windows Vista and higher
  8119. //!
  8120. //!
  8121. //! \since Release: 180
  8122. //!
  8123. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8124. //!
  8125. //! \retval ::NVAPI_OK - Decrease of separation percentage was successfull.
  8126. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8127. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8128. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8129. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8130. //!
  8131. //! \ingroup stereoapi
  8132. ///////////////////////////////////////////////////////////////////////////////
  8133. NVAPI_INTERFACE NvAPI_Stereo_DecreaseSeparation(StereoHandle stereoHandle);
  8134. ///////////////////////////////////////////////////////////////////////////////
  8135. //
  8136. // FUNCTION NAME: NvAPI_Stereo_IncreaseSeparation
  8137. //
  8138. //! DESCRIPTION: This API increases separation for the given device interface (just like the Ctrl+F4 hotkey).
  8139. //!
  8140. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8141. //!
  8142. //! SUPPORTED OS: Windows Vista and higher
  8143. //!
  8144. //!
  8145. //! \since Release: 180
  8146. //!
  8147. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8148. //!
  8149. //! \retval ::NVAPI_OK Increase of separation percentage was successfull.
  8150. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8151. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  8152. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8153. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  8154. //!
  8155. //! \ingroup stereoapi
  8156. ///////////////////////////////////////////////////////////////////////////////
  8157. NVAPI_INTERFACE NvAPI_Stereo_IncreaseSeparation(StereoHandle stereoHandle);
  8158. ///////////////////////////////////////////////////////////////////////////////
  8159. //
  8160. // FUNCTION NAME: NvAPI_Stereo_GetConvergence
  8161. //
  8162. //! DESCRIPTION: This API gets the current convergence value.
  8163. //!
  8164. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8165. //!
  8166. //! SUPPORTED OS: Windows Vista and higher
  8167. //!
  8168. //!
  8169. //! \since Release: 180
  8170. //!
  8171. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8172. //! \param [out] pConvergence Address of @c float type variable to store current convergence value in.
  8173. //!
  8174. //! \retval ::NVAPI_OK Retrieval of convergence value was successfull.
  8175. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8176. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8177. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8178. //! \retval ::NVAPI_ERROR
  8179. //!
  8180. //! \ingroup stereoapi
  8181. ///////////////////////////////////////////////////////////////////////////////
  8182. NVAPI_INTERFACE NvAPI_Stereo_GetConvergence(StereoHandle stereoHandle, float *pConvergence);
  8183. ///////////////////////////////////////////////////////////////////////////////
  8184. //
  8185. // FUNCTION NAME: NvAPI_Stereo_SetConvergence
  8186. //
  8187. //! DESCRIPTION: This API sets convergence to the given value.
  8188. //!
  8189. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8190. //!
  8191. //! SUPPORTED OS: Windows Vista and higher
  8192. //!
  8193. //!
  8194. //! \since Release: 180
  8195. //!
  8196. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8197. //! \param [in] newConvergence New value for convergence.
  8198. //!
  8199. //! \retval ::NVAPI_OK Setting of convergence value was successfull.
  8200. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8201. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8202. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8203. //! \retval ::NVAPI_ERROR
  8204. //!
  8205. //! \ingroup stereoapi
  8206. ///////////////////////////////////////////////////////////////////////////////
  8207. NVAPI_INTERFACE NvAPI_Stereo_SetConvergence(StereoHandle stereoHandle, float newConvergence);
  8208. ///////////////////////////////////////////////////////////////////////////////
  8209. //
  8210. // FUNCTION NAME: NvAPI_Stereo_DecreaseConvergence
  8211. //
  8212. //! DESCRIPTION: This API decreases convergence for the given device interface (just like the Ctrl+F5 hotkey).
  8213. //!
  8214. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8215. //!
  8216. //! SUPPORTED OS: Windows Vista and higher
  8217. //!
  8218. //!
  8219. //! \since Release: 180
  8220. //!
  8221. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8222. //!
  8223. //! \retval ::NVAPI_OK - Decrease of convergence was successfull.
  8224. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8225. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8226. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8227. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8228. //!
  8229. //! \ingroup stereoapi
  8230. ///////////////////////////////////////////////////////////////////////////////
  8231. NVAPI_INTERFACE NvAPI_Stereo_DecreaseConvergence(StereoHandle stereoHandle);
  8232. ///////////////////////////////////////////////////////////////////////////////
  8233. //
  8234. // FUNCTION NAME: NvAPI_Stereo_IncreaseConvergence
  8235. //
  8236. //! DESCRIPTION: This API increases convergence for given the device interface (just like the Ctrl+F5 hotkey).
  8237. //!
  8238. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8239. //!
  8240. //! SUPPORTED OS: Windows Vista and higher
  8241. //!
  8242. //!
  8243. //! \since Release: 180
  8244. //!
  8245. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8246. //!
  8247. //! \retval ::NVAPI_OK Increase of convergence was successfull.
  8248. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8249. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8250. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8251. //! \retval ::NVAPI_ERROR
  8252. //!
  8253. //! \ingroup stereoapi
  8254. ///////////////////////////////////////////////////////////////////////////////
  8255. NVAPI_INTERFACE NvAPI_Stereo_IncreaseConvergence(StereoHandle stereoHandle);
  8256. ///////////////////////////////////////////////////////////////////////////////
  8257. //
  8258. // FUNCTION NAME: NvAPI_Stereo_GetFrustumAdjustMode
  8259. //
  8260. //! \fn NvAPI_Stereo_GetFrustumAdjustMode(StereoHandle stereoHandle, NV_FRUSTUM_ADJUST_MODE *pFrustumAdjustMode)
  8261. //! DESCRIPTION: This API gets the current frustum adjust mode value.
  8262. //!
  8263. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8264. //!
  8265. //! SUPPORTED OS: Windows Vista and higher
  8266. //!
  8267. //!
  8268. //! \since Release: 180
  8269. //!
  8270. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8271. //! \param [out] pFrustumAdjustMode Address of the NV_FRUSTUM_ADJUST_MODE type variable to store current frustum value in.
  8272. //!
  8273. //! \retval ::NVAPI_OK - Retrieval of frustum adjust mode was successfull.
  8274. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8275. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8276. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8277. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8278. //!
  8279. ///////////////////////////////////////////////////////////////////////////////
  8280. //! \ingroup stereoapi
  8281. //! Used in NvAPI_Stereo_GetFrustumAdjustMode().
  8282. typedef enum _NV_FrustumAdjustMode
  8283. {
  8284. NVAPI_NO_FRUSTUM_ADJUST, //!< Do not adjust frustum.
  8285. NVAPI_FRUSTUM_STRETCH, //!< Stretch images in X.
  8286. NVAPI_FRUSTUM_CLEAR_EDGES //!< Clear corresponding edges for each eye.
  8287. } NV_FRUSTUM_ADJUST_MODE;
  8288. //! \ingroup stereoapi
  8289. NVAPI_INTERFACE NvAPI_Stereo_GetFrustumAdjustMode(StereoHandle stereoHandle, NV_FRUSTUM_ADJUST_MODE *pFrustumAdjustMode);
  8290. ///////////////////////////////////////////////////////////////////////////////
  8291. //
  8292. // FUNCTION NAME: NvAPI_Stereo_SetFrustumAdjustMode
  8293. //
  8294. //! DESCRIPTION: This API sets the current frustum adjust mode value.
  8295. //!
  8296. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8297. //!
  8298. //! SUPPORTED OS: Windows Vista and higher
  8299. //!
  8300. //!
  8301. //! \since Release: 180
  8302. //!
  8303. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8304. //! \param [in] newFrustumAdjustModeValue New value for frustum adjust mode. It should be one of the symbolic constants defined in
  8305. //! ::NV_FRUSTUM_ADJUST_MODE. Any other value will cause function to do nothing and return
  8306. //! ::NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED.
  8307. //!
  8308. //! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull.
  8309. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8310. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8311. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8312. //! \retval ::NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED Given frustum adjust mode is not supported.
  8313. //! \retval ::NVAPI_ERROR
  8314. //!
  8315. //! \ingroup stereoapi
  8316. ///////////////////////////////////////////////////////////////////////////////
  8317. NVAPI_INTERFACE NvAPI_Stereo_SetFrustumAdjustMode(StereoHandle stereoHandle, NV_FRUSTUM_ADJUST_MODE newFrustumAdjustModeValue);
  8318. ///////////////////////////////////////////////////////////////////////////////
  8319. //
  8320. // FUNCTION NAME: NvAPI_Stereo_CaptureJpegImage
  8321. //
  8322. //! DESCRIPTION: This API captures the current stereo image in JPEG stereo format with the given quality.
  8323. //! Only the last capture call per flip will be effective.
  8324. //!
  8325. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8326. //!
  8327. //! SUPPORTED OS: Windows Vista and higher
  8328. //!
  8329. //!
  8330. //! \since Release: 180
  8331. //!
  8332. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8333. //! \param [in] quality Quality of the JPEG image to be captured. Integer value betweeen 0 and 100.
  8334. //!
  8335. //! \retval ::NVAPI_OK Image captured.
  8336. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8337. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8338. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED
  8339. //! \retval ::NVAPI_STEREO_PARAMETER_OUT_OF_RANGE Given quality is out of [0..100] range.
  8340. //! \retval ::NVAPI_ERROR
  8341. //!
  8342. //! \ingroup stereoapi
  8343. ///////////////////////////////////////////////////////////////////////////////
  8344. NVAPI_INTERFACE NvAPI_Stereo_CaptureJpegImage(StereoHandle stereoHandle, NvU32 quality);
  8345. ///////////////////////////////////////////////////////////////////////////////
  8346. //
  8347. // FUNCTION NAME: NvAPI_Stereo_InitActivation
  8348. //
  8349. //! DESCRIPTION: This API allows an application to enable stereo viewing, without the need of a GUID/Key pair
  8350. //! This API cannot be used to enable stereo viewing on 3DTV.
  8351. //!
  8352. //! HOW TO USE: Call this function immediately after device creation, then follow with a reset. \n
  8353. //! Very generically:
  8354. //! Create Device->Create Stereo Handle->InitActivation->Reset Device
  8355. //!
  8356. //! SUPPORTED OS: Windows Vista and higher
  8357. //!
  8358. //! \since Release: 302
  8359. //!
  8360. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  8361. //! \param [in] bDelayed Use delayed activation
  8362. //!
  8363. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  8364. //! If there are return error codes with specific meaning for this API,
  8365. //! they are listed below.
  8366. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8367. //!
  8368. //! \ingroup stereoapi
  8369. ///////////////////////////////////////////////////////////////////////////////
  8370. //! \addtogroup stereoapi
  8371. //! @{
  8372. //! InitActivation Flags
  8373. typedef enum _NVAPI_STEREO_INIT_ACTIVATION_FLAGS
  8374. {
  8375. NVAPI_STEREO_INIT_ACTIVATION_IMMEDIATE = 0X00,
  8376. NVAPI_STEREO_INIT_ACTIVATION_DELAYED = 0x01,
  8377. } NVAPI_STEREO_INIT_ACTIVATION_FLAGS;
  8378. NVAPI_INTERFACE NvAPI_Stereo_InitActivation(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_INIT_ACTIVATION_FLAGS flags);
  8379. //! @}
  8380. ///////////////////////////////////////////////////////////////////////////////
  8381. //
  8382. // FUNCTION NAME: NvAPI_Stereo_Trigger_Activation
  8383. //
  8384. //! DESCRIPTION: This API allows an application to trigger creation of a stereo desktop,
  8385. //! in case the creation was stopped on application launch.
  8386. //!
  8387. //! SUPPORTED OS: Windows Vista and higher
  8388. //!
  8389. //! \since Release: 302
  8390. //!
  8391. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8392. //!
  8393. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  8394. //! If there are return error codes with specific meaning for this API,
  8395. //! they are listed below.
  8396. //! \retval ::NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE - Stereo InitActivation not called.
  8397. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8398. //!
  8399. //! \ingroup stereoapi
  8400. ///////////////////////////////////////////////////////////////////////////////
  8401. NVAPI_INTERFACE NvAPI_Stereo_Trigger_Activation(__in StereoHandle hStereoHandle);
  8402. ///////////////////////////////////////////////////////////////////////////////
  8403. //
  8404. // FUNCTION NAME: NvAPI_Stereo_CapturePngImage
  8405. //
  8406. //! DESCRIPTION: This API captures the current stereo image in PNG stereo format.
  8407. //! Only the last capture call per flip will be effective.
  8408. //!
  8409. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8410. //!
  8411. //! SUPPORTED OS: Windows Vista and higher
  8412. //!
  8413. //!
  8414. //! \since Release: 180
  8415. //!
  8416. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  8417. //!
  8418. //! \retval ::NVAPI_OK Image captured.
  8419. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8420. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8421. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8422. //! \retval ::NVAPI_ERROR
  8423. //!
  8424. //! \ingroup stereoapi
  8425. ///////////////////////////////////////////////////////////////////////////////
  8426. NVAPI_INTERFACE NvAPI_Stereo_CapturePngImage(StereoHandle stereoHandle);
  8427. ///////////////////////////////////////////////////////////////////////////////
  8428. //
  8429. // FUNCTION NAME: NvAPI_Stereo_ReverseStereoBlitControl
  8430. //
  8431. //! DESCRIPTION: This API turns on/off reverse stereo blit.
  8432. //!
  8433. //! HOW TO USE: Use after the stereo handle for the device interface is created via successfull call to the appropriate
  8434. //! NvAPI_Stereo_CreateHandleFrom() function.
  8435. //! After reversed stereo blit control is turned on, blits from the stereo surface will
  8436. //! produce the right-eye image in the left side of the destination surface and the left-eye
  8437. //! image in the right side of the destination surface.
  8438. //!
  8439. //! In DirectX 9, the destination surface must be created as the render target, and StretchRect must be used.
  8440. //! Conditions:
  8441. //! - DstWidth == 2*SrcWidth
  8442. //! - DstHeight == SrcHeight
  8443. //! - Src surface is the stereo surface.
  8444. //! - SrcRect must be {0,0,SrcWidth,SrcHeight}
  8445. //! - DstRect must be {0,0,DstWidth,DstHeight}
  8446. //!
  8447. //! In DirectX 10, ResourceCopyRegion must be used.
  8448. //! Conditions:
  8449. //! - DstWidth == 2*SrcWidth
  8450. //! - DstHeight == SrcHeight
  8451. //! - dstX == 0,
  8452. //! - dstY == 0,
  8453. //! - dstZ == 0,
  8454. //! - SrcBox: left=top=front==0; right==SrcWidth; bottom==SrcHeight; back==1;
  8455. //!
  8456. //! SUPPORTED OS: Windows Vista and higher
  8457. //!
  8458. //!
  8459. //! \since Release: 185
  8460. //!
  8461. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  8462. //! \param [in] TurnOn != 0 : Turns on \n
  8463. //! == 0 : Turns off
  8464. //!
  8465. //!
  8466. //! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull.
  8467. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8468. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8469. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8470. //! \retval ::NVAPI_ERROR
  8471. //!
  8472. //! \ingroup stereoapi
  8473. ///////////////////////////////////////////////////////////////////////////////
  8474. NVAPI_INTERFACE NvAPI_Stereo_ReverseStereoBlitControl(StereoHandle hStereoHandle, NvU8 TurnOn);
  8475. ///////////////////////////////////////////////////////////////////////////////
  8476. //
  8477. // FUNCTION NAME: NvAPI_Stereo_SetNotificationMessage
  8478. //
  8479. //! DESCRIPTION: This API is a Setup notification message that the stereo driver uses to notify the application
  8480. //! when the user changes the stereo driver state.
  8481. //!
  8482. //! When the user changes the stereo state (Activated or Deactivated, separation or conversion)
  8483. //! the stereo driver posts a defined message with the following parameters:
  8484. //!
  8485. //! lParam is the current conversion. (Actual conversion is *(float*)&lParam )
  8486. //!
  8487. //! wParam == MAKEWPARAM(l, h) where
  8488. //! - l == 0 if stereo is deactivated
  8489. //! - l == 1 if stereo is deactivated
  8490. //! - h is the current separation. (Actual separation is float(h*100.f/0xFFFF)
  8491. //!
  8492. //! Call this API with NULL hWnd to prohibit notification.
  8493. //!
  8494. //! WHEN TO USE: Use after the stereo handle for device interface is created via successful call to appropriate
  8495. //! NvAPI_Stereo_CreateHandleFrom() function.
  8496. //!
  8497. //!
  8498. //! SUPPORTED OS: Windows Vista and higher
  8499. //!
  8500. //!
  8501. //! \since Release: 180
  8502. //!
  8503. //!
  8504. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  8505. //! \param [in] hWnd Window HWND that will be notified when the user changes the stereo driver state.
  8506. //! Actual HWND must be cast to an NvU64.
  8507. //! \param [in] messageID MessageID of the message that will be posted to hWnd
  8508. //!
  8509. //! \retval ::NVAPI_OK Notification set.
  8510. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8511. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8512. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8513. //! \retval ::NVAPI_ERROR
  8514. //!
  8515. //! \ingroup stereoapi
  8516. ///////////////////////////////////////////////////////////////////////////////
  8517. NVAPI_INTERFACE NvAPI_Stereo_SetNotificationMessage(StereoHandle hStereoHandle, NvU64 hWnd,NvU64 messageID);
  8518. ///////////////////////////////////////////////////////////////////////////////
  8519. //
  8520. // FUNCTION NAME: NvAPI_Stereo_SetActiveEye
  8521. //
  8522. //! \fn NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye);
  8523. //! DESCRIPTION: This API sets the back buffer to left or right in Direct stereo mode.
  8524. //!
  8525. //! HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate
  8526. //! NvAPI_Stereo_CreateHandleFrom function.
  8527. //!
  8528. //! \since Release: 285
  8529. //!
  8530. //! SUPPORTED OS: Windows Vista and higher
  8531. //!
  8532. //!
  8533. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8534. //! \param [in] StereoEye Defines active eye in Direct stereo mode
  8535. //!
  8536. //! \retval ::NVAPI_OK - Active eye is set.
  8537. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8538. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8539. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8540. //! \retval ::NVAPI_INVALID_ARGUMENT - StereoEye parameter has not allowed value.
  8541. //! \retval ::NVAPI_SET_NOT_ALLOWED - Current stereo mode is not Direct
  8542. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8543. //
  8544. ///////////////////////////////////////////////////////////////////////////////
  8545. //! \ingroup stereoapi
  8546. typedef enum _NV_StereoActiveEye
  8547. {
  8548. NVAPI_STEREO_EYE_RIGHT = 1,
  8549. NVAPI_STEREO_EYE_LEFT = 2,
  8550. NVAPI_STEREO_EYE_MONO = 3,
  8551. } NV_STEREO_ACTIVE_EYE;
  8552. //! \ingroup stereoapi
  8553. NVAPI_INTERFACE NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye);
  8554. ///////////////////////////////////////////////////////////////////////////////
  8555. //
  8556. // FUNCTION NAME: NvAPI_Stereo_SetDriverMode
  8557. //
  8558. //! \fn NvAPI_Stereo_SetDriverMode( NV_STEREO_DRIVER_MODE mode );
  8559. //! DESCRIPTION: This API sets the 3D stereo driver mode: Direct or Automatic
  8560. //!
  8561. //! HOW TO USE: This API must be called before the device is created.
  8562. //! Applies to DirectX 9 and higher.
  8563. //!
  8564. //! \since Release: 285
  8565. //!
  8566. //! SUPPORTED OS: Windows Vista and higher
  8567. //!
  8568. //!
  8569. //! \param [in] mode Defines the 3D stereo driver mode: Direct or Automatic
  8570. //!
  8571. //! \retval ::NVAPI_OK Active eye is set.
  8572. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  8573. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8574. //! \retval ::NVAPI_INVALID_ARGUMENT mode parameter has not allowed value.
  8575. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  8576. //
  8577. ///////////////////////////////////////////////////////////////////////////////
  8578. //! \ingroup stereoapi
  8579. typedef enum _NV_StereoDriverMode
  8580. {
  8581. NVAPI_STEREO_DRIVER_MODE_AUTOMATIC = 0,
  8582. NVAPI_STEREO_DRIVER_MODE_DIRECT = 2,
  8583. } NV_STEREO_DRIVER_MODE;
  8584. //! \ingroup stereoapi
  8585. NVAPI_INTERFACE NvAPI_Stereo_SetDriverMode( NV_STEREO_DRIVER_MODE mode );
  8586. ///////////////////////////////////////////////////////////////////////////////
  8587. //
  8588. // FUNCTION NAME: NvAPI_Stereo_GetEyeSeparation
  8589. //
  8590. //! DESCRIPTION: This API returns eye separation as a ratio of <between eye distance>/<physical screen width>.
  8591. //!
  8592. //! HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate API. Applies only to DirectX 9 and up.
  8593. //!
  8594. //! SUPPORTED OS: Windows Vista and higher
  8595. //!
  8596. //!
  8597. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8598. //! \param [out] pSeparation Eye separation.
  8599. //!
  8600. //! \retval ::NVAPI_OK Active eye is set.
  8601. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8602. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  8603. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8604. //! \retval ::NVAPI_ERROR (generic error).
  8605. //!
  8606. //! \ingroup stereoapi
  8607. ///////////////////////////////////////////////////////////////////////////////
  8608. NVAPI_INTERFACE NvAPI_Stereo_GetEyeSeparation(StereoHandle hStereoHandle, float *pSeparation );
  8609. ///////////////////////////////////////////////////////////////////////////////
  8610. //
  8611. // FUNCTION NAME: NvAPI_Stereo_SetSurfaceCreationMode
  8612. //
  8613. //! \function NvAPI_Stereo_SetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE creationMode)
  8614. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  8615. //! \param [in] creationMode New surface creation mode for this device interface.
  8616. //!
  8617. //! \since Release: 285
  8618. //!
  8619. //! SUPPORTED OS: Windows Vista and higher
  8620. //!
  8621. //!
  8622. //! DESCRIPTION: This API sets surface creation mode for this device interface.
  8623. //!
  8624. //! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
  8625. //!
  8626. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  8627. //! There are no return error codes with specific meaning for this API.
  8628. //!
  8629. ///////////////////////////////////////////////////////////////////////////////
  8630. //! \ingroup stereoapi
  8631. typedef enum _NVAPI_STEREO_SURFACECREATEMODE
  8632. {
  8633. NVAPI_STEREO_SURFACECREATEMODE_AUTO, //!< Use driver registry profile settings for surface creation mode.
  8634. NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO, //!< Always create stereo surfaces.
  8635. NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO //!< Always create mono surfaces.
  8636. } NVAPI_STEREO_SURFACECREATEMODE;
  8637. //! \ingroup stereoapi
  8638. NVAPI_INTERFACE NvAPI_Stereo_SetSurfaceCreationMode(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_SURFACECREATEMODE creationMode);
  8639. ///////////////////////////////////////////////////////////////////////////////
  8640. //
  8641. // FUNCTION NAME: NvAPI_Stereo_GetSurfaceCreationMode
  8642. //
  8643. //! \function NvAPI_Stereo_GetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE* pCreationMode)
  8644. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  8645. //! \param [out] pCreationMode The current creation mode for this device interface.
  8646. //!
  8647. //! \since Release: 295
  8648. //!
  8649. //! SUPPORTED OS: Windows Vista and higher
  8650. //!
  8651. //!
  8652. //! DESCRIPTION: This API gets surface creation mode for this device interface.
  8653. //!
  8654. //! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
  8655. //!
  8656. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  8657. //! There are no return error codes with specific meaning for this API.
  8658. //!
  8659. ///////////////////////////////////////////////////////////////////////////////
  8660. //! \ingroup stereoapi
  8661. NVAPI_INTERFACE NvAPI_Stereo_GetSurfaceCreationMode(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_SURFACECREATEMODE* pCreationMode);
  8662. //! \ingroup stereoapi
  8663. #define NVAPI_STEREO_QUADBUFFERED_API_VERSION 0x2
  8664. //! \ingroup stereoapi
  8665. typedef enum _NV_StereoSwapChainMode
  8666. {
  8667. NVAPI_STEREO_SWAPCHAIN_DEFAULT = 0,
  8668. NVAPI_STEREO_SWAPCHAIN_STEREO = 1,
  8669. NVAPI_STEREO_SWAPCHAIN_MONO = 2,
  8670. } NV_STEREO_SWAPCHAIN_MODE;
  8671. #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  8672. ///////////////////////////////////////////////////////////////////////////////
  8673. //
  8674. // FUNCTION NAME: NvAPI_D3D1x_CreateSwapChain
  8675. //
  8676. //! DESCRIPTION: This API allows the user to create a mono or a stereo swap chain.
  8677. //!
  8678. //! NOTE: NvAPI_D3D1x_CreateSwapChain is a wrapper of the method IDXGIFactory::CreateSwapChain which
  8679. //! additionally notifies the D3D driver of the mode in which stereo mode the swap chain is to be
  8680. //! created.
  8681. //!
  8682. //! \since Release: 285
  8683. //!
  8684. //! SUPPORTED OS: Windows 7 and higher
  8685. //!
  8686. //!
  8687. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  8688. //! A pointer to the device that will write 2D images to the swap chain.
  8689. //! \param [in] pDesc A pointer to the swap-chain description (DXGI_SWAP_CHAIN_DESC). This parameter cannot be NULL.
  8690. //! \param [out] ppSwapChain A pointer to the swap chain created.
  8691. //! \param [in] mode The stereo mode fot the swap chain.
  8692. //! NVAPI_STEREO_SWAPCHAIN_DEFAULT
  8693. //! NVAPI_STEREO_SWAPCHAIN_STEREO
  8694. //! NVAPI_STEREO_SWAPCHAIN_MONO
  8695. //!
  8696. //! \retval ::NVAPI_OK The swap chain was created successfully.
  8697. //! \retval ::NVAPI_ERROR The operation failed.
  8698. //!
  8699. //! \ingroup stereoapi
  8700. ///////////////////////////////////////////////////////////////////////////////
  8701. NVAPI_INTERFACE NvAPI_D3D1x_CreateSwapChain(StereoHandle hStereoHandle,
  8702. DXGI_SWAP_CHAIN_DESC* pDesc,
  8703. IDXGISwapChain** ppSwapChain,
  8704. NV_STEREO_SWAPCHAIN_MODE mode);
  8705. #endif //if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  8706. #if defined(_D3D9_H_)
  8707. ///////////////////////////////////////////////////////////////////////////////
  8708. //
  8709. // FUNCTION NAME: NvAPI_D3D9_CreateSwapChain
  8710. //
  8711. //! DESCRIPTION: This API allows the user to create a mono or a stereo swap chain.
  8712. //!
  8713. //! NOTE: NvAPI_D3D9_CreateSwapChain is a wrapper of the method IDirect3DDevice9::CreateAdditionalSwapChain which
  8714. //! additionally notifies the D3D driver if the swap chain creation mode must be stereo or mono.
  8715. //!
  8716. //!
  8717. //! \since Release: 285
  8718. //!
  8719. //! SUPPORTED OS: Windows 7 and higher
  8720. //!
  8721. //!
  8722. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  8723. //! \param [in, out] pPresentationParameters A pointer to the swap-chain description (DXGI). This parameter cannot be NULL.
  8724. //! \param [out] ppSwapChain A pointer to the swap chain created.
  8725. //! \param [in] mode The stereo mode for the swap chain.
  8726. //! NVAPI_STEREO_SWAPCHAIN_DEFAULT
  8727. //! NVAPI_STEREO_SWAPCHAIN_STEREO
  8728. //! NVAPI_STEREO_SWAPCHAIN_MONO
  8729. //!
  8730. //! \retval ::NVAPI_OK The swap chain creation was successful
  8731. //! \retval ::NVAPI_ERROR The operation failed.
  8732. //!
  8733. //!\ingroup stereoapi
  8734. ///////////////////////////////////////////////////////////////////////////////
  8735. NVAPI_INTERFACE NvAPI_D3D9_CreateSwapChain(StereoHandle hStereoHandle,
  8736. D3DPRESENT_PARAMETERS *pPresentationParameters,
  8737. IDirect3DSwapChain9 **ppSwapChain,
  8738. NV_STEREO_SWAPCHAIN_MODE mode);
  8739. #endif //if defined(_D3D9_H_)
  8740. ///////////////////////////////////////////////////////////////////////////////
  8741. //
  8742. // FUNCTION NAME: NvAPI_DRS_DestroySession
  8743. //
  8744. //! DESCRIPTION: This API frees the allocation: cleanup of NvDrsSession.
  8745. //!
  8746. //! SUPPORTED OS: Windows XP and higher
  8747. //!
  8748. //!
  8749. //! \param [in] hSession Input to the session handle.
  8750. //!
  8751. //! \retval ::NVAPI_OK SUCCESS
  8752. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8753. //
  8754. ///////////////////////////////////////////////////////////////////////////////
  8755. NVAPI_INTERFACE NvAPI_DRS_DestroySession(NvDRSSessionHandle hSession);
  8756. ///////////////////////////////////////////////////////////////////////////////
  8757. //
  8758. // FUNCTION NAME: NvAPI_DRS_LoadSettings
  8759. //
  8760. //! DESCRIPTION: This API loads and parses the settings data.
  8761. //!
  8762. //! SUPPORTED OS: Windows XP and higher
  8763. //!
  8764. //!
  8765. //! \param [in] hSession Input to the session handle.
  8766. //!
  8767. //! \retval ::NVAPI_OK SUCCESS
  8768. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8769. //
  8770. ///////////////////////////////////////////////////////////////////////////////
  8771. NVAPI_INTERFACE NvAPI_DRS_LoadSettings(NvDRSSessionHandle hSession);
  8772. ///////////////////////////////////////////////////////////////////////////////
  8773. //
  8774. // FUNCTION NAME: NvAPI_DRS_SaveSettings
  8775. //
  8776. //! DESCRIPTION: This API saves the settings data to the system.
  8777. //!
  8778. //! SUPPORTED OS: Windows XP and higher
  8779. //!
  8780. //!
  8781. //! \param [in] hSession Input to the session handle.
  8782. //!
  8783. //! \retval ::NVAPI_OK SUCCESS
  8784. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8785. //
  8786. ///////////////////////////////////////////////////////////////////////////////
  8787. NVAPI_INTERFACE NvAPI_DRS_SaveSettings(NvDRSSessionHandle hSession);
  8788. ///////////////////////////////////////////////////////////////////////////////
  8789. //
  8790. // FUNCTION NAME: NvAPI_DRS_LoadSettingsFromFile
  8791. //
  8792. //! DESCRIPTION: This API loads settings from the given file path.
  8793. //!
  8794. //! SUPPORTED OS: Windows XP and higher
  8795. //!
  8796. //!
  8797. //! \param [in] hSession Input to the session handle
  8798. //! \param [in] fileName Binary File Name/Path
  8799. //!
  8800. //! \retval ::NVAPI_OK SUCCESS
  8801. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8802. //
  8803. ///////////////////////////////////////////////////////////////////////////////
  8804. NVAPI_INTERFACE NvAPI_DRS_LoadSettingsFromFile(NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName);
  8805. ///////////////////////////////////////////////////////////////////////////////
  8806. //
  8807. // FUNCTION NAME: NvAPI_DRS_SaveSettingsToFile
  8808. //
  8809. //! DESCRIPTION: This API saves settings to the given file path.
  8810. //!
  8811. //! SUPPORTED OS: Windows XP and higher
  8812. //!
  8813. //!
  8814. //! \param [in] hSession Input to the session handle.
  8815. //! \param [in] fileName Binary File Name/Path
  8816. //!
  8817. //! \retval ::NVAPI_OK SUCCESS
  8818. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8819. //
  8820. ///////////////////////////////////////////////////////////////////////////////
  8821. NVAPI_INTERFACE NvAPI_DRS_SaveSettingsToFile(NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName);
  8822. //! @}
  8823. ///////////////////////////////////////////////////////////////////////////////
  8824. //
  8825. // FUNCTION NAME: NvAPI_DRS_CreateProfile
  8826. //
  8827. //! DESCRIPTION: This API creates an empty profile.
  8828. //!
  8829. //! SUPPORTED OS: Windows XP and higher
  8830. //!
  8831. //!
  8832. //! \param [in] hSession Input to the session handle.
  8833. //! \param [in] *pProfileInfo Input pointer to NVDRS_PROFILE.
  8834. //! \param [in] *phProfile Returns pointer to profile handle.
  8835. //!
  8836. //! \retval ::NVAPI_OK SUCCESS
  8837. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8838. //!
  8839. //! \ingroup drsapi
  8840. ///////////////////////////////////////////////////////////////////////////////
  8841. NVAPI_INTERFACE NvAPI_DRS_CreateProfile(NvDRSSessionHandle hSession, NVDRS_PROFILE *pProfileInfo, NvDRSProfileHandle *phProfile);
  8842. ///////////////////////////////////////////////////////////////////////////////
  8843. //
  8844. // FUNCTION NAME: NvAPI_DRS_DeleteProfile
  8845. //
  8846. //! DESCRIPTION: This API deletes a profile or sets it back to a predefined value.
  8847. //!
  8848. //! SUPPORTED OS: Windows XP and higher
  8849. //!
  8850. //!
  8851. //! \param [in] hSession Input to the session handle.
  8852. //! \param [in] hProfile Input profile handle.
  8853. //!
  8854. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  8855. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8856. //!
  8857. //! \ingroup drsapi
  8858. ///////////////////////////////////////////////////////////////////////////////
  8859. NVAPI_INTERFACE NvAPI_DRS_DeleteProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile);
  8860. ///////////////////////////////////////////////////////////////////////////////
  8861. //
  8862. // FUNCTION NAME: NvAPI_DRS_SetCurrentGlobalProfile
  8863. //
  8864. //! DESCRIPTION: This API sets the current global profile in the driver.
  8865. //!
  8866. //! SUPPORTED OS: Windows XP and higher
  8867. //!
  8868. //!
  8869. //! \param [in] hSession Input to the session handle.
  8870. //! \param [in] wszGlobalProfileName Input current Global profile name.
  8871. //!
  8872. //! \retval ::NVAPI_OK SUCCESS
  8873. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8874. //!
  8875. //! \ingroup drsapi
  8876. ///////////////////////////////////////////////////////////////////////////////
  8877. NVAPI_INTERFACE NvAPI_DRS_SetCurrentGlobalProfile(NvDRSSessionHandle hSession, NvAPI_UnicodeString wszGlobalProfileName);
  8878. ///////////////////////////////////////////////////////////////////////////////
  8879. //
  8880. // FUNCTION NAME: NvAPI_DRS_GetCurrentGlobalProfile
  8881. //
  8882. //! DESCRIPTION: This API returns the handle to the current global profile.
  8883. //!
  8884. //! SUPPORTED OS: Windows XP and higher
  8885. //!
  8886. //!
  8887. //! \param [in] hSession Input to the session handle.
  8888. //! \param [out] *phProfile Returns current Global profile handle.
  8889. //!
  8890. //! \retval ::NVAPI_OK SUCCESS
  8891. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8892. //!
  8893. //! \ingroup drsapi
  8894. ///////////////////////////////////////////////////////////////////////////////
  8895. NVAPI_INTERFACE NvAPI_DRS_GetCurrentGlobalProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile);
  8896. ///////////////////////////////////////////////////////////////////////////////
  8897. //
  8898. // FUNCTION NAME: NvAPI_DRS_GetProfileInfo
  8899. //
  8900. //! DESCRIPTION: This API gets information about the given profile. User needs to specify the name of the Profile.
  8901. //!
  8902. //! SUPPORTED OS: Windows XP and higher
  8903. //!
  8904. //!
  8905. //! \param [in] hSession Input to the session handle.
  8906. //! \param [in] hProfile Input profile handle.
  8907. //! \param [out] *pProfileInfo Return the profile info.
  8908. //!
  8909. //! \retval ::NVAPI_OK SUCCESS
  8910. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8911. //!
  8912. //! \ingroup drsapi
  8913. ///////////////////////////////////////////////////////////////////////////////
  8914. NVAPI_INTERFACE NvAPI_DRS_GetProfileInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo);
  8915. ///////////////////////////////////////////////////////////////////////////////
  8916. //
  8917. // FUNCTION NAME: NvAPI_DRS_SetProfileInfo
  8918. //
  8919. //! DESCRIPTION: Specifies flags for a given profile. Currently only the NVDRS_GPU_SUPPORT is
  8920. //! used to update the profile. Neither the name, number of settings or applications
  8921. //! or other profile information can be changed with this function.
  8922. //!
  8923. //! SUPPORTED OS: Windows XP and higher
  8924. //!
  8925. //!
  8926. //! \param [in] hSession Input to the session handle.
  8927. //! \param [in] hProfile Input profile handle.
  8928. //! \param [in] *pProfileInfo Input the new profile info.
  8929. //!
  8930. //! \retval ::NVAPI_OK SUCCESS
  8931. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8932. //!
  8933. //! \ingroup drsapi
  8934. ///////////////////////////////////////////////////////////////////////////////
  8935. NVAPI_INTERFACE NvAPI_DRS_SetProfileInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo);
  8936. ///////////////////////////////////////////////////////////////////////////////
  8937. //
  8938. // FUNCTION NAME: NvAPI_DRS_FindProfileByName
  8939. //
  8940. //! DESCRIPTION: This API finds a profile in the current session.
  8941. //!
  8942. //! SUPPORTED OS: Windows XP and higher
  8943. //!
  8944. //!
  8945. //! \param [in] hSession Input to the session handle.
  8946. //! \param [in] profileName Input profileName.
  8947. //! \param [out] phProfile Input profile handle.
  8948. //!
  8949. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  8950. //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found
  8951. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  8952. //!
  8953. //! \ingroup drsapi
  8954. ///////////////////////////////////////////////////////////////////////////////
  8955. NVAPI_INTERFACE NvAPI_DRS_FindProfileByName(NvDRSSessionHandle hSession, NvAPI_UnicodeString profileName, NvDRSProfileHandle* phProfile);
  8956. ///////////////////////////////////////////////////////////////////////////////
  8957. //
  8958. // FUNCTION NAME: NvAPI_DRS_EnumProfiles
  8959. //
  8960. //! DESCRIPTION: This API enumerates through all the profiles in the session.
  8961. //!
  8962. //! SUPPORTED OS: Windows XP and higher
  8963. //!
  8964. //!
  8965. //! \param [in] hSession Input to the session handle.
  8966. //! \param [in] index Input the index for enumeration.
  8967. //! \param [out] *phProfile Returns profile handle.
  8968. //!
  8969. //! RETURN STATUS: NVAPI_OK: SUCCESS if the profile is found
  8970. //! NVAPI_ERROR: For miscellaneous errors.
  8971. //! NVAPI_END_ENUMERATION: index exceeds the total number of available Profiles in DB.
  8972. //!
  8973. //! \ingroup drsapi
  8974. ///////////////////////////////////////////////////////////////////////////////
  8975. NVAPI_INTERFACE NvAPI_DRS_EnumProfiles(NvDRSSessionHandle hSession, NvU32 index, NvDRSProfileHandle *phProfile);
  8976. ///////////////////////////////////////////////////////////////////////////////
  8977. //
  8978. // FUNCTION NAME: NvAPI_DRS_GetNumProfiles
  8979. //
  8980. //! DESCRIPTION: This API obtains the number of profiles in the current session object.
  8981. //!
  8982. //! SUPPORTED OS: Windows XP and higher
  8983. //!
  8984. //!
  8985. //! \param [in] hSession Input to the session handle.
  8986. //! \param out] *numProfiles Returns count of profiles in the current hSession.
  8987. //!
  8988. //! \retval ::NVAPI_OK SUCCESS
  8989. //! \retval ::NVAPI_API_NOT_INTIALIZED Failed to initialize.
  8990. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid Arguments.
  8991. //!
  8992. //! \ingroup drsapi
  8993. ///////////////////////////////////////////////////////////////////////////////
  8994. NVAPI_INTERFACE NvAPI_DRS_GetNumProfiles(NvDRSSessionHandle hSession, NvU32 *numProfiles);
  8995. ///////////////////////////////////////////////////////////////////////////////
  8996. //
  8997. // FUNCTION NAME: NvAPI_DRS_CreateApplication
  8998. //
  8999. //! DESCRIPTION: This API adds an executable name to a profile.
  9000. //!
  9001. //! SUPPORTED OS: Windows XP and higher
  9002. //!
  9003. //!
  9004. //! \param [in] hSession Input to the session handle.
  9005. //! \param [in] hProfile Input profile handle.
  9006. //! \param [in] *pApplication Input NVDRS_APPLICATION struct with the executable name to be added.
  9007. //!
  9008. //! \retval ::NVAPI_OK SUCCESS
  9009. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9010. //!
  9011. //! \ingroup drsapi
  9012. ///////////////////////////////////////////////////////////////////////////////
  9013. NVAPI_INTERFACE NvAPI_DRS_CreateApplication(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApplication);
  9014. ///////////////////////////////////////////////////////////////////////////////
  9015. //
  9016. // FUNCTION NAME: NvAPI_DRS_DeleteApplicationEx
  9017. //
  9018. //! DESCRIPTION: This API removes an executable from a profile.
  9019. //!
  9020. //! SUPPORTED OS: Windows XP and higher
  9021. //!
  9022. //!
  9023. //! \param [in] hSession - Input to the session handle.
  9024. //! \param [in] hProfile - Input profile handle.
  9025. //! \param [in] *pApp - Input all the information about the application to be removed.
  9026. //!
  9027. //! \retval ::NVAPI_OK SUCCESS
  9028. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9029. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the path provided could refer to two different executables,
  9030. //! this error will be returned.
  9031. //!
  9032. //! \ingroup drsapi
  9033. ///////////////////////////////////////////////////////////////////////////////
  9034. NVAPI_INTERFACE NvAPI_DRS_DeleteApplicationEx(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApp);
  9035. ///////////////////////////////////////////////////////////////////////////////
  9036. //
  9037. // FUNCTION NAME: NvAPI_DRS_DeleteApplication
  9038. //
  9039. //! DESCRIPTION: This API removes an executable name from a profile.
  9040. //!
  9041. //! SUPPORTED OS: Windows XP and higher
  9042. //!
  9043. //!
  9044. //! \param [in] hSessionPARAMETERS Input to the session handle.
  9045. //! \param [in] hProfile Input profile handle.
  9046. //! \param [in] appName Input the executable name to be removed.
  9047. //!
  9048. //! \retval ::NVAPI_OK SUCCESS
  9049. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9050. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the path provided could refer to two different executables,
  9051. //! this error will be returned
  9052. //!
  9053. //! \ingroup drsapi
  9054. ///////////////////////////////////////////////////////////////////////////////
  9055. NVAPI_INTERFACE NvAPI_DRS_DeleteApplication(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName);
  9056. ///////////////////////////////////////////////////////////////////////////////
  9057. //
  9058. // FUNCTION NAME: NvAPI_DRS_GetApplicationInfo
  9059. //
  9060. //! DESCRIPTION: This API gets information about the given application. The input application name
  9061. //! must match exactly what the Profile has stored for the application.
  9062. //! This function is better used to retrieve application information from a previous
  9063. //! enumeration.
  9064. //!
  9065. //! SUPPORTED OS: Windows XP and higher
  9066. //!
  9067. //!
  9068. //! \param [in] hSession Input to the session handle.
  9069. //! \param [in] hProfile Input profile handle.
  9070. //! \param [in] appName Input application name.
  9071. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct with all the attributes.
  9072. //!
  9073. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  9074. //! If there are return error codes with specific meaning for this API,
  9075. //! they are listed below.
  9076. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS The application name could not
  9077. // single out only one executable.
  9078. //! \retval ::NVAPI_EXECUTABLE_NOT_FOUND No application with that name is found on the profile.
  9079. //!
  9080. //! \ingroup drsapi
  9081. ///////////////////////////////////////////////////////////////////////////////
  9082. NVAPI_INTERFACE NvAPI_DRS_GetApplicationInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName, NVDRS_APPLICATION *pApplication);
  9083. ///////////////////////////////////////////////////////////////////////////////
  9084. //
  9085. // FUNCTION NAME: NvAPI_DRS_EnumApplications
  9086. //
  9087. //! DESCRIPTION: This API enumerates all the applications in a given profile from the starting index to the maximum length.
  9088. //!
  9089. //! SUPPORTED OS: Windows XP and higher
  9090. //!
  9091. //!
  9092. //! \param [in] hSession Input to the session handle.
  9093. //! \param [in] hProfile Input profile handle.
  9094. //! \param [in] startIndex Indicates starting index for enumeration.
  9095. //! \param [in,out] *appCount Input maximum length of the passed in arrays. Returns the actual length.
  9096. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct with all the attributes.
  9097. //!
  9098. //! \retval ::NVAPI_OK SUCCESS
  9099. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9100. //! \retval ::NVAPI_END_ENUMERATION startIndex exceeds the total appCount.
  9101. //!
  9102. //! \ingroup drsapi
  9103. ///////////////////////////////////////////////////////////////////////////////
  9104. NVAPI_INTERFACE NvAPI_DRS_EnumApplications(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *appCount, NVDRS_APPLICATION *pApplication);
  9105. ///////////////////////////////////////////////////////////////////////////////
  9106. //
  9107. // FUNCTION NAME: NvAPI_DRS_FindApplicationByName
  9108. //
  9109. //! DESCRIPTION: This API searches the application and the associated profile for the given application name.
  9110. //! If a fully qualified path is provided, this function will always return the profile
  9111. //! the driver will apply upon running the application (on the path provided).
  9112. //!
  9113. //! SUPPORTED OS: Windows XP and higher
  9114. //!
  9115. //!
  9116. //! \param [in] hSession Input to the hSession handle
  9117. //! \param [in] appName Input appName. For best results, provide a fully qualified path of the type
  9118. //! c:/Folder1/Folder2/App.exe
  9119. //! \param [out] *phProfile Returns profile handle.
  9120. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct pointer.
  9121. //!
  9122. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  9123. //! If there are return error codes with specific meaning for this API,
  9124. //! they are listed below:
  9125. //! \retval ::NVAPI_APPLICATION_NOT_FOUND If App not found
  9126. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the input appName was not fully qualified, this error might return in the case of multiple matches
  9127. //!
  9128. //! \ingroup drsapi
  9129. ///////////////////////////////////////////////////////////////////////////////
  9130. NVAPI_INTERFACE NvAPI_DRS_FindApplicationByName(NvDRSSessionHandle hSession, NvAPI_UnicodeString appName, NvDRSProfileHandle *phProfile, NVDRS_APPLICATION *pApplication);
  9131. ///////////////////////////////////////////////////////////////////////////////
  9132. //
  9133. // FUNCTION NAME: NvAPI_DRS_SetSetting
  9134. //
  9135. //! DESCRIPTION: This API adds/modifies a setting to a profile.
  9136. //!
  9137. //! SUPPORTED OS: Windows XP and higher
  9138. //!
  9139. //!
  9140. //! \param [in] hSession Input to the session handle.
  9141. //! \param [in] hProfile Input profile handle.
  9142. //! \param [in] *pSetting Input NVDRS_SETTING struct pointer.
  9143. //!
  9144. //! \retval ::NVAPI_OK SUCCESS
  9145. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9146. //!
  9147. //! \ingroup drsapi
  9148. ///////////////////////////////////////////////////////////////////////////////
  9149. NVAPI_INTERFACE NvAPI_DRS_SetSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_SETTING *pSetting);
  9150. ///////////////////////////////////////////////////////////////////////////////
  9151. //
  9152. // FUNCTION NAME: NvAPI_DRS_GetSetting
  9153. //
  9154. //! DESCRIPTION: This API gets information about the given setting.
  9155. //!
  9156. //! SUPPORTED OS: Windows XP and higher
  9157. //!
  9158. //!
  9159. //! \param [in] hSession Input to the session handle.
  9160. //! \param [in] hProfile Input profile handle.
  9161. //! \param [in] settingId Input settingId.
  9162. //! \param [out] *pSetting Returns all the setting info
  9163. //!
  9164. //! \retval ::NVAPI_OK SUCCESS
  9165. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9166. //!
  9167. //! \ingroup drsapi
  9168. ///////////////////////////////////////////////////////////////////////////////
  9169. NVAPI_INTERFACE NvAPI_DRS_GetSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId, NVDRS_SETTING *pSetting);
  9170. ///////////////////////////////////////////////////////////////////////////////
  9171. //
  9172. // FUNCTION NAME: NvAPI_DRS_EnumSettings
  9173. //
  9174. //! DESCRIPTION: This API enumerates all the settings of a given profile from startIndex to the maximum length.
  9175. //!
  9176. //! SUPPORTED OS: Windows XP and higher
  9177. //!
  9178. //!
  9179. //! \param [in] hSession Input to the session handle.
  9180. //! \param [in] hProfile Input profile handle.
  9181. //! \param [in] startIndex Indicates starting index for enumeration.
  9182. //! \param [in,out] *settingsCount Input max length of the passed in arrays, Returns the actual length.
  9183. //! \param [out] *pSetting Returns all the settings info.
  9184. //!
  9185. //! \retval ::NVAPI_OK SUCCESS
  9186. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9187. //! \retval ::NVAPI_END_ENUMERATION startIndex exceeds the total appCount.
  9188. //!
  9189. //! \ingroup drsapi
  9190. ///////////////////////////////////////////////////////////////////////////////
  9191. NVAPI_INTERFACE NvAPI_DRS_EnumSettings(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *settingsCount, NVDRS_SETTING *pSetting);
  9192. ///////////////////////////////////////////////////////////////////////////////
  9193. //
  9194. // FUNCTION NAME: NvAPI_DRS_EnumAvaliableSettingIds
  9195. //
  9196. //! DESCRIPTION: This API enumerates all the Ids of all the settings recognized by NVAPI.
  9197. //!
  9198. //! SUPPORTED OS: Windows XP and higher
  9199. //!
  9200. //!
  9201. //! \param [out] pSettingIds User-provided array of length *pMaxCount that NVAPI will fill with IDs.
  9202. //! \param [in,out] pMaxCount Input max length of the passed in array, Returns the actual length.
  9203. //!
  9204. //! \retval ::NVAPI_OK SUCCESS
  9205. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9206. //! NVAPI_END_ENUMERATION: the provided pMaxCount is not enough to hold all settingIds.
  9207. //!
  9208. //! \ingroup drsapi
  9209. ///////////////////////////////////////////////////////////////////////////////
  9210. NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingIds(NvU32 *pSettingIds, NvU32 *pMaxCount);
  9211. ///////////////////////////////////////////////////////////////////////////////
  9212. //
  9213. // FUNCTION NAME: NvAPI_DRS_EnumAvailableSettingValues
  9214. //
  9215. //! DESCRIPTION: This API enumerates all available setting values for a given setting.
  9216. //!
  9217. //! SUPPORTED OS: Windows XP and higher
  9218. //!
  9219. //!
  9220. //! \param [in] settingId Input settingId.
  9221. //! \param [in,out] maxNumCount Input max length of the passed in arrays, Returns the actual length.
  9222. //! \param [out] *pSettingValues Returns all available setting values and its count.
  9223. //!
  9224. //! \retval ::NVAPI_OK SUCCESS
  9225. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9226. //!
  9227. //! \ingroup drsapi
  9228. ///////////////////////////////////////////////////////////////////////////////
  9229. NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingValues(NvU32 settingId, NvU32 *pMaxNumValues, NVDRS_SETTING_VALUES *pSettingValues);
  9230. ///////////////////////////////////////////////////////////////////////////////
  9231. //
  9232. // FUNCTION NAME: NvAPI_DRS_GetSettingIdFromName
  9233. //
  9234. //! DESCRIPTION: This API gets the binary ID of a setting given the setting name.
  9235. //!
  9236. //! SUPPORTED OS: Windows XP and higher
  9237. //!
  9238. //!
  9239. //! \param [in] settingName Input Unicode settingName.
  9240. //! \param [out] *pSettingId Returns corresponding settingId.
  9241. //!
  9242. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9243. //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found
  9244. //! \retval ::NVAPI_SETTING_NOT_FOUND if setting is not found
  9245. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9246. //!
  9247. //! \ingroup drsapi
  9248. ///////////////////////////////////////////////////////////////////////////////
  9249. NVAPI_INTERFACE NvAPI_DRS_GetSettingIdFromName(NvAPI_UnicodeString settingName, NvU32 *pSettingId);
  9250. ///////////////////////////////////////////////////////////////////////////////
  9251. //
  9252. // FUNCTION NAME: NvAPI_DRS_GetSettingNameFromId
  9253. //
  9254. //! DESCRIPTION: This API gets the setting name given the binary ID.
  9255. //!
  9256. //! SUPPORTED OS: Windows XP and higher
  9257. //!
  9258. //!
  9259. //! \param [in] settingId Input settingId.
  9260. //! \param [in] *pSettingName Returns corresponding Unicode settingName.
  9261. //!
  9262. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9263. //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found
  9264. //! \retval ::NVAPI_SETTING_NOT_FOUND if setting is not found
  9265. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9266. //!
  9267. //! \ingroup drsapi
  9268. ///////////////////////////////////////////////////////////////////////////////
  9269. NVAPI_INTERFACE NvAPI_DRS_GetSettingNameFromId(NvU32 settingId, NvAPI_UnicodeString *pSettingName);
  9270. ///////////////////////////////////////////////////////////////////////////////
  9271. //
  9272. // FUNCTION NAME: NvAPI_DRS_DeleteProfileSetting
  9273. //
  9274. //! DESCRIPTION: This API deletes a setting or sets it back to predefined value.
  9275. //!
  9276. //! SUPPORTED OS: Windows XP and higher
  9277. //!
  9278. //!
  9279. //! \param [in] hSession Input to the session handle.
  9280. //! \param [in] hProfile Input profile handle.
  9281. //! \param [in] settingId Input settingId to be deleted.
  9282. //!
  9283. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9284. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9285. //!
  9286. //! \ingroup drsapi
  9287. ///////////////////////////////////////////////////////////////////////////////
  9288. NVAPI_INTERFACE NvAPI_DRS_DeleteProfileSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId);
  9289. ///////////////////////////////////////////////////////////////////////////////
  9290. //
  9291. // FUNCTION NAME: NvAPI_DRS_RestoreAllDefaults
  9292. //
  9293. //! DESCRIPTION: This API restores the whole system to predefined(default) values.
  9294. //!
  9295. //! SUPPORTED OS: Windows XP and higher
  9296. //!
  9297. //!
  9298. //! \param [in] hSession Input to the session handle.
  9299. //!
  9300. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9301. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9302. //!
  9303. //! \ingroup drsapi
  9304. ///////////////////////////////////////////////////////////////////////////////
  9305. NVAPI_INTERFACE NvAPI_DRS_RestoreAllDefaults(NvDRSSessionHandle hSession);
  9306. ///////////////////////////////////////////////////////////////////////////////
  9307. //
  9308. // FUNCTION NAME: NvAPI_DRS_RestoreProfileDefault
  9309. //
  9310. //! DESCRIPTION: This API restores the given profile to predefined(default) values.
  9311. //! Any and all user specified modifications will be removed.
  9312. //! If the whole profile was set by the user, the profile will be removed.
  9313. //!
  9314. //! SUPPORTED OS: Windows XP and higher
  9315. //!
  9316. //!
  9317. //! \param [in] hSession Input to the session handle.
  9318. //! \param [in] hProfile Input profile handle.
  9319. //!
  9320. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9321. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9322. //! \retval ::NVAPI_PROFILE_REMOVED SUCCESS, and the hProfile is no longer valid.
  9323. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9324. //!
  9325. //! \ingroup drsapi
  9326. ///////////////////////////////////////////////////////////////////////////////
  9327. NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefault(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile);
  9328. ///////////////////////////////////////////////////////////////////////////////
  9329. //
  9330. // FUNCTION NAME: NvAPI_DRS_RestoreProfileDefaultSetting
  9331. //
  9332. //! DESCRIPTION: This API restores the given profile setting to predefined(default) values.
  9333. //!
  9334. //! SUPPORTED OS: Windows XP and higher
  9335. //!
  9336. //!
  9337. //! \param [in] hSession Input to the session handle.
  9338. //! \param [in] hProfile Input profile handle.
  9339. //! \param [in] settingId Input settingId.
  9340. //!
  9341. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9342. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9343. //!
  9344. //! \ingroup drsapi
  9345. ///////////////////////////////////////////////////////////////////////////////
  9346. NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefaultSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId);
  9347. ///////////////////////////////////////////////////////////////////////////////
  9348. //
  9349. // FUNCTION NAME: NvAPI_DRS_GetBaseProfile
  9350. //
  9351. //! DESCRIPTION: Returns the handle to the current global profile.
  9352. //!
  9353. //! SUPPORTED OS: Windows XP and higher
  9354. //!
  9355. //!
  9356. //! \param [in] hSession Input to the session handle.
  9357. //! \param [in] *phProfile Returns Base profile handle.
  9358. //!
  9359. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9360. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9361. //!
  9362. //! \ingroup drsapi
  9363. ///////////////////////////////////////////////////////////////////////////////
  9364. NVAPI_INTERFACE NvAPI_DRS_GetBaseProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile);
  9365. //! \addtogroup sysgeneral
  9366. //! @{
  9367. typedef struct
  9368. {
  9369. NvU32 version; //!< structure version
  9370. NvU32 vendorId; //!< Chipset vendor identification
  9371. NvU32 deviceId; //!< Chipset device identification
  9372. NvAPI_ShortString szVendorName; //!< Chipset vendor Name
  9373. NvAPI_ShortString szChipsetName; //!< Chipset device Name
  9374. NvU32 flags; //!< Chipset info flags - obsolete
  9375. NvU32 subSysVendorId; //!< Chipset subsystem vendor identification
  9376. NvU32 subSysDeviceId; //!< Chipset subsystem device identification
  9377. NvAPI_ShortString szSubSysVendorName; //!< subsystem vendor Name
  9378. NvU32 HBvendorId; //!< Host bridge vendor identification
  9379. NvU32 HBdeviceId; //!< Host bridge device identification
  9380. NvU32 HBsubSysVendorId; //!< Host bridge subsystem vendor identification
  9381. NvU32 HBsubSysDeviceId; //!< Host bridge subsystem device identification
  9382. } NV_CHIPSET_INFO_v4;
  9383. typedef struct
  9384. {
  9385. NvU32 version; //!< structure version
  9386. NvU32 vendorId; //!< vendor ID
  9387. NvU32 deviceId; //!< device ID
  9388. NvAPI_ShortString szVendorName; //!< vendor Name
  9389. NvAPI_ShortString szChipsetName; //!< device Name
  9390. NvU32 flags; //!< Chipset info flags - obsolete
  9391. NvU32 subSysVendorId; //!< subsystem vendor ID
  9392. NvU32 subSysDeviceId; //!< subsystem device ID
  9393. NvAPI_ShortString szSubSysVendorName; //!< subsystem vendor Name
  9394. } NV_CHIPSET_INFO_v3;
  9395. typedef enum
  9396. {
  9397. NV_CHIPSET_INFO_HYBRID = 0x00000001,
  9398. } NV_CHIPSET_INFO_FLAGS;
  9399. typedef struct
  9400. {
  9401. NvU32 version; //!< structure version
  9402. NvU32 vendorId; //!< vendor ID
  9403. NvU32 deviceId; //!< device ID
  9404. NvAPI_ShortString szVendorName; //!< vendor Name
  9405. NvAPI_ShortString szChipsetName; //!< device Name
  9406. NvU32 flags; //!< Chipset info flags
  9407. } NV_CHIPSET_INFO_v2;
  9408. typedef struct
  9409. {
  9410. NvU32 version; //structure version
  9411. NvU32 vendorId; //vendor ID
  9412. NvU32 deviceId; //device ID
  9413. NvAPI_ShortString szVendorName; //vendor Name
  9414. NvAPI_ShortString szChipsetName; //device Name
  9415. } NV_CHIPSET_INFO_v1;
  9416. #define NV_CHIPSET_INFO_VER_1 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v1,1)
  9417. #define NV_CHIPSET_INFO_VER_2 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v2,2)
  9418. #define NV_CHIPSET_INFO_VER_3 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v3,3)
  9419. #define NV_CHIPSET_INFO_VER_4 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v4,4)
  9420. #define NV_CHIPSET_INFO NV_CHIPSET_INFO_v4
  9421. #define NV_CHIPSET_INFO_VER NV_CHIPSET_INFO_VER_4
  9422. //! @}
  9423. ///////////////////////////////////////////////////////////////////////////////
  9424. //
  9425. // FUNCTION NAME: NvAPI_SYS_GetChipSetInfo
  9426. //
  9427. //! This function returns information about the system's chipset.
  9428. //!
  9429. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  9430. //!
  9431. //!
  9432. //! \since Release: 95
  9433. //!
  9434. //! \retval NVAPI_INVALID_ARGUMENT pChipSetInfo is NULL.
  9435. //! \retval NVAPI_OK *pChipSetInfo is now set.
  9436. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_CHIPSET_INFO version not compatible with driver.
  9437. //! \ingroup sysgeneral
  9438. ///////////////////////////////////////////////////////////////////////////////
  9439. NVAPI_INTERFACE NvAPI_SYS_GetChipSetInfo(NV_CHIPSET_INFO *pChipSetInfo);
  9440. //! \ingroup sysgeneral
  9441. //! Lid and dock information - used in NvAPI_GetLidDockInfo()
  9442. typedef struct
  9443. {
  9444. NvU32 version; //! Structure version, constructed from the macro #NV_LID_DOCK_PARAMS_VER
  9445. NvU32 currentLidState;
  9446. NvU32 currentDockState;
  9447. NvU32 currentLidPolicy;
  9448. NvU32 currentDockPolicy;
  9449. NvU32 forcedLidMechanismPresent;
  9450. NvU32 forcedDockMechanismPresent;
  9451. }NV_LID_DOCK_PARAMS;
  9452. //! ingroup sysgeneral
  9453. #define NV_LID_DOCK_PARAMS_VER MAKE_NVAPI_VERSION(NV_LID_DOCK_PARAMS,1)
  9454. ///////////////////////////////////////////////////////////////////////////////
  9455. //
  9456. // FUNCTION NAME: NvAPI_GetLidDockInfo
  9457. //
  9458. //! DESCRIPTION: This function returns the current lid and dock information.
  9459. //!
  9460. //! SUPPORTED OS: Windows XP and higher
  9461. //!
  9462. //!
  9463. //! \since Release: 177
  9464. //!
  9465. //! \retval ::NVAPI_OK
  9466. //! \retval ::NVAPI_ERROR
  9467. //! \retval ::NVAPI_NOT_SUPPORTED
  9468. //! \retval ::NVAPI_HANDLE_INVALIDATED
  9469. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9470. //!
  9471. //! \ingroup sysgeneral
  9472. ///////////////////////////////////////////////////////////////////////////////
  9473. NVAPI_INTERFACE NvAPI_SYS_GetLidAndDockInfo(NV_LID_DOCK_PARAMS *pLidAndDock);
  9474. ///////////////////////////////////////////////////////////////////////////////
  9475. // FUNCTION NAME: NvAPI_SYS_GetDisplayIdFromGpuAndOutputId
  9476. //
  9477. //! DESCRIPTION: This API converts a Physical GPU handle and output ID to a
  9478. //! display ID.
  9479. //!
  9480. //! SUPPORTED OS: Windows XP and higher
  9481. //!
  9482. //!
  9483. //! \param [in] hPhysicalGpu Handle to the physical GPU
  9484. //! \param [in] outputId Connected display output ID on the
  9485. //! target GPU - must only have one bit set
  9486. //! \param [out] displayId Pointer to an NvU32 which contains
  9487. //! the display ID
  9488. //!
  9489. //! \retval ::NVAPI_OK - completed request
  9490. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
  9491. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  9492. //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter.
  9493. //!
  9494. //! \ingroup sysgeneral
  9495. ///////////////////////////////////////////////////////////////////////////////
  9496. NVAPI_INTERFACE NvAPI_SYS_GetDisplayIdFromGpuAndOutputId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NvU32* displayId);
  9497. ///////////////////////////////////////////////////////////////////////////////
  9498. // FUNCTION NAME: NvAPI_SYS_GetGpuAndOutputIdFromDisplayId
  9499. //
  9500. //! DESCRIPTION: This API converts a display ID to a Physical GPU handle and output ID.
  9501. //!
  9502. //! SUPPORTED OS: Windows XP and higher
  9503. //!
  9504. //!
  9505. //! \param [in] displayId Display ID of display to retrieve
  9506. //! GPU and outputId for
  9507. //! \param [out] hPhysicalGpu Handle to the physical GPU
  9508. //! \param [out] outputId ) Connected display output ID on the
  9509. //! target GPU will only have one bit set.
  9510. //!
  9511. //! \retval ::NVAPI_OK
  9512. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9513. //! \retval ::NVAPI_ID_OUT_OF_RANGE The DisplayId corresponds to a
  9514. //! display which is not within the
  9515. //! normal outputId range.
  9516. //! \retval ::NVAPI_ERROR
  9517. //! \retval ::NVAPI_INVALID_ARGUMENT
  9518. //!
  9519. //! \ingroup sysgeneral
  9520. ///////////////////////////////////////////////////////////////////////////////
  9521. NVAPI_INTERFACE NvAPI_SYS_GetGpuAndOutputIdFromDisplayId(NvU32 displayId, NvPhysicalGpuHandle *hPhysicalGpu, NvU32 *outputId);
  9522. #if (((defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) && (_MSC_VER <= 1399) && !defined(NVAPI_INTERNAL)) || defined(NVAPI_DEPRECATED_OLD))
  9523. #pragma deprecated( NvAPI_SetView, NvAPI_SetViewEx, NvAPI_GetDisplayDriverVersion, NvAPI_GPU_GetAllOutputs, NvAPI_GPU_GetConnectedOutputs, NvAPI_GPU_GetConnectedSLIOutputs, NvAPI_GPU_GetConnectedOutputsWithLidState, NvAPI_GPU_GetConnectedSLIOutputsWithLidState, NvAPI_GPU_GetPstatesInfoEx, NvAPI_GetView, NvAPI_GetViewEx, NvAPI_VIO_SetCSC, NvAPI_VIO_GetCSC, NvAPI_VIO_SetGamma, NvAPI_VIO_GetGamma, NvAPI_VIO_SetSyncDelay, NvAPI_VIO_GetSyncDelay )
  9524. #endif
  9525. #ifndef __NVAPI_EMPTY_SAL
  9526. #ifdef __nvapi_undef__ecount
  9527. #undef __ecount
  9528. #undef __nvapi_undef__ecount
  9529. #endif
  9530. #ifdef __nvapi_undef__bcount
  9531. #undef __bcount
  9532. #undef __nvapi_undef__bcount
  9533. #endif
  9534. #ifdef __nvapi_undef__in
  9535. #undef __in
  9536. #undef __nvapi_undef__in
  9537. #endif
  9538. #ifdef __nvapi_undef__in_ecount
  9539. #undef __in_ecount
  9540. #undef __nvapi_undef__in_ecount
  9541. #endif
  9542. #ifdef __nvapi_undef__in_bcount
  9543. #undef __in_bcount
  9544. #undef __nvapi_undef__in_bcount
  9545. #endif
  9546. #ifdef __nvapi_undef__in_z
  9547. #undef __in_z
  9548. #undef __nvapi_undef__in_z
  9549. #endif
  9550. #ifdef __nvapi_undef__in_ecount_z
  9551. #undef __in_ecount_z
  9552. #undef __nvapi_undef__in_ecount_z
  9553. #endif
  9554. #ifdef __nvapi_undef__in_bcount_z
  9555. #undef __in_bcount_z
  9556. #undef __nvapi_undef__in_bcount_z
  9557. #endif
  9558. #ifdef __nvapi_undef__in_nz
  9559. #undef __in_nz
  9560. #undef __nvapi_undef__in_nz
  9561. #endif
  9562. #ifdef __nvapi_undef__in_ecount_nz
  9563. #undef __in_ecount_nz
  9564. #undef __nvapi_undef__in_ecount_nz
  9565. #endif
  9566. #ifdef __nvapi_undef__in_bcount_nz
  9567. #undef __in_bcount_nz
  9568. #undef __nvapi_undef__in_bcount_nz
  9569. #endif
  9570. #ifdef __nvapi_undef__out
  9571. #undef __out
  9572. #undef __nvapi_undef__out
  9573. #endif
  9574. #ifdef __nvapi_undef__out_ecount
  9575. #undef __out_ecount
  9576. #undef __nvapi_undef__out_ecount
  9577. #endif
  9578. #ifdef __nvapi_undef__out_bcount
  9579. #undef __out_bcount
  9580. #undef __nvapi_undef__out_bcount
  9581. #endif
  9582. #ifdef __nvapi_undef__out_ecount_part
  9583. #undef __out_ecount_part
  9584. #undef __nvapi_undef__out_ecount_part
  9585. #endif
  9586. #ifdef __nvapi_undef__out_bcount_part
  9587. #undef __out_bcount_part
  9588. #undef __nvapi_undef__out_bcount_part
  9589. #endif
  9590. #ifdef __nvapi_undef__out_ecount_full
  9591. #undef __out_ecount_full
  9592. #undef __nvapi_undef__out_ecount_full
  9593. #endif
  9594. #ifdef __nvapi_undef__out_bcount_full
  9595. #undef __out_bcount_full
  9596. #undef __nvapi_undef__out_bcount_full
  9597. #endif
  9598. #ifdef __nvapi_undef__out_z
  9599. #undef __out_z
  9600. #undef __nvapi_undef__out_z
  9601. #endif
  9602. #ifdef __nvapi_undef__out_z_opt
  9603. #undef __out_z_opt
  9604. #undef __nvapi_undef__out_z_opt
  9605. #endif
  9606. #ifdef __nvapi_undef__out_ecount_z
  9607. #undef __out_ecount_z
  9608. #undef __nvapi_undef__out_ecount_z
  9609. #endif
  9610. #ifdef __nvapi_undef__out_bcount_z
  9611. #undef __out_bcount_z
  9612. #undef __nvapi_undef__out_bcount_z
  9613. #endif
  9614. #ifdef __nvapi_undef__out_ecount_part_z
  9615. #undef __out_ecount_part_z
  9616. #undef __nvapi_undef__out_ecount_part_z
  9617. #endif
  9618. #ifdef __nvapi_undef__out_bcount_part_z
  9619. #undef __out_bcount_part_z
  9620. #undef __nvapi_undef__out_bcount_part_z
  9621. #endif
  9622. #ifdef __nvapi_undef__out_ecount_full_z
  9623. #undef __out_ecount_full_z
  9624. #undef __nvapi_undef__out_ecount_full_z
  9625. #endif
  9626. #ifdef __nvapi_undef__out_bcount_full_z
  9627. #undef __out_bcount_full_z
  9628. #undef __nvapi_undef__out_bcount_full_z
  9629. #endif
  9630. #ifdef __nvapi_undef__out_nz
  9631. #undef __out_nz
  9632. #undef __nvapi_undef__out_nz
  9633. #endif
  9634. #ifdef __nvapi_undef__out_nz_opt
  9635. #undef __out_nz_opt
  9636. #undef __nvapi_undef__out_nz_opt
  9637. #endif
  9638. #ifdef __nvapi_undef__out_ecount_nz
  9639. #undef __out_ecount_nz
  9640. #undef __nvapi_undef__out_ecount_nz
  9641. #endif
  9642. #ifdef __nvapi_undef__out_bcount_nz
  9643. #undef __out_bcount_nz
  9644. #undef __nvapi_undef__out_bcount_nz
  9645. #endif
  9646. #ifdef __nvapi_undef__inout
  9647. #undef __inout
  9648. #undef __nvapi_undef__inout
  9649. #endif
  9650. #ifdef __nvapi_undef__inout_ecount
  9651. #undef __inout_ecount
  9652. #undef __nvapi_undef__inout_ecount
  9653. #endif
  9654. #ifdef __nvapi_undef__inout_bcount
  9655. #undef __inout_bcount
  9656. #undef __nvapi_undef__inout_bcount
  9657. #endif
  9658. #ifdef __nvapi_undef__inout_ecount_part
  9659. #undef __inout_ecount_part
  9660. #undef __nvapi_undef__inout_ecount_part
  9661. #endif
  9662. #ifdef __nvapi_undef__inout_bcount_part
  9663. #undef __inout_bcount_part
  9664. #undef __nvapi_undef__inout_bcount_part
  9665. #endif
  9666. #ifdef __nvapi_undef__inout_ecount_full
  9667. #undef __inout_ecount_full
  9668. #undef __nvapi_undef__inout_ecount_full
  9669. #endif
  9670. #ifdef __nvapi_undef__inout_bcount_full
  9671. #undef __inout_bcount_full
  9672. #undef __nvapi_undef__inout_bcount_full
  9673. #endif
  9674. #ifdef __nvapi_undef__inout_z
  9675. #undef __inout_z
  9676. #undef __nvapi_undef__inout_z
  9677. #endif
  9678. #ifdef __nvapi_undef__inout_ecount_z
  9679. #undef __inout_ecount_z
  9680. #undef __nvapi_undef__inout_ecount_z
  9681. #endif
  9682. #ifdef __nvapi_undef__inout_bcount_z
  9683. #undef __inout_bcount_z
  9684. #undef __nvapi_undef__inout_bcount_z
  9685. #endif
  9686. #ifdef __nvapi_undef__inout_nz
  9687. #undef __inout_nz
  9688. #undef __nvapi_undef__inout_nz
  9689. #endif
  9690. #ifdef __nvapi_undef__inout_ecount_nz
  9691. #undef __inout_ecount_nz
  9692. #undef __nvapi_undef__inout_ecount_nz
  9693. #endif
  9694. #ifdef __nvapi_undef__inout_bcount_nz
  9695. #undef __inout_bcount_nz
  9696. #undef __nvapi_undef__inout_bcount_nz
  9697. #endif
  9698. #ifdef __nvapi_undef__ecount_opt
  9699. #undef __ecount_opt
  9700. #undef __nvapi_undef__ecount_opt
  9701. #endif
  9702. #ifdef __nvapi_undef__bcount_opt
  9703. #undef __bcount_opt
  9704. #undef __nvapi_undef__bcount_opt
  9705. #endif
  9706. #ifdef __nvapi_undef__in_opt
  9707. #undef __in_opt
  9708. #undef __nvapi_undef__in_opt
  9709. #endif
  9710. #ifdef __nvapi_undef__in_ecount_opt
  9711. #undef __in_ecount_opt
  9712. #undef __nvapi_undef__in_ecount_opt
  9713. #endif
  9714. #ifdef __nvapi_undef__in_bcount_opt
  9715. #undef __in_bcount_opt
  9716. #undef __nvapi_undef__in_bcount_opt
  9717. #endif
  9718. #ifdef __nvapi_undef__in_z_opt
  9719. #undef __in_z_opt
  9720. #undef __nvapi_undef__in_z_opt
  9721. #endif
  9722. #ifdef __nvapi_undef__in_ecount_z_opt
  9723. #undef __in_ecount_z_opt
  9724. #undef __nvapi_undef__in_ecount_z_opt
  9725. #endif
  9726. #ifdef __nvapi_undef__in_bcount_z_opt
  9727. #undef __in_bcount_z_opt
  9728. #undef __nvapi_undef__in_bcount_z_opt
  9729. #endif
  9730. #ifdef __nvapi_undef__in_nz_opt
  9731. #undef __in_nz_opt
  9732. #undef __nvapi_undef__in_nz_opt
  9733. #endif
  9734. #ifdef __nvapi_undef__in_ecount_nz_opt
  9735. #undef __in_ecount_nz_opt
  9736. #undef __nvapi_undef__in_ecount_nz_opt
  9737. #endif
  9738. #ifdef __nvapi_undef__in_bcount_nz_opt
  9739. #undef __in_bcount_nz_opt
  9740. #undef __nvapi_undef__in_bcount_nz_opt
  9741. #endif
  9742. #ifdef __nvapi_undef__out_opt
  9743. #undef __out_opt
  9744. #undef __nvapi_undef__out_opt
  9745. #endif
  9746. #ifdef __nvapi_undef__out_ecount_opt
  9747. #undef __out_ecount_opt
  9748. #undef __nvapi_undef__out_ecount_opt
  9749. #endif
  9750. #ifdef __nvapi_undef__out_bcount_opt
  9751. #undef __out_bcount_opt
  9752. #undef __nvapi_undef__out_bcount_opt
  9753. #endif
  9754. #ifdef __nvapi_undef__out_ecount_part_opt
  9755. #undef __out_ecount_part_opt
  9756. #undef __nvapi_undef__out_ecount_part_opt
  9757. #endif
  9758. #ifdef __nvapi_undef__out_bcount_part_opt
  9759. #undef __out_bcount_part_opt
  9760. #undef __nvapi_undef__out_bcount_part_opt
  9761. #endif
  9762. #ifdef __nvapi_undef__out_ecount_full_opt
  9763. #undef __out_ecount_full_opt
  9764. #undef __nvapi_undef__out_ecount_full_opt
  9765. #endif
  9766. #ifdef __nvapi_undef__out_bcount_full_opt
  9767. #undef __out_bcount_full_opt
  9768. #undef __nvapi_undef__out_bcount_full_opt
  9769. #endif
  9770. #ifdef __nvapi_undef__out_ecount_z_opt
  9771. #undef __out_ecount_z_opt
  9772. #undef __nvapi_undef__out_ecount_z_opt
  9773. #endif
  9774. #ifdef __nvapi_undef__out_bcount_z_opt
  9775. #undef __out_bcount_z_opt
  9776. #undef __nvapi_undef__out_bcount_z_opt
  9777. #endif
  9778. #ifdef __nvapi_undef__out_ecount_part_z_opt
  9779. #undef __out_ecount_part_z_opt
  9780. #undef __nvapi_undef__out_ecount_part_z_opt
  9781. #endif
  9782. #ifdef __nvapi_undef__out_bcount_part_z_opt
  9783. #undef __out_bcount_part_z_opt
  9784. #undef __nvapi_undef__out_bcount_part_z_opt
  9785. #endif
  9786. #ifdef __nvapi_undef__out_ecount_full_z_opt
  9787. #undef __out_ecount_full_z_opt
  9788. #undef __nvapi_undef__out_ecount_full_z_opt
  9789. #endif
  9790. #ifdef __nvapi_undef__out_bcount_full_z_opt
  9791. #undef __out_bcount_full_z_opt
  9792. #undef __nvapi_undef__out_bcount_full_z_opt
  9793. #endif
  9794. #ifdef __nvapi_undef__out_ecount_nz_opt
  9795. #undef __out_ecount_nz_opt
  9796. #undef __nvapi_undef__out_ecount_nz_opt
  9797. #endif
  9798. #ifdef __nvapi_undef__out_bcount_nz_opt
  9799. #undef __out_bcount_nz_opt
  9800. #undef __nvapi_undef__out_bcount_nz_opt
  9801. #endif
  9802. #ifdef __nvapi_undef__inout_opt
  9803. #undef __inout_opt
  9804. #undef __nvapi_undef__inout_opt
  9805. #endif
  9806. #ifdef __nvapi_undef__inout_ecount_opt
  9807. #undef __inout_ecount_opt
  9808. #undef __nvapi_undef__inout_ecount_opt
  9809. #endif
  9810. #ifdef __nvapi_undef__inout_bcount_opt
  9811. #undef __inout_bcount_opt
  9812. #undef __nvapi_undef__inout_bcount_opt
  9813. #endif
  9814. #ifdef __nvapi_undef__inout_ecount_part_opt
  9815. #undef __inout_ecount_part_opt
  9816. #undef __nvapi_undef__inout_ecount_part_opt
  9817. #endif
  9818. #ifdef __nvapi_undef__inout_bcount_part_opt
  9819. #undef __inout_bcount_part_opt
  9820. #undef __nvapi_undef__inout_bcount_part_opt
  9821. #endif
  9822. #ifdef __nvapi_undef__inout_ecount_full_opt
  9823. #undef __inout_ecount_full_opt
  9824. #undef __nvapi_undef__inout_ecount_full_opt
  9825. #endif
  9826. #ifdef __nvapi_undef__inout_bcount_full_opt
  9827. #undef __inout_bcount_full_opt
  9828. #undef __nvapi_undef__inout_bcount_full_opt
  9829. #endif
  9830. #ifdef __nvapi_undef__inout_z_opt
  9831. #undef __inout_z_opt
  9832. #undef __nvapi_undef__inout_z_opt
  9833. #endif
  9834. #ifdef __nvapi_undef__inout_ecount_z_opt
  9835. #undef __inout_ecount_z_opt
  9836. #undef __nvapi_undef__inout_ecount_z_opt
  9837. #endif
  9838. #ifdef __nvapi_undef__inout_ecount_z_opt
  9839. #undef __inout_ecount_z_opt
  9840. #undef __nvapi_undef__inout_ecount_z_opt
  9841. #endif
  9842. #ifdef __nvapi_undef__inout_bcount_z_opt
  9843. #undef __inout_bcount_z_opt
  9844. #undef __nvapi_undef__inout_bcount_z_opt
  9845. #endif
  9846. #ifdef __nvapi_undef__inout_nz_opt
  9847. #undef __inout_nz_opt
  9848. #undef __nvapi_undef__inout_nz_opt
  9849. #endif
  9850. #ifdef __nvapi_undef__inout_ecount_nz_opt
  9851. #undef __inout_ecount_nz_opt
  9852. #undef __nvapi_undef__inout_ecount_nz_opt
  9853. #endif
  9854. #ifdef __nvapi_undef__inout_bcount_nz_opt
  9855. #undef __inout_bcount_nz_opt
  9856. #undef __nvapi_undef__inout_bcount_nz_opt
  9857. #endif
  9858. #ifdef __nvapi_undef__deref_ecount
  9859. #undef __deref_ecount
  9860. #undef __nvapi_undef__deref_ecount
  9861. #endif
  9862. #ifdef __nvapi_undef__deref_bcount
  9863. #undef __deref_bcount
  9864. #undef __nvapi_undef__deref_bcount
  9865. #endif
  9866. #ifdef __nvapi_undef__deref_out
  9867. #undef __deref_out
  9868. #undef __nvapi_undef__deref_out
  9869. #endif
  9870. #ifdef __nvapi_undef__deref_out_ecount
  9871. #undef __deref_out_ecount
  9872. #undef __nvapi_undef__deref_out_ecount
  9873. #endif
  9874. #ifdef __nvapi_undef__deref_out_bcount
  9875. #undef __deref_out_bcount
  9876. #undef __nvapi_undef__deref_out_bcount
  9877. #endif
  9878. #ifdef __nvapi_undef__deref_out_ecount_part
  9879. #undef __deref_out_ecount_part
  9880. #undef __nvapi_undef__deref_out_ecount_part
  9881. #endif
  9882. #ifdef __nvapi_undef__deref_out_bcount_part
  9883. #undef __deref_out_bcount_part
  9884. #undef __nvapi_undef__deref_out_bcount_part
  9885. #endif
  9886. #ifdef __nvapi_undef__deref_out_ecount_full
  9887. #undef __deref_out_ecount_full
  9888. #undef __nvapi_undef__deref_out_ecount_full
  9889. #endif
  9890. #ifdef __nvapi_undef__deref_out_bcount_full
  9891. #undef __deref_out_bcount_full
  9892. #undef __nvapi_undef__deref_out_bcount_full
  9893. #endif
  9894. #ifdef __nvapi_undef__deref_out_z
  9895. #undef __deref_out_z
  9896. #undef __nvapi_undef__deref_out_z
  9897. #endif
  9898. #ifdef __nvapi_undef__deref_out_ecount_z
  9899. #undef __deref_out_ecount_z
  9900. #undef __nvapi_undef__deref_out_ecount_z
  9901. #endif
  9902. #ifdef __nvapi_undef__deref_out_bcount_z
  9903. #undef __deref_out_bcount_z
  9904. #undef __nvapi_undef__deref_out_bcount_z
  9905. #endif
  9906. #ifdef __nvapi_undef__deref_out_nz
  9907. #undef __deref_out_nz
  9908. #undef __nvapi_undef__deref_out_nz
  9909. #endif
  9910. #ifdef __nvapi_undef__deref_out_ecount_nz
  9911. #undef __deref_out_ecount_nz
  9912. #undef __nvapi_undef__deref_out_ecount_nz
  9913. #endif
  9914. #ifdef __nvapi_undef__deref_out_bcount_nz
  9915. #undef __deref_out_bcount_nz
  9916. #undef __nvapi_undef__deref_out_bcount_nz
  9917. #endif
  9918. #ifdef __nvapi_undef__deref_inout
  9919. #undef __deref_inout
  9920. #undef __nvapi_undef__deref_inout
  9921. #endif
  9922. #ifdef __nvapi_undef__deref_inout_z
  9923. #undef __deref_inout_z
  9924. #undef __nvapi_undef__deref_inout_z
  9925. #endif
  9926. #ifdef __nvapi_undef__deref_inout_ecount
  9927. #undef __deref_inout_ecount
  9928. #undef __nvapi_undef__deref_inout_ecount
  9929. #endif
  9930. #ifdef __nvapi_undef__deref_inout_bcount
  9931. #undef __deref_inout_bcount
  9932. #undef __nvapi_undef__deref_inout_bcount
  9933. #endif
  9934. #ifdef __nvapi_undef__deref_inout_ecount_part
  9935. #undef __deref_inout_ecount_part
  9936. #undef __nvapi_undef__deref_inout_ecount_part
  9937. #endif
  9938. #ifdef __nvapi_undef__deref_inout_bcount_part
  9939. #undef __deref_inout_bcount_part
  9940. #undef __nvapi_undef__deref_inout_bcount_part
  9941. #endif
  9942. #ifdef __nvapi_undef__deref_inout_ecount_full
  9943. #undef __deref_inout_ecount_full
  9944. #undef __nvapi_undef__deref_inout_ecount_full
  9945. #endif
  9946. #ifdef __nvapi_undef__deref_inout_bcount_full
  9947. #undef __deref_inout_bcount_full
  9948. #undef __nvapi_undef__deref_inout_bcount_full
  9949. #endif
  9950. #ifdef __nvapi_undef__deref_inout_z
  9951. #undef __deref_inout_z
  9952. #undef __nvapi_undef__deref_inout_z
  9953. #endif
  9954. #ifdef __nvapi_undef__deref_inout_ecount_z
  9955. #undef __deref_inout_ecount_z
  9956. #undef __nvapi_undef__deref_inout_ecount_z
  9957. #endif
  9958. #ifdef __nvapi_undef__deref_inout_bcount_z
  9959. #undef __deref_inout_bcount_z
  9960. #undef __nvapi_undef__deref_inout_bcount_z
  9961. #endif
  9962. #ifdef __nvapi_undef__deref_inout_nz
  9963. #undef __deref_inout_nz
  9964. #undef __nvapi_undef__deref_inout_nz
  9965. #endif
  9966. #ifdef __nvapi_undef__deref_inout_ecount_nz
  9967. #undef __deref_inout_ecount_nz
  9968. #undef __nvapi_undef__deref_inout_ecount_nz
  9969. #endif
  9970. #ifdef __nvapi_undef__deref_inout_bcount_nz
  9971. #undef __deref_inout_bcount_nz
  9972. #undef __nvapi_undef__deref_inout_bcount_nz
  9973. #endif
  9974. #ifdef __nvapi_undef__deref_ecount_opt
  9975. #undef __deref_ecount_opt
  9976. #undef __nvapi_undef__deref_ecount_opt
  9977. #endif
  9978. #ifdef __nvapi_undef__deref_bcount_opt
  9979. #undef __deref_bcount_opt
  9980. #undef __nvapi_undef__deref_bcount_opt
  9981. #endif
  9982. #ifdef __nvapi_undef__deref_out_opt
  9983. #undef __deref_out_opt
  9984. #undef __nvapi_undef__deref_out_opt
  9985. #endif
  9986. #ifdef __nvapi_undef__deref_out_ecount_opt
  9987. #undef __deref_out_ecount_opt
  9988. #undef __nvapi_undef__deref_out_ecount_opt
  9989. #endif
  9990. #ifdef __nvapi_undef__deref_out_bcount_opt
  9991. #undef __deref_out_bcount_opt
  9992. #undef __nvapi_undef__deref_out_bcount_opt
  9993. #endif
  9994. #ifdef __nvapi_undef__deref_out_ecount_part_opt
  9995. #undef __deref_out_ecount_part_opt
  9996. #undef __nvapi_undef__deref_out_ecount_part_opt
  9997. #endif
  9998. #ifdef __nvapi_undef__deref_out_bcount_part_opt
  9999. #undef __deref_out_bcount_part_opt
  10000. #undef __nvapi_undef__deref_out_bcount_part_opt
  10001. #endif
  10002. #ifdef __nvapi_undef__deref_out_ecount_full_opt
  10003. #undef __deref_out_ecount_full_opt
  10004. #undef __nvapi_undef__deref_out_ecount_full_opt
  10005. #endif
  10006. #ifdef __nvapi_undef__deref_out_bcount_full_opt
  10007. #undef __deref_out_bcount_full_opt
  10008. #undef __nvapi_undef__deref_out_bcount_full_opt
  10009. #endif
  10010. #ifdef __nvapi_undef__deref_out_z_opt
  10011. #undef __deref_out_z_opt
  10012. #undef __nvapi_undef__deref_out_z_opt
  10013. #endif
  10014. #ifdef __nvapi_undef__deref_out_ecount_z_opt
  10015. #undef __deref_out_ecount_z_opt
  10016. #undef __nvapi_undef__deref_out_ecount_z_opt
  10017. #endif
  10018. #ifdef __nvapi_undef__deref_out_bcount_z_opt
  10019. #undef __deref_out_bcount_z_opt
  10020. #undef __nvapi_undef__deref_out_bcount_z_opt
  10021. #endif
  10022. #ifdef __nvapi_undef__deref_out_nz_opt
  10023. #undef __deref_out_nz_opt
  10024. #undef __nvapi_undef__deref_out_nz_opt
  10025. #endif
  10026. #ifdef __nvapi_undef__deref_out_ecount_nz_opt
  10027. #undef __deref_out_ecount_nz_opt
  10028. #undef __nvapi_undef__deref_out_ecount_nz_opt
  10029. #endif
  10030. #ifdef __nvapi_undef__deref_out_bcount_nz_opt
  10031. #undef __deref_out_bcount_nz_opt
  10032. #undef __nvapi_undef__deref_out_bcount_nz_opt
  10033. #endif
  10034. #ifdef __nvapi_undef__deref_inout_opt
  10035. #undef __deref_inout_opt
  10036. #undef __nvapi_undef__deref_inout_opt
  10037. #endif
  10038. #ifdef __nvapi_undef__deref_inout_ecount_opt
  10039. #undef __deref_inout_ecount_opt
  10040. #undef __nvapi_undef__deref_inout_ecount_opt
  10041. #endif
  10042. #ifdef __nvapi_undef__deref_inout_bcount_opt
  10043. #undef __deref_inout_bcount_opt
  10044. #undef __nvapi_undef__deref_inout_bcount_opt
  10045. #endif
  10046. #ifdef __nvapi_undef__deref_inout_ecount_part_opt
  10047. #undef __deref_inout_ecount_part_opt
  10048. #undef __nvapi_undef__deref_inout_ecount_part_opt
  10049. #endif
  10050. #ifdef __nvapi_undef__deref_inout_bcount_part_opt
  10051. #undef __deref_inout_bcount_part_opt
  10052. #undef __nvapi_undef__deref_inout_bcount_part_opt
  10053. #endif
  10054. #ifdef __nvapi_undef__deref_inout_ecount_full_opt
  10055. #undef __deref_inout_ecount_full_opt
  10056. #undef __nvapi_undef__deref_inout_ecount_full_opt
  10057. #endif
  10058. #ifdef __nvapi_undef__deref_inout_bcount_full_opt
  10059. #undef __deref_inout_bcount_full_opt
  10060. #undef __nvapi_undef__deref_inout_bcount_full_opt
  10061. #endif
  10062. #ifdef __nvapi_undef__deref_inout_z_opt
  10063. #undef __deref_inout_z_opt
  10064. #undef __nvapi_undef__deref_inout_z_opt
  10065. #endif
  10066. #ifdef __nvapi_undef__deref_inout_ecount_z_opt
  10067. #undef __deref_inout_ecount_z_opt
  10068. #undef __nvapi_undef__deref_inout_ecount_z_opt
  10069. #endif
  10070. #ifdef __nvapi_undef__deref_inout_bcount_z_opt
  10071. #undef __deref_inout_bcount_z_opt
  10072. #undef __nvapi_undef__deref_inout_bcount_z_opt
  10073. #endif
  10074. #ifdef __nvapi_undef__deref_inout_nz_opt
  10075. #undef __deref_inout_nz_opt
  10076. #undef __nvapi_undef__deref_inout_nz_opt
  10077. #endif
  10078. #ifdef __nvapi_undef__deref_inout_ecount_nz_opt
  10079. #undef __deref_inout_ecount_nz_opt
  10080. #undef __nvapi_undef__deref_inout_ecount_nz_opt
  10081. #endif
  10082. #ifdef __nvapi_undef__deref_inout_bcount_nz_opt
  10083. #undef __deref_inout_bcount_nz_opt
  10084. #undef __nvapi_undef__deref_inout_bcount_nz_opt
  10085. #endif
  10086. #ifdef __nvapi_undef__deref_opt_ecount
  10087. #undef __deref_opt_ecount
  10088. #undef __nvapi_undef__deref_opt_ecount
  10089. #endif
  10090. #ifdef __nvapi_undef__deref_opt_bcount
  10091. #undef __deref_opt_bcount
  10092. #undef __nvapi_undef__deref_opt_bcount
  10093. #endif
  10094. #ifdef __nvapi_undef__deref_opt_out
  10095. #undef __deref_opt_out
  10096. #undef __nvapi_undef__deref_opt_out
  10097. #endif
  10098. #ifdef __nvapi_undef__deref_opt_out_z
  10099. #undef __deref_opt_out_z
  10100. #undef __nvapi_undef__deref_opt_out_z
  10101. #endif
  10102. #ifdef __nvapi_undef__deref_opt_out_ecount
  10103. #undef __deref_opt_out_ecount
  10104. #undef __nvapi_undef__deref_opt_out_ecount
  10105. #endif
  10106. #ifdef __nvapi_undef__deref_opt_out_bcount
  10107. #undef __deref_opt_out_bcount
  10108. #undef __nvapi_undef__deref_opt_out_bcount
  10109. #endif
  10110. #ifdef __nvapi_undef__deref_opt_out_ecount_part
  10111. #undef __deref_opt_out_ecount_part
  10112. #undef __nvapi_undef__deref_opt_out_ecount_part
  10113. #endif
  10114. #ifdef __nvapi_undef__deref_opt_out_bcount_part
  10115. #undef __deref_opt_out_bcount_part
  10116. #undef __nvapi_undef__deref_opt_out_bcount_part
  10117. #endif
  10118. #ifdef __nvapi_undef__deref_opt_out_ecount_full
  10119. #undef __deref_opt_out_ecount_full
  10120. #undef __nvapi_undef__deref_opt_out_ecount_full
  10121. #endif
  10122. #ifdef __nvapi_undef__deref_opt_out_bcount_full
  10123. #undef __deref_opt_out_bcount_full
  10124. #undef __nvapi_undef__deref_opt_out_bcount_full
  10125. #endif
  10126. #ifdef __nvapi_undef__deref_opt_inout
  10127. #undef __deref_opt_inout
  10128. #undef __nvapi_undef__deref_opt_inout
  10129. #endif
  10130. #ifdef __nvapi_undef__deref_opt_inout_ecount
  10131. #undef __deref_opt_inout_ecount
  10132. #undef __nvapi_undef__deref_opt_inout_ecount
  10133. #endif
  10134. #ifdef __nvapi_undef__deref_opt_inout_bcount
  10135. #undef __deref_opt_inout_bcount
  10136. #undef __nvapi_undef__deref_opt_inout_bcount
  10137. #endif
  10138. #ifdef __nvapi_undef__deref_opt_inout_ecount_part
  10139. #undef __deref_opt_inout_ecount_part
  10140. #undef __nvapi_undef__deref_opt_inout_ecount_part
  10141. #endif
  10142. #ifdef __nvapi_undef__deref_opt_inout_bcount_part
  10143. #undef __deref_opt_inout_bcount_part
  10144. #undef __nvapi_undef__deref_opt_inout_bcount_part
  10145. #endif
  10146. #ifdef __nvapi_undef__deref_opt_inout_ecount_full
  10147. #undef __deref_opt_inout_ecount_full
  10148. #undef __nvapi_undef__deref_opt_inout_ecount_full
  10149. #endif
  10150. #ifdef __nvapi_undef__deref_opt_inout_bcount_full
  10151. #undef __deref_opt_inout_bcount_full
  10152. #undef __nvapi_undef__deref_opt_inout_bcount_full
  10153. #endif
  10154. #ifdef __nvapi_undef__deref_opt_inout_z
  10155. #undef __deref_opt_inout_z
  10156. #undef __nvapi_undef__deref_opt_inout_z
  10157. #endif
  10158. #ifdef __nvapi_undef__deref_opt_inout_ecount_z
  10159. #undef __deref_opt_inout_ecount_z
  10160. #undef __nvapi_undef__deref_opt_inout_ecount_z
  10161. #endif
  10162. #ifdef __nvapi_undef__deref_opt_inout_bcount_z
  10163. #undef __deref_opt_inout_bcount_z
  10164. #undef __nvapi_undef__deref_opt_inout_bcount_z
  10165. #endif
  10166. #ifdef __nvapi_undef__deref_opt_inout_nz
  10167. #undef __deref_opt_inout_nz
  10168. #undef __nvapi_undef__deref_opt_inout_nz
  10169. #endif
  10170. #ifdef __nvapi_undef__deref_opt_inout_ecount_nz
  10171. #undef __deref_opt_inout_ecount_nz
  10172. #undef __nvapi_undef__deref_opt_inout_ecount_nz
  10173. #endif
  10174. #ifdef __nvapi_undef__deref_opt_inout_bcount_nz
  10175. #undef __deref_opt_inout_bcount_nz
  10176. #undef __nvapi_undef__deref_opt_inout_bcount_nz
  10177. #endif
  10178. #ifdef __nvapi_undef__deref_opt_ecount_opt
  10179. #undef __deref_opt_ecount_opt
  10180. #undef __nvapi_undef__deref_opt_ecount_opt
  10181. #endif
  10182. #ifdef __nvapi_undef__deref_opt_bcount_opt
  10183. #undef __deref_opt_bcount_opt
  10184. #undef __nvapi_undef__deref_opt_bcount_opt
  10185. #endif
  10186. #ifdef __nvapi_undef__deref_opt_out_opt
  10187. #undef __deref_opt_out_opt
  10188. #undef __nvapi_undef__deref_opt_out_opt
  10189. #endif
  10190. #ifdef __nvapi_undef__deref_opt_out_ecount_opt
  10191. #undef __deref_opt_out_ecount_opt
  10192. #undef __nvapi_undef__deref_opt_out_ecount_opt
  10193. #endif
  10194. #ifdef __nvapi_undef__deref_opt_out_bcount_opt
  10195. #undef __deref_opt_out_bcount_opt
  10196. #undef __nvapi_undef__deref_opt_out_bcount_opt
  10197. #endif
  10198. #ifdef __nvapi_undef__deref_opt_out_ecount_part_opt
  10199. #undef __deref_opt_out_ecount_part_opt
  10200. #undef __nvapi_undef__deref_opt_out_ecount_part_opt
  10201. #endif
  10202. #ifdef __nvapi_undef__deref_opt_out_bcount_part_opt
  10203. #undef __deref_opt_out_bcount_part_opt
  10204. #undef __nvapi_undef__deref_opt_out_bcount_part_opt
  10205. #endif
  10206. #ifdef __nvapi_undef__deref_opt_out_ecount_full_opt
  10207. #undef __deref_opt_out_ecount_full_opt
  10208. #undef __nvapi_undef__deref_opt_out_ecount_full_opt
  10209. #endif
  10210. #ifdef __nvapi_undef__deref_opt_out_bcount_full_opt
  10211. #undef __deref_opt_out_bcount_full_opt
  10212. #undef __nvapi_undef__deref_opt_out_bcount_full_opt
  10213. #endif
  10214. #ifdef __nvapi_undef__deref_opt_out_z_opt
  10215. #undef __deref_opt_out_z_opt
  10216. #undef __nvapi_undef__deref_opt_out_z_opt
  10217. #endif
  10218. #ifdef __nvapi_undef__deref_opt_out_ecount_z_opt
  10219. #undef __deref_opt_out_ecount_z_opt
  10220. #undef __nvapi_undef__deref_opt_out_ecount_z_opt
  10221. #endif
  10222. #ifdef __nvapi_undef__deref_opt_out_bcount_z_opt
  10223. #undef __deref_opt_out_bcount_z_opt
  10224. #undef __nvapi_undef__deref_opt_out_bcount_z_opt
  10225. #endif
  10226. #ifdef __nvapi_undef__deref_opt_out_nz_opt
  10227. #undef __deref_opt_out_nz_opt
  10228. #undef __nvapi_undef__deref_opt_out_nz_opt
  10229. #endif
  10230. #ifdef __nvapi_undef__deref_opt_out_ecount_nz_opt
  10231. #undef __deref_opt_out_ecount_nz_opt
  10232. #undef __nvapi_undef__deref_opt_out_ecount_nz_opt
  10233. #endif
  10234. #ifdef __nvapi_undef__deref_opt_out_bcount_nz_opt
  10235. #undef __deref_opt_out_bcount_nz_opt
  10236. #undef __nvapi_undef__deref_opt_out_bcount_nz_opt
  10237. #endif
  10238. #ifdef __nvapi_undef__deref_opt_inout_opt
  10239. #undef __deref_opt_inout_opt
  10240. #undef __nvapi_undef__deref_opt_inout_opt
  10241. #endif
  10242. #ifdef __nvapi_undef__deref_opt_inout_ecount_opt
  10243. #undef __deref_opt_inout_ecount_opt
  10244. #undef __nvapi_undef__deref_opt_inout_ecount_opt
  10245. #endif
  10246. #ifdef __nvapi_undef__deref_opt_inout_bcount_opt
  10247. #undef __deref_opt_inout_bcount_opt
  10248. #undef __nvapi_undef__deref_opt_inout_bcount_opt
  10249. #endif
  10250. #ifdef __nvapi_undef__deref_opt_inout_ecount_part_opt
  10251. #undef __deref_opt_inout_ecount_part_opt
  10252. #undef __nvapi_undef__deref_opt_inout_ecount_part_opt
  10253. #endif
  10254. #ifdef __nvapi_undef__deref_opt_inout_bcount_part_opt
  10255. #undef __deref_opt_inout_bcount_part_opt
  10256. #undef __nvapi_undef__deref_opt_inout_bcount_part_opt
  10257. #endif
  10258. #ifdef __nvapi_undef__deref_opt_inout_ecount_full_opt
  10259. #undef __deref_opt_inout_ecount_full_opt
  10260. #undef __nvapi_undef__deref_opt_inout_ecount_full_opt
  10261. #endif
  10262. #ifdef __nvapi_undef__deref_opt_inout_bcount_full_opt
  10263. #undef __deref_opt_inout_bcount_full_opt
  10264. #undef __nvapi_undef__deref_opt_inout_bcount_full_opt
  10265. #endif
  10266. #ifdef __nvapi_undef__deref_opt_inout_z_opt
  10267. #undef __deref_opt_inout_z_opt
  10268. #undef __nvapi_undef__deref_opt_inout_z_opt
  10269. #endif
  10270. #ifdef __nvapi_undef__deref_opt_inout_ecount_z_opt
  10271. #undef __deref_opt_inout_ecount_z_opt
  10272. #undef __nvapi_undef__deref_opt_inout_ecount_z_opt
  10273. #endif
  10274. #ifdef __nvapi_undef__deref_opt_inout_bcount_z_opt
  10275. #undef __deref_opt_inout_bcount_z_opt
  10276. #undef __nvapi_undef__deref_opt_inout_bcount_z_opt
  10277. #endif
  10278. #ifdef __nvapi_undef__deref_opt_inout_nz_opt
  10279. #undef __deref_opt_inout_nz_opt
  10280. #undef __nvapi_undef__deref_opt_inout_nz_opt
  10281. #endif
  10282. #ifdef __nvapi_undef__deref_opt_inout_ecount_nz_opt
  10283. #undef __deref_opt_inout_ecount_nz_opt
  10284. #undef __nvapi_undef__deref_opt_inout_ecount_nz_opt
  10285. #endif
  10286. #ifdef __nvapi_undef__deref_opt_inout_bcount_nz_opt
  10287. #undef __deref_opt_inout_bcount_nz_opt
  10288. #undef __nvapi_undef__deref_opt_inout_bcount_nz_opt
  10289. #endif
  10290. #endif // __NVAPI_EMPTY_SAL
  10291. #ifdef __cplusplus
  10292. }; //extern "C" {
  10293. #endif
  10294. #pragma pack(pop)
  10295. #endif // _NVAPI_H