Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11760 lines
567 KiB

  1. #include"nvapi_lite_salstart.h"
  2. #include"nvapi_lite_common.h"
  3. #include"nvapi_lite_sli.h"
  4. #include"nvapi_lite_surround.h"
  5. #include"nvapi_lite_stereo.h"
  6. #include"nvapi_lite_d3dext.h"
  7. /************************************************************************************************************************************\
  8. |* *|
  9. |* Copyright © 2012 NVIDIA Corporation. All rights reserved. *|
  10. |* *|
  11. |* NOTICE TO USER: *|
  12. |* *|
  13. |* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
  14. |* *|
  15. |* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
  16. |* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
  17. |* Otherwise, you have no rights to use or access this software in any manner. *|
  18. |* *|
  19. |* If not covered by the applicable NVIDIA software license agreement: *|
  20. |* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
  21. |* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
  22. |* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
  23. |* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
  24. |* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
  25. |* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
  26. |* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
  27. |* *|
  28. |* U.S. Government End Users. *|
  29. |* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
  30. |* consisting of "commercial computer software" and "commercial computer software documentation" *|
  31. |* 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. *|
  32. |* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
  33. |* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
  34. |* *|
  35. |* Any use of this software in individual and commercial software must include, *|
  36. |* in the user documentation and internal comments to the code, *|
  37. |* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
  38. |* *|
  39. \************************************************************************************************************************************/
  40. ///////////////////////////////////////////////////////////////////////////////
  41. //
  42. // Date: Jan 27, 2016
  43. // File: nvapi.h
  44. //
  45. // NvAPI provides an interface to NVIDIA devices. This file contains the
  46. // interface constants, structure definitions and function prototypes.
  47. //
  48. // Target Profile: developer
  49. // Target Platform: windows
  50. //
  51. ///////////////////////////////////////////////////////////////////////////////
  52. #ifndef _NVAPI_H
  53. #define _NVAPI_H
  54. #pragma pack(push,8) // Make sure we have consistent structure packings
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. // ====================================================
  59. // Universal NvAPI Definitions
  60. // ====================================================
  61. #ifndef _WIN32
  62. #define __cdecl
  63. #endif
  64. //! @}
  65. //! \ingroup nvapistatus
  66. #define NVAPI_API_NOT_INTIALIZED NVAPI_API_NOT_INITIALIZED //!< Fix typo in error code
  67. //! \ingroup nvapistatus
  68. #define NVAPI_INVALID_USER_PRIVILEDGE NVAPI_INVALID_USER_PRIVILEGE //!< Fix typo in error code
  69. ///////////////////////////////////////////////////////////////////////////////
  70. //
  71. // FUNCTION NAME: NvAPI_Initialize
  72. //
  73. //! This function initializes the NvAPI library (if not already initialized) but always increments the ref-counter.
  74. //! This must be called before calling other NvAPI_ functions.
  75. //!
  76. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  77. //!
  78. //!
  79. //! \since Release: 80
  80. //!
  81. //! \retval NVAPI_ERROR An error occurred during the initialization process (generic error)
  82. //! \retval NVAPI_LIBRARYNOTFOUND Failed to load the NVAPI support library
  83. //! \retval NVAPI_OK Initialized
  84. //! \sa nvapistatus
  85. //! \ingroup nvapifunctions
  86. ///////////////////////////////////////////////////////////////////////////////
  87. NVAPI_INTERFACE NvAPI_Initialize();
  88. ///////////////////////////////////////////////////////////////////////////////
  89. //
  90. // FUNCTION NAME: NvAPI_Unload
  91. //
  92. //! DESCRIPTION: Decrements the ref-counter and when it reaches ZERO, unloads NVAPI library.
  93. //! This must be called in pairs with NvAPI_Initialize.
  94. //!
  95. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  96. //!
  97. //!
  98. //! Note: By design, it is not mandatory to call NvAPI_Initialize before calling any NvAPI.
  99. //! When any NvAPI is called without first calling NvAPI_Initialize, the internal refcounter
  100. //! will be implicitly incremented. In such cases, calling NvAPI_Initialize from a different thread will
  101. //! result in incrementing the refcount again and the user has to call NvAPI_Unload twice to
  102. //! unload the library. However, note that the implicit increment of the refcounter happens only once.
  103. //! If the client wants unload functionality, it is recommended to always call NvAPI_Initialize and NvAPI_Unload in pairs.
  104. //!
  105. //! Unloading NvAPI library is not supported when the library is in a resource locked state.
  106. //! Some functions in the NvAPI library initiates an operation or allocates certain resources
  107. //! and there are corresponding functions available, to complete the operation or free the
  108. //! allocated resources. All such function pairs are designed to prevent unloading NvAPI library.
  109. //!
  110. //! For example, if NvAPI_Unload is called after NvAPI_XXX which locks a resource, it fails with
  111. //! NVAPI_ERROR. Developers need to call the corresponding NvAPI_YYY to unlock the resources,
  112. //! before calling NvAPI_Unload again.
  113. //!
  114. //! \retval ::NVAPI_ERROR One or more resources are locked and hence cannot unload NVAPI library
  115. //! \retval ::NVAPI_OK NVAPI library unloaded
  116. //!
  117. //! \ingroup nvapifunctions
  118. ///////////////////////////////////////////////////////////////////////////////
  119. NVAPI_INTERFACE NvAPI_Unload();
  120. ///////////////////////////////////////////////////////////////////////////////
  121. //
  122. // FUNCTION NAME: NvAPI_GetErrorMessage
  123. //
  124. //! This function converts an NvAPI error code into a null terminated string.
  125. //!
  126. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  127. //!
  128. //!
  129. //! \since Release: 80
  130. //!
  131. //! \param nr The error code to convert
  132. //! \param szDesc The string corresponding to the error code
  133. //!
  134. //! \return NULL terminated string (always, never NULL)
  135. //! \ingroup nvapifunctions
  136. ///////////////////////////////////////////////////////////////////////////////
  137. NVAPI_INTERFACE NvAPI_GetErrorMessage(NvAPI_Status nr,NvAPI_ShortString szDesc);
  138. ///////////////////////////////////////////////////////////////////////////////
  139. //
  140. // FUNCTION NAME: NvAPI_GetInterfaceVersionString
  141. //
  142. //! This function returns a string describing the version of the NvAPI library.
  143. //! The contents of the string are human readable. Do not assume a fixed
  144. //! format.
  145. //!
  146. //!
  147. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  148. //!
  149. //!
  150. //! \since Release: 80
  151. //!
  152. //! \param szDesc User readable string giving NvAPI version information
  153. //!
  154. //! \return See \ref nvapistatus for the list of possible return values.
  155. //! \ingroup nvapifunctions
  156. ///////////////////////////////////////////////////////////////////////////////
  157. NVAPI_INTERFACE NvAPI_GetInterfaceVersionString(NvAPI_ShortString szDesc);
  158. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  159. // All display port related data types definition starts
  160. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  161. // This category is intentionally added before the #ifdef. The #endif should also be in the same scope
  162. #ifndef DISPLAYPORT_STRUCTS_DEFINED
  163. #define DISPLAYPORT_STRUCTS_DEFINED
  164. //! \ingroup dispcontrol
  165. //! Used in NV_DISPLAY_PORT_INFO.
  166. typedef enum _NV_DP_LINK_RATE
  167. {
  168. NV_DP_1_62GBPS = 6,
  169. NV_DP_2_70GBPS = 0xA,
  170. NV_DP_5_40GBPS = 0x14,
  171. NV_DP_8_10GBPS = 0x1E
  172. } NV_DP_LINK_RATE;
  173. //! \ingroup dispcontrol
  174. //! Used in NV_DISPLAY_PORT_INFO.
  175. typedef enum _NV_DP_LANE_COUNT
  176. {
  177. NV_DP_1_LANE = 1,
  178. NV_DP_2_LANE = 2,
  179. NV_DP_4_LANE = 4,
  180. } NV_DP_LANE_COUNT;
  181. //! \ingroup dispcontrol
  182. //! Used in NV_DISPLAY_PORT_INFO.
  183. typedef enum _NV_DP_COLOR_FORMAT
  184. {
  185. NV_DP_COLOR_FORMAT_RGB = 0,
  186. NV_DP_COLOR_FORMAT_YCbCr422,
  187. NV_DP_COLOR_FORMAT_YCbCr444,
  188. } NV_DP_COLOR_FORMAT;
  189. //! \ingroup dispcontrol
  190. //! Used in NV_DISPLAY_PORT_INFO.
  191. typedef enum _NV_DP_COLORIMETRY
  192. {
  193. NV_DP_COLORIMETRY_RGB = 0,
  194. NV_DP_COLORIMETRY_YCbCr_ITU601,
  195. NV_DP_COLORIMETRY_YCbCr_ITU709,
  196. } NV_DP_COLORIMETRY;
  197. //! \ingroup dispcontrol
  198. //! Used in NV_DISPLAY_PORT_INFO.
  199. typedef enum _NV_DP_DYNAMIC_RANGE
  200. {
  201. NV_DP_DYNAMIC_RANGE_VESA = 0,
  202. NV_DP_DYNAMIC_RANGE_CEA,
  203. } NV_DP_DYNAMIC_RANGE;
  204. //! \ingroup dispcontrol
  205. //! Used in NV_DISPLAY_PORT_INFO.
  206. typedef enum _NV_DP_BPC
  207. {
  208. NV_DP_BPC_DEFAULT = 0,
  209. NV_DP_BPC_6,
  210. NV_DP_BPC_8,
  211. NV_DP_BPC_10,
  212. NV_DP_BPC_12,
  213. NV_DP_BPC_16,
  214. } NV_DP_BPC;
  215. #endif //#ifndef DISPLAYPORT_STRUCTS_DEFINED
  216. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  217. // All display port related data types definitions end
  218. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  219. ///////////////////////////////////////////////////////////////////////////////
  220. //
  221. // FUNCTION NAME: NvAPI_GPU_GetEDID
  222. //
  223. //! \fn NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID)
  224. //! This function returns the EDID data for the specified GPU handle and connection bit mask.
  225. //! displayOutputId should have exactly 1 bit set to indicate a single display. See \ref handles.
  226. //!
  227. //! SUPPORTED OS: Windows XP and higher
  228. //!
  229. //!
  230. //! \since Release: 85
  231. //!
  232. //! \retval NVAPI_INVALID_ARGUMENT pEDID is NULL; displayOutputId has 0 or > 1 bits set
  233. //! \retval NVAPI_OK *pEDID contains valid data.
  234. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  235. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  236. //! \retval NVAPI_DATA_NOT_FOUND The requested display does not contain an EDID.
  237. //
  238. ///////////////////////////////////////////////////////////////////////////////
  239. //! \ingroup gpu
  240. //! @{
  241. #define NV_EDID_V1_DATA_SIZE 256
  242. #define NV_EDID_DATA_SIZE NV_EDID_V1_DATA_SIZE
  243. typedef struct
  244. {
  245. NvU32 version; //structure version
  246. NvU8 EDID_Data[NV_EDID_DATA_SIZE];
  247. } NV_EDID_V1;
  248. //! Used in NvAPI_GPU_GetEDID()
  249. typedef struct
  250. {
  251. NvU32 version; //!< Structure version
  252. NvU8 EDID_Data[NV_EDID_DATA_SIZE];
  253. NvU32 sizeofEDID;
  254. } NV_EDID_V2;
  255. //! Used in NvAPI_GPU_GetEDID()
  256. typedef struct
  257. {
  258. NvU32 version; //!< Structure version
  259. NvU8 EDID_Data[NV_EDID_DATA_SIZE];
  260. NvU32 sizeofEDID;
  261. NvU32 edidId; //!< ID which always returned in a monotonically increasing counter.
  262. //!< Across a split-EDID read we need to verify that all calls returned the same edidId.
  263. //!< This counter is incremented if we get the updated EDID.
  264. NvU32 offset; //!< Which 256-byte page of the EDID we want to read. Start at 0.
  265. //!< If the read succeeds with edidSize > NV_EDID_DATA_SIZE,
  266. //!< call back again with offset+256 until we have read the entire buffer
  267. } NV_EDID_V3;
  268. typedef NV_EDID_V3 NV_EDID;
  269. #define NV_EDID_VER1 MAKE_NVAPI_VERSION(NV_EDID_V1,1)
  270. #define NV_EDID_VER2 MAKE_NVAPI_VERSION(NV_EDID_V2,2)
  271. #define NV_EDID_VER3 MAKE_NVAPI_VERSION(NV_EDID_V3,3)
  272. #define NV_EDID_VER NV_EDID_VER3
  273. //! @}
  274. //! \ingroup gpu
  275. NVAPI_INTERFACE NvAPI_GPU_GetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID);
  276. //! \ingroup gpu
  277. //! Used in NV_GPU_CONNECTOR_DATA
  278. typedef enum _NV_GPU_CONNECTOR_TYPE
  279. {
  280. NVAPI_GPU_CONNECTOR_VGA_15_PIN = 0x00000000,
  281. NVAPI_GPU_CONNECTOR_TV_COMPOSITE = 0x00000010,
  282. NVAPI_GPU_CONNECTOR_TV_SVIDEO = 0x00000011,
  283. NVAPI_GPU_CONNECTOR_TV_HDTV_COMPONENT = 0x00000013,
  284. NVAPI_GPU_CONNECTOR_TV_SCART = 0x00000014,
  285. NVAPI_GPU_CONNECTOR_TV_COMPOSITE_SCART_ON_EIAJ4120 = 0x00000016,
  286. NVAPI_GPU_CONNECTOR_TV_HDTV_EIAJ4120 = 0x00000017,
  287. NVAPI_GPU_CONNECTOR_PC_POD_HDTV_YPRPB = 0x00000018,
  288. NVAPI_GPU_CONNECTOR_PC_POD_SVIDEO = 0x00000019,
  289. NVAPI_GPU_CONNECTOR_PC_POD_COMPOSITE = 0x0000001A,
  290. NVAPI_GPU_CONNECTOR_DVI_I_TV_SVIDEO = 0x00000020,
  291. NVAPI_GPU_CONNECTOR_DVI_I_TV_COMPOSITE = 0x00000021,
  292. NVAPI_GPU_CONNECTOR_DVI_I = 0x00000030,
  293. NVAPI_GPU_CONNECTOR_DVI_D = 0x00000031,
  294. NVAPI_GPU_CONNECTOR_ADC = 0x00000032,
  295. NVAPI_GPU_CONNECTOR_LFH_DVI_I_1 = 0x00000038,
  296. NVAPI_GPU_CONNECTOR_LFH_DVI_I_2 = 0x00000039,
  297. NVAPI_GPU_CONNECTOR_SPWG = 0x00000040,
  298. NVAPI_GPU_CONNECTOR_OEM = 0x00000041,
  299. NVAPI_GPU_CONNECTOR_DISPLAYPORT_EXTERNAL = 0x00000046,
  300. NVAPI_GPU_CONNECTOR_DISPLAYPORT_INTERNAL = 0x00000047,
  301. NVAPI_GPU_CONNECTOR_DISPLAYPORT_MINI_EXT = 0x00000048,
  302. NVAPI_GPU_CONNECTOR_HDMI_A = 0x00000061,
  303. NVAPI_GPU_CONNECTOR_HDMI_C_MINI = 0x00000063,
  304. NVAPI_GPU_CONNECTOR_LFH_DISPLAYPORT_1 = 0x00000064,
  305. NVAPI_GPU_CONNECTOR_LFH_DISPLAYPORT_2 = 0x00000065,
  306. NVAPI_GPU_CONNECTOR_VIRTUAL_WFD = 0x00000070,
  307. NVAPI_GPU_CONNECTOR_UNKNOWN = 0xFFFFFFFF,
  308. } NV_GPU_CONNECTOR_TYPE;
  309. ////////////////////////////////////////////////////////////////////////////////
  310. //
  311. // NvAPI_TVOutput Information
  312. //
  313. ///////////////////////////////////////////////////////////////////////////////
  314. //! \ingroup tvapi
  315. //! Used in NV_DISPLAY_TV_OUTPUT_INFO
  316. typedef enum _NV_DISPLAY_TV_FORMAT
  317. {
  318. NV_DISPLAY_TV_FORMAT_NONE = 0,
  319. NV_DISPLAY_TV_FORMAT_SD_NTSCM = 0x00000001,
  320. NV_DISPLAY_TV_FORMAT_SD_NTSCJ = 0x00000002,
  321. NV_DISPLAY_TV_FORMAT_SD_PALM = 0x00000004,
  322. NV_DISPLAY_TV_FORMAT_SD_PALBDGH = 0x00000008,
  323. NV_DISPLAY_TV_FORMAT_SD_PALN = 0x00000010,
  324. NV_DISPLAY_TV_FORMAT_SD_PALNC = 0x00000020,
  325. NV_DISPLAY_TV_FORMAT_SD_576i = 0x00000100,
  326. NV_DISPLAY_TV_FORMAT_SD_480i = 0x00000200,
  327. NV_DISPLAY_TV_FORMAT_ED_480p = 0x00000400,
  328. NV_DISPLAY_TV_FORMAT_ED_576p = 0x00000800,
  329. NV_DISPLAY_TV_FORMAT_HD_720p = 0x00001000,
  330. NV_DISPLAY_TV_FORMAT_HD_1080i = 0x00002000,
  331. NV_DISPLAY_TV_FORMAT_HD_1080p = 0x00004000,
  332. NV_DISPLAY_TV_FORMAT_HD_720p50 = 0x00008000,
  333. NV_DISPLAY_TV_FORMAT_HD_1080p24 = 0x00010000,
  334. NV_DISPLAY_TV_FORMAT_HD_1080i50 = 0x00020000,
  335. NV_DISPLAY_TV_FORMAT_HD_1080p50 = 0x00040000,
  336. NV_DISPLAY_TV_FORMAT_UHD_4Kp30 = 0x00080000,
  337. NV_DISPLAY_TV_FORMAT_UHD_4Kp30_3840 = NV_DISPLAY_TV_FORMAT_UHD_4Kp30,
  338. NV_DISPLAY_TV_FORMAT_UHD_4Kp25 = 0x00100000,
  339. NV_DISPLAY_TV_FORMAT_UHD_4Kp25_3840 = NV_DISPLAY_TV_FORMAT_UHD_4Kp25,
  340. NV_DISPLAY_TV_FORMAT_UHD_4Kp24 = 0x00200000,
  341. NV_DISPLAY_TV_FORMAT_UHD_4Kp24_3840 = NV_DISPLAY_TV_FORMAT_UHD_4Kp24,
  342. NV_DISPLAY_TV_FORMAT_UHD_4Kp24_SMPTE = 0x00400000,
  343. NV_DISPLAY_TV_FORMAT_UHD_4Kp50_3840 = 0x00800000,
  344. NV_DISPLAY_TV_FORMAT_UHD_4Kp60_3840 = 0x00900000,
  345. NV_DISPLAY_TV_FORMAT_UHD_4Kp30_4096 = 0x00A00000,
  346. NV_DISPLAY_TV_FORMAT_UHD_4Kp25_4096 = 0x00B00000,
  347. NV_DISPLAY_TV_FORMAT_UHD_4Kp24_4096 = 0x00C00000,
  348. NV_DISPLAY_TV_FORMAT_UHD_4Kp50_4096 = 0x00D00000,
  349. NV_DISPLAY_TV_FORMAT_UHD_4Kp60_4096 = 0x00E00000,
  350. NV_DISPLAY_TV_FORMAT_SD_OTHER = 0x01000000,
  351. NV_DISPLAY_TV_FORMAT_ED_OTHER = 0x02000000,
  352. NV_DISPLAY_TV_FORMAT_HD_OTHER = 0x04000000,
  353. NV_DISPLAY_TV_FORMAT_ANY = 0x80000000,
  354. } NV_DISPLAY_TV_FORMAT;
  355. //! \ingroup dispcontrol
  356. //! @{
  357. #define NVAPI_MAX_VIEW_TARGET 2
  358. #define NVAPI_ADVANCED_MAX_VIEW_TARGET 4
  359. #ifndef _NV_TARGET_VIEW_MODE_
  360. #define _NV_TARGET_VIEW_MODE_
  361. //! Used in NvAPI_SetView().
  362. typedef enum _NV_TARGET_VIEW_MODE
  363. {
  364. NV_VIEW_MODE_STANDARD = 0,
  365. NV_VIEW_MODE_CLONE = 1,
  366. NV_VIEW_MODE_HSPAN = 2,
  367. NV_VIEW_MODE_VSPAN = 3,
  368. NV_VIEW_MODE_DUALVIEW = 4,
  369. NV_VIEW_MODE_MULTIVIEW = 5,
  370. } NV_TARGET_VIEW_MODE;
  371. #endif
  372. //! @}
  373. // Following definitions are used in NvAPI_SetViewEx.
  374. //! Scaling modes - used in NvAPI_SetViewEx().
  375. //! \ingroup dispcontrol
  376. typedef enum _NV_SCALING
  377. {
  378. NV_SCALING_DEFAULT = 0, //!< No change
  379. // New Scaling Declarations
  380. NV_SCALING_GPU_SCALING_TO_CLOSEST = 1, //!< Balanced - Full Screen
  381. NV_SCALING_GPU_SCALING_TO_NATIVE = 2, //!< Force GPU - Full Screen
  382. NV_SCALING_GPU_SCANOUT_TO_NATIVE = 3, //!< Force GPU - Centered\No Scaling
  383. NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_NATIVE = 5, //!< Force GPU - Aspect Ratio
  384. NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_CLOSEST = 6, //!< Balanced - Aspect Ratio
  385. NV_SCALING_GPU_SCANOUT_TO_CLOSEST = 7, //!< Balanced - Centered\No Scaling
  386. // Legacy Declarations
  387. NV_SCALING_MONITOR_SCALING = NV_SCALING_GPU_SCALING_TO_CLOSEST,
  388. NV_SCALING_ADAPTER_SCALING = NV_SCALING_GPU_SCALING_TO_NATIVE,
  389. NV_SCALING_CENTERED = NV_SCALING_GPU_SCANOUT_TO_NATIVE,
  390. NV_SCALING_ASPECT_SCALING = NV_SCALING_GPU_SCALING_TO_ASPECT_SCANOUT_TO_NATIVE,
  391. NV_SCALING_CUSTOMIZED = 255 //!< For future use
  392. } NV_SCALING;
  393. //! Rotate modes- used in NvAPI_SetViewEx().
  394. //! \ingroup dispcontrol
  395. typedef enum _NV_ROTATE
  396. {
  397. NV_ROTATE_0 = 0,
  398. NV_ROTATE_90 = 1,
  399. NV_ROTATE_180 = 2,
  400. NV_ROTATE_270 = 3,
  401. NV_ROTATE_IGNORED = 4,
  402. } NV_ROTATE;
  403. //! Color formats- used in NvAPI_SetViewEx().
  404. //! \ingroup dispcontrol
  405. #define NVFORMAT_MAKEFOURCC(ch0, ch1, ch2, ch3) \
  406. ((NvU32)(NvU8)(ch0) | ((NvU32)(NvU8)(ch1) << 8) | \
  407. ((NvU32)(NvU8)(ch2) << 16) | ((NvU32)(NvU8)(ch3) << 24 ))
  408. //! Color formats- used in NvAPI_SetViewEx().
  409. //! \ingroup dispcontrol
  410. typedef enum _NV_FORMAT
  411. {
  412. NV_FORMAT_UNKNOWN = 0, //!< unknown. Driver will choose one as following value.
  413. NV_FORMAT_P8 = 41, //!< for 8bpp mode
  414. NV_FORMAT_R5G6B5 = 23, //!< for 16bpp mode
  415. NV_FORMAT_A8R8G8B8 = 21, //!< for 32bpp mode
  416. NV_FORMAT_A16B16G16R16F = 113, //!< for 64bpp(floating point) mode.
  417. } NV_FORMAT;
  418. // TV standard
  419. typedef struct
  420. {
  421. float x; //!< x-coordinate of the viewport top-left point
  422. float y; //!< y-coordinate of the viewport top-left point
  423. float w; //!< Width of the viewport
  424. float h; //!< Height of the viewport
  425. } NV_VIEWPORTF;
  426. //! \ingroup dispcontrol
  427. //! The timing override is not supported yet; must be set to _AUTO. \n
  428. typedef enum _NV_TIMING_OVERRIDE
  429. {
  430. NV_TIMING_OVERRIDE_CURRENT = 0, //!< get the current timing
  431. NV_TIMING_OVERRIDE_AUTO, //!< the timing the driver will use based the current policy
  432. NV_TIMING_OVERRIDE_EDID, //!< EDID timing
  433. NV_TIMING_OVERRIDE_DMT, //!< VESA DMT timing
  434. NV_TIMING_OVERRIDE_DMT_RB, //!< VESA DMT timing with reduced blanking
  435. NV_TIMING_OVERRIDE_CVT, //!< VESA CVT timing
  436. NV_TIMING_OVERRIDE_CVT_RB, //!< VESA CVT timing with reduced blanking
  437. NV_TIMING_OVERRIDE_GTF, //!< VESA GTF timing
  438. NV_TIMING_OVERRIDE_EIA861, //!< EIA 861x pre-defined timing
  439. NV_TIMING_OVERRIDE_ANALOG_TV, //!< analog SD/HDTV timing
  440. NV_TIMING_OVERRIDE_CUST, //!< NV custom timings
  441. NV_TIMING_OVERRIDE_NV_PREDEFINED, //!< NV pre-defined timing (basically the PsF timings)
  442. NV_TIMING_OVERRIDE_NV_PSF = NV_TIMING_OVERRIDE_NV_PREDEFINED,
  443. NV_TIMING_OVERRIDE_NV_ASPR,
  444. NV_TIMING_OVERRIDE_SDI, //!< Override for SDI timing
  445. NV_TIMING_OVRRIDE_MAX,
  446. }NV_TIMING_OVERRIDE;
  447. #ifndef NV_TIMING_STRUCTS_DEFINED
  448. #define NV_TIMING_STRUCTS_DEFINED
  449. //***********************
  450. // The Timing Structure
  451. //***********************
  452. //
  453. //! \ingroup dispcontrol
  454. //! NVIDIA-specific timing extras \n
  455. //! Used in NV_TIMING.
  456. typedef struct tagNV_TIMINGEXT
  457. {
  458. NvU32 flag; //!< Reserved for NVIDIA hardware-based enhancement, such as double-scan.
  459. NvU16 rr; //!< Logical refresh rate to present
  460. NvU32 rrx1k; //!< Physical vertical refresh rate in 0.001Hz
  461. NvU32 aspect; //!< Display aspect ratio Hi(aspect):horizontal-aspect, Low(aspect):vertical-aspect
  462. NvU16 rep; //!< Bit-wise pixel repetition factor: 0x1:no pixel repetition; 0x2:each pixel repeats twice horizontally,..
  463. NvU32 status; //!< Timing standard
  464. NvU8 name[40]; //!< Timing name
  465. }NV_TIMINGEXT;
  466. //! \ingroup dispcontrol
  467. //!The very basic timing structure based on the VESA standard:
  468. //! \code
  469. //! |<----------------------------htotal--------------------------->|
  470. //! ---------"active" video-------->|<-------blanking------>|<-----
  471. //! |<-------hvisible-------->|<-hb->|<-hfp->|<-hsw->|<-hbp->|<-hb->|
  472. //! --------- -+-------------------------+ | | | | |
  473. //! A A | | | | | | |
  474. //! : : | | | | | | |
  475. //! : : | | | | | | |
  476. //! :vertical| addressable video | | | | | |
  477. //! : visible| | | | | | |
  478. //! : : | | | | | | |
  479. //! : : | | | | | | |
  480. //! vertical V | | | | | | |
  481. //! total --+-------------------------+ | | | | |
  482. //! : vb border | | | | |
  483. //! : -----------------------------------+ | | | |
  484. //! : vfp front porch | | | |
  485. //! : -------------------------------------------+ | | |
  486. //! : vsw sync width | | |
  487. //! : ---------------------------------------------------+ | |
  488. //! : vbp back porch | |
  489. //! : -----------------------------------------------------------+ |
  490. //! V vb border |
  491. //! ---------------------------------------------------------------------------+
  492. //! \endcode
  493. typedef struct _NV_TIMING
  494. {
  495. // VESA scan out timing parameters:
  496. NvU16 HVisible; //!< horizontal visible
  497. NvU16 HBorder; //!< horizontal border
  498. NvU16 HFrontPorch; //!< horizontal front porch
  499. NvU16 HSyncWidth; //!< horizontal sync width
  500. NvU16 HTotal; //!< horizontal total
  501. NvU8 HSyncPol; //!< horizontal sync polarity: 1-negative, 0-positive
  502. NvU16 VVisible; //!< vertical visible
  503. NvU16 VBorder; //!< vertical border
  504. NvU16 VFrontPorch; //!< vertical front porch
  505. NvU16 VSyncWidth; //!< vertical sync width
  506. NvU16 VTotal; //!< vertical total
  507. NvU8 VSyncPol; //!< vertical sync polarity: 1-negative, 0-positive
  508. NvU16 interlaced; //!< 1-interlaced, 0-progressive
  509. NvU32 pclk; //!< pixel clock in 10 kHz
  510. //other timing related extras
  511. NV_TIMINGEXT etc;
  512. }NV_TIMING;
  513. #endif //NV_TIMING_STRUCTS_DEFINED
  514. //! \addtogroup dispcontrol
  515. //! Timing-related constants
  516. //! @{
  517. #define NV_TIMING_H_SYNC_POSITIVE 0
  518. #define NV_TIMING_H_SYNC_NEGATIVE 1
  519. #define NV_TIMING_H_SYNC_DEFAULT NV_TIMING_H_SYNC_NEGATIVE
  520. //
  521. #define NV_TIMING_V_SYNC_POSITIVE 0
  522. #define NV_TIMING_V_SYNC_NEGATIVE 1
  523. #define NV_TIMING_V_SYNC_DEFAULT NV_TIMING_V_SYNC_POSITIVE
  524. //
  525. #define NV_TIMING_PROGRESSIVE 0
  526. #define NV_TIMING_INTERLACED 1
  527. #define NV_TIMING_INTERLACED_EXTRA_VBLANK_ON_FIELD2 1
  528. #define NV_TIMING_INTERLACED_NO_EXTRA_VBLANK_ON_FIELD2 2
  529. //! @}
  530. ///////////////////////////////////////////////////////////////////////////////
  531. //
  532. // FUNCTION NAME: NvAPI_SetView
  533. //
  534. //! \fn NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView)
  535. //! This function lets the caller modify the target display arrangement of the selected source display handle in any nView mode.
  536. //! It can also modify or extend the source display in Dualview mode.
  537. //! \note Maps the selected source to the associated target Ids.
  538. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs cannot be enabled with this API.
  539. //!
  540. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.
  541. //! SUPPORTED OS: Windows Vista and higher
  542. //!
  543. //!
  544. //! \since Release: 90
  545. //!
  546. //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNVidiaDisplayHandle().
  547. //! \param [in] pTargetInfo Pointer to array of NV_VIEW_TARGET_INFO, specifying device properties in this view.
  548. //! The first device entry in the array is the physical primary.
  549. //! The device entry with the lowest source id is the desktop primary.
  550. //! \param [in] targetCount Count of target devices specified in pTargetInfo.
  551. //! \param [in] targetView Target view selected from NV_TARGET_VIEW_MODE.
  552. //!
  553. //! \retval NVAPI_OK Completed request
  554. //! \retval NVAPI_ERROR Miscellaneous error occurred
  555. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  556. //
  557. ///////////////////////////////////////////////////////////////////////////////
  558. //! \ingroup dispcontrol
  559. //! Used in NvAPI_SetView() and NvAPI_GetView()
  560. typedef struct
  561. {
  562. NvU32 version; //!< (IN) structure version
  563. NvU32 count; //!< (IN) target count
  564. struct
  565. {
  566. NvU32 deviceMask; //!< (IN/OUT) Device mask
  567. NvU32 sourceId; //!< (IN/OUT) Source ID - values will be based on the number of heads exposed per GPU.
  568. NvU32 bPrimary:1; //!< (OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary.
  569. //!< NvAPI_SetView automatically selects the first target in NV_VIEW_TARGET_INFO index 0 as the GPU's primary view.
  570. NvU32 bInterlaced:1; //!< (IN/OUT) Indicates if the timing being used on this monitor is interlaced.
  571. NvU32 bGDIPrimary:1; //!< (IN/OUT) Indicates if this is the desktop GDI primary.
  572. 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.
  573. } target[NVAPI_MAX_VIEW_TARGET];
  574. } NV_VIEW_TARGET_INFO;
  575. //! \ingroup dispcontrol
  576. #define NV_VIEW_TARGET_INFO_VER MAKE_NVAPI_VERSION(NV_VIEW_TARGET_INFO,2)
  577. //! \ingroup dispcontrol
  578. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.")
  579. NVAPI_INTERFACE NvAPI_SetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView);
  580. ///////////////////////////////////////////////////////////////////////////////
  581. //
  582. // FUNCTION NAME: NvAPI_SetViewEx
  583. //
  584. //! \fn NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView)
  585. //! This function lets caller to modify the display arrangement for selected source display handle in any of the nview modes.
  586. //! It also allows to modify or extend the source display in dualview mode.
  587. //! \note Maps the selected source to the associated target Ids.
  588. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs cannot be enabled with this API.
  589. //!
  590. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.
  591. //! SUPPORTED OS: Windows Vista and higher
  592. //!
  593. //!
  594. //! \since Release: 95
  595. //!
  596. //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with
  597. //! NvAPI_EnumNVidiaDisplayHandle().
  598. //! \param [in] pPathInfo Pointer to array of NV_VIEW_PATH_INFO, specifying device properties in this view.
  599. //! The first device entry in the array is the physical primary.
  600. //! The device entry with the lowest source id is the desktop primary.
  601. //! \param [in] pathCount Count of paths specified in pPathInfo.
  602. //! \param [in] displayView Display view selected from NV_TARGET_VIEW_MODE.
  603. //!
  604. //! \retval NVAPI_OK Completed request
  605. //! \retval NVAPI_ERROR Miscellaneous error occurred
  606. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  607. //
  608. ///////////////////////////////////////////////////////////////////////////////
  609. //! \ingroup dispcontrol
  610. #define NVAPI_MAX_DISPLAY_PATH NVAPI_MAX_VIEW_TARGET
  611. //! \ingroup dispcontrol
  612. #define NVAPI_ADVANCED_MAX_DISPLAY_PATH NVAPI_ADVANCED_MAX_VIEW_TARGET
  613. //! \ingroup dispcontrol
  614. //! Used in NV_DISPLAY_PATH_INFO.
  615. typedef struct
  616. {
  617. NvU32 deviceMask; //!< (IN) Device mask
  618. NvU32 sourceId; //!< (IN) Values will be based on the number of heads exposed per GPU(0, 1?)
  619. NvU32 bPrimary:1; //!< (IN/OUT) Indicates if this is the GPU's primary view target. This is not the desktop GDI primary.
  620. //!< NvAPI_SetViewEx() automatically selects the first target in NV_DISPLAY_PATH_INFO index 0 as the GPU's primary view.
  621. NV_GPU_CONNECTOR_TYPE connector; //!< (IN) Specify connector type. For TV only.
  622. // source mode information
  623. NvU32 width; //!< (IN) Width of the mode
  624. NvU32 height; //!< (IN) Height of the mode
  625. NvU32 depth; //!< (IN) Depth of the mode
  626. NV_FORMAT colorFormat; //!< Color format if it needs to be specified. Not used now.
  627. //rotation setting of the mode
  628. NV_ROTATE rotation; //!< (IN) Rotation setting.
  629. // the scaling mode
  630. NV_SCALING scaling; //!< (IN) Scaling setting
  631. // Timing info
  632. NvU32 refreshRate; //!< (IN) Refresh rate of the mode
  633. NvU32 interlaced:1; //!< (IN) Interlaced mode flag
  634. NV_DISPLAY_TV_FORMAT tvFormat; //!< (IN) To choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE
  635. // Windows desktop position
  636. NvU32 posx; //!< (IN/OUT) X-offset of this display on the Windows desktop
  637. NvU32 posy; //!< (IN/OUT) Y-offset of this display on the Windows desktop
  638. NvU32 bGDIPrimary:1; //!< (IN/OUT) Indicates if this is the desktop GDI primary.
  639. 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.
  640. NvU32 bFocusDisplay:1;//!< (IN) If set, this display path should have the focus after the GPU topology change
  641. 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)
  642. } NV_DISPLAY_PATH;
  643. //! \ingroup dispcontrol
  644. //! Used in NvAPI_SetViewEx() and NvAPI_GetViewEx().
  645. typedef struct
  646. {
  647. NvU32 version; //!< (IN) Structure version
  648. NvU32 count; //!< (IN) Path count
  649. NV_DISPLAY_PATH path[NVAPI_MAX_DISPLAY_PATH];
  650. } NV_DISPLAY_PATH_INFO_V3;
  651. //! \ingroup dispcontrol
  652. //! Used in NvAPI_SetViewEx() and NvAPI_GetViewEx().
  653. typedef struct
  654. {
  655. NvU32 version; //!< (IN) Structure version
  656. NvU32 count; //!< (IN) Path count
  657. NV_DISPLAY_PATH path[NVAPI_ADVANCED_MAX_DISPLAY_PATH];
  658. } NV_DISPLAY_PATH_INFO;
  659. //! \addtogroup dispcontrol
  660. //! Macro for constructing the version fields of NV_DISPLAY_PATH_INFO
  661. //! @{
  662. #define NV_DISPLAY_PATH_INFO_VER NV_DISPLAY_PATH_INFO_VER4
  663. #define NV_DISPLAY_PATH_INFO_VER4 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,4)
  664. #define NV_DISPLAY_PATH_INFO_VER3 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,3)
  665. #define NV_DISPLAY_PATH_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,2)
  666. #define NV_DISPLAY_PATH_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_PATH_INFO,1)
  667. //! @}
  668. //! \ingroup dispcontrol
  669. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_SetDisplayConfig.")
  670. NVAPI_INTERFACE NvAPI_SetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView);
  671. ///////////////////////////////////////////////////////////////////////////////
  672. // SetDisplayConfig/GetDisplayConfig
  673. ///////////////////////////////////////////////////////////////////////////////
  674. //! \ingroup dispcontrol
  675. typedef struct _NV_POSITION
  676. {
  677. NvS32 x;
  678. NvS32 y;
  679. } NV_POSITION;
  680. //! \ingroup dispcontrol
  681. typedef struct _NV_RESOLUTION
  682. {
  683. NvU32 width;
  684. NvU32 height;
  685. NvU32 colorDepth;
  686. } NV_RESOLUTION;
  687. //! \ingroup dispcontrol
  688. typedef struct _NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1
  689. {
  690. NvU32 version;
  691. // Rotation and Scaling
  692. NV_ROTATE rotation; //!< (IN) rotation setting.
  693. NV_SCALING scaling; //!< (IN) scaling setting.
  694. // Refresh Rate
  695. NvU32 refreshRate1K; //!< (IN) Non-interlaced Refresh Rate of the mode, multiplied by 1000, 0 = ignored
  696. //!< This is the value which driver reports to the OS.
  697. // Flags
  698. NvU32 interlaced:1; //!< (IN) Interlaced mode flag, ignored if refreshRate == 0
  699. NvU32 primary:1; //!< (IN) Declares primary display in clone configuration. This is *NOT* GDI Primary.
  700. //!< Only one target can be primary per source. If no primary is specified, the first
  701. //!< target will automatically be primary.
  702. #ifdef NV_PAN_AND_SCAN_DEFINED
  703. NvU32 isPanAndScanTarget:1; //!< Whether on this target Pan and Scan is enabled or has to be enabled. Valid only
  704. //!< when the target is part of clone topology.
  705. #else
  706. NvU32 reservedBit1:1;
  707. #endif
  708. NvU32 disableVirtualModeSupport:1;
  709. NvU32 isPreferredUnscaledTarget:1;
  710. NvU32 reserved:27;
  711. // TV format information
  712. NV_GPU_CONNECTOR_TYPE connector; //!< Specify connector type. For TV only, ignored if tvFormat == NV_DISPLAY_TV_FORMAT_NONE
  713. NV_DISPLAY_TV_FORMAT tvFormat; //!< (IN) to choose the last TV format set this value to NV_DISPLAY_TV_FORMAT_NONE
  714. //!< In case of NvAPI_DISP_GetDisplayConfig(), this field will indicate the currently applied TV format;
  715. //!< if no TV format is applied, this field will have NV_DISPLAY_TV_FORMAT_NONE value.
  716. //!< In case of NvAPI_DISP_SetDisplayConfig(), this field should only be set in case of TVs;
  717. //!< for other displays this field will be ignored and resolution & refresh rate specified in input will be used to apply the TV format.
  718. // Backend (raster) timing standard
  719. NV_TIMING_OVERRIDE timingOverride; //!< Ignored if timingOverride == NV_TIMING_OVERRIDE_CURRENT
  720. NV_TIMING timing; //!< Scan out timing, valid only if timingOverride == NV_TIMING_OVERRIDE_CUST
  721. //!< The value NV_TIMING::NV_TIMINGEXT::rrx1k is obtained from the EDID. The driver may
  722. //!< tweak this value for HDTV, stereo, etc., before reporting it to the OS.
  723. } NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1;
  724. //! \ingroup dispcontrol
  725. typedef NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1 NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO;
  726. //! \ingroup dispcontrol
  727. #define NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_V1,1)
  728. //! \ingroup dispcontrol
  729. #define NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO_VER1
  730. //! \ingroup dispcontrol
  731. typedef struct _NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1
  732. {
  733. NvU32 displayId; //!< Display ID
  734. NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO* details; //!< May be NULL if no advanced settings are required. NULL for Non-NVIDIA Display.
  735. } NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1;
  736. //! \ingroup dispcontrol
  737. typedef struct _NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2
  738. {
  739. NvU32 displayId; //!< Display ID
  740. NV_DISPLAYCONFIG_PATH_ADVANCED_TARGET_INFO* details; //!< May be NULL if no advanced settings are required
  741. NvU32 targetId; //!< Windows CCD target ID. Must be present only for non-NVIDIA adapter, for NVIDIA adapter this parameter is ignored.
  742. } NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2;
  743. //! \ingroup dispcontrol
  744. //! As version is not defined for this structure, we will be using version of NV_DISPLAYCONFIG_PATH_INFO
  745. typedef NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2 NV_DISPLAYCONFIG_PATH_TARGET_INFO;
  746. //! \ingroup dispcontrol
  747. typedef enum _NV_DISPLAYCONFIG_SPANNING_ORIENTATION
  748. {
  749. NV_DISPLAYCONFIG_SPAN_NONE = 0,
  750. NV_DISPLAYCONFIG_SPAN_HORIZONTAL = 1,
  751. NV_DISPLAYCONFIG_SPAN_VERTICAL = 2,
  752. } NV_DISPLAYCONFIG_SPANNING_ORIENTATION;
  753. //! \ingroup dispcontrol
  754. typedef struct _NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1
  755. {
  756. NV_RESOLUTION resolution;
  757. NV_FORMAT colorFormat; //!< Ignored at present, must be NV_FORMAT_UNKNOWN (0)
  758. NV_POSITION position; //!< Is all positions are 0 or invalid, displays will be automatically
  759. //!< positioned from left to right with GDI Primary at 0,0, and all
  760. //!< other displays in the order of the path array.
  761. NV_DISPLAYCONFIG_SPANNING_ORIENTATION spanningOrientation; //!< Spanning is only supported on XP
  762. NvU32 bGDIPrimary : 1;
  763. NvU32 bSLIFocus : 1;
  764. NvU32 reserved : 30; //!< Must be 0
  765. } NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1;
  766. //! \ingroup dispcontrol
  767. typedef struct _NV_DISPLAYCONFIG_PATH_INFO_V1
  768. {
  769. NvU32 version;
  770. NvU32 reserved_sourceId; //!< This field is reserved. There is ongoing debate if we need this field.
  771. //!< Identifies sourceIds used by Windows. If all sourceIds are 0,
  772. //!< these will be computed automatically.
  773. NvU32 targetInfoCount; //!< Number of elements in targetInfo array
  774. NV_DISPLAYCONFIG_PATH_TARGET_INFO_V1* targetInfo;
  775. NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1* sourceModeInfo; //!< May be NULL if mode info is not important
  776. } NV_DISPLAYCONFIG_PATH_INFO_V1;
  777. //! \ingroup dispcontrol
  778. //! This define is temporary and must be removed once DVS failure is fixed.
  779. #define _NV_DISPLAYCONFIG_PATH_INFO_V2 _NV_DISPLAYCONFIG_PATH_INFO
  780. //! \ingroup dispcontrol
  781. typedef struct _NV_DISPLAYCONFIG_PATH_INFO_V2
  782. {
  783. NvU32 version;
  784. union {
  785. NvU32 sourceId; //!< Identifies sourceId used by Windows CCD. This can be optionally set.
  786. NvU32 reserved_sourceId; //!< Only for compatibility
  787. };
  788. NvU32 targetInfoCount; //!< Number of elements in targetInfo array
  789. NV_DISPLAYCONFIG_PATH_TARGET_INFO_V2* targetInfo;
  790. NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1* sourceModeInfo; //!< May be NULL if mode info is not important
  791. NvU32 IsNonNVIDIAAdapter : 1; //!< True for non-NVIDIA adapter.
  792. NvU32 reserved : 31; //!< Must be 0
  793. void *pOSAdapterID; //!< Used by Non-NVIDIA adapter for pointer to OS Adapter of LUID
  794. //!< type, type casted to void *.
  795. } NV_DISPLAYCONFIG_PATH_INFO_V2;
  796. //! \ingroup dispcontrol
  797. #define NV_DISPLAYCONFIG_PATH_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_INFO_V1,1)
  798. //! \ingroup dispcontrol
  799. #define NV_DISPLAYCONFIG_PATH_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAYCONFIG_PATH_INFO_V2,2)
  800. #ifndef NV_DISPLAYCONFIG_PATH_INFO_VER
  801. typedef NV_DISPLAYCONFIG_PATH_INFO_V2 NV_DISPLAYCONFIG_PATH_INFO;
  802. #define NV_DISPLAYCONFIG_PATH_INFO_VER NV_DISPLAYCONFIG_PATH_INFO_VER2
  803. typedef NV_DISPLAYCONFIG_SOURCE_MODE_INFO_V1 NV_DISPLAYCONFIG_SOURCE_MODE_INFO;
  804. #endif
  805. //! \ingroup dispcontrol
  806. typedef enum _NV_DISPLAYCONFIG_FLAGS
  807. {
  808. NV_DISPLAYCONFIG_VALIDATE_ONLY = 0x00000001,
  809. NV_DISPLAYCONFIG_SAVE_TO_PERSISTENCE = 0x00000002,
  810. NV_DISPLAYCONFIG_DRIVER_RELOAD_ALLOWED = 0x00000004, //!< Driver reload is permitted if necessary
  811. NV_DISPLAYCONFIG_FORCE_MODE_ENUMERATION = 0x00000008, //!< Refresh OS mode list.
  812. } NV_DISPLAYCONFIG_FLAGS;
  813. #define NVAPI_UNICODE_STRING_MAX 2048
  814. #define NVAPI_BINARY_DATA_MAX 4096
  815. typedef NvU16 NvAPI_UnicodeString[NVAPI_UNICODE_STRING_MAX];
  816. typedef const NvU16 *NvAPI_LPCWSTR;
  817. ///////////////////////////////////////////////////////////////////////////////
  818. //
  819. // FUNCTION NAME: NvAPI_GetDisplayDriverVersion
  820. //! \fn NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion)
  821. //! This function returns a struct that describes aspects of the display driver
  822. //! build.
  823. //!
  824. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_SYS_GetDriverAndBranchVersion.
  825. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  826. //!
  827. //!
  828. //! \since Release: 80
  829. //!
  830. //! \param [in] hNvDisplay NVIDIA display handle.
  831. //! \param [out] pVersion Pointer to NV_DISPLAY_DRIVER_VERSION struc
  832. //!
  833. //! \retval NVAPI_ERROR
  834. //! \retval NVAPI_OK
  835. ///////////////////////////////////////////////////////////////////////////////
  836. //! \ingroup driverapi
  837. //! Used in NvAPI_GetDisplayDriverVersion()
  838. typedef struct
  839. {
  840. NvU32 version; // Structure version
  841. NvU32 drvVersion;
  842. NvU32 bldChangeListNum;
  843. NvAPI_ShortString szBuildBranchString;
  844. NvAPI_ShortString szAdapterString;
  845. } NV_DISPLAY_DRIVER_VERSION;
  846. //! \ingroup driverapi
  847. #define NV_DISPLAY_DRIVER_VERSION_VER MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_VERSION,1)
  848. //! \ingroup driverapi
  849. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_SYS_GetDriverAndBranchVersion.")
  850. NVAPI_INTERFACE NvAPI_GetDisplayDriverVersion(NvDisplayHandle hNvDisplay, NV_DISPLAY_DRIVER_VERSION *pVersion);
  851. ///////////////////////////////////////////////////////////////////////////////
  852. //
  853. // FUNCTION NAME: NvAPI_OGL_ExpertModeSet[Get]
  854. //
  855. //! \name NvAPI_OGL_ExpertModeSet[Get] Functions
  856. //@{
  857. //! This function configures OpenGL Expert Mode, an API usage feedback and
  858. //! advice reporting mechanism. The effects of this call are
  859. //! applied only to the current context, and are reset to the
  860. //! defaults when the context is destroyed.
  861. //!
  862. //! \note This feature is valid at runtime only when GLExpert
  863. //! functionality has been built into the OpenGL driver
  864. //! installed on the system. All Windows Vista OpenGL
  865. //! drivers provided by NVIDIA have this instrumentation
  866. //! included by default. Windows XP, however, requires a
  867. //! special display driver available with the NVIDIA
  868. //! PerfSDK found at developer.nvidia.com.
  869. //!
  870. //! \note These functions are valid only for the current OpenGL
  871. //! context. Calling these functions prior to creating a
  872. //! context and calling MakeCurrent with it will result
  873. //! in errors and undefined behavior.
  874. //!
  875. //! SUPPORTED OS: Windows XP and higher
  876. //!
  877. //!
  878. //! \since Release: 80
  879. //!
  880. //! \param expertDetailMask Mask made up of NVAPI_OGLEXPERT_DETAIL bits,
  881. //! this parameter specifies the detail level in
  882. //! the feedback stream.
  883. //!
  884. //! \param expertReportMask Mask made up of NVAPI_OGLEXPERT_REPORT bits,
  885. //! this parameter specifies the areas of
  886. //! functional interest.
  887. //!
  888. //! \param expertOutputMask Mask made up of NVAPI_OGLEXPERT_OUTPUT bits,
  889. //! this parameter specifies the feedback output
  890. //! location.
  891. //!
  892. //! \param expertCallback Used in conjunction with OUTPUT_TO_CALLBACK,
  893. //! this is a simple callback function the user
  894. //! may use to obtain the feedback stream. The
  895. //! function will be called once per fully
  896. //! qualified feedback stream extry.
  897. //!
  898. //! \retval NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  899. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU found
  900. //! \retval NVAPI_OPENGL_CONTEXT_NOT_CURRENT No NVIDIA OpenGL context
  901. //! which supports GLExpert
  902. //! has been made current
  903. //! \retval NVAPI_ERROR OpenGL driver failed to load properly
  904. //! \retval NVAPI_OK Success
  905. //
  906. ///////////////////////////////////////////////////////////////////////////////
  907. //! \addtogroup oglapi
  908. //! @{
  909. #define NVAPI_OGLEXPERT_DETAIL_NONE 0x00000000
  910. #define NVAPI_OGLEXPERT_DETAIL_ERROR 0x00000001
  911. #define NVAPI_OGLEXPERT_DETAIL_SWFALLBACK 0x00000002
  912. #define NVAPI_OGLEXPERT_DETAIL_BASIC_INFO 0x00000004
  913. #define NVAPI_OGLEXPERT_DETAIL_DETAILED_INFO 0x00000008
  914. #define NVAPI_OGLEXPERT_DETAIL_PERFORMANCE_WARNING 0x00000010
  915. #define NVAPI_OGLEXPERT_DETAIL_QUALITY_WARNING 0x00000020
  916. #define NVAPI_OGLEXPERT_DETAIL_USAGE_WARNING 0x00000040
  917. #define NVAPI_OGLEXPERT_DETAIL_ALL 0xFFFFFFFF
  918. #define NVAPI_OGLEXPERT_REPORT_NONE 0x00000000
  919. #define NVAPI_OGLEXPERT_REPORT_ERROR 0x00000001
  920. #define NVAPI_OGLEXPERT_REPORT_SWFALLBACK 0x00000002
  921. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_VERTEX 0x00000004
  922. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_GEOMETRY 0x00000008
  923. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_XFB 0x00000010
  924. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_RASTER 0x00000020
  925. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAGMENT 0x00000040
  926. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_ROP 0x00000080
  927. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_FRAMEBUFFER 0x00000100
  928. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_PIXEL 0x00000200
  929. #define NVAPI_OGLEXPERT_REPORT_PIPELINE_TEXTURE 0x00000400
  930. #define NVAPI_OGLEXPERT_REPORT_OBJECT_BUFFEROBJECT 0x00000800
  931. #define NVAPI_OGLEXPERT_REPORT_OBJECT_TEXTURE 0x00001000
  932. #define NVAPI_OGLEXPERT_REPORT_OBJECT_PROGRAM 0x00002000
  933. #define NVAPI_OGLEXPERT_REPORT_OBJECT_FBO 0x00004000
  934. #define NVAPI_OGLEXPERT_REPORT_FEATURE_SLI 0x00008000
  935. #define NVAPI_OGLEXPERT_REPORT_ALL 0xFFFFFFFF
  936. #define NVAPI_OGLEXPERT_OUTPUT_TO_NONE 0x00000000
  937. #define NVAPI_OGLEXPERT_OUTPUT_TO_CONSOLE 0x00000001
  938. #define NVAPI_OGLEXPERT_OUTPUT_TO_DEBUGGER 0x00000004
  939. #define NVAPI_OGLEXPERT_OUTPUT_TO_CALLBACK 0x00000008
  940. #define NVAPI_OGLEXPERT_OUTPUT_TO_ALL 0xFFFFFFFF
  941. //! @}
  942. ///////////////////////////////////////////////////////////////////////////////
  943. //
  944. // FUNCTION TYPE: NVAPI_OGLEXPERT_CALLBACK
  945. //
  946. //! DESCRIPTION: Used in conjunction with OUTPUT_TO_CALLBACK, this is a simple
  947. //! callback function the user may use to obtain the feedback
  948. //! stream. The function will be called once per fully qualified
  949. //! feedback stream entry.
  950. //!
  951. //! \param categoryId Contains the bit from the NVAPI_OGLEXPERT_REPORT
  952. //! mask that corresponds to the current message
  953. //! \param messageId Unique ID for the current message
  954. //! \param detailLevel Contains the bit from the NVAPI_OGLEXPERT_DETAIL
  955. //! mask that corresponds to the current message
  956. //! \param objectId Unique ID of the object that corresponds to the
  957. //! current message
  958. //! \param messageStr Text string from the current message
  959. //!
  960. //! \ingroup oglapi
  961. ///////////////////////////////////////////////////////////////////////////////
  962. typedef void (* NVAPI_OGLEXPERT_CALLBACK) (unsigned int categoryId, unsigned int messageId, unsigned int detailLevel, int objectId, const char *messageStr);
  963. //! \ingroup oglapi
  964. //! SUPPORTED OS: Windows XP and higher
  965. //!
  966. NVAPI_INTERFACE NvAPI_OGL_ExpertModeSet(NvU32 expertDetailLevel,
  967. NvU32 expertReportMask,
  968. NvU32 expertOutputMask,
  969. NVAPI_OGLEXPERT_CALLBACK expertCallback);
  970. //! \addtogroup oglapi
  971. //! SUPPORTED OS: Windows XP and higher
  972. //!
  973. NVAPI_INTERFACE NvAPI_OGL_ExpertModeGet(NvU32 *pExpertDetailLevel,
  974. NvU32 *pExpertReportMask,
  975. NvU32 *pExpertOutputMask,
  976. NVAPI_OGLEXPERT_CALLBACK *pExpertCallback);
  977. //@}
  978. ///////////////////////////////////////////////////////////////////////////////
  979. //
  980. //! \name NvAPI_OGL_ExpertModeDefaultsSet[Get] Functions
  981. //!
  982. //@{
  983. //! This function configures OpenGL Expert Mode global defaults. These settings
  984. //! apply to any OpenGL application which starts up after these
  985. //! values are applied (i.e. these settings *do not* apply to
  986. //! currently running applications).
  987. //!
  988. //! SUPPORTED OS: Windows XP and higher
  989. //!
  990. //!
  991. //! \since Release: 80
  992. //!
  993. //! \param expertDetailLevel Value which specifies the detail level in
  994. //! the feedback stream. This is a mask made up
  995. //! of NVAPI_OGLEXPERT_LEVEL bits.
  996. //!
  997. //! \param expertReportMask Mask made up of NVAPI_OGLEXPERT_REPORT bits,
  998. //! this parameter specifies the areas of
  999. //! functional interest.
  1000. //!
  1001. //! \param expertOutputMask Mask made up of NVAPI_OGLEXPERT_OUTPUT bits,
  1002. //! this parameter specifies the feedback output
  1003. //! location. Note that using OUTPUT_TO_CALLBACK
  1004. //! here is meaningless and has no effect, but
  1005. //! using it will not cause an error.
  1006. //!
  1007. //! \return ::NVAPI_ERROR or ::NVAPI_OK
  1008. //
  1009. ///////////////////////////////////////////////////////////////////////////////
  1010. //! \ingroup oglapi
  1011. //! SUPPORTED OS: Windows XP and higher
  1012. //!
  1013. NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsSet(NvU32 expertDetailLevel,
  1014. NvU32 expertReportMask,
  1015. NvU32 expertOutputMask);
  1016. //! \addtogroup oglapi
  1017. //! SUPPORTED OS: Windows XP and higher
  1018. //!
  1019. NVAPI_INTERFACE NvAPI_OGL_ExpertModeDefaultsGet(NvU32 *pExpertDetailLevel,
  1020. NvU32 *pExpertReportMask,
  1021. NvU32 *pExpertOutputMask);
  1022. //@}
  1023. ///////////////////////////////////////////////////////////////////////////////
  1024. //
  1025. // FUNCTION NAME: NvAPI_EnumTCCPhysicalGPUs
  1026. //
  1027. //! This function returns an array of physical GPU handles that are in TCC Mode.
  1028. //! Each handle represents a physical GPU present in the system in TCC Mode.
  1029. //! That GPU may not be visible to the OS directly.
  1030. //!
  1031. //! The array nvGPUHandle will be filled with physical GPU handle values. The returned
  1032. //! gpuCount determines how many entries in the array are valid.
  1033. //!
  1034. //! NOTE: Handles enumerated by this API are only valid for NvAPIs that are tagged as TCC_SUPPORTED
  1035. //! If handle is passed to any other API, it will fail with NVAPI_INVALID_HANDLE
  1036. //!
  1037. //! For WDDM GPU handles please use NvAPI_EnumPhysicalGPUs()
  1038. //!
  1039. //! SUPPORTED OS: Windows Vista and higher, Mac OS X
  1040. //!
  1041. //!
  1042. //!
  1043. //! \param [out] nvGPUHandle Physical GPU array that will contain all TCC Physical GPUs
  1044. //! \param [out] pGpuCount count represent the number of valid entries in nvGPUHandle
  1045. //!
  1046. //!
  1047. //! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL
  1048. //! \retval NVAPI_OK One or more handles were returned
  1049. //! \ingroup gpu
  1050. ///////////////////////////////////////////////////////////////////////////////
  1051. NVAPI_INTERFACE NvAPI_EnumTCCPhysicalGPUs( NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
  1052. ///////////////////////////////////////////////////////////////////////////////
  1053. //
  1054. // FUNCTION NAME: NvAPI_EnumLogicalGPUs
  1055. //
  1056. //! This function returns an array of logical GPU handles.
  1057. //!
  1058. //! Each handle represents one or more GPUs acting in concert as a single graphics device.
  1059. //!
  1060. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  1061. //!
  1062. //! The array nvGPUHandle will be filled with logical GPU handle values. The returned
  1063. //! gpuCount determines how many entries in the array are valid.
  1064. //!
  1065. //! \note All logical GPUs handles get invalidated on a GPU topology change, so the calling
  1066. //! application is required to renum the logical GPU handles to get latest physical handle
  1067. //! mapping after every GPU topology change activated by a call to NvAPI_SetGpuTopologies().
  1068. //!
  1069. //! To detect if SLI rendering is enabled, use NvAPI_D3D_GetCurrentSLIState().
  1070. //!
  1071. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1072. //!
  1073. //!
  1074. //! \since Release: 80
  1075. //!
  1076. //! \retval NVAPI_INVALID_ARGUMENT nvGPUHandle or pGpuCount is NULL
  1077. //! \retval NVAPI_OK One or more handles were returned
  1078. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1079. //! \ingroup gpu
  1080. ///////////////////////////////////////////////////////////////////////////////
  1081. NVAPI_INTERFACE NvAPI_EnumLogicalGPUs(NvLogicalGpuHandle nvGPUHandle[NVAPI_MAX_LOGICAL_GPUS], NvU32 *pGpuCount);
  1082. ///////////////////////////////////////////////////////////////////////////////
  1083. //
  1084. // FUNCTION NAME: NvAPI_GetPhysicalGPUsFromDisplay
  1085. //
  1086. //! This function returns an array of physical GPU handles associated with the specified display.
  1087. //!
  1088. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  1089. //!
  1090. //! The array nvGPUHandle will be filled with physical GPU handle values. The returned
  1091. //! gpuCount determines how many entries in the array are valid.
  1092. //!
  1093. //! If the display corresponds to more than one physical GPU, the first GPU returned
  1094. //! is the one with the attached active output.
  1095. //!
  1096. //! SUPPORTED OS: Windows XP and higher
  1097. //!
  1098. //!
  1099. //! \since Release: 80
  1100. //!
  1101. //! \retval NVAPI_INVALID_ARGUMENT hNvDisp is not valid; nvGPUHandle or pGpuCount is NULL
  1102. //! \retval NVAPI_OK One or more handles were returned
  1103. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND no NVIDIA GPU driving a display was found
  1104. //! \ingroup gpu
  1105. ///////////////////////////////////////////////////////////////////////////////
  1106. NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromDisplay(NvDisplayHandle hNvDisp, NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
  1107. ///////////////////////////////////////////////////////////////////////////////
  1108. //
  1109. // FUNCTION NAME: NvAPI_GetPhysicalGPUFromUnAttachedDisplay
  1110. //
  1111. //! This function returns a physical GPU handle associated with the specified unattached display.
  1112. //! The source GPU is a physical render GPU which renders the frame buffer but may or may not drive the scan out.
  1113. //!
  1114. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  1115. //!
  1116. //! SUPPORTED OS: Windows XP and higher
  1117. //!
  1118. //!
  1119. //! \since Release: 80
  1120. //!
  1121. //! \retval NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pPhysicalGpu is NULL.
  1122. //! \retval NVAPI_OK One or more handles were returned
  1123. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1124. //! \ingroup gpu
  1125. ///////////////////////////////////////////////////////////////////////////////
  1126. NVAPI_INTERFACE NvAPI_GetPhysicalGPUFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvPhysicalGpuHandle *pPhysicalGpu);
  1127. ///////////////////////////////////////////////////////////////////////////////
  1128. //
  1129. // FUNCTION NAME: NvAPI_GetLogicalGPUFromDisplay
  1130. //
  1131. //! This function returns the logical GPU handle associated with the specified display.
  1132. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  1133. //!
  1134. //! SUPPORTED OS: Windows XP and higher
  1135. //!
  1136. //!
  1137. //! \since Release: 80
  1138. //!
  1139. //! \retval NVAPI_INVALID_ARGUMENT hNvDisp is not valid; pLogicalGPU is NULL
  1140. //! \retval NVAPI_OK One or more handles were returned
  1141. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1142. //! \ingroup gpu
  1143. ///////////////////////////////////////////////////////////////////////////////
  1144. NVAPI_INTERFACE NvAPI_GetLogicalGPUFromDisplay(NvDisplayHandle hNvDisp, NvLogicalGpuHandle *pLogicalGPU);
  1145. ///////////////////////////////////////////////////////////////////////////////
  1146. //
  1147. // FUNCTION NAME: NvAPI_GetLogicalGPUFromPhysicalGPU
  1148. //
  1149. //! This function returns the logical GPU handle associated with specified physical GPU handle.
  1150. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  1151. //!
  1152. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1153. //!
  1154. //!
  1155. //! \since Release: 80
  1156. //!
  1157. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGPU is not valid; pLogicalGPU is NULL
  1158. //! \retval NVAPI_OK One or more handles were returned
  1159. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1160. //! \ingroup gpu
  1161. ///////////////////////////////////////////////////////////////////////////////
  1162. NVAPI_INTERFACE NvAPI_GetLogicalGPUFromPhysicalGPU(NvPhysicalGpuHandle hPhysicalGPU, NvLogicalGpuHandle *pLogicalGPU);
  1163. ///////////////////////////////////////////////////////////////////////////////
  1164. //
  1165. // FUNCTION NAME: NvAPI_GetPhysicalGPUsFromLogicalGPU
  1166. //
  1167. //! This function returns the physical GPU handles associated with the specified logical GPU handle.
  1168. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  1169. //!
  1170. //! The array hPhysicalGPU will be filled with physical GPU handle values. The returned
  1171. //! gpuCount determines how many entries in the array are valid.
  1172. //!
  1173. //! SUPPORTED OS: Windows XP and higher
  1174. //!
  1175. //!
  1176. //! \since Release: 80
  1177. //!
  1178. //! \retval NVAPI_INVALID_ARGUMENT hLogicalGPU is not valid; hPhysicalGPU is NULL
  1179. //! \retval NVAPI_OK One or more handles were returned
  1180. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1181. //! \retval NVAPI_EXPECTED_LOGICAL_GPU_HANDLE hLogicalGPU was not a logical GPU handle
  1182. //! \ingroup gpu
  1183. ///////////////////////////////////////////////////////////////////////////////
  1184. NVAPI_INTERFACE NvAPI_GetPhysicalGPUsFromLogicalGPU(NvLogicalGpuHandle hLogicalGPU,NvPhysicalGpuHandle hPhysicalGPU[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
  1185. ///////////////////////////////////////////////////////////////////////////////
  1186. //
  1187. // FUNCTION NAME: NvAPI_GPU_GetGpuCoreCount
  1188. //
  1189. //! DESCRIPTION: Retrieves the total number of cores defined for a GPU.
  1190. //! Returns 0 on architectures that don't define GPU cores.
  1191. //!
  1192. //! SUPPORTED OS: Windows XP and higher
  1193. //!
  1194. //!
  1195. //! TCC_SUPPORTED
  1196. //!
  1197. //! \retval ::NVAPI_INVALID_ARGUMENT pCount is NULL
  1198. //! \retval ::NVAPI_OK *pCount is set
  1199. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND no NVIDIA GPU driving a display was found
  1200. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1201. //! \retval ::NVAPI_NOT_SUPPORTED API call is not supported on current architecture
  1202. //!
  1203. //! \ingroup gpu
  1204. ///////////////////////////////////////////////////////////////////////////////
  1205. NVAPI_INTERFACE NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pCount);
  1206. ///////////////////////////////////////////////////////////////////////////////
  1207. //
  1208. // FUNCTION NAME: NvAPI_GPU_GetAllOutputs
  1209. //
  1210. //! This function returns set of all GPU-output identifiers as a bitmask.
  1211. //!
  1212. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetAllDisplayIds.
  1213. //! SUPPORTED OS: Windows XP and higher
  1214. //!
  1215. //!
  1216. //! \since Release: 85
  1217. //!
  1218. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL.
  1219. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers.
  1220. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1221. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1222. //! \ingroup gpu
  1223. ///////////////////////////////////////////////////////////////////////////////
  1224. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetAllDisplayIds.")
  1225. NVAPI_INTERFACE NvAPI_GPU_GetAllOutputs(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pOutputsMask);
  1226. ///////////////////////////////////////////////////////////////////////////////
  1227. //
  1228. // FUNCTION NAME: NvAPI_GPU_GetConnectedOutputs
  1229. //
  1230. //! This function is the same as NvAPI_GPU_GetAllOutputs() but returns only the set of GPU output
  1231. //! identifiers that are connected to display devices.
  1232. //!
  1233. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  1234. //! SUPPORTED OS: Windows XP and higher
  1235. //!
  1236. //!
  1237. //! \since Release: 80
  1238. //!
  1239. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL.
  1240. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers.
  1241. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1242. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1243. //! \ingroup gpu
  1244. ///////////////////////////////////////////////////////////////////////////////
  1245. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  1246. NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  1247. ///////////////////////////////////////////////////////////////////////////////
  1248. //
  1249. // FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputs
  1250. //
  1251. //! DESCRIPTION: This function is the same as NvAPI_GPU_GetConnectedOutputs() but returns only the set of GPU-output
  1252. //! identifiers that can be selected in an SLI configuration.
  1253. //! NOTE: This function matches NvAPI_GPU_GetConnectedOutputs()
  1254. //! - On systems which are not SLI capable.
  1255. //! - If the queried GPU is not part of a valid SLI group.
  1256. //!
  1257. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  1258. //! SUPPORTED OS: Windows XP and higher
  1259. //!
  1260. //!
  1261. //! \since Release: 170
  1262. //!
  1263. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  1264. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers
  1265. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1266. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  1267. //!
  1268. //! \ingroup gpu
  1269. ///////////////////////////////////////////////////////////////////////////////
  1270. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  1271. NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  1272. //! \ingroup gpu
  1273. typedef enum
  1274. {
  1275. NV_MONITOR_CONN_TYPE_UNINITIALIZED = 0,
  1276. NV_MONITOR_CONN_TYPE_VGA,
  1277. NV_MONITOR_CONN_TYPE_COMPONENT,
  1278. NV_MONITOR_CONN_TYPE_SVIDEO,
  1279. NV_MONITOR_CONN_TYPE_HDMI,
  1280. NV_MONITOR_CONN_TYPE_DVI,
  1281. NV_MONITOR_CONN_TYPE_LVDS,
  1282. NV_MONITOR_CONN_TYPE_DP,
  1283. NV_MONITOR_CONN_TYPE_COMPOSITE,
  1284. NV_MONITOR_CONN_TYPE_UNKNOWN = -1
  1285. } NV_MONITOR_CONN_TYPE;
  1286. //! \addtogroup gpu
  1287. //! @{
  1288. #define NV_GPU_CONNECTED_IDS_FLAG_UNCACHED NV_BIT(0) //!< Get uncached connected devices
  1289. #define NV_GPU_CONNECTED_IDS_FLAG_SLI NV_BIT(1) //!< Get devices such that those can be selected in an SLI configuration
  1290. #define NV_GPU_CONNECTED_IDS_FLAG_LIDSTATE NV_BIT(2) //!< Get devices such that to reflect the Lid State
  1291. #define NV_GPU_CONNECTED_IDS_FLAG_FAKE NV_BIT(3) //!< Get devices that includes the fake connected monitors
  1292. #define NV_GPU_CONNECTED_IDS_FLAG_EXCLUDE_MST NV_BIT(4) //!< Excludes devices that are part of the multi stream topology.
  1293. //! @}
  1294. //! \ingroup gpu
  1295. typedef struct _NV_GPU_DISPLAYIDS
  1296. {
  1297. NvU32 version;
  1298. 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
  1299. //!< GPU connector type from NvAPI_GPU_GetConnectorInfo/NvAPI_GPU_GetConnectorInfoEx
  1300. NvU32 displayId; //!< this is a unique identifier for each device
  1301. NvU32 isDynamic:1; //!< if bit is set then this display is part of MST topology and it's a dynamic
  1302. 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
  1303. //!< a single multi stream capable monitor is connected to it, the monitor will share the display id with the RootNode.
  1304. //!< When there is more than one monitor connected in a multi stream topology, then the root node will have a separate displayId.
  1305. NvU32 isActive:1; //!< if bit is set then this display is being actively driven
  1306. NvU32 isCluster:1; //!< if bit is set then this display is the representative display
  1307. NvU32 isOSVisible:1; //!< if bit is set, then this display is reported to the OS
  1308. NvU32 isWFD:1; //!< if bit is set, then this display is wireless
  1309. NvU32 isConnected:1; //!< if bit is set, then this display is connected
  1310. NvU32 reservedInternal:10; //!< Do not use
  1311. NvU32 isPhysicallyConnected:1; //!< if bit is set, then this display is a phycially connected display; Valid only when isConnected bit is set
  1312. NvU32 reserved: 14; //!< must be zero
  1313. } NV_GPU_DISPLAYIDS;
  1314. //! \ingroup gpu
  1315. //! Macro for constructing the version field of ::_NV_GPU_DISPLAYIDS
  1316. #define NV_GPU_DISPLAYIDS_VER1 MAKE_NVAPI_VERSION(NV_GPU_DISPLAYIDS,1)
  1317. #define NV_GPU_DISPLAYIDS_VER2 MAKE_NVAPI_VERSION(NV_GPU_DISPLAYIDS,3)
  1318. #define NV_GPU_DISPLAYIDS_VER NV_GPU_DISPLAYIDS_VER2
  1319. ///////////////////////////////////////////////////////////////////////////////
  1320. //
  1321. // FUNCTION NAME: NvAPI_GPU_GetConnectedDisplayIds
  1322. //
  1323. //! \code
  1324. //! DESCRIPTION: Due to space limitation NvAPI_GPU_GetConnectedOutputs can return maximum 32 devices, but
  1325. //! this is no longer true for DPMST. NvAPI_GPU_GetConnectedDisplayIds will return all
  1326. //! the connected display devices in the form of displayIds for the associated hPhysicalGpu.
  1327. //! This function can accept set of flags to request cached, uncached, sli and lid to get the connected devices.
  1328. //! Default value for flags will be cached .
  1329. //! HOW TO USE: 1) for each PhysicalGpu, make a call to get the number of connected displayId's
  1330. //! using NvAPI_GPU_GetConnectedDisplayIds by passing the pDisplayIds as NULL
  1331. //! On call success:
  1332. //! 2) Allocate memory based on pDisplayIdCount then make a call NvAPI_GPU_GetConnectedDisplayIds to populate DisplayIds
  1333. //! SUPPORTED OS: Windows XP and higher
  1334. //!
  1335. //! PARAMETERS: hPhysicalGpu (IN) - GPU selection
  1336. //! flags (IN) - One or more defines from NV_GPU_CONNECTED_IDS_FLAG_* as valid flags.
  1337. //! pDisplayIds (IN/OUT) - Pointer to an NV_GPU_DISPLAYIDS struct, each entry represents a one displayID and its attributes
  1338. //! pDisplayIdCount(OUT)- Number of displayId's.
  1339. //!
  1340. //! RETURN STATUS: NVAPI_INVALID_ARGUMENT: hPhysicalGpu or pDisplayIds or pDisplayIdCount is NULL
  1341. //! NVAPI_OK: *pDisplayIds contains a set of GPU-output identifiers
  1342. //! NVAPI_NVIDIA_DEVICE_NOT_FOUND: no NVIDIA GPU driving a display was found
  1343. //! NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  1344. //! \endcode
  1345. //! \ingroup gpu
  1346. ///////////////////////////////////////////////////////////////////////////////
  1347. NVAPI_INTERFACE NvAPI_GPU_GetConnectedDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __inout_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS* pDisplayIds, __inout NvU32* pDisplayIdCount, __in NvU32 flags);
  1348. ///////////////////////////////////////////////////////////////////////////////
  1349. //
  1350. // FUNCTION NAME: NvAPI_GPU_GetAllDisplayIds
  1351. //
  1352. //! DESCRIPTION: This API returns display IDs for all possible outputs on the GPU.
  1353. //! For DPMST connector, it will return display IDs for all the video sinks in the topology. \n
  1354. //! 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
  1355. //! a) hPhysicalGpu - a valid GPU handle(enumerated using NvAPI_EnumPhysicalGPUs()) as input, \n
  1356. //! b) pDisplayIds - NULL, as we just want to get the display ID count. \n
  1357. //! c) pDisplayIdCount - a valid pointer to NvU32, whose value is set to ZERO. \n
  1358. //! If all parameters are correct and this call is successful, this call will return the display ID's count. \n
  1359. //! 2. To get the display ID array, make the second call to NvAPI_GPU_GetAllDisplayIds() with \n
  1360. //! a) hPhysicalGpu - should be same value which was sent in first call, \n
  1361. //! b) pDisplayIds - pointer to the display ID array allocated by caller based on display ID count, \n
  1362. //! eg. malloc(sizeof(NV_GPU_DISPLAYIDS) * pDisplayIdCount). \n
  1363. //! c) pDisplayIdCount - a valid pointer to NvU32. This indicates for how many display IDs \n
  1364. //! the memory is allocated(pDisplayIds) by the caller. \n
  1365. //! If all parameters are correct and this call is successful, this call will return the display ID array and actual
  1366. //! display ID count (which was obtained in the first call to NvAPI_GPU_GetAllDisplayIds). If the input display ID count is
  1367. //! less than the actual display ID count, it will overwrite the input and give the pDisplayIdCount as actual count and the
  1368. //! API will return NVAPI_INSUFFICIENT_BUFFER.
  1369. //!
  1370. //! SUPPORTED OS: Windows XP and higher
  1371. //!
  1372. //!
  1373. //! \param [in] hPhysicalGpu GPU selection.
  1374. //! \param [in,out] DisplayIds Pointer to an array of NV_GPU_DISPLAYIDS structures, each entry represents one displayID
  1375. //! and its attributes.
  1376. //! \param [in,out] pDisplayIdCount As input, this parameter indicates the number of display's id's for which caller has
  1377. //! allocated the memory. As output, it will return the actual number of display IDs.
  1378. //!
  1379. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  1380. //! specific meaning for this API, they are listed below.
  1381. //!
  1382. //! \retval NVAPI_INSUFFICIENT_BUFFER When the input buffer(pDisplayIds) is less than the actual number of display IDs, this API
  1383. //! will return NVAPI_INSUFFICIENT_BUFFER.
  1384. //!
  1385. //! \ingroup gpu
  1386. ///////////////////////////////////////////////////////////////////////////////
  1387. NVAPI_INTERFACE NvAPI_GPU_GetAllDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __inout_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS* pDisplayIds, __inout NvU32* pDisplayIdCount);
  1388. ///////////////////////////////////////////////////////////////////////////////
  1389. //
  1390. // FUNCTION NAME: NvAPI_GPU_GetConnectedOutputsWithLidState
  1391. //
  1392. //! This function is similar to NvAPI_GPU_GetConnectedOutputs(), and returns the connected display identifiers that are connected
  1393. //! as an output mask but unlike NvAPI_GPU_GetConnectedOutputs() this API "always" reflects the Lid State in the output mask.
  1394. //! Thus if you expect the LID close state to be available in the connection mask use this API.
  1395. //! - If LID is closed then this API will remove the LID panel from the connected display identifiers.
  1396. //! - If LID is open then this API will reflect the LID panel in the connected display identifiers.
  1397. //!
  1398. //! \note This API should be used on notebook systems and on systems where the LID state is required in the connection
  1399. //! output mask. On desktop systems the returned identifiers will match NvAPI_GPU_GetConnectedOutputs().
  1400. //!
  1401. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  1402. //! SUPPORTED OS: Windows XP and higher
  1403. //!
  1404. //!
  1405. //! \since Release: 95
  1406. //!
  1407. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  1408. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers
  1409. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1410. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1411. //! \ingroup gpu
  1412. ///////////////////////////////////////////////////////////////////////////////
  1413. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  1414. NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  1415. ///////////////////////////////////////////////////////////////////////////////
  1416. //
  1417. // FUNCTION NAME: NvAPI_GPU_GetConnectedSLIOutputsWithLidState
  1418. //
  1419. //! DESCRIPTION: This function is the same as NvAPI_GPU_GetConnectedOutputsWithLidState() but returns only the set
  1420. //! of GPU-output identifiers that can be selected in an SLI configuration. With SLI disabled,
  1421. //! this function matches NvAPI_GPU_GetConnectedOutputsWithLidState().
  1422. //!
  1423. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.
  1424. //! SUPPORTED OS: Windows XP and higher
  1425. //!
  1426. //!
  1427. //! \since Release: 170
  1428. //!
  1429. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  1430. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers
  1431. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1432. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1433. //!
  1434. //! \ingroup gpu
  1435. ///////////////////////////////////////////////////////////////////////////////
  1436. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.")
  1437. NVAPI_INTERFACE NvAPI_GPU_GetConnectedSLIOutputsWithLidState(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  1438. ///////////////////////////////////////////////////////////////////////////////
  1439. //
  1440. // FUNCTION NAME: NvAPI_GPU_GetSystemType
  1441. //
  1442. //! \fn NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType)
  1443. //! This function identifies whether the GPU is a notebook GPU or a desktop GPU.
  1444. //!
  1445. //! SUPPORTED OS: Windows XP and higher
  1446. //!
  1447. //!
  1448. //! \since Release: 95
  1449. //!
  1450. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL
  1451. //! \retval NVAPI_OK *pSystemType contains the GPU system type
  1452. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1453. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  1454. //
  1455. ///////////////////////////////////////////////////////////////////////////////
  1456. //! \ingroup gpu
  1457. //! Used in NvAPI_GPU_GetSystemType()
  1458. typedef enum
  1459. {
  1460. NV_SYSTEM_TYPE_UNKNOWN = 0,
  1461. NV_SYSTEM_TYPE_LAPTOP = 1,
  1462. NV_SYSTEM_TYPE_DESKTOP = 2,
  1463. } NV_SYSTEM_TYPE;
  1464. //! \ingroup gpu
  1465. NVAPI_INTERFACE NvAPI_GPU_GetSystemType(NvPhysicalGpuHandle hPhysicalGpu, NV_SYSTEM_TYPE *pSystemType);
  1466. ///////////////////////////////////////////////////////////////////////////////
  1467. //
  1468. // FUNCTION NAME: NvAPI_GPU_GetActiveOutputs
  1469. //
  1470. //! This function is the same as NvAPI_GPU_GetAllOutputs but returns only the set of GPU output
  1471. //! identifiers that are actively driving display devices.
  1472. //!
  1473. //! SUPPORTED OS: Windows XP and higher
  1474. //!
  1475. //!
  1476. //! \since Release: 85
  1477. //!
  1478. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pOutputsMask is NULL.
  1479. //! \retval NVAPI_OK *pOutputsMask contains a set of GPU-output identifiers.
  1480. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1481. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1482. //! \ingroup gpu
  1483. ///////////////////////////////////////////////////////////////////////////////
  1484. NVAPI_INTERFACE NvAPI_GPU_GetActiveOutputs(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pOutputsMask);
  1485. ///////////////////////////////////////////////////////////////////////////////
  1486. //
  1487. // FUNCTION NAME: NvAPI_GPU_SetEDID
  1488. //
  1489. //! Thus function sets the EDID data for the specified GPU handle and connection bit mask.
  1490. //! User can either send (Gpu handle & output id) or only display Id in variable displayOutputId parameter & hPhysicalGpu parameter can be default handle (0).
  1491. //! \note The EDID will be cached across the boot session and will be enumerated to the OS in this call.
  1492. //! To remove the EDID set sizeofEDID to zero.
  1493. //! OS and NVAPI connection status APIs will reflect the newly set or removed EDID dynamically.
  1494. //!
  1495. //! This feature will NOT be supported on the following boards:
  1496. //! - GeForce
  1497. //! - Quadro VX
  1498. //! - Tesla
  1499. //!
  1500. //! SUPPORTED OS: Windows XP and higher
  1501. //!
  1502. //!
  1503. //! \since Release: 100
  1504. //!
  1505. //! \retval NVAPI_INVALID_ARGUMENT pEDID is NULL; displayOutputId has 0 or > 1 bits set
  1506. //! \retval NVAPI_OK *pEDID data was applied to the requested displayOutputId.
  1507. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1508. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle.
  1509. //! \retval NVAPI_NOT_SUPPORTED For the above mentioned GPUs
  1510. //! \ingroup gpu
  1511. ///////////////////////////////////////////////////////////////////////////////
  1512. NVAPI_INTERFACE NvAPI_GPU_SetEDID(NvPhysicalGpuHandle hPhysicalGpu, NvU32 displayOutputId, NV_EDID *pEDID);
  1513. ///////////////////////////////////////////////////////////////////////////////
  1514. //
  1515. // FUNCTION NAME: NvAPI_GPU_GetOutputType
  1516. //
  1517. //! \fn NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType)
  1518. //! This function returns the output type for a specific physical GPU handle and outputId (exactly 1 bit set - see \ref handles).
  1519. //!
  1520. //! SUPPORTED OS: Windows XP and higher
  1521. //!
  1522. //!
  1523. //! \Version Earliest supported ForceWare version: 82.61
  1524. //!
  1525. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu, outputId, or pOutputsMask is NULL; or outputId has > 1 bit set
  1526. //! \retval NVAPI_OK *pOutputType contains a NvGpuOutputType value
  1527. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1528. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1529. //
  1530. ///////////////////////////////////////////////////////////////////////////////
  1531. //! \ingroup gpu
  1532. //! used in NvAPI_GPU_GetOutputType()
  1533. typedef enum _NV_GPU_OUTPUT_TYPE
  1534. {
  1535. NVAPI_GPU_OUTPUT_UNKNOWN = 0,
  1536. NVAPI_GPU_OUTPUT_CRT = 1, //!< CRT display device
  1537. NVAPI_GPU_OUTPUT_DFP = 2, //!< Digital Flat Panel display device
  1538. NVAPI_GPU_OUTPUT_TV = 3, //!< TV display device
  1539. } NV_GPU_OUTPUT_TYPE;
  1540. //! \ingroup gpu
  1541. NVAPI_INTERFACE NvAPI_GPU_GetOutputType(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NV_GPU_OUTPUT_TYPE *pOutputType);
  1542. ///////////////////////////////////////////////////////////////////////////////
  1543. //
  1544. // FUNCTION NAME: NvAPI_GPU_ValidateOutputCombination
  1545. //
  1546. //! This function determines if a set of GPU outputs can be active
  1547. //! simultaneously. While a GPU may have <n> outputs, typically they cannot
  1548. //! all be active at the same time due to internal resource sharing.
  1549. //!
  1550. //! Given a physical GPU handle and a mask of candidate outputs, this call
  1551. //! will return NVAPI_OK if all of the specified outputs can be driven
  1552. //! simultaneously. It will return NVAPI_INVALID_COMBINATION if they cannot.
  1553. //!
  1554. //! Use NvAPI_GPU_GetAllOutputs() to determine which outputs are candidates.
  1555. //!
  1556. //! SUPPORTED OS: Windows XP and higher
  1557. //!
  1558. //!
  1559. //! \since Release: 85
  1560. //!
  1561. //! \retval NVAPI_OK Combination of outputs in outputsMask are valid (can be active simultaneously).
  1562. //! \retval NVAPI_INVALID_COMBINATION Combination of outputs in outputsMask are NOT valid.
  1563. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or outputsMask does not have at least 2 bits set.
  1564. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1565. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1566. //! \ingroup gpu
  1567. ///////////////////////////////////////////////////////////////////////////////
  1568. NVAPI_INTERFACE NvAPI_GPU_ValidateOutputCombination(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputsMask);
  1569. ///////////////////////////////////////////////////////////////////////////////
  1570. //
  1571. // FUNCTION NAME: NvAPI_GPU_GetFullName
  1572. //
  1573. //! This function retrieves the full GPU name as an ASCII string - for example, "Quadro FX 1400".
  1574. //!
  1575. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1576. //!
  1577. //!
  1578. //! TCC_SUPPORTED
  1579. //!
  1580. //! \since Release: 90
  1581. //!
  1582. //! \return NVAPI_ERROR or NVAPI_OK
  1583. //! \ingroup gpu
  1584. ///////////////////////////////////////////////////////////////////////////////
  1585. NVAPI_INTERFACE NvAPI_GPU_GetFullName(NvPhysicalGpuHandle hPhysicalGpu, NvAPI_ShortString szName);
  1586. ///////////////////////////////////////////////////////////////////////////////
  1587. //
  1588. // FUNCTION NAME: NvAPI_GPU_GetPCIIdentifiers
  1589. //
  1590. //! This function returns the PCI identifiers associated with this GPU.
  1591. //!
  1592. //! SUPPORTED OS: Windows XP and higher
  1593. //!
  1594. //!
  1595. //! TCC_SUPPORTED
  1596. //!
  1597. //! \since Release: 90
  1598. //!
  1599. //! \param DeviceId The internal PCI device identifier for the GPU.
  1600. //! \param SubSystemId The internal PCI subsystem identifier for the GPU.
  1601. //! \param RevisionId The internal PCI device-specific revision identifier for the GPU.
  1602. //! \param ExtDeviceId The external PCI device identifier for the GPU.
  1603. //!
  1604. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or an argument is NULL
  1605. //! \retval NVAPI_OK Arguments are populated with PCI identifiers
  1606. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1607. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1608. //! \ingroup gpu
  1609. ///////////////////////////////////////////////////////////////////////////////
  1610. NVAPI_INTERFACE NvAPI_GPU_GetPCIIdentifiers(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pDeviceId,NvU32 *pSubSystemId,NvU32 *pRevisionId,NvU32 *pExtDeviceId);
  1611. //! \ingroup gpu
  1612. //! Used in NvAPI_GPU_GetGPUType().
  1613. typedef enum _NV_GPU_TYPE
  1614. {
  1615. NV_SYSTEM_TYPE_GPU_UNKNOWN = 0,
  1616. NV_SYSTEM_TYPE_IGPU = 1, //!< Integrated GPU
  1617. NV_SYSTEM_TYPE_DGPU = 2, //!< Discrete GPU
  1618. } NV_GPU_TYPE;
  1619. ///////////////////////////////////////////////////////////////////////////////
  1620. //
  1621. // FUNCTION NAME: NvAPI_GPU_GetGPUType
  1622. //
  1623. //! DESCRIPTION: This function returns the GPU type (integrated or discrete).
  1624. //! See ::NV_GPU_TYPE.
  1625. //!
  1626. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1627. //!
  1628. //!
  1629. //! TCC_SUPPORTED
  1630. //!
  1631. //! \since Release: 173
  1632. //!
  1633. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu
  1634. //! \retval NVAPI_OK *pGpuType contains the GPU type
  1635. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1636. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE: hPhysicalGpu was not a physical GPU handle
  1637. //!
  1638. //! \ingroup gpu
  1639. ///////////////////////////////////////////////////////////////////////////////
  1640. NVAPI_INTERFACE NvAPI_GPU_GetGPUType(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_TYPE *pGpuType);
  1641. //! \ingroup gpu
  1642. //! Used in NvAPI_GPU_GetBusType()
  1643. typedef enum _NV_GPU_BUS_TYPE
  1644. {
  1645. NVAPI_GPU_BUS_TYPE_UNDEFINED = 0,
  1646. NVAPI_GPU_BUS_TYPE_PCI = 1,
  1647. NVAPI_GPU_BUS_TYPE_AGP = 2,
  1648. NVAPI_GPU_BUS_TYPE_PCI_EXPRESS = 3,
  1649. NVAPI_GPU_BUS_TYPE_FPCI = 4,
  1650. NVAPI_GPU_BUS_TYPE_AXI = 5,
  1651. } NV_GPU_BUS_TYPE;
  1652. ///////////////////////////////////////////////////////////////////////////////
  1653. //
  1654. // FUNCTION NAME: NvAPI_GPU_GetBusType
  1655. //
  1656. //! This function returns the type of bus associated with this GPU.
  1657. //!
  1658. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1659. //!
  1660. //!
  1661. //! TCC_SUPPORTED
  1662. //!
  1663. //! \since Release: 90
  1664. //!
  1665. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  1666. //! specific meaning for this API, they are listed below.
  1667. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusType is NULL.
  1668. //! \retval NVAPI_OK *pBusType contains bus identifier.
  1669. //! \ingroup gpu
  1670. ///////////////////////////////////////////////////////////////////////////////
  1671. NVAPI_INTERFACE NvAPI_GPU_GetBusType(NvPhysicalGpuHandle hPhysicalGpu,NV_GPU_BUS_TYPE *pBusType);
  1672. ///////////////////////////////////////////////////////////////////////////////
  1673. //
  1674. // FUNCTION NAME: NvAPI_GPU_GetBusId
  1675. //
  1676. //! DESCRIPTION: Returns the ID of the bus associated with this GPU.
  1677. //!
  1678. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1679. //!
  1680. //!
  1681. //! TCC_SUPPORTED
  1682. //!
  1683. //! \since Release: 167
  1684. //!
  1685. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusId is NULL.
  1686. //! \retval NVAPI_OK *pBusId contains the bus ID.
  1687. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1688. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1689. //!
  1690. //! \ingroup gpu
  1691. ///////////////////////////////////////////////////////////////////////////////
  1692. NVAPI_INTERFACE NvAPI_GPU_GetBusId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusId);
  1693. ///////////////////////////////////////////////////////////////////////////////
  1694. //
  1695. // FUNCTION NAME: NvAPI_GPU_GetBusSlotId
  1696. //
  1697. //! DESCRIPTION: Returns the ID of the bus slot associated with this GPU.
  1698. //!
  1699. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1700. //!
  1701. //!
  1702. //! TCC_SUPPORTED
  1703. //!
  1704. //! \since Release: 167
  1705. //!
  1706. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBusSlotId is NULL.
  1707. //! \retval NVAPI_OK *pBusSlotId contains the bus slot ID.
  1708. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1709. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1710. //!
  1711. //! \ingroup gpu
  1712. ///////////////////////////////////////////////////////////////////////////////
  1713. NVAPI_INTERFACE NvAPI_GPU_GetBusSlotId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pBusSlotId);
  1714. ///////////////////////////////////////////////////////////////////////////////
  1715. //
  1716. // FUNCTION NAME: NvAPI_GPU_GetIRQ
  1717. //
  1718. //! This function returns the interrupt number associated with this GPU.
  1719. //!
  1720. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1721. //!
  1722. //!
  1723. //! TCC_SUPPORTED
  1724. //!
  1725. //! \since Release: 90
  1726. //!
  1727. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pIRQ is NULL.
  1728. //! \retval NVAPI_OK *pIRQ contains interrupt number.
  1729. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1730. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1731. //! \ingroup gpu
  1732. ///////////////////////////////////////////////////////////////////////////////
  1733. NVAPI_INTERFACE NvAPI_GPU_GetIRQ(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pIRQ);
  1734. ///////////////////////////////////////////////////////////////////////////////
  1735. //
  1736. // FUNCTION NAME: NvAPI_GPU_GetVbiosRevision
  1737. //
  1738. //! This function returns the revision of the video BIOS associated with this GPU.
  1739. //!
  1740. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1741. //!
  1742. //!
  1743. //! TCC_SUPPORTED
  1744. //!
  1745. //! \since Release: 90
  1746. //!
  1747. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBiosRevision is NULL.
  1748. //! \retval NVAPI_OK *pBiosRevision contains revision number.
  1749. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1750. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1751. //! \ingroup gpu
  1752. ///////////////////////////////////////////////////////////////////////////////
  1753. NVAPI_INTERFACE NvAPI_GPU_GetVbiosRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision);
  1754. ///////////////////////////////////////////////////////////////////////////////
  1755. //
  1756. // FUNCTION NAME: NvAPI_GPU_GetVbiosOEMRevision
  1757. //
  1758. //! This function returns the OEM revision of the video BIOS associated with this GPU.
  1759. //!
  1760. //! SUPPORTED OS: Windows XP and higher
  1761. //!
  1762. //!
  1763. //! \since Release: 90
  1764. //!
  1765. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu or pBiosRevision is NULL
  1766. //! \retval NVAPI_OK *pBiosRevision contains revision number
  1767. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1768. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1769. //! \ingroup gpu
  1770. ///////////////////////////////////////////////////////////////////////////////
  1771. NVAPI_INTERFACE NvAPI_GPU_GetVbiosOEMRevision(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pBiosRevision);
  1772. ///////////////////////////////////////////////////////////////////////////////
  1773. //
  1774. // FUNCTION NAME: NvAPI_GPU_GetVbiosVersionString
  1775. //
  1776. //! This function returns the full video BIOS version string in the form of xx.xx.xx.xx.yy where
  1777. //! - xx numbers come from NvAPI_GPU_GetVbiosRevision() and
  1778. //! - yy comes from NvAPI_GPU_GetVbiosOEMRevision().
  1779. //!
  1780. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1781. //!
  1782. //!
  1783. //! TCC_SUPPORTED
  1784. //!
  1785. //! \since Release: 90
  1786. //!
  1787. //! \retval NVAPI_INVALID_ARGUMENT hPhysicalGpu is NULL.
  1788. //! \retval NVAPI_OK szBiosRevision contains version string.
  1789. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1790. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1791. //! \ingroup gpu
  1792. ///////////////////////////////////////////////////////////////////////////////
  1793. NVAPI_INTERFACE NvAPI_GPU_GetVbiosVersionString(NvPhysicalGpuHandle hPhysicalGpu,NvAPI_ShortString szBiosRevision);
  1794. ///////////////////////////////////////////////////////////////////////////////
  1795. //
  1796. // FUNCTION NAME: NvAPI_GPU_GetAGPAperture
  1797. //
  1798. //! This function returns the AGP aperture in megabytes.
  1799. //!
  1800. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1801. //!
  1802. //!
  1803. //! \since Release: 90
  1804. //!
  1805. //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL.
  1806. //! \retval NVAPI_OK Call successful.
  1807. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1808. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1809. //! \ingroup gpu
  1810. ///////////////////////////////////////////////////////////////////////////////
  1811. NVAPI_INTERFACE NvAPI_GPU_GetAGPAperture(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
  1812. ///////////////////////////////////////////////////////////////////////////////
  1813. //
  1814. // FUNCTION NAME: NvAPI_GPU_GetCurrentAGPRate
  1815. //
  1816. //! This function returns the current AGP Rate (0 = AGP not present, 1 = 1x, 2 = 2x, etc.).
  1817. //!
  1818. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1819. //!
  1820. //!
  1821. //! \since Release: 90
  1822. //!
  1823. //! \retval NVAPI_INVALID_ARGUMENT pRate is NULL.
  1824. //! \retval NVAPI_OK Call successful.
  1825. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1826. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1827. //! \ingroup gpu
  1828. ///////////////////////////////////////////////////////////////////////////////
  1829. NVAPI_INTERFACE NvAPI_GPU_GetCurrentAGPRate(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pRate);
  1830. ///////////////////////////////////////////////////////////////////////////////
  1831. //
  1832. // FUNCTION NAME: NvAPI_GPU_GetCurrentPCIEDownstreamWidth
  1833. //
  1834. //! This function returns the number of PCIE lanes being used for the PCIE interface
  1835. //! downstream from the GPU.
  1836. //!
  1837. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1838. //!
  1839. //!
  1840. //! \since Release: 90
  1841. //!
  1842. //! \retval NVAPI_INVALID_ARGUMENT pWidth is NULL.
  1843. //! \retval NVAPI_OK Call successful.
  1844. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1845. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1846. //! \ingroup gpu
  1847. ///////////////////////////////////////////////////////////////////////////////
  1848. NVAPI_INTERFACE NvAPI_GPU_GetCurrentPCIEDownstreamWidth(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pWidth);
  1849. ///////////////////////////////////////////////////////////////////////////////
  1850. //
  1851. // FUNCTION NAME: NvAPI_GPU_GetPhysicalFrameBufferSize
  1852. //
  1853. //! This function returns the physical size of framebuffer in KB. This does NOT include any
  1854. //! system RAM that may be dedicated for use by the GPU.
  1855. //!
  1856. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1857. //!
  1858. //!
  1859. //! TCC_SUPPORTED
  1860. //!
  1861. //! \since Release: 90
  1862. //!
  1863. //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL
  1864. //! \retval NVAPI_OK Call successful
  1865. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  1866. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle
  1867. //! \ingroup gpu
  1868. ///////////////////////////////////////////////////////////////////////////////
  1869. NVAPI_INTERFACE NvAPI_GPU_GetPhysicalFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
  1870. ///////////////////////////////////////////////////////////////////////////////
  1871. //
  1872. // FUNCTION NAME: NvAPI_GPU_GetVirtualFrameBufferSize
  1873. //
  1874. //! This function returns the virtual size of framebuffer in KB. This includes the physical RAM plus any
  1875. //! system RAM that has been dedicated for use by the GPU.
  1876. //!
  1877. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1878. //!
  1879. //!
  1880. //! TCC_SUPPORTED
  1881. //!
  1882. //! \since Release: 90
  1883. //!
  1884. //! \retval NVAPI_INVALID_ARGUMENT pSize is NULL.
  1885. //! \retval NVAPI_OK Call successful.
  1886. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  1887. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu was not a physical GPU handle.
  1888. //! \ingroup gpu
  1889. ///////////////////////////////////////////////////////////////////////////////
  1890. NVAPI_INTERFACE NvAPI_GPU_GetVirtualFrameBufferSize(NvPhysicalGpuHandle hPhysicalGpu,NvU32 *pSize);
  1891. ///////////////////////////////////////////////////////////////////////////////
  1892. //
  1893. // FUNCTION NAME: NvAPI_GPU_GetQuadroStatus
  1894. //
  1895. //! This function retrieves the Quadro status for the GPU (1 if Quadro, 0 if GeForce)
  1896. //!
  1897. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  1898. //!
  1899. //!
  1900. //! \since Release: 80
  1901. //!
  1902. //! \return NVAPI_ERROR or NVAPI_OK
  1903. //! \ingroup gpu
  1904. ///////////////////////////////////////////////////////////////////////////////
  1905. NVAPI_INTERFACE NvAPI_GPU_GetQuadroStatus(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pStatus);
  1906. //! \ingroup gpu
  1907. typedef struct _NV_BOARD_INFO
  1908. {
  1909. NvU32 version; //!< structure version
  1910. NvU8 BoardNum[16]; //!< Board Serial Number
  1911. }NV_BOARD_INFO_V1;
  1912. #define NV_BOARD_INFO_VER1 MAKE_NVAPI_VERSION(NV_BOARD_INFO_V1,1)
  1913. #ifndef NV_BOARD_INFO_VER
  1914. //! \ingroup gpu
  1915. typedef NV_BOARD_INFO_V1 NV_BOARD_INFO;
  1916. //! \ingroup gpu
  1917. //! \ingroup gpu
  1918. #define NV_BOARD_INFO_VER NV_BOARD_INFO_VER1
  1919. #endif
  1920. //! SUPPORTED OS: Windows XP and higher
  1921. //!
  1922. ///////////////////////////////////////////////////////////////////////////////
  1923. //
  1924. // FUNCTION NAME: NvAPI_GPU_GetBoardInfo
  1925. //
  1926. //! DESCRIPTION: This API Retrieves the Board information (a unique GPU Board Serial Number) stored in the InfoROM.
  1927. //!
  1928. //! \param [in] hPhysicalGpu Physical GPU Handle.
  1929. //! \param [in,out] NV_BOARD_INFO Board Information.
  1930. //!
  1931. //! TCC_SUPPORTED
  1932. //!
  1933. //! \retval ::NVAPI_OK completed request
  1934. //! \retval ::NVAPI_ERROR miscellaneous error occurred
  1935. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE handle passed is not a physical GPU handle
  1936. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  1937. //! \retval ::NVAPI_INVALID_POINTER pBoardInfo is NULL
  1938. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION the version of the INFO struct is not supported
  1939. //!
  1940. //! \ingroup gpu
  1941. ///////////////////////////////////////////////////////////////////////////////
  1942. NVAPI_INTERFACE NvAPI_GPU_GetBoardInfo(NvPhysicalGpuHandle hPhysicalGpu, NV_BOARD_INFO *pBoardInfo);
  1943. ///////////////////////////////////////////////////////////////////////////////
  1944. //
  1945. // GPU Clock Control
  1946. //
  1947. // These APIs allow the user to get and set individual clock domains
  1948. // on a per-GPU basis.
  1949. //
  1950. ///////////////////////////////////////////////////////////////////////////////
  1951. //! \ingroup gpuclock
  1952. //! @{
  1953. #define NVAPI_MAX_GPU_CLOCKS 32
  1954. #define NVAPI_MAX_GPU_PUBLIC_CLOCKS 32
  1955. #define NVAPI_MAX_GPU_PERF_CLOCKS 32
  1956. #define NVAPI_MAX_GPU_PERF_VOLTAGES 16
  1957. #define NVAPI_MAX_GPU_PERF_PSTATES 16
  1958. //! @}
  1959. //! \ingroup gpuclock
  1960. typedef enum _NV_GPU_PUBLIC_CLOCK_ID
  1961. {
  1962. NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS = 0,
  1963. NVAPI_GPU_PUBLIC_CLOCK_MEMORY = 4,
  1964. NVAPI_GPU_PUBLIC_CLOCK_PROCESSOR = 7,
  1965. NVAPI_GPU_PUBLIC_CLOCK_VIDEO = 8,
  1966. NVAPI_GPU_PUBLIC_CLOCK_UNDEFINED = NVAPI_MAX_GPU_PUBLIC_CLOCKS,
  1967. } NV_GPU_PUBLIC_CLOCK_ID;
  1968. //! \ingroup gpuclock
  1969. typedef enum _NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID
  1970. {
  1971. NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_CORE = 0,
  1972. NVAPI_GPU_PERF_VOLTAGE_INFO_DOMAIN_UNDEFINED = NVAPI_MAX_GPU_PERF_VOLTAGES,
  1973. } NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID;
  1974. //! \ingroup gpuclock
  1975. //! Used in NvAPI_GPU_GetAllClockFrequencies()
  1976. typedef struct
  1977. {
  1978. NvU32 version; //!< Structure version
  1979. NvU32 reserved; //!< These bits are reserved for future use.
  1980. struct
  1981. {
  1982. NvU32 bIsPresent:1; //!< Set if this domain is present on this GPU
  1983. NvU32 reserved:31; //!< These bits are reserved for future use.
  1984. NvU32 frequency; //!< Clock frequency (kHz)
  1985. }domain[NVAPI_MAX_GPU_PUBLIC_CLOCKS];
  1986. } NV_GPU_CLOCK_FREQUENCIES_V1;
  1987. //! \ingroup gpuclock
  1988. //! Used in NvAPI_GPU_GetAllClockFrequencies()
  1989. typedef enum
  1990. {
  1991. NV_GPU_CLOCK_FREQUENCIES_CURRENT_FREQ = 0,
  1992. NV_GPU_CLOCK_FREQUENCIES_BASE_CLOCK = 1,
  1993. NV_GPU_CLOCK_FREQUENCIES_BOOST_CLOCK = 2,
  1994. NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE_NUM = 3
  1995. } NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE;
  1996. //! \ingroup gpuclock
  1997. //! Used in NvAPI_GPU_GetAllClockFrequencies()
  1998. typedef struct
  1999. {
  2000. NvU32 version; //!< Structure version
  2001. NvU32 ClockType:2; //!< One of NV_GPU_CLOCK_FREQUENCIES_CLOCK_TYPE. Used to specify the type of clock to be returned.
  2002. NvU32 reserved:22; //!< These bits are reserved for future use. Must be set to 0.
  2003. NvU32 reserved1:8; //!< These bits are reserved.
  2004. struct
  2005. {
  2006. NvU32 bIsPresent:1; //!< Set if this domain is present on this GPU
  2007. NvU32 reserved:31; //!< These bits are reserved for future use.
  2008. NvU32 frequency; //!< Clock frequency (kHz)
  2009. }domain[NVAPI_MAX_GPU_PUBLIC_CLOCKS];
  2010. } NV_GPU_CLOCK_FREQUENCIES_V2;
  2011. //! \ingroup gpuclock
  2012. //! Used in NvAPI_GPU_GetAllClockFrequencies()
  2013. typedef NV_GPU_CLOCK_FREQUENCIES_V2 NV_GPU_CLOCK_FREQUENCIES;
  2014. //! \addtogroup gpuclock
  2015. //! @{
  2016. #define NV_GPU_CLOCK_FREQUENCIES_VER_1 MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V1,1)
  2017. #define NV_GPU_CLOCK_FREQUENCIES_VER_2 MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,2)
  2018. #define NV_GPU_CLOCK_FREQUENCIES_VER_3 MAKE_NVAPI_VERSION(NV_GPU_CLOCK_FREQUENCIES_V2,3)
  2019. #define NV_GPU_CLOCK_FREQUENCIES_VER NV_GPU_CLOCK_FREQUENCIES_VER_3
  2020. //! @}
  2021. ///////////////////////////////////////////////////////////////////////////////
  2022. //
  2023. // FUNCTION NAME: NvAPI_GPU_GetAllClockFrequencies
  2024. //
  2025. //! This function retrieves the NV_GPU_CLOCK_FREQUENCIES structure for the specified physical GPU.
  2026. //!
  2027. //! For each clock domain:
  2028. //! - bIsPresent is set for each domain that is present on the GPU
  2029. //! - frequency is the domain's clock freq in kHz
  2030. //!
  2031. //! Each domain's info is indexed in the array. For example:
  2032. //! clkFreqs.domain[NVAPI_GPU_PUBLIC_CLOCK_MEMORY] holds the info for the MEMORY domain.
  2033. //!
  2034. //! SUPPORTED OS: Windows XP and higher
  2035. //!
  2036. //!
  2037. //! \since Release: 295
  2038. //!
  2039. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  2040. //! If there are return error codes with specific meaning for this API,
  2041. //! they are listed below.
  2042. //! \retval NVAPI_INVALID_ARGUMENT pClkFreqs is NULL.
  2043. //! \ingroup gpuclock
  2044. ///////////////////////////////////////////////////////////////////////////////
  2045. NVAPI_INTERFACE NvAPI_GPU_GetAllClockFrequencies(__in NvPhysicalGpuHandle hPhysicalGPU, __inout NV_GPU_CLOCK_FREQUENCIES *pClkFreqs);
  2046. //! \addtogroup gpupstate
  2047. //! @{
  2048. typedef enum _NV_GPU_PERF_PSTATE_ID
  2049. {
  2050. NVAPI_GPU_PERF_PSTATE_P0 = 0,
  2051. NVAPI_GPU_PERF_PSTATE_P1,
  2052. NVAPI_GPU_PERF_PSTATE_P2,
  2053. NVAPI_GPU_PERF_PSTATE_P3,
  2054. NVAPI_GPU_PERF_PSTATE_P4,
  2055. NVAPI_GPU_PERF_PSTATE_P5,
  2056. NVAPI_GPU_PERF_PSTATE_P6,
  2057. NVAPI_GPU_PERF_PSTATE_P7,
  2058. NVAPI_GPU_PERF_PSTATE_P8,
  2059. NVAPI_GPU_PERF_PSTATE_P9,
  2060. NVAPI_GPU_PERF_PSTATE_P10,
  2061. NVAPI_GPU_PERF_PSTATE_P11,
  2062. NVAPI_GPU_PERF_PSTATE_P12,
  2063. NVAPI_GPU_PERF_PSTATE_P13,
  2064. NVAPI_GPU_PERF_PSTATE_P14,
  2065. NVAPI_GPU_PERF_PSTATE_P15,
  2066. NVAPI_GPU_PERF_PSTATE_UNDEFINED = NVAPI_MAX_GPU_PERF_PSTATES,
  2067. NVAPI_GPU_PERF_PSTATE_ALL,
  2068. } NV_GPU_PERF_PSTATE_ID;
  2069. //! @}
  2070. //! \ingroup gpupstate
  2071. //! Used in NvAPI_GPU_GetPstatesInfoEx()
  2072. typedef struct
  2073. {
  2074. NvU32 version;
  2075. NvU32 flags; //!< - bit 0 indicates if perfmon is enabled or not
  2076. //!< - bit 1 indicates if dynamic Pstate is capable or not
  2077. //!< - bit 2 indicates if dynamic Pstate is enable or not
  2078. //!< - all other bits must be set to 0
  2079. NvU32 numPstates; //!< The number of available p-states
  2080. NvU32 numClocks; //!< The number of clock domains supported by each P-State
  2081. struct
  2082. {
  2083. NV_GPU_PERF_PSTATE_ID pstateId; //!< ID of the p-state.
  2084. NvU32 flags; //!< - bit 0 indicates if the PCIE limit is GEN1 or GEN2
  2085. //!< - bit 1 indicates if the Pstate is overclocked or not
  2086. //!< - bit 2 indicates if the Pstate is overclockable or not
  2087. //!< - all other bits must be set to 0
  2088. struct
  2089. {
  2090. NV_GPU_PUBLIC_CLOCK_ID domainId; //!< ID of the clock domain
  2091. NvU32 flags; //!< Reserved. Must be set to 0
  2092. NvU32 freq; //!< Clock frequency in kHz
  2093. } clocks[NVAPI_MAX_GPU_PERF_CLOCKS];
  2094. } pstates[NVAPI_MAX_GPU_PERF_PSTATES];
  2095. } NV_GPU_PERF_PSTATES_INFO_V1;
  2096. //! \ingroup gpupstate
  2097. typedef struct
  2098. {
  2099. NvU32 version;
  2100. NvU32 flags; //!< - bit 0 indicates if perfmon is enabled or not
  2101. //!< - bit 1 indicates if dynamic Pstate is capable or not
  2102. //!< - bit 2 indicates if dynamic Pstate is enable or not
  2103. //!< - all other bits must be set to 0
  2104. NvU32 numPstates; //!< The number of available p-states
  2105. NvU32 numClocks; //!< The number of clock domains supported by each P-State
  2106. NvU32 numVoltages;
  2107. struct
  2108. {
  2109. NV_GPU_PERF_PSTATE_ID pstateId; //!< ID of the p-state.
  2110. NvU32 flags; //!< - bit 0 indicates if the PCIE limit is GEN1 or GEN2
  2111. //!< - bit 1 indicates if the Pstate is overclocked or not
  2112. //!< - bit 2 indicates if the Pstate is overclockable or not
  2113. //!< - all other bits must be set to 0
  2114. struct
  2115. {
  2116. NV_GPU_PUBLIC_CLOCK_ID domainId;
  2117. NvU32 flags; //!< bit 0 indicates if this clock is overclockable
  2118. //!< all other bits must be set to 0
  2119. NvU32 freq;
  2120. } clocks[NVAPI_MAX_GPU_PERF_CLOCKS];
  2121. struct
  2122. {
  2123. NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId; //!< ID of the voltage domain, containing flags and mvolt info
  2124. NvU32 flags; //!< Reserved for future use. Must be set to 0
  2125. NvU32 mvolt; //!< Voltage in mV
  2126. } voltages[NVAPI_MAX_GPU_PERF_VOLTAGES];
  2127. } pstates[NVAPI_MAX_GPU_PERF_PSTATES]; //!< Valid index range is 0 to numVoltages-1
  2128. } NV_GPU_PERF_PSTATES_INFO_V2;
  2129. //! \ingroup gpupstate
  2130. typedef NV_GPU_PERF_PSTATES_INFO_V2 NV_GPU_PERF_PSTATES_INFO;
  2131. //! \ingroup gpupstate
  2132. //! @{
  2133. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V1
  2134. #define NV_GPU_PERF_PSTATES_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V1,1)
  2135. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V2
  2136. #define NV_GPU_PERF_PSTATES_INFO_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V2,2)
  2137. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO_V2
  2138. #define NV_GPU_PERF_PSTATES_INFO_VER3 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES_INFO_V2,3)
  2139. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES_INFO
  2140. #define NV_GPU_PERF_PSTATES_INFO_VER NV_GPU_PERF_PSTATES_INFO_VER3
  2141. //! @}
  2142. ///////////////////////////////////////////////////////////////////////////////
  2143. //
  2144. // FUNCTION NAME: NvAPI_GPU_GetPstatesInfoEx
  2145. //
  2146. //! DESCRIPTION: This API retrieves all performance states (P-States) information. This is the same as
  2147. //! NvAPI_GPU_GetPstatesInfo(), but supports an input flag for various options.
  2148. //!
  2149. //! P-States are GPU active/executing performance capability and power consumption states.
  2150. //!
  2151. //! P-States ranges from P0 to P15, with P0 being the highest performance/power state, and
  2152. //! P15 being the lowest performance/power state. Each P-State, if available, maps to a
  2153. //! performance level. Not all P-States are available on a given system. The definitions
  2154. //! of each P-State are currently as follows: \n
  2155. //! - P0/P1 - Maximum 3D performance
  2156. //! - P2/P3 - Balanced 3D performance-power
  2157. //! - P8 - Basic HD video playback
  2158. //! - P10 - DVD playback
  2159. //! - P12 - Minimum idle power consumption
  2160. //!
  2161. //! \deprecated Do not use this function - it is deprecated in release 304. Instead, use NvAPI_GPU_GetPstates20.
  2162. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2163. //!
  2164. //!
  2165. //! \param [in] hPhysicalGPU GPU selection.
  2166. //! \param [out] pPerfPstatesInfo P-States information retrieved, as detailed below: \n
  2167. //! - flags is reserved for future use.
  2168. //! - numPstates is the number of available P-States
  2169. //! - numClocks is the number of clock domains supported by each P-State
  2170. //! - pstates has valid index range from 0 to numPstates - 1
  2171. //! - pstates[i].pstateId is the ID of the P-State,
  2172. //! containing the following info:
  2173. //! - pstates[i].flags containing the following info:
  2174. //! - bit 0 indicates if the PCIE limit is GEN1 or GEN2
  2175. //! - bit 1 indicates if the Pstate is overclocked or not
  2176. //! - bit 2 indicates if the Pstate is overclockable or not
  2177. //! - pstates[i].clocks has valid index range from 0 to numClocks -1
  2178. //! - pstates[i].clocks[j].domainId is the public ID of the clock domain,
  2179. //! containing the following info:
  2180. //! - pstates[i].clocks[j].flags containing the following info:
  2181. //! bit 0 indicates if the clock domain is overclockable or not
  2182. //! - pstates[i].clocks[j].freq is the clock frequency in kHz
  2183. //! - pstates[i].voltages has a valid index range from 0 to numVoltages - 1
  2184. //! - pstates[i].voltages[j].domainId is the ID of the voltage domain,
  2185. //! containing the following info:
  2186. //! - pstates[i].voltages[j].flags is reserved for future use.
  2187. //! - pstates[i].voltages[j].mvolt is the voltage in mV
  2188. //! inputFlags(IN) - This can be used to select various options:
  2189. //! - if bit 0 is set, pPerfPstatesInfo would contain the default settings
  2190. //! instead of the current, possibily overclocked settings.
  2191. //! - if bit 1 is set, pPerfPstatesInfo would contain the maximum clock
  2192. //! frequencies instead of the nominal frequencies.
  2193. //! - if bit 2 is set, pPerfPstatesInfo would contain the minimum clock
  2194. //! frequencies instead of the nominal frequencies.
  2195. //! - all other bits must be set to 0.
  2196. //!
  2197. //! \retval ::NVAPI_OK Completed request
  2198. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  2199. //! \retval ::NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide)
  2200. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle
  2201. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the NV_GPU_PERF_PSTATES struct is not supported
  2202. //!
  2203. //! \ingroup gpupstate
  2204. ///////////////////////////////////////////////////////////////////////////////
  2205. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 304. Instead, use NvAPI_GPU_GetPstates20.")
  2206. NVAPI_INTERFACE NvAPI_GPU_GetPstatesInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATES_INFO *pPerfPstatesInfo, NvU32 inputFlags);
  2207. //! \addtogroup gpupstate
  2208. //! @{
  2209. #define NVAPI_MAX_GPU_PSTATE20_PSTATES 16
  2210. #define NVAPI_MAX_GPU_PSTATE20_CLOCKS 8
  2211. #define NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES 4
  2212. //! Used to identify clock type
  2213. typedef enum
  2214. {
  2215. //! Clock domains that use single frequency value within given pstate
  2216. NVAPI_GPU_PERF_PSTATE20_CLOCK_TYPE_SINGLE = 0,
  2217. //! Clock domains that allow range of frequency values within given pstate
  2218. NVAPI_GPU_PERF_PSTATE20_CLOCK_TYPE_RANGE,
  2219. } NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID;
  2220. //! Used to describe both voltage and frequency deltas
  2221. typedef struct
  2222. {
  2223. //! Value of parameter delta (in respective units [kHz, uV])
  2224. NvS32 value;
  2225. struct
  2226. {
  2227. //! Min value allowed for parameter delta (in respective units [kHz, uV])
  2228. NvS32 min;
  2229. //! Max value allowed for parameter delta (in respective units [kHz, uV])
  2230. NvS32 max;
  2231. } valueRange;
  2232. } NV_GPU_PERF_PSTATES20_PARAM_DELTA;
  2233. //! Used to describe single clock entry
  2234. typedef struct
  2235. {
  2236. //! ID of the clock domain
  2237. NV_GPU_PUBLIC_CLOCK_ID domainId;
  2238. //! Clock type ID
  2239. NV_GPU_PERF_PSTATE20_CLOCK_TYPE_ID typeId;
  2240. NvU32 bIsEditable:1;
  2241. //! These bits are reserved for future use (must be always 0)
  2242. NvU32 reserved:31;
  2243. //! Current frequency delta from nominal settings in (kHz)
  2244. NV_GPU_PERF_PSTATES20_PARAM_DELTA freqDelta_kHz;
  2245. //! Clock domain type dependant information
  2246. union
  2247. {
  2248. struct
  2249. {
  2250. //! Clock frequency within given pstate in (kHz)
  2251. NvU32 freq_kHz;
  2252. } single;
  2253. struct
  2254. {
  2255. //! Min clock frequency within given pstate in (kHz)
  2256. NvU32 minFreq_kHz;
  2257. //! Max clock frequency within given pstate in (kHz)
  2258. NvU32 maxFreq_kHz;
  2259. //! Voltage domain ID and value range in (uV) required for this clock
  2260. NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId;
  2261. NvU32 minVoltage_uV;
  2262. NvU32 maxVoltage_uV;
  2263. } range;
  2264. } data;
  2265. } NV_GPU_PSTATE20_CLOCK_ENTRY_V1;
  2266. //! Used to describe single base voltage entry
  2267. typedef struct
  2268. {
  2269. //! ID of the voltage domain
  2270. NV_GPU_PERF_VOLTAGE_INFO_DOMAIN_ID domainId;
  2271. NvU32 bIsEditable:1;
  2272. //! These bits are reserved for future use (must be always 0)
  2273. NvU32 reserved:31;
  2274. //! Current base voltage settings in [uV]
  2275. NvU32 volt_uV;
  2276. NV_GPU_PERF_PSTATES20_PARAM_DELTA voltDelta_uV; // Current base voltage delta from nominal settings in [uV]
  2277. } NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1;
  2278. //! Used in NvAPI_GPU_GetPstates20() interface call.
  2279. typedef struct
  2280. {
  2281. //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER<n>)
  2282. NvU32 version;
  2283. NvU32 bIsEditable:1;
  2284. //! These bits are reserved for future use (must be always 0)
  2285. NvU32 reserved:31;
  2286. //! Number of populated pstates
  2287. NvU32 numPstates;
  2288. //! Number of populated clocks (per pstate)
  2289. NvU32 numClocks;
  2290. //! Number of populated base voltages (per pstate)
  2291. NvU32 numBaseVoltages;
  2292. //! Performance state (P-State) settings
  2293. //! Valid index range is 0 to numPstates-1
  2294. struct
  2295. {
  2296. //! ID of the P-State
  2297. NV_GPU_PERF_PSTATE_ID pstateId;
  2298. NvU32 bIsEditable:1;
  2299. //! These bits are reserved for future use (must be always 0)
  2300. NvU32 reserved:31;
  2301. //! Array of clock entries
  2302. //! Valid index range is 0 to numClocks-1
  2303. NV_GPU_PSTATE20_CLOCK_ENTRY_V1 clocks[NVAPI_MAX_GPU_PSTATE20_CLOCKS];
  2304. //! Array of baseVoltage entries
  2305. //! Valid index range is 0 to numBaseVoltages-1
  2306. NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 baseVoltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES];
  2307. } pstates[NVAPI_MAX_GPU_PSTATE20_PSTATES];
  2308. } NV_GPU_PERF_PSTATES20_INFO_V1;
  2309. //! Used in NvAPI_GPU_GetPstates20() interface call.
  2310. typedef struct _NV_GPU_PERF_PSTATES20_INFO_V2
  2311. {
  2312. //! Version info of the structure (NV_GPU_PERF_PSTATES20_INFO_VER<n>)
  2313. NvU32 version;
  2314. NvU32 bIsEditable:1;
  2315. //! These bits are reserved for future use (must be always 0)
  2316. NvU32 reserved:31;
  2317. //! Number of populated pstates
  2318. NvU32 numPstates;
  2319. //! Number of populated clocks (per pstate)
  2320. NvU32 numClocks;
  2321. //! Number of populated base voltages (per pstate)
  2322. NvU32 numBaseVoltages;
  2323. //! Performance state (P-State) settings
  2324. //! Valid index range is 0 to numPstates-1
  2325. struct
  2326. {
  2327. //! ID of the P-State
  2328. NV_GPU_PERF_PSTATE_ID pstateId;
  2329. NvU32 bIsEditable:1;
  2330. //! These bits are reserved for future use (must be always 0)
  2331. NvU32 reserved:31;
  2332. //! Array of clock entries
  2333. //! Valid index range is 0 to numClocks-1
  2334. NV_GPU_PSTATE20_CLOCK_ENTRY_V1 clocks[NVAPI_MAX_GPU_PSTATE20_CLOCKS];
  2335. //! Array of baseVoltage entries
  2336. //! Valid index range is 0 to numBaseVoltages-1
  2337. NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 baseVoltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES];
  2338. } pstates[NVAPI_MAX_GPU_PSTATE20_PSTATES];
  2339. //! OV settings - Please refer to NVIDIA over-volting recommendation to understand impact of this functionality
  2340. //! Valid index range is 0 to numVoltages-1
  2341. struct
  2342. {
  2343. //! Number of populated voltages
  2344. NvU32 numVoltages;
  2345. //! Array of voltage entries
  2346. //! Valid index range is 0 to numVoltages-1
  2347. NV_GPU_PSTATE20_BASE_VOLTAGE_ENTRY_V1 voltages[NVAPI_MAX_GPU_PSTATE20_BASE_VOLTAGES];
  2348. } ov;
  2349. } NV_GPU_PERF_PSTATES20_INFO_V2;
  2350. typedef NV_GPU_PERF_PSTATES20_INFO_V2 NV_GPU_PERF_PSTATES20_INFO;
  2351. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V1
  2352. #define NV_GPU_PERF_PSTATES20_INFO_VER1 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V1,1)
  2353. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V2
  2354. #define NV_GPU_PERF_PSTATES20_INFO_VER2 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V2,2)
  2355. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO_V2
  2356. #define NV_GPU_PERF_PSTATES20_INFO_VER3 MAKE_NVAPI_VERSION(NV_GPU_PERF_PSTATES20_INFO_V2,3)
  2357. //! Macro for constructing the version field of NV_GPU_PERF_PSTATES20_INFO
  2358. #define NV_GPU_PERF_PSTATES20_INFO_VER NV_GPU_PERF_PSTATES20_INFO_VER3
  2359. //! @}
  2360. ///////////////////////////////////////////////////////////////////////////////
  2361. //
  2362. // FUNCTION NAME: NvAPI_GPU_GetPstates20
  2363. //
  2364. //! DESCRIPTION: This API retrieves all performance states (P-States) 2.0 information.
  2365. //!
  2366. //! P-States are GPU active/executing performance capability states.
  2367. //! They range from P0 to P15, with P0 being the highest performance state,
  2368. //! and P15 being the lowest performance state. Each P-State, if available,
  2369. //! maps to a performance level. Not all P-States are available on a given system.
  2370. //! The definition of each P-States are currently as follow:
  2371. //! - P0/P1 - Maximum 3D performance
  2372. //! - P2/P3 - Balanced 3D performance-power
  2373. //! - P8 - Basic HD video playback
  2374. //! - P10 - DVD playback
  2375. //! - P12 - Minimum idle power consumption
  2376. //!
  2377. //! TCC_SUPPORTED
  2378. //!
  2379. //! \since Release: 295
  2380. //!
  2381. //! SUPPORTED OS: Windows XP and higher
  2382. //!
  2383. //!
  2384. //! \param [in] hPhysicalGPU GPU selection
  2385. //! \param [out] pPstatesInfo P-States information retrieved, as documented in declaration above
  2386. //!
  2387. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  2388. //! If there are return error codes with specific meaning for this API,
  2389. //! they are listed below.
  2390. //!
  2391. //! \ingroup gpupstate
  2392. ///////////////////////////////////////////////////////////////////////////////
  2393. NVAPI_INTERFACE NvAPI_GPU_GetPstates20(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GPU_PERF_PSTATES20_INFO *pPstatesInfo);
  2394. ///////////////////////////////////////////////////////////////////////////////
  2395. //
  2396. // FUNCTION NAME: NvAPI_GPU_GetCurrentPstate
  2397. //
  2398. //! DESCRIPTION: This function retrieves the current performance state (P-State).
  2399. //!
  2400. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2401. //!
  2402. //!
  2403. //! \since Release: 165
  2404. //!
  2405. //! TCC_SUPPORTED
  2406. //!
  2407. //! \param [in] hPhysicalGPU GPU selection
  2408. //! \param [out] pCurrentPstate The ID of the current P-State of the GPU - see \ref NV_GPU_PERF_PSTATES.
  2409. //!
  2410. //! \retval NVAPI_OK Completed request
  2411. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  2412. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  2413. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  2414. //! \retval NVAPI_NOT_SUPPORTED P-States is not supported on this setup.
  2415. //!
  2416. //! \ingroup gpupstate
  2417. ///////////////////////////////////////////////////////////////////////////////
  2418. NVAPI_INTERFACE NvAPI_GPU_GetCurrentPstate(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_PSTATE_ID *pCurrentPstate);
  2419. //! \ingroup gpupstate
  2420. #define NVAPI_MAX_GPU_UTILIZATIONS 8
  2421. //! \ingroup gpupstate
  2422. //! Used in NvAPI_GPU_GetDynamicPstatesInfoEx().
  2423. typedef struct
  2424. {
  2425. NvU32 version; //!< Structure version
  2426. NvU32 flags; //!< bit 0 indicates if the dynamic Pstate is enabled or not
  2427. struct
  2428. {
  2429. NvU32 bIsPresent:1; //!< Set if this utilization domain is present on this GPU
  2430. NvU32 percentage; //!< Percentage of time where the domain is considered busy in the last 1 second interval
  2431. } utilization[NVAPI_MAX_GPU_UTILIZATIONS];
  2432. } NV_GPU_DYNAMIC_PSTATES_INFO_EX;
  2433. //! \ingroup gpupstate
  2434. //! Macro for constructing the version field of NV_GPU_DYNAMIC_PSTATES_INFO_EX
  2435. #define NV_GPU_DYNAMIC_PSTATES_INFO_EX_VER MAKE_NVAPI_VERSION(NV_GPU_DYNAMIC_PSTATES_INFO_EX,1)
  2436. ///////////////////////////////////////////////////////////////////////////////
  2437. //
  2438. // FUNCTION NAME: NvAPI_GPU_GetDynamicPstatesInfoEx
  2439. //
  2440. //! DESCRIPTION: This API retrieves the NV_GPU_DYNAMIC_PSTATES_INFO_EX structure for the specified physical GPU.
  2441. //! Each domain's info is indexed in the array. For example:
  2442. //! - pDynamicPstatesInfo->utilization[NVAPI_GPU_UTILIZATION_DOMAIN_GPU] holds the info for the GPU domain. \p
  2443. //! There are currently 4 domains for which GPU utilization and dynamic P-State thresholds can be retrieved:
  2444. //! graphic engine (GPU), frame buffer (FB), video engine (VID), and bus interface (BUS).
  2445. //!
  2446. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2447. //!
  2448. //!
  2449. //! \since Release: 185
  2450. //!
  2451. //! \retval ::NVAPI_OK
  2452. //! \retval ::NVAPI_ERROR
  2453. //! \retval ::NVAPI_INVALID_ARGUMENT pDynamicPstatesInfo is NULL
  2454. //! \retval ::NVAPI_HANDLE_INVALIDATED
  2455. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE
  2456. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the INFO struct is not supported
  2457. //!
  2458. //! \ingroup gpupstate
  2459. ///////////////////////////////////////////////////////////////////////////////
  2460. NVAPI_INTERFACE NvAPI_GPU_GetDynamicPstatesInfoEx(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_DYNAMIC_PSTATES_INFO_EX *pDynamicPstatesInfoEx);
  2461. ///////////////////////////////////////////////////////////////////////////////////
  2462. // Thermal API
  2463. // Provides ability to get temperature levels from the various thermal sensors associated with the GPU
  2464. //! \ingroup gputhermal
  2465. #define NVAPI_MAX_THERMAL_SENSORS_PER_GPU 3
  2466. //! \ingroup gputhermal
  2467. //! Used in NV_GPU_THERMAL_SETTINGS
  2468. typedef enum
  2469. {
  2470. NVAPI_THERMAL_TARGET_NONE = 0,
  2471. NVAPI_THERMAL_TARGET_GPU = 1, //!< GPU core temperature requires NvPhysicalGpuHandle
  2472. NVAPI_THERMAL_TARGET_MEMORY = 2, //!< GPU memory temperature requires NvPhysicalGpuHandle
  2473. NVAPI_THERMAL_TARGET_POWER_SUPPLY = 4, //!< GPU power supply temperature requires NvPhysicalGpuHandle
  2474. NVAPI_THERMAL_TARGET_BOARD = 8, //!< GPU board ambient temperature requires NvPhysicalGpuHandle
  2475. NVAPI_THERMAL_TARGET_VCD_BOARD = 9, //!< Visual Computing Device Board temperature requires NvVisualComputingDeviceHandle
  2476. NVAPI_THERMAL_TARGET_VCD_INLET = 10, //!< Visual Computing Device Inlet temperature requires NvVisualComputingDeviceHandle
  2477. NVAPI_THERMAL_TARGET_VCD_OUTLET = 11, //!< Visual Computing Device Outlet temperature requires NvVisualComputingDeviceHandle
  2478. NVAPI_THERMAL_TARGET_ALL = 15,
  2479. NVAPI_THERMAL_TARGET_UNKNOWN = -1,
  2480. } NV_THERMAL_TARGET;
  2481. //! \ingroup gputhermal
  2482. //! Used in NV_GPU_THERMAL_SETTINGS
  2483. typedef enum
  2484. {
  2485. NVAPI_THERMAL_CONTROLLER_NONE = 0,
  2486. NVAPI_THERMAL_CONTROLLER_GPU_INTERNAL,
  2487. NVAPI_THERMAL_CONTROLLER_ADM1032,
  2488. NVAPI_THERMAL_CONTROLLER_MAX6649,
  2489. NVAPI_THERMAL_CONTROLLER_MAX1617,
  2490. NVAPI_THERMAL_CONTROLLER_LM99,
  2491. NVAPI_THERMAL_CONTROLLER_LM89,
  2492. NVAPI_THERMAL_CONTROLLER_LM64,
  2493. NVAPI_THERMAL_CONTROLLER_ADT7473,
  2494. NVAPI_THERMAL_CONTROLLER_SBMAX6649,
  2495. NVAPI_THERMAL_CONTROLLER_VBIOSEVT,
  2496. NVAPI_THERMAL_CONTROLLER_OS,
  2497. NVAPI_THERMAL_CONTROLLER_UNKNOWN = -1,
  2498. } NV_THERMAL_CONTROLLER;
  2499. //! \ingroup gputhermal
  2500. //! Used in NvAPI_GPU_GetThermalSettings()
  2501. typedef struct
  2502. {
  2503. NvU32 version; //!< structure version
  2504. NvU32 count; //!< number of associated thermal sensors
  2505. struct
  2506. {
  2507. NV_THERMAL_CONTROLLER controller; //!< internal, ADM1032, MAX6649...
  2508. NvU32 defaultMinTemp; //!< The min default temperature value of the thermal sensor in degree Celsius
  2509. NvU32 defaultMaxTemp; //!< The max default temperature value of the thermal sensor in degree Celsius
  2510. NvU32 currentTemp; //!< The current temperature value of the thermal sensor in degree Celsius
  2511. NV_THERMAL_TARGET target; //!< Thermal sensor targeted @ GPU, memory, chipset, powersupply, Visual Computing Device, etc.
  2512. } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU];
  2513. } NV_GPU_THERMAL_SETTINGS_V1;
  2514. //! \ingroup gputhermal
  2515. typedef struct
  2516. {
  2517. NvU32 version; //!< structure version
  2518. NvU32 count; //!< number of associated thermal sensors
  2519. struct
  2520. {
  2521. NV_THERMAL_CONTROLLER controller; //!< internal, ADM1032, MAX6649...
  2522. NvS32 defaultMinTemp; //!< Minimum default temperature value of the thermal sensor in degree Celsius
  2523. NvS32 defaultMaxTemp; //!< Maximum default temperature value of the thermal sensor in degree Celsius
  2524. NvS32 currentTemp; //!< Current temperature value of the thermal sensor in degree Celsius
  2525. NV_THERMAL_TARGET target; //!< Thermal sensor targeted - GPU, memory, chipset, powersupply, Visual Computing Device, etc
  2526. } sensor[NVAPI_MAX_THERMAL_SENSORS_PER_GPU];
  2527. } NV_GPU_THERMAL_SETTINGS_V2;
  2528. //! \ingroup gputhermal
  2529. typedef NV_GPU_THERMAL_SETTINGS_V2 NV_GPU_THERMAL_SETTINGS;
  2530. //! \ingroup gputhermal
  2531. //! @{
  2532. //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS_V1
  2533. #define NV_GPU_THERMAL_SETTINGS_VER_1 MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS_V1,1)
  2534. //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS_V2
  2535. #define NV_GPU_THERMAL_SETTINGS_VER_2 MAKE_NVAPI_VERSION(NV_GPU_THERMAL_SETTINGS_V2,2)
  2536. //! Macro for constructing the version field of NV_GPU_THERMAL_SETTINGS
  2537. #define NV_GPU_THERMAL_SETTINGS_VER NV_GPU_THERMAL_SETTINGS_VER_2
  2538. //! @}
  2539. ///////////////////////////////////////////////////////////////////////////////
  2540. //
  2541. // FUNCTION NAME: NvAPI_GPU_GetThermalSettings
  2542. //
  2543. //! This function retrieves the thermal information of all thermal sensors or specific thermal sensor associated with the selected GPU.
  2544. //! Thermal sensors are indexed 0 to NVAPI_MAX_THERMAL_SENSORS_PER_GPU-1.
  2545. //!
  2546. //! - To retrieve specific thermal sensor info, set the sensorIndex to the required thermal sensor index.
  2547. //! - To retrieve info for all sensors, set sensorIndex to NVAPI_THERMAL_TARGET_ALL.
  2548. //!
  2549. //! SUPPORTED OS: Windows XP and higher
  2550. //!
  2551. //!
  2552. //! TCC_SUPPORTED
  2553. //!
  2554. //! \since Release: 85
  2555. //!
  2556. //! \param [in] hPhysicalGPU GPU selection.
  2557. //! \param [in] sensorIndex Explicit thermal sensor index selection.
  2558. //! \param [out] pThermalSettings Array of thermal settings.
  2559. //!
  2560. //! \retval NVAPI_OK Completed request
  2561. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  2562. //! \retval NVAPI_INVALID_ARGUMENT pThermalInfo is NULL.
  2563. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  2564. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  2565. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the INFO struct is not supported.
  2566. //! \ingroup gputhermal
  2567. ///////////////////////////////////////////////////////////////////////////////
  2568. NVAPI_INTERFACE NvAPI_GPU_GetThermalSettings(NvPhysicalGpuHandle hPhysicalGpu, NvU32 sensorIndex, NV_GPU_THERMAL_SETTINGS *pThermalSettings);
  2569. ///////////////////////////////////////////////////////////////////////////////////
  2570. // I2C API
  2571. // Provides ability to read or write data using I2C protocol.
  2572. // These APIs allow I2C access only to DDC monitors
  2573. //! \addtogroup i2capi
  2574. //! @{
  2575. #define NVAPI_MAX_SIZEOF_I2C_DATA_BUFFER 4096
  2576. #define NVAPI_MAX_SIZEOF_I2C_REG_ADDRESS 4
  2577. #define NVAPI_DISPLAY_DEVICE_MASK_MAX 24
  2578. #define NVAPI_I2C_SPEED_DEPRECATED 0xFFFF
  2579. typedef enum
  2580. {
  2581. NVAPI_I2C_SPEED_DEFAULT, //!< Set i2cSpeedKhz to I2C_SPEED_DEFAULT if default I2C speed is to be chosen, ie.use the current frequency setting.
  2582. NVAPI_I2C_SPEED_3KHZ,
  2583. NVAPI_I2C_SPEED_10KHZ,
  2584. NVAPI_I2C_SPEED_33KHZ,
  2585. NVAPI_I2C_SPEED_100KHZ,
  2586. NVAPI_I2C_SPEED_200KHZ,
  2587. NVAPI_I2C_SPEED_400KHZ,
  2588. } NV_I2C_SPEED;
  2589. //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite()
  2590. typedef struct
  2591. {
  2592. NvU32 version; //!< The structure version.
  2593. NvU32 displayMask; //!< The Display Mask of the concerned display.
  2594. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port
  2595. //!< (FALSE) of the concerned display.
  2596. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For
  2597. //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored
  2598. //!< here as 0xA0. This matches the position within the byte sent by the master, as
  2599. //!< the last bit is reserved to specify the read or write direction.
  2600. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register
  2601. //!< address should be sent.
  2602. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this
  2603. //!< field must be 0.
  2604. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command).
  2605. NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written.
  2606. NvU32 i2cSpeed; //!< The target speed of the transaction (between 28Kbps to 40Kbps; not guaranteed).
  2607. } NV_I2C_INFO_V1;
  2608. //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite()
  2609. typedef struct
  2610. {
  2611. NvU32 version; //!< The structure version.
  2612. NvU32 displayMask; //!< The Display Mask of the concerned display.
  2613. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port
  2614. //!< (FALSE) of the concerned display.
  2615. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For
  2616. //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored
  2617. //!< here as 0xA0. This matches the position within the byte sent by the master, as
  2618. //!< the last bit is reserved to specify the read or write direction.
  2619. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register
  2620. //!< address should be sent.
  2621. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this
  2622. //!< field must be 0.
  2623. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command).
  2624. NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written.
  2625. NvU32 i2cSpeed; //!< Deprecated, Must be set to NVAPI_I2C_SPEED_DEPRECATED.
  2626. NV_I2C_SPEED i2cSpeedKhz; //!< The target speed of the transaction in (kHz) (Chosen from the enum NV_I2C_SPEED).
  2627. } NV_I2C_INFO_V2;
  2628. //! Used in NvAPI_I2CRead() and NvAPI_I2CWrite()
  2629. typedef struct
  2630. {
  2631. NvU32 version; //!< The structure version.
  2632. NvU32 displayMask; //!< The Display Mask of the concerned display.
  2633. NvU8 bIsDDCPort; //!< This flag indicates either the DDC port (TRUE) or the communication port
  2634. //!< (FALSE) of the concerned display.
  2635. NvU8 i2cDevAddress; //!< The address of the I2C slave. The address should be shifted left by one. For
  2636. //!< example, the I2C address 0x50, often used for reading EDIDs, would be stored
  2637. //!< here as 0xA0. This matches the position within the byte sent by the master, as
  2638. //!< the last bit is reserved to specify the read or write direction.
  2639. NvU8* pbI2cRegAddress; //!< The I2C target register address. May be NULL, which indicates no register
  2640. //!< address should be sent.
  2641. NvU32 regAddrSize; //!< The size in bytes of target register address. If pbI2cRegAddress is NULL, this
  2642. //!< field must be 0.
  2643. NvU8* pbData; //!< The buffer of data which is to be read or written (depending on the command).
  2644. NvU32 cbSize; //!< The size of the data buffer, pbData, to be read or written.
  2645. NvU32 i2cSpeed; //!< Deprecated, Must be set to NVAPI_I2C_SPEED_DEPRECATED.
  2646. NV_I2C_SPEED i2cSpeedKhz; //!< The target speed of the transaction in (kHz) (Chosen from the enum NV_I2C_SPEED).
  2647. NvU8 portId; //!< The portid on which device is connected (remember to set bIsPortIdSet if this value is set)
  2648. //!< Optional for pre-Kepler
  2649. NvU32 bIsPortIdSet; //!< set this flag on if and only if portid value is set
  2650. } NV_I2C_INFO_V3;
  2651. typedef NV_I2C_INFO_V3 NV_I2C_INFO;
  2652. #define NV_I2C_INFO_VER3 MAKE_NVAPI_VERSION(NV_I2C_INFO_V3,3)
  2653. #define NV_I2C_INFO_VER2 MAKE_NVAPI_VERSION(NV_I2C_INFO_V2,2)
  2654. #define NV_I2C_INFO_VER1 MAKE_NVAPI_VERSION(NV_I2C_INFO_V1,1)
  2655. #define NV_I2C_INFO_VER NV_I2C_INFO_VER3
  2656. //! @}
  2657. /***********************************************************************************/
  2658. ///////////////////////////////////////////////////////////////////////////////
  2659. //
  2660. // FUNCTION NAME: NvAPI_I2CRead
  2661. //
  2662. //! This function reads the data buffer from the I2C port.
  2663. //! The I2C request must be for a DDC port: pI2cInfo->bIsDDCPort = 1.
  2664. //!
  2665. //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case,
  2666. //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned.
  2667. //!
  2668. //! If a register address is specified (i.e. regAddrSize is positive), then the transaction will be performed in
  2669. //! the combined format described in the I2C specification. The register address will be written, followed by
  2670. //! reading into the data buffer.
  2671. //!
  2672. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2673. //!
  2674. //!
  2675. //! \since Release: 85
  2676. //!
  2677. //! \param [in] hPhysicalGPU GPU selection.
  2678. //! \param [out] NV_I2C_INFO *pI2cInfo The I2C data input structure
  2679. //!
  2680. //! \retval NVAPI_OK Completed request
  2681. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  2682. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  2683. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  2684. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported.
  2685. //! \retval NVAPI_INVALID_ARGUMENT - argument does not meet specified requirements
  2686. //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE - an argument exceeds the maximum
  2687. //!
  2688. //! \ingroup i2capi
  2689. ///////////////////////////////////////////////////////////////////////////////
  2690. NVAPI_INTERFACE NvAPI_I2CRead(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo);
  2691. ///////////////////////////////////////////////////////////////////////////////
  2692. //
  2693. // FUNCTION NAME: NvAPI_I2CWrite
  2694. //
  2695. //! This function writes the data buffer to the I2C port.
  2696. //!
  2697. //! The I2C request must be for a DDC port: pI2cInfo->bIsDDCPort = 1.
  2698. //!
  2699. //! A data buffer size larger than 16 bytes may be rejected if a register address is specified. In such a case,
  2700. //! NVAPI_ARGUMENT_EXCEED_MAX_SIZE would be returned.
  2701. //!
  2702. //! If a register address is specified (i.e. regAddrSize is positive), then the register address will be written
  2703. //! and the data buffer will immediately follow without a restart.
  2704. //!
  2705. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  2706. //!
  2707. //!
  2708. //! \since Release: 85
  2709. //!
  2710. //! \param [in] hPhysicalGPU GPU selection.
  2711. //! \param [in] pI2cInfo The I2C data input structure
  2712. //!
  2713. //! \retval NVAPI_OK Completed request
  2714. //! \retval NVAPI_ERROR Miscellaneous error occurred.
  2715. //! \retval NVAPI_HANDLE_INVALIDATED Handle passed has been invalidated (see user guide).
  2716. //! \retval NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE Handle passed is not a physical GPU handle.
  2717. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION Structure version is not supported.
  2718. //! \retval NVAPI_INVALID_ARGUMENT Argument does not meet specified requirements
  2719. //! \retval NVAPI_ARGUMENT_EXCEED_MAX_SIZE Argument exceeds the maximum
  2720. //!
  2721. //! \ingroup i2capi
  2722. ///////////////////////////////////////////////////////////////////////////////
  2723. NVAPI_INTERFACE NvAPI_I2CWrite(NvPhysicalGpuHandle hPhysicalGpu, NV_I2C_INFO *pI2cInfo);
  2724. ///////////////////////////////////////////////////////////////////////////////
  2725. //
  2726. // FUNCTION NAME: NvAPI_GPU_WorkstationFeatureSetup
  2727. //
  2728. //! \fn NvAPI_GPU_WorkstationFeatureSetup(NvPhysicalGpuHandle hPhysicalGpu, NvU32 featureEnableMask, NvU32 featureDisableMask)
  2729. //! DESCRIPTION: This API configures the driver for a set of workstation features.
  2730. //! The driver can allocate the memory resources accordingly.
  2731. //!
  2732. //! SUPPORTED OS: Windows 7
  2733. //!
  2734. //!
  2735. //! \param [in] hPhysicalGpu Physical GPU Handle of the display adapter to be configured. GPU handles may be retrieved
  2736. //! using NvAPI_EnumPhysicalGPUs. A value of NULL is permitted and applies the same operation
  2737. //! to all GPU handles enumerated by NvAPI_EnumPhysicalGPUs.
  2738. //! \param [in] featureEnableMask Mask of features the caller requests to enable for use
  2739. //! \param [in] featureDisableMask Mask of features the caller requests to disable
  2740. //!
  2741. //! As a general rule, features in the enable and disable masks are expected to be disjoint, although the disable
  2742. //! mask has precedence and a feature flagged in both masks will be disabled.
  2743. //!
  2744. //! \retval ::NVAPI_OK configuration request succeeded
  2745. //! \retval ::NVAPI_ERROR configuration request failed
  2746. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu is not a physical GPU handle.
  2747. //! \retval ::NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE requested feature set does not have all resources allocated for completeness.
  2748. //! \retval ::NVAPI_NO_IMPLEMENTATION only implemented for Win7
  2749. //
  2750. ///////////////////////////////////////////////////////////////////////////////
  2751. //! \ingroup gpu
  2752. typedef enum
  2753. {
  2754. NVAPI_GPU_WORKSTATION_FEATURE_MASK_SWAPGROUP = 0x00000001,
  2755. NVAPI_GPU_WORKSTATION_FEATURE_MASK_STEREO = 0x00000010,
  2756. NVAPI_GPU_WORKSTATION_FEATURE_MASK_WARPING = 0x00000100,
  2757. NVAPI_GPU_WORKSTATION_FEATURE_MASK_PIXINTENSITY = 0x00000200,
  2758. NVAPI_GPU_WORKSTATION_FEATURE_MASK_GRAYSCALE = 0x00000400,
  2759. NVAPI_GPU_WORKSTATION_FEATURE_MASK_BPC10 = 0x00001000
  2760. } NVAPI_GPU_WORKSTATION_FEATURE_MASK;
  2761. //! \ingroup gpu
  2762. NVAPI_INTERFACE NvAPI_GPU_WorkstationFeatureSetup(__in NvPhysicalGpuHandle hPhysicalGpu, __in NvU32 featureEnableMask, __in NvU32 featureDisableMask);
  2763. ///////////////////////////////////////////////////////////////////////////////
  2764. //
  2765. // FUNCTION NAME: NvAPI_GPU_WorkstationFeatureQuery
  2766. //
  2767. //! DESCRIPTION: This API queries the current set of workstation features.
  2768. //!
  2769. //! SUPPORTED OS: Windows 7
  2770. //!
  2771. //!
  2772. //! \param [in] hPhysicalGpu Physical GPU Handle of the display adapter to be configured. GPU handles may be retrieved
  2773. //! using NvAPI_EnumPhysicalGPUs.
  2774. //! \param [out] pConfiguredFeatureMask Mask of features requested for use by client drivers
  2775. //! \param [out] pConsistentFeatureMask Mask of features that have all resources allocated for completeness.
  2776. //!
  2777. //! \retval ::NVAPI_OK configuration request succeeded
  2778. //! \retval ::NVAPI_ERROR configuration request failed
  2779. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE hPhysicalGpu is not a physical GPU handle.
  2780. //! \retval ::NVAPI_NO_IMPLEMENTATION only implemented for Win7
  2781. //
  2782. ///////////////////////////////////////////////////////////////////////////////
  2783. //! \ingroup gpu
  2784. NVAPI_INTERFACE NvAPI_GPU_WorkstationFeatureQuery(__in NvPhysicalGpuHandle hPhysicalGpu, __out_opt NvU32 *pConfiguredFeatureMask, __out_opt NvU32 *pConsistentFeatureMask);
  2785. ///////////////////////////////////////////////////////////////////////////////
  2786. //
  2787. // FUNCTION NAME: NvAPI_GPU_GetHDCPSupportStatus
  2788. //
  2789. //! \fn NvAPI_GPU_GetHDCPSupportStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GET_HDCP_SUPPORT_STATUS *pGetHDCPSupportStatus)
  2790. //! DESCRIPTION: This function returns a GPU's HDCP support status.
  2791. //!
  2792. //! SUPPORTED OS: Windows XP and higher
  2793. //!
  2794. //!
  2795. //! \since Release: 175
  2796. //!
  2797. //! \retval ::NVAPI_OK
  2798. //! \retval ::NVAPI_ERROR
  2799. //! \retval ::NVAPI_INVALID_ARGUMENT
  2800. //! \retval ::NVAPI_HANDLE_INVALIDATED
  2801. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE
  2802. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION
  2803. //
  2804. ////////////////////////////////////////////////////////////////////////////////
  2805. //! \addtogroup gpu
  2806. //! @{
  2807. //! HDCP fuse states - used in NV_GPU_GET_HDCP_SUPPORT_STATUS
  2808. typedef enum _NV_GPU_HDCP_FUSE_STATE
  2809. {
  2810. NV_GPU_HDCP_FUSE_STATE_UNKNOWN = 0,
  2811. NV_GPU_HDCP_FUSE_STATE_DISABLED = 1,
  2812. NV_GPU_HDCP_FUSE_STATE_ENABLED = 2,
  2813. } NV_GPU_HDCP_FUSE_STATE;
  2814. //! HDCP key sources - used in NV_GPU_GET_HDCP_SUPPORT_STATUS
  2815. typedef enum _NV_GPU_HDCP_KEY_SOURCE
  2816. {
  2817. NV_GPU_HDCP_KEY_SOURCE_UNKNOWN = 0,
  2818. NV_GPU_HDCP_KEY_SOURCE_NONE = 1,
  2819. NV_GPU_HDCP_KEY_SOURCE_CRYPTO_ROM = 2,
  2820. NV_GPU_HDCP_KEY_SOURCE_SBIOS = 3,
  2821. NV_GPU_HDCP_KEY_SOURCE_I2C_ROM = 4,
  2822. NV_GPU_HDCP_KEY_SOURCE_FUSES = 5,
  2823. } NV_GPU_HDCP_KEY_SOURCE;
  2824. //! HDCP key source states - used in NV_GPU_GET_HDCP_SUPPORT_STATUS
  2825. typedef enum _NV_GPU_HDCP_KEY_SOURCE_STATE
  2826. {
  2827. NV_GPU_HDCP_KEY_SOURCE_STATE_UNKNOWN = 0,
  2828. NV_GPU_HDCP_KEY_SOURCE_STATE_ABSENT = 1,
  2829. NV_GPU_HDCP_KEY_SOURCE_STATE_PRESENT = 2,
  2830. } NV_GPU_HDCP_KEY_SOURCE_STATE;
  2831. //! HDPC support status - used in NvAPI_GPU_GetHDCPSupportStatus()
  2832. typedef struct
  2833. {
  2834. NvU32 version; //! Structure version constucted by macro #NV_GPU_GET_HDCP_SUPPORT_STATUS
  2835. NV_GPU_HDCP_FUSE_STATE hdcpFuseState; //! GPU's HDCP fuse state
  2836. NV_GPU_HDCP_KEY_SOURCE hdcpKeySource; //! GPU's HDCP key source
  2837. NV_GPU_HDCP_KEY_SOURCE_STATE hdcpKeySourceState; //! GPU's HDCP key source state
  2838. } NV_GPU_GET_HDCP_SUPPORT_STATUS;
  2839. //! Macro for constructing the version for structure NV_GPU_GET_HDCP_SUPPORT_STATUS
  2840. #define NV_GPU_GET_HDCP_SUPPORT_STATUS_VER MAKE_NVAPI_VERSION(NV_GPU_GET_HDCP_SUPPORT_STATUS,1)
  2841. //! @}
  2842. //! \ingroup gpu
  2843. NVAPI_INTERFACE NvAPI_GPU_GetHDCPSupportStatus(NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_GET_HDCP_SUPPORT_STATUS *pGetHDCPSupportStatus);
  2844. ///////////////////////////////////////////////////////////////////////////////
  2845. //
  2846. // FUNCTION NAME: NvAPI_GPU_GetTachReading
  2847. //
  2848. //! DESCRIPTION: This API retrieves the fan speed tachometer reading for the specified physical GPU.
  2849. //!
  2850. //! HOW TO USE:
  2851. //! - NvU32 Value = 0;
  2852. //! - ret = NvAPI_GPU_GetTachReading(hPhysicalGpu, &Value);
  2853. //! - On call success:
  2854. //! - Value contains the tachometer reading
  2855. //!
  2856. //! SUPPORTED OS: Windows XP and higher
  2857. //!
  2858. //!
  2859. //! TCC_SUPPORTED
  2860. //!
  2861. //! \param [in] hPhysicalGpu GPU selection.
  2862. //! \param [out] pValue Pointer to a variable to get the tachometer reading
  2863. //!
  2864. //! \retval ::NVAPI_OK - completed request
  2865. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  2866. //! \retval ::NVAPI_NOT_SUPPORTED - functionality not supported
  2867. //! \retval ::NVAPI_API_NOT_INTIALIZED - nvapi not initialized
  2868. //! \retval ::NVAPI_INVALID_ARGUMENT - invalid argument passed
  2869. //! \retval ::NVAPI_HANDLE_INVALIDATED - handle passed has been invalidated (see user guide)
  2870. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE - handle passed is not a physical GPU handle
  2871. //!
  2872. //! \ingroup gpucooler
  2873. ///////////////////////////////////////////////////////////////////////////////
  2874. NVAPI_INTERFACE NvAPI_GPU_GetTachReading(NvPhysicalGpuHandle hPhysicalGPU, NvU32 *pValue);
  2875. ///////////////////////////////////////////////////////////////////////////////
  2876. //
  2877. // FUNCTION NAME: NvAPI_GPU_GetECCStatusInfo
  2878. //
  2879. //! \fn NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu,
  2880. //! NV_GPU_ECC_STATUS_INFO *pECCStatusInfo);
  2881. //! DESCRIPTION: This function returns ECC memory status information.
  2882. //!
  2883. //! SUPPORTED OS: Windows XP and higher
  2884. //!
  2885. //!
  2886. //! TCC_SUPPORTED
  2887. //!
  2888. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for which ECC
  2889. //! status information is to be retrieved.
  2890. //! \param [out] pECCStatusInfo A pointer to an ECC status structure.
  2891. //!
  2892. //! \retval ::NVAPI_OK The request was completed successfully.
  2893. //! \retval ::NVAPI_ERROR An unknown error occurred.
  2894. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  2895. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid.
  2896. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  2897. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided.
  2898. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  2899. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  2900. //
  2901. ///////////////////////////////////////////////////////////////////////////////
  2902. //! \addtogroup gpuecc
  2903. //! Used in NV_GPU_ECC_STATUS_INFO.
  2904. typedef enum _NV_ECC_CONFIGURATION
  2905. {
  2906. NV_ECC_CONFIGURATION_NOT_SUPPORTED = 0,
  2907. NV_ECC_CONFIGURATION_DEFERRED, //!< Changes require a POST to take effect
  2908. NV_ECC_CONFIGURATION_IMMEDIATE, //!< Changes can optionally be made to take effect immediately
  2909. } NV_ECC_CONFIGURATION;
  2910. //! \ingroup gpuecc
  2911. //! Used in NvAPI_GPU_GetECCStatusInfo().
  2912. typedef struct
  2913. {
  2914. NvU32 version; //!< Structure version
  2915. NvU32 isSupported : 1; //!< ECC memory feature support
  2916. NV_ECC_CONFIGURATION configurationOptions; //!< Supported ECC memory feature configuration options
  2917. NvU32 isEnabled : 1; //!< Active ECC memory setting
  2918. } NV_GPU_ECC_STATUS_INFO;
  2919. //! \ingroup gpuecc
  2920. //! Macro for constructing the version field of NV_GPU_ECC_STATUS_INFO
  2921. #define NV_GPU_ECC_STATUS_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_STATUS_INFO,1)
  2922. //! \ingroup gpuecc
  2923. NVAPI_INTERFACE NvAPI_GPU_GetECCStatusInfo(NvPhysicalGpuHandle hPhysicalGpu,
  2924. NV_GPU_ECC_STATUS_INFO *pECCStatusInfo);
  2925. ///////////////////////////////////////////////////////////////////////////////
  2926. //
  2927. // FUNCTION NAME: NvAPI_GPU_GetECCErrorInfo
  2928. //
  2929. //! \fn NvAPI_GPU_GetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu,
  2930. //! NV_GPU_ECC_ERROR_INFO *pECCErrorInfo);
  2931. //!
  2932. //! DESCRIPTION: This function returns ECC memory error information.
  2933. //!
  2934. //! SUPPORTED OS: Windows XP and higher
  2935. //!
  2936. //!
  2937. //! TCC_SUPPORTED
  2938. //!
  2939. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  2940. //! which ECC error information is to be
  2941. //! retrieved.
  2942. //! \param [out] pECCErrorInfo A pointer to an ECC error structure.
  2943. //!
  2944. //! \retval ::NVAPI_OK The request was completed successfully.
  2945. //! \retval ::NVAPI_ERROR An unknown error occurred.
  2946. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  2947. //! \retval ::NVAPI_INVALID_ARGUMENT incorrect param value
  2948. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided.
  2949. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION structure version is not supported, initialize to NV_GPU_ECC_ERROR_INFO_VER.
  2950. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  2951. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  2952. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  2953. //
  2954. ///////////////////////////////////////////////////////////////////////////////
  2955. //! \ingroup gpuecc
  2956. //! Used in NvAPI_GPU_GetECCErrorInfo()/
  2957. typedef struct
  2958. {
  2959. NvU32 version; //!< Structure version
  2960. struct {
  2961. NvU64 singleBitErrors; //!< Number of single-bit ECC errors detected since last boot
  2962. NvU64 doubleBitErrors; //!< Number of double-bit ECC errors detected since last boot
  2963. } current;
  2964. struct {
  2965. NvU64 singleBitErrors; //!< Number of single-bit ECC errors detected since last counter reset
  2966. NvU64 doubleBitErrors; //!< Number of double-bit ECC errors detected since last counter reset
  2967. } aggregate;
  2968. } NV_GPU_ECC_ERROR_INFO;
  2969. //! \ingroup gpuecc
  2970. //! Macro for constructing the version field of NV_GPU_ECC_ERROR_INFO
  2971. #define NV_GPU_ECC_ERROR_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_ERROR_INFO,1)
  2972. //! \ingroup gpuecc
  2973. NVAPI_INTERFACE NvAPI_GPU_GetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu,
  2974. NV_GPU_ECC_ERROR_INFO *pECCErrorInfo);
  2975. ///////////////////////////////////////////////////////////////////////////////
  2976. //
  2977. // FUNCTION NAME: NvAPI_GPU_ResetECCErrorInfo
  2978. //
  2979. //! DESCRIPTION: This function resets ECC memory error counters.
  2980. //!
  2981. //! SUPPORTED OS: Windows XP and higher
  2982. //!
  2983. //!
  2984. //! TCC_SUPPORTED
  2985. //!
  2986. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  2987. //! which ECC error information is to be
  2988. //! cleared.
  2989. //! \param [in] bResetCurrent Reset the current ECC error counters.
  2990. //! \param [in] bResetAggregate Reset the aggregate ECC error counters.
  2991. //!
  2992. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  2993. //! specific meaning for this API, they are listed below.
  2994. //!
  2995. //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - The caller does not have administrative privileges
  2996. //!
  2997. //! \ingroup gpuecc
  2998. ///////////////////////////////////////////////////////////////////////////////
  2999. NVAPI_INTERFACE NvAPI_GPU_ResetECCErrorInfo(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bResetCurrent,
  3000. NvU8 bResetAggregate);
  3001. ///////////////////////////////////////////////////////////////////////////////
  3002. //
  3003. // FUNCTION NAME: NvAPI_GPU_GetECCConfigurationInfo
  3004. //
  3005. //! \fn NvAPI_GPU_GetECCConfigurationInfo(NvPhysicalGpuHandle hPhysicalGpu,
  3006. //! NV_GPU_ECC_CONFIGURATION_INFO *pECCConfigurationInfo);
  3007. //! DESCRIPTION: This function returns ECC memory configuration information.
  3008. //!
  3009. //! SUPPORTED OS: Windows XP and higher
  3010. //!
  3011. //!
  3012. //! TCC_SUPPORTED
  3013. //!
  3014. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  3015. //! which ECC configuration information
  3016. //! is to be retrieved.
  3017. //! \param [out] pECCConfigurationInfo A pointer to an ECC
  3018. //! configuration structure.
  3019. //!
  3020. //! \retval ::NVAPI_OK The request was completed successfully.
  3021. //! \retval ::NVAPI_ERROR An unknown error occurred.
  3022. //! \retval ::NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE The provided GPU handle is not a physical GPU handle.
  3023. //! \retval ::NVAPI_INVALID_HANDLE The provided GPU handle is invalid.
  3024. //! \retval ::NVAPI_HANDLE_INVALIDATED The provided GPU handle is no longer valid.
  3025. //! \retval ::NVAPI_INVALID_POINTER An invalid argument pointer was provided.
  3026. //! \retval ::NVAPI_NOT_SUPPORTED The request is not supported.
  3027. //! \retval ::NVAPI_API_NOT_INTIALIZED NvAPI was not yet initialized.
  3028. //
  3029. ///////////////////////////////////////////////////////////////////////////////
  3030. //! \ingroup gpuecc
  3031. //! Used in NvAPI_GPU_GetECCConfigurationInfo().
  3032. typedef struct
  3033. {
  3034. NvU32 version; //! Structure version
  3035. NvU32 isEnabled : 1; //! Current ECC configuration stored in non-volatile memory
  3036. NvU32 isEnabledByDefault : 1; //! Factory default ECC configuration (static)
  3037. } NV_GPU_ECC_CONFIGURATION_INFO;
  3038. //! \ingroup gpuecc
  3039. //! Macro for consstructing the verion field of NV_GPU_ECC_CONFIGURATION_INFO
  3040. #define NV_GPU_ECC_CONFIGURATION_INFO_VER MAKE_NVAPI_VERSION(NV_GPU_ECC_CONFIGURATION_INFO,1)
  3041. //! \ingroup gpuecc
  3042. NVAPI_INTERFACE NvAPI_GPU_GetECCConfigurationInfo(NvPhysicalGpuHandle hPhysicalGpu,
  3043. NV_GPU_ECC_CONFIGURATION_INFO *pECCConfigurationInfo);
  3044. ///////////////////////////////////////////////////////////////////////////////
  3045. //
  3046. // FUNCTION NAME: NvAPI_GPU_SetECCConfiguration
  3047. //
  3048. //! DESCRIPTION: This function updates the ECC memory configuration setting.
  3049. //!
  3050. //! SUPPORTED OS: Windows XP and higher
  3051. //!
  3052. //!
  3053. //! TCC_SUPPORTED
  3054. //!
  3055. //! \param [in] hPhysicalGpu A handle identifying the physical GPU for
  3056. //! which to update the ECC configuration
  3057. //! setting.
  3058. //! \param [in] bEnable The new ECC configuration setting.
  3059. //! \param [in] bEnableImmediately Request that the new setting take effect immediately.
  3060. //!
  3061. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  3062. //! specific meaning for this API, they are listed below.
  3063. //!
  3064. //! \retval ::NVAPI_INVALID_CONFIGURATION - Possibly SLI is enabled. Disable SLI and retry.
  3065. //! \retval ::NVAPI_INVALID_USER_PRIVILEGE - The caller does not have administrative privileges
  3066. //!
  3067. //! \ingroup gpuecc
  3068. ///////////////////////////////////////////////////////////////////////////////
  3069. NVAPI_INTERFACE NvAPI_GPU_SetECCConfiguration(NvPhysicalGpuHandle hPhysicalGpu, NvU8 bEnable,
  3070. NvU8 bEnableImmediately);
  3071. //! \ingroup gpu
  3072. typedef struct
  3073. {
  3074. NvU32 version; //!< version of this structure
  3075. NvU32 width; //!< width of the input texture
  3076. NvU32 height; //!< height of the input texture
  3077. float* blendingTexture; //!< array of floating values building an intensity RGB texture
  3078. } NV_SCANOUT_INTENSITY_DATA_V1;
  3079. //! \ingroup gpu
  3080. typedef struct
  3081. {
  3082. NvU32 version; //!< version of this structure
  3083. NvU32 width; //!< width of the input texture
  3084. NvU32 height; //!< height of the input texture
  3085. float* blendingTexture; //!< array of floating values building an intensity RGB texture
  3086. float* offsetTexture; //!< array of floating values building an offset texture
  3087. NvU32 offsetTexChannels; //!< number of channels per pixel in the offset texture
  3088. } NV_SCANOUT_INTENSITY_DATA_V2;
  3089. typedef NV_SCANOUT_INTENSITY_DATA_V2 NV_SCANOUT_INTENSITY_DATA;
  3090. //! \ingroup gpu
  3091. #define NV_SCANOUT_INTENSITY_DATA_VER1 MAKE_NVAPI_VERSION(NV_SCANOUT_INTENSITY_DATA_V1, 1)
  3092. #define NV_SCANOUT_INTENSITY_DATA_VER2 MAKE_NVAPI_VERSION(NV_SCANOUT_INTENSITY_DATA_V2, 2)
  3093. #define NV_SCANOUT_INTENSITY_DATA_VER NV_SCANOUT_INTENSITY_DATA_VER2
  3094. ///////////////////////////////////////////////////////////////////////////////
  3095. // FUNCTION NAME: NvAPI_GPU_SetScanoutIntensity
  3096. //
  3097. //! DESCRIPTION: This API enables and sets up per-pixel intensity feature on the specified display.
  3098. //!
  3099. //! SUPPORTED OS: Windows 7 and higher
  3100. //!
  3101. //!
  3102. //! \param [in] displayId combined physical display and GPU identifier of the display to apply the intensity control.
  3103. //! \param [in] scanoutIntensityData the intensity texture info.
  3104. //! \param [out] pbSticky(OUT) indicates whether the settings will be kept over a reboot.
  3105. //!
  3106. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3107. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3108. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs
  3109. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input data.
  3110. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_SCANOUT_INTENSITY_DATA structure version mismatch.
  3111. //! \retval ::NVAPI_OK Feature enabled.
  3112. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3113. //!
  3114. //! \ingroup gpu
  3115. ///////////////////////////////////////////////////////////////////////////////
  3116. NVAPI_INTERFACE NvAPI_GPU_SetScanoutIntensity(NvU32 displayId, NV_SCANOUT_INTENSITY_DATA* scanoutIntensityData, int *pbSticky);
  3117. //! \ingroup gpu
  3118. typedef struct _NV_SCANOUT_INTENSITY_STATE_DATA
  3119. {
  3120. NvU32 version; //!< version of this structure
  3121. NvU32 bEnabled; //!< intensity is enabled or not
  3122. } NV_SCANOUT_INTENSITY_STATE_DATA;
  3123. //! \ingroup gpu
  3124. #define NV_SCANOUT_INTENSITY_STATE_VER MAKE_NVAPI_VERSION(NV_SCANOUT_INTENSITY_STATE_DATA, 1)
  3125. ///////////////////////////////////////////////////////////////////////////////
  3126. // FUNCTION NAME: NvAPI_GPU_GetScanoutIntensityState
  3127. //
  3128. //! DESCRIPTION: This API queries current state of the intensity feature on the specified display.
  3129. //!
  3130. //! SUPPORTED OS: Windows 7 and higher
  3131. //!
  3132. //!
  3133. //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration.
  3134. //! \param [in,out] scanoutIntensityStateData intensity state data.
  3135. //!
  3136. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  3137. //! specific meaning for this API, they are listed below.
  3138. //!
  3139. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3140. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3141. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs.
  3142. //! \retval ::NVAPI_OK Feature enabled.
  3143. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3144. //!
  3145. //! \ingroup gpu
  3146. ///////////////////////////////////////////////////////////////////////////////
  3147. NVAPI_INTERFACE NvAPI_GPU_GetScanoutIntensityState(__in NvU32 displayId, __inout NV_SCANOUT_INTENSITY_STATE_DATA* scanoutIntensityStateData);
  3148. //! \ingroup gpu
  3149. typedef enum
  3150. {
  3151. NV_GPU_WARPING_VERTICE_FORMAT_TRIANGLESTRIP_XYUVRQ = 0,
  3152. NV_GPU_WARPING_VERTICE_FORMAT_TRIANGLES_XYUVRQ = 1,
  3153. } NV_GPU_WARPING_VERTICE_FORMAT;
  3154. //! \ingroup gpu
  3155. typedef struct
  3156. {
  3157. NvU32 version; //!< version of this structure
  3158. float* vertices; //!< width of the input texture
  3159. NV_GPU_WARPING_VERTICE_FORMAT vertexFormat; //!< format of the input vertices
  3160. int numVertices; //!< number of the input vertices
  3161. NvSBox* textureRect; //!< rectangle in desktop coordinates describing the source area for the warping
  3162. } NV_SCANOUT_WARPING_DATA;
  3163. //! \ingroup gpu
  3164. #define NV_SCANOUT_WARPING_VER MAKE_NVAPI_VERSION(NV_SCANOUT_WARPING_DATA, 1)
  3165. ///////////////////////////////////////////////////////////////////////////////
  3166. // FUNCTION NAME: NvAPI_GPU_SetScanoutWarping
  3167. //
  3168. //! DESCRIPTION: This API enables and sets up the warping feature on the specified display.
  3169. //!
  3170. //! SUPPORTED OS: Windows 7 and higher
  3171. //!
  3172. //!
  3173. //! \param [in] displayId Combined physical display and GPU identifier of the display to apply the intensity control
  3174. //! \param [in] scanoutWarpingData The warping data info
  3175. //! \param [out] pbSticky Indicates whether the settings will be kept over a reboot.
  3176. //!
  3177. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3178. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3179. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs
  3180. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input data.
  3181. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_SCANOUT_WARPING_DATA structure version mismatch.
  3182. //! \retval ::NVAPI_OK Feature enabled.
  3183. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3184. //!
  3185. //! \ingroup gpu
  3186. ///////////////////////////////////////////////////////////////////////////////
  3187. NVAPI_INTERFACE NvAPI_GPU_SetScanoutWarping(NvU32 displayId, NV_SCANOUT_WARPING_DATA* scanoutWarpingData, int* piMaxNumVertices, int* pbSticky);
  3188. //! \ingroup gpu
  3189. typedef struct _NV_SCANOUT_WARPING_STATE_DATA
  3190. {
  3191. NvU32 version; //!< version of this structure
  3192. NvU32 bEnabled; //!< warping is enabled or not
  3193. } NV_SCANOUT_WARPING_STATE_DATA;
  3194. //! \ingroup gpu
  3195. #define NV_SCANOUT_WARPING_STATE_VER MAKE_NVAPI_VERSION(NV_SCANOUT_WARPING_STATE_DATA, 1)
  3196. ///////////////////////////////////////////////////////////////////////////////
  3197. // FUNCTION NAME: NvAPI_GPU_GetScanoutWarpingState
  3198. //
  3199. //! DESCRIPTION: This API queries current state of the warping feature on the specified display.
  3200. //!
  3201. //! SUPPORTED OS: Windows 7 and higher
  3202. //!
  3203. //!
  3204. //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration.
  3205. //! \param [in,out] scanoutWarpingStateData warping state data.
  3206. //!
  3207. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  3208. //! specific meaning for this API, they are listed below.
  3209. //!
  3210. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3211. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3212. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs.
  3213. //! \retval ::NVAPI_OK Feature enabled.
  3214. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3215. //!
  3216. //! \ingroup gpu
  3217. ///////////////////////////////////////////////////////////////////////////////
  3218. NVAPI_INTERFACE NvAPI_GPU_GetScanoutWarpingState(__in NvU32 displayId, __inout NV_SCANOUT_WARPING_STATE_DATA* scanoutWarpingStateData);
  3219. typedef enum
  3220. {
  3221. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_WARPING_RESAMPLING_METHOD = 0
  3222. } NV_GPU_SCANOUT_COMPOSITION_PARAMETER;
  3223. //! This enum defines a collection of possible scanout composition values that can be used to configure
  3224. //! possible scanout composition settings. (Currently the only parameter defined is the WARPING_RESAMPLING_METHOD).
  3225. typedef enum
  3226. {
  3227. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_SET_TO_DEFAULT = 0, // Set parameter to default value.
  3228. // WARPING_RESAMPLING_METHOD section:
  3229. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BILINEAR = 0x100,
  3230. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_TRIANGULAR = 0x101,
  3231. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_BELL_SHAPED = 0x102,
  3232. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_BSPLINE = 0x103,
  3233. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_ADAPTIVE_TRIANGULAR = 0x104,
  3234. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_ADAPTIVE_BELL_SHAPED = 0x105,
  3235. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE_WARPING_RESAMPLING_METHOD_BICUBIC_ADAPTIVE_BSPLINE = 0x106
  3236. } NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE;
  3237. ///////////////////////////////////////////////////////////////////////////////
  3238. // FUNCTION NAME: NvAPI_GPU_SetScanoutCompositionParameter
  3239. //
  3240. //! DESCRIPTION: This API sets various parameters that configure the scanout composition feature on the specified display.
  3241. //! (currently there is only one configurable parameter defined: WARPING_RESAMPLING_METHOD,
  3242. //! but this function is designed to support the addition of parameters as needed.)
  3243. //!
  3244. //! SUPPORTED OS: Windows 7 and higher
  3245. //!
  3246. //!
  3247. //! \param [in] displayId Combined physical display and GPU identifier of the display to apply the intensity control
  3248. //! \param [in] parameter The scanout composition parameter to be set
  3249. //! \param [in] parameterValue The data to be set for the specified parameter
  3250. //! \param [in] pContainer Additional container for data associated with the specified parameter
  3251. //!
  3252. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3253. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3254. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs
  3255. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input data.
  3256. //! \retval ::NVAPI_OK Feature enabled.
  3257. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3258. //!
  3259. //! \ingroup gpu
  3260. ///////////////////////////////////////////////////////////////////////////////
  3261. NVAPI_INTERFACE NvAPI_GPU_SetScanoutCompositionParameter(NvU32 displayId, NV_GPU_SCANOUT_COMPOSITION_PARAMETER parameter,
  3262. NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE parameterValue, float *pContainer);
  3263. ///////////////////////////////////////////////////////////////////////////////
  3264. // FUNCTION NAME: NvAPI_GPU_GetScanoutCompositionParameter
  3265. //
  3266. //! DESCRIPTION: This API queries current state of one of the various scanout composition parameters on the specified display.
  3267. //!
  3268. //! SUPPORTED OS: Windows 7 and higher
  3269. //!
  3270. //!
  3271. //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration.
  3272. //! \param [in] parameter scanout composition parameter to by queried.
  3273. //! \param [out] parameterData scanout composition parameter data.
  3274. //! \param [out] pContainer Additional container for returning data associated with the specified parameter
  3275. //!
  3276. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  3277. //! specific meaning for this API, they are listed below.
  3278. //!
  3279. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3280. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3281. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs.
  3282. //! \retval ::NVAPI_OK Feature enabled.
  3283. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3284. //!
  3285. //! \ingroup gpu
  3286. ///////////////////////////////////////////////////////////////////////////////
  3287. NVAPI_INTERFACE NvAPI_GPU_GetScanoutCompositionParameter(__in NvU32 displayId, __in NV_GPU_SCANOUT_COMPOSITION_PARAMETER parameter,
  3288. __out NV_GPU_SCANOUT_COMPOSITION_PARAMETER_VALUE *parameterData, __out float *pContainer);
  3289. ///////////////////////////////////////////////////////////////////////////////
  3290. // FUNCTION NAME: NvAPI_GPU_GetScanoutConfiguration
  3291. //
  3292. //! DESCRIPTION: This API queries the desktop and scanout portion of the specified display.
  3293. //!
  3294. //! SUPPORTED OS: Windows 7 and higher
  3295. //!
  3296. //!
  3297. //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration.
  3298. //! \param [in,out] desktopRect desktop area of the display in desktop coordinates.
  3299. //! \param [in,out] scanoutRect scanout area of the display relative to desktopRect.
  3300. //!
  3301. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid input parameters.
  3302. //! \retval ::NVAPI_API_NOT_INITIALIZED NvAPI not initialized.
  3303. //! \retval ::NVAPI_NOT_SUPPORTED Interface not supported by the driver used, or only supported on selected GPUs.
  3304. //! \retval ::NVAPI_OK Feature enabled.
  3305. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  3306. //!
  3307. //! \ingroup gpu
  3308. ///////////////////////////////////////////////////////////////////////////////
  3309. NVAPI_INTERFACE NvAPI_GPU_GetScanoutConfiguration(NvU32 displayId, NvSBox* desktopRect, NvSBox* scanoutRect);
  3310. //! \ingroup gpu
  3311. //! Used in NvAPI_GPU_GetScanoutConfigurationEx().
  3312. typedef struct _NV_SCANOUT_INFORMATION
  3313. {
  3314. NvU32 version; //!< Structure version, needs to be initialized with NV_SCANOUT_INFORMATION_VER.
  3315. NvSBox sourceDesktopRect; //!< Operating system display device rect in desktop coordinates displayId is scanning out from.
  3316. NvSBox sourceViewportRect; //!< Area inside the sourceDesktopRect which is scanned out to the display.
  3317. NvSBox targetViewportRect; //!< Area inside the rect described by targetDisplayWidth/Height sourceViewportRect is scanned out to.
  3318. NvU32 targetDisplayWidth; //!< Horizontal size of the active resolution scanned out to the display.
  3319. NvU32 targetDisplayHeight; //!< Vertical size of the active resolution scanned out to the display.
  3320. NvU32 cloneImportance; //!< If targets are cloned views of the sourceDesktopRect the cloned targets have an importance assigned (0:primary,1 secondary,...).
  3321. NV_ROTATE sourceToTargetRotation; //!< Rotation performed between the sourceViewportRect and the targetViewportRect.
  3322. } NV_SCANOUT_INFORMATION;
  3323. #define NV_SCANOUT_INFORMATION_VER MAKE_NVAPI_VERSION(NV_SCANOUT_INFORMATION,1)
  3324. ///////////////////////////////////////////////////////////////////////////////
  3325. // FUNCTION NAME: NvAPI_GPU_GetScanoutConfigurationEx
  3326. //
  3327. //! DESCRIPTION: This API queries the desktop and scanout portion of the specified display.
  3328. //!
  3329. //! SUPPORTED OS: Windows 7 and higher
  3330. //!
  3331. //! \since Release: 331
  3332. //!
  3333. //! \param [in] displayId combined physical display and GPU identifier of the display to query the configuration.
  3334. //! \param [in,out] pScanoutInformation desktop area to displayId mapping information.
  3335. //!
  3336. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  3337. //!
  3338. //! \ingroup gpu
  3339. ///////////////////////////////////////////////////////////////////////////////
  3340. NVAPI_INTERFACE NvAPI_GPU_GetScanoutConfigurationEx(__in NvU32 displayId, __inout NV_SCANOUT_INFORMATION *pScanoutInformation);
  3341. //! Used in NvAPI_GPU_GetPerfDecreaseInfo.
  3342. //! Bit masks for knowing the exact reason for performance decrease
  3343. typedef enum _NVAPI_GPU_PERF_DECREASE
  3344. {
  3345. NV_GPU_PERF_DECREASE_NONE = 0, //!< No Slowdown detected
  3346. NV_GPU_PERF_DECREASE_REASON_THERMAL_PROTECTION = 0x00000001, //!< Thermal slowdown/shutdown/POR thermal protection
  3347. NV_GPU_PERF_DECREASE_REASON_POWER_CONTROL = 0x00000002, //!< Power capping / pstate cap
  3348. NV_GPU_PERF_DECREASE_REASON_AC_BATT = 0x00000004, //!< AC->BATT event
  3349. NV_GPU_PERF_DECREASE_REASON_API_TRIGGERED = 0x00000008, //!< API triggered slowdown
  3350. NV_GPU_PERF_DECREASE_REASON_INSUFFICIENT_POWER = 0x00000010, //!< Power connector missing
  3351. NV_GPU_PERF_DECREASE_REASON_UNKNOWN = 0x80000000, //!< Unknown reason
  3352. } NVAPI_GPU_PERF_DECREASE;
  3353. ///////////////////////////////////////////////////////////////////////////////
  3354. //
  3355. // FUNCTION NAME: NvAPI_GPU_GetPerfDecreaseInfo
  3356. //
  3357. //! DESCRIPTION: This function retrieves - in NvU32 variable - reasons for the current performance decrease.
  3358. //!
  3359. //! SUPPORTED OS: Windows XP and higher
  3360. //!
  3361. //! \param [in] hPhysicalGPU (IN) - GPU for which performance decrease is to be evaluated.
  3362. //! \param [out] pPerfDecrInfo (OUT) - Pointer to a NvU32 variable containing performance decrease info
  3363. //!
  3364. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  3365. //!
  3366. //! \ingroup gpu
  3367. ///////////////////////////////////////////////////////////////////////////////
  3368. NVAPI_INTERFACE NvAPI_GPU_GetPerfDecreaseInfo(__in NvPhysicalGpuHandle hPhysicalGpu, __inout NvU32 *pPerfDecrInfo);
  3369. //! \ingroup gpu
  3370. typedef enum _NV_GPU_ILLUMINATION_ATTRIB
  3371. {
  3372. NV_GPU_IA_LOGO_BRIGHTNESS = 0,
  3373. NV_GPU_IA_SLI_BRIGHTNESS = 1,
  3374. } NV_GPU_ILLUMINATION_ATTRIB;
  3375. ///////////////////////////////////////////////////////////////////////////////
  3376. //
  3377. // FUNCTION NAME: NvAPI_GPU_QueryIlluminationSupport
  3378. //
  3379. //! \fn NvAPI_GPU_QueryIlluminationSupport(__inout NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM *pIlluminationSupportInfo)
  3380. //! DESCRIPTION: This function reports if the specified illumination attribute is supported.
  3381. //!
  3382. //! \note Only a single GPU can manage an given attribute on a given HW element,
  3383. //! regardless of how many are attatched. I.E. only one GPU will be used to control
  3384. //! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached.
  3385. //! You should enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  3386. //!
  3387. //! SUPPORTED OS: Windows Vista and higher
  3388. //!
  3389. //! \since Version: 300.05
  3390. //!
  3391. //! \param [in] hPhysicalGpu Physical GPU handle
  3392. //! \param Attribute An enumeration value specifying the Illumination attribute to be querried
  3393. //! \param [out] pSupported A boolean indicating if the attribute is supported.
  3394. //!
  3395. //! \return See \ref nvapistatus for the list of possible return values.
  3396. //
  3397. //////////////////////////////////////////////////////////////////////////////
  3398. //! \ingroup gpu
  3399. typedef struct _NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1 {
  3400. // IN
  3401. NvU32 version; //!< Version of this structure
  3402. NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute.
  3403. //!< note that this is the GPU that is managing the attribute.
  3404. //!< Only a single GPU can manage an given attribute on a given HW element,
  3405. //!< regardless of how many are attatched.
  3406. //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge,
  3407. //!< regardless of how many are physicaly attached.
  3408. //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  3409. NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried.
  3410. //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB.
  3411. // OUT
  3412. NvU32 bSupported; //!< A boolean indicating if the attribute is supported.
  3413. } NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1;
  3414. //! \ingroup gpu
  3415. typedef NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1 NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM;
  3416. //! \ingroup gpu
  3417. #define NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_V1,1)
  3418. //! \ingroup gpu
  3419. #define NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM_VER_1
  3420. //! \ingroup gpu
  3421. NVAPI_INTERFACE NvAPI_GPU_QueryIlluminationSupport(__inout NV_GPU_QUERY_ILLUMINATION_SUPPORT_PARM *pIlluminationSupportInfo);
  3422. ///////////////////////////////////////////////////////////////////////////////
  3423. //
  3424. // FUNCTION NAME: NvAPI_GPU_GetIllumination
  3425. //
  3426. //! \fn NvAPI_GPU_GetIllumination(NV_GPU_GET_ILLUMINATION_PARM *pIlluminationInfo)
  3427. //! DESCRIPTION: This function reports value of the specified illumination attribute.
  3428. //!
  3429. //! \note Only a single GPU can manage an given attribute on a given HW element,
  3430. //! regardless of how many are attatched. I.E. only one GPU will be used to control
  3431. //! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached.
  3432. //! You should enumerate thru the GPUs with the \ref NvAPI_GPU_QueryIlluminationSupport call to
  3433. //! determine which GPU is managing the attribute.
  3434. //!
  3435. //! SUPPORTED OS: Windows Vista and higher
  3436. //!
  3437. //! \since Version: 300.05
  3438. //!
  3439. //! \param [in] hPhysicalGpu Physical GPU handle
  3440. //! \param Attribute An enumeration value specifying the Illumination attribute to be querried
  3441. //! \param [out] Value A DWORD containing the current value for the specified attribute.
  3442. //! This is specified as a percentage of the full range of the attribute
  3443. //! (0-100; 0 = off, 100 = full brightness)
  3444. //!
  3445. //! \return See \ref nvapistatus for the list of possible return values. Return values of special interest are:
  3446. //! NVAPI_INVALID_ARGUMENT The specified attibute is not known to the driver.
  3447. //! NVAPI_NOT_SUPPORTED: The specified attribute is not supported on the specified GPU
  3448. //
  3449. //////////////////////////////////////////////////////////////////////////////
  3450. //! \ingroup gpu
  3451. typedef struct _NV_GPU_GET_ILLUMINATION_PARM_V1 {
  3452. // IN
  3453. NvU32 version; //!< Version of this structure
  3454. NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute.
  3455. //!< Note that this is the GPU that is managing the attribute.
  3456. //!< Only a single GPU can manage an given attribute on a given HW element,
  3457. //!< regardless of how many are attatched.
  3458. //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge,
  3459. //!< regardless of how many are physicaly attached.
  3460. //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  3461. NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried.
  3462. //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB.
  3463. // OUT
  3464. NvU32 Value; //!< A DWORD that will contain the current value of the specified attribute.
  3465. //! This is specified as a percentage of the full range of the attribute
  3466. //! (0-100; 0 = off, 100 = full brightness)
  3467. } NV_GPU_GET_ILLUMINATION_PARM_V1;
  3468. //! \ingroup gpu
  3469. typedef NV_GPU_GET_ILLUMINATION_PARM_V1 NV_GPU_GET_ILLUMINATION_PARM;
  3470. //! \ingroup gpu
  3471. #define NV_GPU_GET_ILLUMINATION_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_GET_ILLUMINATION_PARM_V1,1)
  3472. //! \ingroup gpu
  3473. #define NV_GPU_GET_ILLUMINATION_PARM_VER NV_GPU_GET_ILLUMINATION_PARM_VER_1
  3474. //! \ingroup gpu
  3475. NVAPI_INTERFACE NvAPI_GPU_GetIllumination(NV_GPU_GET_ILLUMINATION_PARM *pIlluminationInfo);
  3476. ///////////////////////////////////////////////////////////////////////////////
  3477. //
  3478. // FUNCTION NAME: NvAPI_GPU_SetIllumination
  3479. //
  3480. //! \fn NvAPI_GPU_SetIllumination(NV_GPU_SET_ILLUMINATION_PARM *pIlluminationInfo)
  3481. //! DESCRIPTION: This function sets the value of the specified illumination attribute.
  3482. //!
  3483. //! \note Only a single GPU can manage an given attribute on a given HW element,
  3484. //! regardless of how many are attatched. I.E. only one GPU will be used to control
  3485. //! the brightness of the LED on an SLI bridge, regardless of how many are physicaly attached.
  3486. //! You should enumerate thru the GPUs with the \ref NvAPI_GPU_QueryIlluminationSupport call to
  3487. //! determine which GPU is managing the attribute.
  3488. //!
  3489. //! SUPPORTED OS: Windows Vista and higher
  3490. //!
  3491. //! \since Version: 300.05
  3492. //!
  3493. //! \param [in] hPhysicalGpu Physical GPU handle
  3494. //! \param Attribute An enumeration value specifying the Illumination attribute to be set
  3495. //! \param Value The new value for the specified attribute.
  3496. //! This should be specified as a percentage of the full range of the attribute
  3497. //! (0-100; 0 = off, 100 = full brightness)
  3498. //! If a value is specified outside this range, NVAPI_INVALID_ARGUMENT will be returned.
  3499. //!
  3500. //! \return See \ref nvapistatus for the list of possible return values. Return values of special interest are:
  3501. //! NVAPI_INVALID_ARGUMENT The specified attibute is not known to the driver, or the specified value is out of range.
  3502. //! NVAPI_NOT_SUPPORTED The specified attribute is not supported on the specified GPU.
  3503. //
  3504. ///////////////////////////////////////////////////////////////////////////////
  3505. //! \ingroup gpu
  3506. typedef struct _NV_GPU_SET_ILLUMINATION_PARM_V1 {
  3507. // IN
  3508. NvU32 version; //!< Version of this structure
  3509. NvPhysicalGpuHandle hPhysicalGpu; //!< The handle of the GPU that you are checking for the specified attribute.
  3510. //!< Note that this is the GPU that is managing the attribute.
  3511. //!< Only a single GPU can manage an given attribute on a given HW element,
  3512. //!< regardless of how many are attatched.
  3513. //!< I.E. only one GPU will be used to control the brightness of the LED on an SLI bridge,
  3514. //!< regardless of how many are physicaly attached.
  3515. //!< You enumerate thru the GPUs with this call to determine which GPU is managing the attribute.
  3516. NV_GPU_ILLUMINATION_ATTRIB Attribute; //!< An enumeration value specifying the Illumination attribute to be querried.
  3517. //!< refer to enum \ref NV_GPU_ILLUMINATION_ATTRIB.
  3518. NvU32 Value; //!< A DWORD containing the new value for the specified attribute.
  3519. //!< This should be specified as a percentage of the full range of the attribute
  3520. //!< (0-100; 0 = off, 100 = full brightness)
  3521. //!< If a value is specified outside this range, NVAPI_INVALID_ARGUMENT will be returned.
  3522. // OUT
  3523. } NV_GPU_SET_ILLUMINATION_PARM_V1;
  3524. //! \ingroup gpu
  3525. typedef NV_GPU_SET_ILLUMINATION_PARM_V1 NV_GPU_SET_ILLUMINATION_PARM;
  3526. //! \ingroup gpu
  3527. #define NV_GPU_SET_ILLUMINATION_PARM_VER_1 MAKE_NVAPI_VERSION(NV_GPU_SET_ILLUMINATION_PARM_V1,1)
  3528. //! \ingroup gpu
  3529. #define NV_GPU_SET_ILLUMINATION_PARM_VER NV_GPU_SET_ILLUMINATION_PARM_VER_1
  3530. //! \ingroup gpu
  3531. NVAPI_INTERFACE NvAPI_GPU_SetIllumination(NV_GPU_SET_ILLUMINATION_PARM *pIlluminationInfo);
  3532. ///////////////////////////////////////////////////////////////////////////////
  3533. //
  3534. // FUNCTION NAME: NvAPI_EnumNvidiaDisplayHandle
  3535. //
  3536. //! This function returns the handle of the NVIDIA display specified by the enum
  3537. //! index (thisEnum). The client should keep enumerating until it
  3538. //! returns NVAPI_END_ENUMERATION.
  3539. //!
  3540. //! Note: Display handles can get invalidated on a modeset, so the calling applications need to
  3541. //! renum the handles after every modeset.
  3542. //!
  3543. //! SUPPORTED OS: Windows XP and higher
  3544. //!
  3545. //!
  3546. //! \since Release: 80
  3547. //!
  3548. //! \param [in] thisEnum The index of the NVIDIA display.
  3549. //! \param [out] pNvDispHandle Pointer to the NVIDIA display handle.
  3550. //!
  3551. //! \retval NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big
  3552. //! \retval NVAPI_OK Return a valid NvDisplayHandle based on the enum index
  3553. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system
  3554. //! \retval NVAPI_END_ENUMERATION No more display device to enumerate
  3555. //! \ingroup disphandle
  3556. ///////////////////////////////////////////////////////////////////////////////
  3557. NVAPI_INTERFACE NvAPI_EnumNvidiaDisplayHandle(NvU32 thisEnum, NvDisplayHandle *pNvDispHandle);
  3558. ///////////////////////////////////////////////////////////////////////////////
  3559. //
  3560. // FUNCTION NAME: NvAPI_EnumNvidiaUnAttachedDisplayHandle
  3561. //
  3562. //! This function returns the handle of the NVIDIA unattached display specified by the enum
  3563. //! index (thisEnum). The client should keep enumerating until it
  3564. //! returns error.
  3565. //! Note: Display handles can get invalidated on a modeset, so the calling applications need to
  3566. //! renum the handles after every modeset.
  3567. //!
  3568. //! SUPPORTED OS: Windows XP and higher
  3569. //!
  3570. //!
  3571. //! \since Release: 80
  3572. //!
  3573. //! \param [in] thisEnum The index of the NVIDIA display.
  3574. //! \param [out] pNvUnAttachedDispHandle Pointer to the NVIDIA display handle of the unattached display.
  3575. //!
  3576. //! \retval NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big
  3577. //! \retval NVAPI_OK Return a valid NvDisplayHandle based on the enum index
  3578. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system
  3579. //! \retval NVAPI_END_ENUMERATION No more display device to enumerate.
  3580. //! \ingroup disphandle
  3581. ///////////////////////////////////////////////////////////////////////////////
  3582. NVAPI_INTERFACE NvAPI_EnumNvidiaUnAttachedDisplayHandle(NvU32 thisEnum, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle);
  3583. ///////////////////////////////////////////////////////////////////////////////
  3584. //
  3585. // FUNCTION NAME: NvAPI_CreateDisplayFromUnAttachedDisplay
  3586. //
  3587. //! This function converts the unattached display handle to an active attached display handle.
  3588. //!
  3589. //! At least one GPU must be present in the system and running an NVIDIA display driver.
  3590. //!
  3591. //! SUPPORTED OS: Windows XP and higher
  3592. //!
  3593. //!
  3594. //! \since Release: 80
  3595. //!
  3596. //! \retval NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pNvDisplay is NULL.
  3597. //! \retval NVAPI_OK One or more handles were returned
  3598. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  3599. //! \ingroup dispcontrol
  3600. ///////////////////////////////////////////////////////////////////////////////
  3601. NVAPI_INTERFACE NvAPI_CreateDisplayFromUnAttachedDisplay(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvDisplayHandle *pNvDisplay);
  3602. ///////////////////////////////////////////////////////////////////////////////
  3603. //
  3604. // FUNCTION NAME: NvAPI_GetAssociatedNVidiaDisplayHandle
  3605. //
  3606. //! This function returns the handle of the NVIDIA display that is associated
  3607. //! with the given display "name" (such as "\\.\DISPLAY1").
  3608. //!
  3609. //! SUPPORTED OS: Windows XP and higher
  3610. //!
  3611. //!
  3612. //! \since Release: 80
  3613. //!
  3614. //! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL
  3615. //! \retval NVAPI_OK *pNvDispHandle is now valid
  3616. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name
  3617. //! \ingroup disphandle
  3618. ///////////////////////////////////////////////////////////////////////////////
  3619. NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayHandle(const char *szDisplayName, NvDisplayHandle *pNvDispHandle);
  3620. ///////////////////////////////////////////////////////////////////////////////
  3621. //
  3622. // FUNCTION NAME: NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle
  3623. //
  3624. //! DESCRIPTION: This function returns the handle of an unattached NVIDIA display that is
  3625. //! associated with the given display name (such as "\\DISPLAY1").
  3626. //!
  3627. //! SUPPORTED OS: Windows XP and higher
  3628. //!
  3629. //!
  3630. //! \since Release: 185
  3631. //!
  3632. //! \retval ::NVAPI_INVALID_ARGUMENT Either argument is NULL.
  3633. //! \retval ::NVAPI_OK *pNvUnAttachedDispHandle is now valid.
  3634. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name.
  3635. //!
  3636. //! \ingroup disphandle
  3637. ///////////////////////////////////////////////////////////////////////////////
  3638. NVAPI_INTERFACE NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle(const char *szDisplayName, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle);
  3639. ///////////////////////////////////////////////////////////////////////////////
  3640. //
  3641. // FUNCTION NAME: NvAPI_GetAssociatedNVidiaDisplayName
  3642. //
  3643. //! For a given NVIDIA display handle, this function returns a string (such as "\\.\DISPLAY1") to identify the display.
  3644. //!
  3645. //! SUPPORTED OS: Windows XP and higher
  3646. //!
  3647. //!
  3648. //! \since Release: 80
  3649. //!
  3650. //! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL
  3651. //! \retval NVAPI_OK *pNvDispHandle is now valid
  3652. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name
  3653. //! \ingroup dispcontrol
  3654. ///////////////////////////////////////////////////////////////////////////////
  3655. NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayName(NvDisplayHandle NvDispHandle, NvAPI_ShortString szDisplayName);
  3656. ///////////////////////////////////////////////////////////////////////////////
  3657. //
  3658. // FUNCTION NAME: NvAPI_GetUnAttachedAssociatedDisplayName
  3659. //
  3660. //! This function returns the display name given, for example, "\\DISPLAY1", using the unattached NVIDIA display handle
  3661. //!
  3662. //! SUPPORTED OS: Windows XP and higher
  3663. //!
  3664. //!
  3665. //! \since Release: 95
  3666. //!
  3667. //! \retval NVAPI_INVALID_ARGUMENT Either argument is NULL
  3668. //! \retval NVAPI_OK *pNvDispHandle is now valid
  3669. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name
  3670. //! \ingroup dispcontrol
  3671. ///////////////////////////////////////////////////////////////////////////////
  3672. NVAPI_INTERFACE NvAPI_GetUnAttachedAssociatedDisplayName(NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvAPI_ShortString szDisplayName);
  3673. ///////////////////////////////////////////////////////////////////////////////
  3674. //
  3675. // FUNCTION NAME: NvAPI_EnableHWCursor
  3676. //
  3677. //! This function enables hardware cursor support
  3678. //!
  3679. //! SUPPORTED OS: Windows XP
  3680. //!
  3681. //!
  3682. //!
  3683. //! \since Release: 80
  3684. //!
  3685. //! \return NVAPI_ERROR or NVAPI_OK
  3686. //! \ingroup dispcontrol
  3687. ///////////////////////////////////////////////////////////////////////////////
  3688. NVAPI_INTERFACE NvAPI_EnableHWCursor(NvDisplayHandle hNvDisplay);
  3689. ///////////////////////////////////////////////////////////////////////////////
  3690. //
  3691. // FUNCTION NAME: NvAPI_DisableHWCursor
  3692. //
  3693. //! This function disables hardware cursor support
  3694. //!
  3695. //! SUPPORTED OS: Windows XP
  3696. //!
  3697. //!
  3698. //! \since Release: 80
  3699. //!
  3700. //! \return NVAPI_ERROR or NVAPI_OK
  3701. //! \ingroup dispcontrol
  3702. ///////////////////////////////////////////////////////////////////////////////
  3703. NVAPI_INTERFACE NvAPI_DisableHWCursor(NvDisplayHandle hNvDisplay);
  3704. ///////////////////////////////////////////////////////////////////////////////
  3705. //
  3706. // FUNCTION NAME: NvAPI_GetVBlankCounter
  3707. //
  3708. //! This function gets the V-blank counter
  3709. //!
  3710. //! SUPPORTED OS: Windows XP and higher
  3711. //!
  3712. //!
  3713. //! \since Release: 80
  3714. //!
  3715. //! \return NVAPI_ERROR or NVAPI_OK
  3716. //! \ingroup dispcontrol
  3717. ///////////////////////////////////////////////////////////////////////////////
  3718. NVAPI_INTERFACE NvAPI_GetVBlankCounter(NvDisplayHandle hNvDisplay, NvU32 *pCounter);
  3719. ///////////////////////////////////////////////////////////////////////////////
  3720. // FUNCTION NAME: NvAPI_SetRefreshRateOverride
  3721. //
  3722. //! This function overrides the refresh rate on the given display/outputsMask.
  3723. //! The new refresh rate can be applied right away in this API call or deferred to be applied with the
  3724. //! next OS modeset. The override is good for only one modeset (regardless whether it's deferred or immediate).
  3725. //!
  3726. //!
  3727. //! SUPPORTED OS: Windows XP
  3728. //!
  3729. //!
  3730. //! \since Release: 80
  3731. //!
  3732. //! \param [in] hNvDisplay The NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle
  3733. //! enumerated from NvAPI_EnumNVidiaDisplayHandle().
  3734. //! \param [in] outputsMask A set of bits that identify all target outputs which are associated with the NVIDIA
  3735. //! display handle to apply the refresh rate override. When SLI is enabled, the
  3736. //! outputsMask only applies to the GPU that is driving the display output.
  3737. //! \param [in] refreshRate The override value. "0.0" means cancel the override.
  3738. //! \param [in] bSetDeferred
  3739. //! - "0": Apply the refresh rate override immediately in this API call.\p
  3740. //! - "1": Apply refresh rate at the next OS modeset.
  3741. //!
  3742. //! \retval NVAPI_INVALID_ARGUMENT hNvDisplay or outputsMask is invalid
  3743. //! \retval NVAPI_OK The refresh rate override is correct set
  3744. //! \retval NVAPI_ERROR The operation failed
  3745. //! \ingroup dispcontrol
  3746. ///////////////////////////////////////////////////////////////////////////////
  3747. NVAPI_INTERFACE NvAPI_SetRefreshRateOverride(NvDisplayHandle hNvDisplay, NvU32 outputsMask, float refreshRate, NvU32 bSetDeferred);
  3748. ///////////////////////////////////////////////////////////////////////////////
  3749. //
  3750. // FUNCTION NAME: NvAPI_GetAssociatedDisplayOutputId
  3751. //
  3752. //! This function gets the active outputId associated with the display handle.
  3753. //!
  3754. //! SUPPORTED OS: Windows XP and higher
  3755. //!
  3756. //!
  3757. //! \since Release: 90
  3758. //!
  3759. //! \param [in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
  3760. //! \param [out] outputId The active display output ID associated with the selected display handle hNvDisplay.
  3761. //! The outputid will have only one bit set. In the case of Clone or Span mode, this will indicate the
  3762. //! display outputId of the primary display that the GPU is driving. See \ref handles.
  3763. //!
  3764. //! \retval NVAPI_OK Call successful.
  3765. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
  3766. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle.
  3767. //! \ingroup dispcontrol
  3768. ///////////////////////////////////////////////////////////////////////////////
  3769. NVAPI_INTERFACE NvAPI_GetAssociatedDisplayOutputId(NvDisplayHandle hNvDisplay, NvU32 *pOutputId);
  3770. //! \ingroup dispcontrol
  3771. //! Used in NvAPI_GetDisplayPortInfo().
  3772. typedef struct _NV_DISPLAY_PORT_INFO_V1
  3773. {
  3774. NvU32 version; //!< Structure version
  3775. NvU32 dpcd_ver; //!< DPCD version of the monitor
  3776. NV_DP_LINK_RATE maxLinkRate; //!< Maximum supported link rate
  3777. NV_DP_LANE_COUNT maxLaneCount; //!< Maximum supported lane count
  3778. NV_DP_LINK_RATE curLinkRate; //!< Current link rate
  3779. NV_DP_LANE_COUNT curLaneCount; //!< Current lane count
  3780. NV_DP_COLOR_FORMAT colorFormat; //!< Current color format
  3781. NV_DP_DYNAMIC_RANGE dynamicRange; //!< Dynamic range
  3782. NV_DP_COLORIMETRY colorimetry; //!< Ignored in RGB space
  3783. NV_DP_BPC bpc; //!< Current bit-per-component
  3784. NvU32 isDp : 1; //!< If the monitor is driven by a DisplayPort
  3785. NvU32 isInternalDp : 1; //!< If the monitor is driven by an NV Dp transmitter
  3786. NvU32 isColorCtrlSupported : 1; //!< If the color format change is supported
  3787. NvU32 is6BPCSupported : 1; //!< If 6 bpc is supported
  3788. NvU32 is8BPCSupported : 1; //!< If 8 bpc is supported
  3789. NvU32 is10BPCSupported : 1; //!< If 10 bpc is supported
  3790. NvU32 is12BPCSupported : 1; //!< If 12 bpc is supported
  3791. NvU32 is16BPCSupported : 1; //!< If 16 bpc is supported
  3792. NvU32 isYCrCb422Supported : 1; //!< If YCrCb422 is supported
  3793. NvU32 isYCrCb444Supported : 1; //!< If YCrCb444 is supported
  3794. NvU32 isRgb444SupportedOnCurrentMode : 1; //!< If Rgb444 is supported on the current mode
  3795. NvU32 isYCbCr444SupportedOnCurrentMode : 1; //!< If YCbCr444 is supported on the current mode
  3796. NvU32 isYCbCr422SupportedOnCurrentMode : 1; //!< If YCbCr422 is support on the current mode
  3797. NvU32 is6BPCSupportedOnCurrentMode : 1; // if 6 bpc is supported On Current Mode
  3798. NvU32 is8BPCSupportedOnCurrentMode : 1; // if 8 bpc is supported On Current Mode
  3799. NvU32 is10BPCSupportedOnCurrentMode : 1; // if 10 bpc is supported On Current Mode
  3800. NvU32 is12BPCSupportedOnCurrentMode : 1; // if 12 bpc is supported On Current Mode
  3801. NvU32 is16BPCSupportedOnCurrentMode : 1; // if 16 bpc is supported On Current Mode
  3802. NvU32 isMonxvYCC601Capable : 1; // if xvYCC 601 extended colorimetry is supported
  3803. NvU32 isMonxvYCC709Capable : 1; // if xvYCC 709 extended colorimetry is supported
  3804. NvU32 isMonsYCC601Capable : 1; // if sYCC601 extended colorimetry is supported
  3805. NvU32 isMonAdobeYCC601Capable : 1; // if AdobeYCC601 extended colorimetry is supported
  3806. NvU32 isMonAdobeRGBCapable : 1; // if AdobeRGB extended colorimetry is supported
  3807. NvU32 isMonBT2020RGBCapable : 1; // if BT2020 RGB extended colorimetry is supported
  3808. NvU32 isMonBT2020YCCCapable : 1; // if BT2020 Y'CbCr extended colorimetry is supported
  3809. NvU32 isMonBT2020cYCCCapable : 1; // if BT2020 cYCbCr (constant luminance) extended colorimetry is supported
  3810. NvU32 reserved : 6; //!< reserved
  3811. } NV_DISPLAY_PORT_INFO_V1;
  3812. typedef NV_DISPLAY_PORT_INFO_V1 NV_DISPLAY_PORT_INFO;
  3813. //! Macro for constructing the version field of NV_DISPLAY_PORT_INFO.
  3814. #define NV_DISPLAY_PORT_INFO_VER1 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_INFO,1)
  3815. #define NV_DISPLAY_PORT_INFO_VER2 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_INFO,2)
  3816. #define NV_DISPLAY_PORT_INFO_VER NV_DISPLAY_PORT_INFO_VER2
  3817. ///////////////////////////////////////////////////////////////////////////////
  3818. // FUNCTION NAME: NvAPI_GetDisplayPortInfo
  3819. //
  3820. //! \fn NvAPI_GetDisplayPortInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_DISPLAY_PORT_INFO *pInfo)
  3821. //! DESCRIPTION: This function returns the current DisplayPort-related information on the specified device (monitor).
  3822. //!
  3823. //! SUPPORTED OS: Windows XP and higher
  3824. //!
  3825. //!
  3826. //! \since Release: 165
  3827. //!
  3828. //! \param [in] hvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
  3829. //! This parameter is ignored when the outputId is a NvAPI displayId.
  3830. //! \param [in] outputId This can either be the connection bit mask or the NvAPI displayId. When the legacy connection bit mask is passed,
  3831. //! it should have exactly 1 bit set to indicate a single display. If it's "0" then the default outputId from
  3832. //! NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles.
  3833. //! \param [out] pInfo The DisplayPort information
  3834. //!
  3835. //! \retval NVAPI_OK Completed request
  3836. //! \retval NVAPI_ERROR Miscellaneous error occurred
  3837. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  3838. //
  3839. ///////////////////////////////////////////////////////////////////////////////
  3840. //! \ingroup dispcontrol
  3841. NVAPI_INTERFACE NvAPI_GetDisplayPortInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_DISPLAY_PORT_INFO *pInfo);
  3842. ///////////////////////////////////////////////////////////////////////////////
  3843. // FUNCTION NAME: NvAPI_SetDisplayPort
  3844. //
  3845. //! \fn NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg)
  3846. //! DESCRIPTION: This function sets up DisplayPort-related configurations.
  3847. //!
  3848. //! SUPPORTED OS: Windows XP and higher
  3849. //!
  3850. //!
  3851. //! \since Release: 165
  3852. //!
  3853. //! \param [in] hNvDisplay NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from
  3854. //! NvAPI_EnumNVidiaDisplayHandle().
  3855. //! \param [in] outputId This display output ID, when it's "0" it means the default outputId generated from the return of
  3856. //! NvAPI_GetAssociatedDisplayOutputId(). See \ref handles.
  3857. //! \param [in] pCfg The display port config structure. If pCfg is NULL, it means to use the driver's default value to setup.
  3858. //!
  3859. //! \retval NVAPI_OK Completed request
  3860. //! \retval NVAPI_ERROR Miscellaneous error occurred
  3861. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter
  3862. ///////////////////////////////////////////////////////////////////////////////
  3863. //! \ingroup dispcontrol
  3864. //! DisplayPort configuration settings - used in NvAPI_SetDisplayPort().
  3865. typedef struct
  3866. {
  3867. NvU32 version; //!< Structure version - 2 is the latest
  3868. NV_DP_LINK_RATE linkRate; //!< Link rate
  3869. NV_DP_LANE_COUNT laneCount; //!< Lane count
  3870. NV_DP_COLOR_FORMAT colorFormat; //!< Color format to set
  3871. NV_DP_DYNAMIC_RANGE dynamicRange; //!< Dynamic range
  3872. NV_DP_COLORIMETRY colorimetry; //!< Ignored in RGB space
  3873. NV_DP_BPC bpc; //!< Bit-per-component
  3874. NvU32 isHPD : 1; //!< If the control panel is making this call due to HPD
  3875. NvU32 isSetDeferred : 1; //!< Requires an OS modeset to finalize the setup if set
  3876. NvU32 isChromaLpfOff : 1; //!< Force the chroma low_pass_filter to be off
  3877. NvU32 isDitherOff : 1; //!< Force to turn off dither
  3878. NvU32 testLinkTrain : 1; //!< If testing mode, skip validation
  3879. NvU32 testColorChange : 1; //!< If testing mode, skip validation
  3880. } NV_DISPLAY_PORT_CONFIG;
  3881. //! \addtogroup dispcontrol
  3882. //! @{
  3883. //! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG
  3884. #define NV_DISPLAY_PORT_CONFIG_VER MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2)
  3885. //! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG
  3886. #define NV_DISPLAY_PORT_CONFIG_VER_1 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,1)
  3887. //! Macro for constructing the version field of NV_DISPLAY_PORT_CONFIG
  3888. #define NV_DISPLAY_PORT_CONFIG_VER_2 MAKE_NVAPI_VERSION(NV_DISPLAY_PORT_CONFIG,2)
  3889. //! @}
  3890. //! \ingroup dispcontrol
  3891. NVAPI_INTERFACE NvAPI_SetDisplayPort(NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg);
  3892. //! \ingroup dispcontrol
  3893. //! Used in NvAPI_GetHDMISupportInfo().
  3894. typedef struct _NV_HDMI_SUPPORT_INFO_V1
  3895. {
  3896. NvU32 version; //!< Structure version
  3897. NvU32 isGpuHDMICapable : 1; //!< If the GPU can handle HDMI
  3898. NvU32 isMonUnderscanCapable : 1; //!< If the monitor supports underscan
  3899. NvU32 isMonBasicAudioCapable : 1; //!< If the monitor supports basic audio
  3900. NvU32 isMonYCbCr444Capable : 1; //!< If YCbCr 4:4:4 is supported
  3901. NvU32 isMonYCbCr422Capable : 1; //!< If YCbCr 4:2:2 is supported
  3902. NvU32 isMonxvYCC601Capable : 1; //!< If xvYCC 601 is supported
  3903. NvU32 isMonxvYCC709Capable : 1; //!< If xvYCC 709 is supported
  3904. NvU32 isMonHDMI : 1; //!< If the monitor is HDMI (with IEEE's HDMI registry ID)
  3905. NvU32 reserved : 24; //!< Reserved.
  3906. NvU32 EDID861ExtRev; //!< Revision number of the EDID 861 extension
  3907. } NV_HDMI_SUPPORT_INFO_V1;
  3908. typedef struct _NV_HDMI_SUPPORT_INFO_V2
  3909. {
  3910. NvU32 version; //!< Structure version
  3911. NvU32 isGpuHDMICapable : 1; //!< If the GPU can handle HDMI
  3912. NvU32 isMonUnderscanCapable : 1; //!< If the monitor supports underscan
  3913. NvU32 isMonBasicAudioCapable : 1; //!< If the monitor supports basic audio
  3914. NvU32 isMonYCbCr444Capable : 1; //!< If YCbCr 4:4:4 is supported
  3915. NvU32 isMonYCbCr422Capable : 1; //!< If YCbCr 4:2:2 is supported
  3916. NvU32 isMonxvYCC601Capable : 1; //!< If xvYCC extended colorimetry 601 is supported
  3917. NvU32 isMonxvYCC709Capable : 1; //!< If xvYCC extended colorimetry 709 is supported
  3918. NvU32 isMonHDMI : 1; //!< If the monitor is HDMI (with IEEE's HDMI registry ID)
  3919. NvU32 isMonsYCC601Capable : 1; //!< if sYCC601 extended colorimetry is supported
  3920. NvU32 isMonAdobeYCC601Capable : 1; //!< if AdobeYCC601 extended colorimetry is supported
  3921. NvU32 isMonAdobeRGBCapable : 1; //!< if AdobeRGB extended colorimetry is supported
  3922. NvU32 reserved : 21; //!< Reserved.
  3923. NvU32 EDID861ExtRev; //!< Revision number of the EDID 861 extension
  3924. } NV_HDMI_SUPPORT_INFO_V2;
  3925. #define NV_HDMI_SUPPORT_INFO_VER1 MAKE_NVAPI_VERSION(NV_HDMI_SUPPORT_INFO_V1, 1)
  3926. #define NV_HDMI_SUPPORT_INFO_VER2 MAKE_NVAPI_VERSION(NV_HDMI_SUPPORT_INFO_V2, 2)
  3927. #ifndef NV_HDMI_SUPPORT_INFO_VER
  3928. typedef NV_HDMI_SUPPORT_INFO_V2 NV_HDMI_SUPPORT_INFO;
  3929. #define NV_HDMI_SUPPORT_INFO_VER NV_HDMI_SUPPORT_INFO_VER2
  3930. #endif
  3931. //! SUPPORTED OS: Windows Vista and higher
  3932. //!
  3933. ///////////////////////////////////////////////////////////////////////////////
  3934. // FUNCTION NAME: NvAPI_GetHDMISupportInfo
  3935. //
  3936. //! \fn NvAPI_GetHDMISupportInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_HDMI_SUPPORT_INFO *pInfo)
  3937. //! This API returns the current infoframe data on the specified device(monitor).
  3938. //!
  3939. //! \since Release: 95
  3940. //!
  3941. //! \param [in] hvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNVidiaDisplayHandle().
  3942. //! This parameter is ignored when the outputId is a NvAPI displayId.
  3943. //! \param [in] outputId This can either be the connection bit mask or the NvAPI displayId. When the legacy connection bit mask is passed,
  3944. //! it should have exactly 1 bit set to indicate a single display. If it's "0" then the default outputId from
  3945. //! NvAPI_GetAssociatedDisplayOutputId() will be used. See \ref handles.
  3946. //! \param [out] pInfo The monitor and GPU's HDMI support info
  3947. //!
  3948. //! \retval NVAPI_OK Completed request
  3949. //! \retval NVAPI_ERROR Miscellaneous error occurred
  3950. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  3951. ///////////////////////////////////////////////////////////////////////////////
  3952. //! \ingroup dispcontrol
  3953. NVAPI_INTERFACE NvAPI_GetHDMISupportInfo(__in_opt NvDisplayHandle hNvDisplay, __in NvU32 outputId, __inout NV_HDMI_SUPPORT_INFO *pInfo);
  3954. //! \ingroup dispcontrol
  3955. typedef enum
  3956. {
  3957. NV_INFOFRAME_CMD_GET_DEFAULT = 0, //!< Returns the fields in the infoframe with values set by the manufacturer - NVIDIA/OEM.
  3958. NV_INFOFRAME_CMD_RESET, //!< Sets the fields in the infoframe to auto, and infoframe to the default infoframe for use in a set.
  3959. NV_INFOFRAME_CMD_GET, //!< Get the current infoframe state.
  3960. NV_INFOFRAME_CMD_SET, //!< Set the current infoframe state (flushed to the monitor), the values are one time and do not persist.
  3961. 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.
  3962. 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
  3963. NV_INFOFRAME_CMD_GET_PROPERTY, //!< get properties associated with infoframe (each of the infoframe type will have properties)
  3964. NV_INFOFRAME_CMD_SET_PROPERTY, //!< set properties associated with infoframe
  3965. } NV_INFOFRAME_CMD;
  3966. typedef enum
  3967. {
  3968. NV_INFOFRAME_PROPERTY_MODE_AUTO = 0, //!< Driver determines whether to send infoframes.
  3969. NV_INFOFRAME_PROPERTY_MODE_ENABLE, //!< Driver always sends infoframe.
  3970. NV_INFOFRAME_PROPERTY_MODE_DISABLE, //!< Driver never sends infoframe.
  3971. NV_INFOFRAME_PROPERTY_MODE_ALLOW_OVERRIDE, //!< Driver only sends infoframe when client requests it via infoframe escape call.
  3972. } NV_INFOFRAME_PROPERTY_MODE;
  3973. //! Returns whether the current monitor is in blacklist or force this monitor to be in blacklist.
  3974. typedef enum
  3975. {
  3976. NV_INFOFRAME_PROPERTY_BLACKLIST_FALSE = 0,
  3977. NV_INFOFRAME_PROPERTY_BLACKLIST_TRUE,
  3978. } NV_INFOFRAME_PROPERTY_BLACKLIST;
  3979. typedef struct
  3980. {
  3981. NvU32 mode : 4;
  3982. NvU32 blackList : 2;
  3983. NvU32 reserved : 10;
  3984. NvU32 version : 8;
  3985. NvU32 length : 8;
  3986. } NV_INFOFRAME_PROPERTY;
  3987. //! Byte1 related
  3988. typedef enum
  3989. {
  3990. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_NODATA = 0,
  3991. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_OVERSCAN,
  3992. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_UNDERSCAN,
  3993. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_FUTURE,
  3994. NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO_AUTO = 7
  3995. } NV_INFOFRAME_FIELD_VALUE_AVI_SCANINFO;
  3996. typedef enum
  3997. {
  3998. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_NOT_PRESENT = 0,
  3999. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_VERTICAL_PRESENT,
  4000. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_HORIZONTAL_PRESENT,
  4001. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_BOTH_PRESENT,
  4002. NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA_AUTO = 7
  4003. } NV_INFOFRAME_FIELD_VALUE_AVI_BARDATA;
  4004. typedef enum
  4005. {
  4006. NV_INFOFRAME_FIELD_VALUE_AVI_AFI_ABSENT = 0,
  4007. NV_INFOFRAME_FIELD_VALUE_AVI_AFI_PRESENT,
  4008. NV_INFOFRAME_FIELD_VALUE_AVI_AFI_AUTO = 3
  4009. } NV_INFOFRAME_FIELD_VALUE_AVI_ACTIVEFORMATINFO;
  4010. typedef enum
  4011. {
  4012. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_RGB = 0,
  4013. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_YCbCr422,
  4014. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_YCbCr444,
  4015. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_FUTURE,
  4016. NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT_AUTO = 7
  4017. } NV_INFOFRAME_FIELD_VALUE_AVI_COLORFORMAT;
  4018. typedef enum
  4019. {
  4020. NV_INFOFRAME_FIELD_VALUE_AVI_F17_FALSE = 0,
  4021. NV_INFOFRAME_FIELD_VALUE_AVI_F17_TRUE,
  4022. NV_INFOFRAME_FIELD_VALUE_AVI_F17_AUTO = 3
  4023. } NV_INFOFRAME_FIELD_VALUE_AVI_F17;
  4024. //! Byte2 related
  4025. typedef enum
  4026. {
  4027. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_NO_AFD = 0,
  4028. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE01,
  4029. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE02,
  4030. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE03,
  4031. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_LETTERBOX_GT16x9,
  4032. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE05,
  4033. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE06,
  4034. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE07,
  4035. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_EQUAL_CODEDFRAME = 8,
  4036. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_4x3,
  4037. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_16x9,
  4038. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_CENTER_14x9,
  4039. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_RESERVE12,
  4040. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_4x3_ON_14x9,
  4041. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_16x9_ON_14x9,
  4042. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_16x9_ON_4x3,
  4043. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION_AUTO = 31,
  4044. } NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOACTIVEPORTION;
  4045. typedef enum
  4046. {
  4047. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_NO_DATA = 0,
  4048. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_4x3,
  4049. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_16x9,
  4050. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_FUTURE,
  4051. NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME_AUTO = 7
  4052. } NV_INFOFRAME_FIELD_VALUE_AVI_ASPECTRATIOCODEDFRAME;
  4053. typedef enum
  4054. {
  4055. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_NO_DATA = 0,
  4056. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_SMPTE_170M,
  4057. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_ITUR_BT709,
  4058. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_USE_EXTENDED_COLORIMETRY,
  4059. NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY_AUTO = 7
  4060. } NV_INFOFRAME_FIELD_VALUE_AVI_COLORIMETRY;
  4061. //! Byte 3 related
  4062. typedef enum
  4063. {
  4064. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_NO_DATA = 0,
  4065. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_HORIZONTAL,
  4066. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_VERTICAL,
  4067. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_BOTH,
  4068. NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING_AUTO = 7
  4069. } NV_INFOFRAME_FIELD_VALUE_AVI_NONUNIFORMPICTURESCALING;
  4070. typedef enum
  4071. {
  4072. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_DEFAULT = 0,
  4073. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_LIMITED_RANGE,
  4074. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_FULL_RANGE,
  4075. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_RESERVED,
  4076. NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION_AUTO = 7
  4077. } NV_INFOFRAME_FIELD_VALUE_AVI_RGBQUANTIZATION;
  4078. typedef enum
  4079. {
  4080. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_XVYCC601 = 0,
  4081. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_XVYCC709,
  4082. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_SYCC601,
  4083. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_ADOBEYCC601,
  4084. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_ADOBERGB,
  4085. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED05,
  4086. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED06,
  4087. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_RESERVED07,
  4088. NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY_AUTO = 15
  4089. } NV_INFOFRAME_FIELD_VALUE_AVI_EXTENDEDCOLORIMETRY;
  4090. typedef enum
  4091. {
  4092. NV_INFOFRAME_FIELD_VALUE_AVI_ITC_VIDEO_CONTENT = 0,
  4093. NV_INFOFRAME_FIELD_VALUE_AVI_ITC_ITCONTENT,
  4094. NV_INFOFRAME_FIELD_VALUE_AVI_ITC_AUTO = 3
  4095. } NV_INFOFRAME_FIELD_VALUE_AVI_ITC;
  4096. //! Byte 4 related
  4097. typedef enum
  4098. {
  4099. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_NONE = 0,
  4100. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X02,
  4101. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X03,
  4102. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X04,
  4103. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X05,
  4104. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X06,
  4105. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X07,
  4106. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X08,
  4107. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X09,
  4108. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_X10,
  4109. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED10,
  4110. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED11,
  4111. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED12,
  4112. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED13,
  4113. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED14,
  4114. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_RESERVED15,
  4115. NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION_AUTO = 31
  4116. } NV_INFOFRAME_FIELD_VALUE_AVI_PIXELREPETITION;
  4117. typedef enum
  4118. {
  4119. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_GRAPHICS = 0,
  4120. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_PHOTO,
  4121. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_CINEMA,
  4122. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_GAME,
  4123. NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE_AUTO = 7
  4124. } NV_INFOFRAME_FIELD_VALUE_AVI_CONTENTTYPE;
  4125. typedef enum
  4126. {
  4127. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_LIMITED_RANGE = 0,
  4128. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_FULL_RANGE,
  4129. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_RESERVED02,
  4130. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_RESERVED03,
  4131. NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION_AUTO = 7
  4132. } NV_INFOFRAME_FIELD_VALUE_AVI_YCCQUANTIZATION;
  4133. //! Adding an Auto bit to each field
  4134. typedef struct
  4135. {
  4136. NvU32 vic : 8;
  4137. NvU32 pixelRepeat : 5;
  4138. NvU32 colorSpace : 3;
  4139. NvU32 colorimetry : 3;
  4140. NvU32 extendedColorimetry : 4;
  4141. NvU32 rgbQuantizationRange : 3;
  4142. NvU32 yccQuantizationRange : 3;
  4143. NvU32 itContent : 2;
  4144. NvU32 contentTypes : 3;
  4145. NvU32 scanInfo : 3;
  4146. NvU32 activeFormatInfoPresent : 2;
  4147. NvU32 activeFormatAspectRatio : 5;
  4148. NvU32 picAspectRatio : 3;
  4149. NvU32 nonuniformScaling : 3;
  4150. NvU32 barInfo : 3;
  4151. NvU32 top_bar : 17;
  4152. NvU32 bottom_bar : 17;
  4153. NvU32 left_bar : 17;
  4154. NvU32 right_bar : 17;
  4155. NvU32 Future17 : 2;
  4156. NvU32 Future47 : 2;
  4157. } NV_INFOFRAME_VIDEO;
  4158. //! Byte 1 related
  4159. typedef enum
  4160. {
  4161. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_IN_HEADER = 0,
  4162. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_2,
  4163. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_3,
  4164. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_4,
  4165. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_5,
  4166. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_6,
  4167. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_7,
  4168. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_8,
  4169. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT_AUTO = 15
  4170. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELCOUNT;
  4171. typedef enum
  4172. {
  4173. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_IN_HEADER = 0,
  4174. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_PCM,
  4175. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AC3,
  4176. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MPEG1,
  4177. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MP3,
  4178. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MPEG2,
  4179. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AACLC,
  4180. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DTS,
  4181. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_ATRAC,
  4182. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DSD,
  4183. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_EAC3,
  4184. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DTSHD,
  4185. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_MLP,
  4186. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_DST,
  4187. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_WMAPRO,
  4188. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_USE_CODING_EXTENSION_TYPE,
  4189. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE_AUTO = 31
  4190. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGTYPE;
  4191. //! Byte 2 related
  4192. typedef enum
  4193. {
  4194. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_IN_HEADER = 0,
  4195. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_16BITS,
  4196. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_20BITS,
  4197. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_24BITS,
  4198. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE_AUTO = 7
  4199. } NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLESIZE;
  4200. typedef enum
  4201. {
  4202. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_IN_HEADER = 0,
  4203. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_32000HZ,
  4204. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_44100HZ,
  4205. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_48000HZ,
  4206. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_88200KHZ,
  4207. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_96000KHZ,
  4208. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_176400KHZ,
  4209. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_192000KHZ,
  4210. NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY_AUTO = 15
  4211. } NV_INFOFRAME_FIELD_VALUE_AUDIO_SAMPLEFREQUENCY;
  4212. //! Byte 3 related
  4213. typedef enum
  4214. {
  4215. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_USE_CODING_TYPE = 0,
  4216. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_HEAAC,
  4217. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_HEAACV2,
  4218. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_MPEGSURROUND,
  4219. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE04,
  4220. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE05,
  4221. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE06,
  4222. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE07,
  4223. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE08,
  4224. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE09,
  4225. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE10,
  4226. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE11,
  4227. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE12,
  4228. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE13,
  4229. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE14,
  4230. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE15,
  4231. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE16,
  4232. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE17,
  4233. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE18,
  4234. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE19,
  4235. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE20,
  4236. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE21,
  4237. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE22,
  4238. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE23,
  4239. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE24,
  4240. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE25,
  4241. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE26,
  4242. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE27,
  4243. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE28,
  4244. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE29,
  4245. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE30,
  4246. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_RESERVE31,
  4247. NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE_AUTO = 63
  4248. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CODINGEXTENSIONTYPE;
  4249. //! Byte 4 related
  4250. typedef enum
  4251. {
  4252. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_X_X_FR_FL =0,
  4253. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_X_LFE_FR_FL,
  4254. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_FC_X_FR_FL,
  4255. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_X_FC_LFE_FR_FL,
  4256. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_X_X_FR_FL,
  4257. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_X_LFE_FR_FL,
  4258. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_FC_X_FR_FL,
  4259. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_X_RC_FC_LFE_FR_FL,
  4260. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_X_X_FR_FL,
  4261. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_X_LFE_FR_FL,
  4262. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_FC_X_FR_FL,
  4263. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_X_RR_RL_FC_LFE_FR_FL,
  4264. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_X_X_FR_FL,
  4265. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_X_LFE_FR_FL,
  4266. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_FC_X_FR_FL,
  4267. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_RC_RR_RL_FC_LFE_FR_FL,
  4268. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_X_X_FR_FL,
  4269. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_X_LFE_FR_FL,
  4270. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_FC_X_FR_FL,
  4271. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_RRC_RLC_RR_RL_FC_LFE_FR_FL,
  4272. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_X_X_FR_FL,
  4273. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_X_LFE_FR_FL,
  4274. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_FC_X_FR_FL,
  4275. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_X_FC_LFE_FR_FL,
  4276. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_X_X_FR_FL,
  4277. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_X_LFE_FR_FL,
  4278. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_FC_X_FR_FL,
  4279. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_X_RC_FC_LFE_FR_FL,
  4280. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_X_X_FR_FL,
  4281. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_X_LFE_FR_FL,
  4282. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_FC_X_FR_FL,
  4283. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRC_FLC_RR_RL_FC_LFE_FR_FL,
  4284. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_FCH_RR_RL_FC_X_FR_FL,
  4285. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_X_FCH_RR_RL_FC_LFE_FR_FL,
  4286. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_X_RR_RL_FC_X_FR_FL,
  4287. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_X_RR_RL_FC_LFE_FR_FL,
  4288. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_X_X_FR_FL,
  4289. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_X_LFE_FR_FL,
  4290. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_X_X_FR_FL,
  4291. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_X_LFE_FR_FL,
  4292. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_RC_RR_RL_FC_X_FR_FL,
  4293. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_RC_RR_RL_FC_LFE_FR_FL,
  4294. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FCH_RC_RR_RL_FC_X_FR_FL,
  4295. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FCH_RC_RR_RL_FC_LFE_FR_FL,
  4296. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_FCH_RR_RL_FC_X_FR_FL,
  4297. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_TC_FCH_RR_RL_FC_LFE_FR_FL,
  4298. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_FC_X_FR_FL,
  4299. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRH_FLH_RR_RL_FC_LFE_FR_FL,
  4300. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_FC_X_FR_FL,
  4301. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_FRW_FLW_RR_RL_FC_LFE_FR_FL = 0X31,
  4302. // all other values should default to auto
  4303. NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION_AUTO = 0x1FF
  4304. } NV_INFOFRAME_FIELD_VALUE_AUDIO_CHANNELALLOCATION;
  4305. //! Byte 5 related
  4306. typedef enum
  4307. {
  4308. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_NO_DATA = 0,
  4309. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_0DB,
  4310. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_PLUS10DB,
  4311. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_RESERVED03,
  4312. NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL_AUTO = 7
  4313. } NV_INFOFRAME_FIELD_VALUE_AUDIO_LFEPLAYBACKLEVEL;
  4314. typedef enum
  4315. {
  4316. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_0DB = 0,
  4317. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_1DB,
  4318. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_2DB,
  4319. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_3DB,
  4320. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_4DB,
  4321. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_5DB,
  4322. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_6DB,
  4323. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_7DB,
  4324. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_8DB,
  4325. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_9DB,
  4326. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_10DB,
  4327. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_11DB,
  4328. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_12DB,
  4329. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_13DB,
  4330. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_14DB,
  4331. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_15DB,
  4332. NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES_AUTO = 31
  4333. } NV_INFOFRAME_FIELD_VALUE_AUDIO_LEVELSHIFTVALUES;
  4334. typedef enum
  4335. {
  4336. NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_PERMITTED = 0,
  4337. NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_PROHIBITED,
  4338. NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX_AUTO = 3
  4339. } NV_INFOFRAME_FIELD_VALUE_AUDIO_DOWNMIX;
  4340. typedef struct
  4341. {
  4342. NvU32 codingType : 5;
  4343. NvU32 codingExtensionType : 6;
  4344. NvU32 sampleSize : 3;
  4345. NvU32 sampleRate : 4;
  4346. NvU32 channelCount : 4;
  4347. NvU32 speakerPlacement : 9;
  4348. NvU32 downmixInhibit : 2;
  4349. NvU32 lfePlaybackLevel : 3;
  4350. NvU32 levelShift : 5;
  4351. NvU32 Future12 : 2;
  4352. NvU32 Future2x : 4;
  4353. NvU32 Future3x : 4;
  4354. NvU32 Future52 : 2;
  4355. NvU32 Future6 : 9;
  4356. NvU32 Future7 : 9;
  4357. NvU32 Future8 : 9;
  4358. NvU32 Future9 : 9;
  4359. NvU32 Future10 : 9;
  4360. } NV_INFOFRAME_AUDIO;
  4361. typedef struct
  4362. {
  4363. NvU32 version; //!< version of this structure
  4364. NvU16 size; //!< size of this structure
  4365. NvU8 cmd; //!< The actions to perform from NV_INFOFRAME_CMD
  4366. NvU8 type; //!< type of infoframe
  4367. union
  4368. {
  4369. NV_INFOFRAME_PROPERTY property; //!< This is NVIDIA-specific and corresponds to the property cmds and associated infoframe.
  4370. NV_INFOFRAME_AUDIO audio;
  4371. NV_INFOFRAME_VIDEO video;
  4372. } infoframe;
  4373. } NV_INFOFRAME_DATA;
  4374. //! Macro for constructing the version field of ::NV_INFOFRAME_DATA
  4375. #define NV_INFOFRAME_DATA_VER MAKE_NVAPI_VERSION(NV_INFOFRAME_DATA,1)
  4376. ///////////////////////////////////////////////////////////////////////////////
  4377. // FUNCTION NAME: NvAPI_Disp_InfoFrameControl
  4378. //
  4379. //! DESCRIPTION: This API controls the InfoFrame values.
  4380. //!
  4381. //! SUPPORTED OS: Windows Vista and higher
  4382. //!
  4383. //!
  4384. //! \param [in] displayId Monitor Identifier
  4385. //! \param [in,out] pInfoframeData Contains data corresponding to InfoFrame
  4386. //!
  4387. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4388. //! specific meaning for this API, they are listed below.
  4389. //!
  4390. //! \ingroup dispcontrol
  4391. ///////////////////////////////////////////////////////////////////////////////
  4392. NVAPI_INTERFACE NvAPI_Disp_InfoFrameControl(__in NvU32 displayId, __inout NV_INFOFRAME_DATA *pInfoframeData);
  4393. //! \ingroup dispcontrol
  4394. //! @{
  4395. ///////////////////////////////////////////////////////////////////////////////
  4396. // FUNCTION NAME: NvAPI_Disp_ColorControl
  4397. //
  4398. //! \fn NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData)
  4399. //! DESCRIPTION: This API controls the Color values.
  4400. //!
  4401. //! SUPPORTED OS: Windows Vista and higher
  4402. //!
  4403. //!
  4404. //! \param [in] displayId Monitor Identifier
  4405. //! \param [in,out] pColorData Contains data corresponding to color information
  4406. //!
  4407. //! \return RETURN STATUS:
  4408. //! ::NVAPI_OK,
  4409. //! ::NVAPI_ERROR,
  4410. //! ::NVAPI_INVALID_ARGUMENT
  4411. //
  4412. ///////////////////////////////////////////////////////////////////////////////
  4413. typedef enum
  4414. {
  4415. NV_COLOR_CMD_GET = 1,
  4416. NV_COLOR_CMD_SET,
  4417. NV_COLOR_CMD_IS_SUPPORTED_COLOR,
  4418. NV_COLOR_CMD_GET_DEFAULT
  4419. } NV_COLOR_CMD;
  4420. //! See Table 14 of CEA-861E. Not all of this is supported by the GPU.
  4421. typedef enum
  4422. {
  4423. NV_COLOR_FORMAT_RGB = 0,
  4424. NV_COLOR_FORMAT_YUV422,
  4425. NV_COLOR_FORMAT_YUV444,
  4426. NV_COLOR_FORMAT_YUV420,
  4427. NV_COLOR_FORMAT_DEFAULT = 0xFE,
  4428. NV_COLOR_FORMAT_AUTO = 0xFF
  4429. } NV_COLOR_FORMAT;
  4430. typedef enum
  4431. {
  4432. NV_COLOR_COLORIMETRY_RGB = 0,
  4433. NV_COLOR_COLORIMETRY_YCC601,
  4434. NV_COLOR_COLORIMETRY_YCC709,
  4435. NV_COLOR_COLORIMETRY_XVYCC601,
  4436. NV_COLOR_COLORIMETRY_XVYCC709,
  4437. NV_COLOR_COLORIMETRY_SYCC601,
  4438. NV_COLOR_COLORIMETRY_ADOBEYCC601,
  4439. NV_COLOR_COLORIMETRY_ADOBERGB,
  4440. NV_COLOR_COLORIMETRY_BT2020RGB,
  4441. NV_COLOR_COLORIMETRY_BT2020YCC,
  4442. NV_COLOR_COLORIMETRY_BT2020cYCC,
  4443. NV_COLOR_COLORIMETRY_DEFAULT = 0xFE,
  4444. NV_COLOR_COLORIMETRY_AUTO = 0xFF
  4445. } NV_COLOR_COLORIMETRY;
  4446. typedef enum _NV_DYNAMIC_RANGE
  4447. {
  4448. NV_DYNAMIC_RANGE_VESA = 0x0,
  4449. NV_DYNAMIC_RANGE_CEA = 0x1,
  4450. NV_DYNAMIC_RANGE_AUTO = 0xFF
  4451. } NV_DYNAMIC_RANGE;
  4452. typedef enum _NV_BPC
  4453. {
  4454. NV_BPC_DEFAULT = 0,
  4455. NV_BPC_6 = 1,
  4456. NV_BPC_8 = 2,
  4457. NV_BPC_10 = 3,
  4458. NV_BPC_12 = 4,
  4459. NV_BPC_16 = 5,
  4460. } NV_BPC;
  4461. typedef struct _NV_COLOR_DATA_V1
  4462. {
  4463. NvU32 version; //!< Version of this structure
  4464. NvU16 size; //!< Size of this structure
  4465. NvU8 cmd;
  4466. struct
  4467. {
  4468. NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values.
  4469. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values.
  4470. } data;
  4471. } NV_COLOR_DATA_V1;
  4472. typedef struct _NV_COLOR_DATA_V2
  4473. {
  4474. NvU32 version; //!< Version of this structure
  4475. NvU16 size; //!< Size of this structure
  4476. NvU8 cmd;
  4477. struct
  4478. {
  4479. NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values.
  4480. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values.
  4481. NvU8 dynamicRange; //!< One of NV_DYNAMIC_RANGE enum values.
  4482. } data;
  4483. } NV_COLOR_DATA_V2;
  4484. typedef struct _NV_COLOR_DATA_V3
  4485. {
  4486. NvU32 version; //!< Version of this structure
  4487. NvU16 size; //!< Size of this structure
  4488. NvU8 cmd;
  4489. struct
  4490. {
  4491. NvU8 colorFormat; //!< One of NV_COLOR_FORMAT enum values.
  4492. NvU8 colorimetry; //!< One of NV_COLOR_COLORIMETRY enum values.
  4493. NvU8 dynamicRange; //!< One of NV_DYNAMIC_RANGE enum values.
  4494. NV_BPC bpc; //!< One of NV_BPC enum values.
  4495. } data;
  4496. } NV_COLOR_DATA_V3;
  4497. typedef NV_COLOR_DATA_V3 NV_COLOR_DATA;
  4498. #define NV_COLOR_DATA_VER1 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V1, 1)
  4499. #define NV_COLOR_DATA_VER2 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V2, 2)
  4500. #define NV_COLOR_DATA_VER3 MAKE_NVAPI_VERSION(NV_COLOR_DATA_V3, 3)
  4501. #define NV_COLOR_DATA_VER NV_COLOR_DATA_VER3
  4502. NVAPI_INTERFACE NvAPI_Disp_ColorControl(NvU32 displayId, NV_COLOR_DATA *pColorData);
  4503. //! @}
  4504. //! \ingroup dispcontrol
  4505. //! Used in NvAPI_DISP_GetTiming().
  4506. typedef struct
  4507. {
  4508. NvU32 isInterlaced : 4; //!< To retrieve interlaced/progressive timing
  4509. NvU32 reserved0 : 12;
  4510. union
  4511. {
  4512. NvU32 tvFormat : 8; //!< The actual analog HD/SDTV format. Used when the timing type is
  4513. //! NV_TIMING_OVERRIDE_ANALOG_TV and width==height==rr==0.
  4514. NvU32 ceaId : 8; //!< The EIA/CEA 861B/D predefined short timing descriptor ID.
  4515. //! Used when the timing type is NV_TIMING_OVERRIDE_EIA861
  4516. //! and width==height==rr==0.
  4517. NvU32 nvPsfId : 8; //!< The NV predefined PsF format Id.
  4518. //! Used when the timing type is NV_TIMING_OVERRIDE_NV_PREDEFINED.
  4519. };
  4520. NvU32 scaling : 8; //!< Define preferred scaling
  4521. }NV_TIMING_FLAG;
  4522. //! \ingroup dispcontrol
  4523. //! Used in NvAPI_DISP_GetTiming().
  4524. typedef struct _NV_TIMING_INPUT
  4525. {
  4526. NvU32 version; //!< (IN) structure version
  4527. NvU32 width; //!< Visible horizontal size
  4528. NvU32 height; //!< Visible vertical size
  4529. float rr; //!< Timing refresh rate
  4530. NV_TIMING_FLAG flag; //!< Flag containing additional info for timing calculation.
  4531. NV_TIMING_OVERRIDE type; //!< Timing type(formula) to use for calculating the timing
  4532. }NV_TIMING_INPUT;
  4533. #define NV_TIMING_INPUT_VER MAKE_NVAPI_VERSION(NV_TIMING_INPUT,1)
  4534. ///////////////////////////////////////////////////////////////////////////////
  4535. // FUNCTION NAME: NvAPI_DISP_GetTiming
  4536. //
  4537. //! DESCRIPTION: This function calculates the timing from the visible width/height/refresh-rate and timing type info.
  4538. //!
  4539. //! SUPPORTED OS: Windows XP and higher
  4540. //!
  4541. //!
  4542. //! \since Release: 313
  4543. //!
  4544. //!
  4545. //! \param [in] displayId Display ID of the display.
  4546. //! \param [in] timingInput Inputs used for calculating the timing.
  4547. //! \param [out] pTiming Pointer to the NV_TIMING structure.
  4548. //!
  4549. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4550. //! specific meaning for this API, they are listed below.
  4551. //!
  4552. //! \ingroup dispcontrol
  4553. ///////////////////////////////////////////////////////////////////////////////
  4554. NVAPI_INTERFACE NvAPI_DISP_GetTiming( __in NvU32 displayId,__in NV_TIMING_INPUT *timingInput, __out NV_TIMING *pTiming);
  4555. ///////////////////////////////////////////////////////////////////////////////
  4556. // FUNCTION NAME: NvAPI_DISP_GetMonitorCapabilities
  4557. //
  4558. //! \fn NvAPI_DISP_GetMonitorCapabilities(NvU32 displayId, NV_MONITOR_CAPABILITIES *pMonitorCapabilities)
  4559. //! DESCRIPTION: This API returns the Monitor capabilities
  4560. //!
  4561. //! SUPPORTED OS: Windows Vista and higher
  4562. //!
  4563. //!
  4564. //! \param [in] displayId Monitor Identifier
  4565. //! \param [out] pMonitorCapabilities The monitor support info
  4566. //!
  4567. //! \return ::NVAPI_OK,
  4568. //! ::NVAPI_ERROR,
  4569. //! ::NVAPI_INVALID_ARGUMENT
  4570. //
  4571. ///////////////////////////////////////////////////////////////////////////////
  4572. //! \ingroup dispcontrol
  4573. //! @{
  4574. //! HDMI-related and extended CAPs
  4575. typedef enum
  4576. {
  4577. // hdmi related caps
  4578. NV_MONITOR_CAPS_TYPE_HDMI_VSDB = 0x1000,
  4579. NV_MONITOR_CAPS_TYPE_HDMI_VCDB = 0x1001,
  4580. } NV_MONITOR_CAPS_TYPE;
  4581. typedef struct _NV_MONITOR_CAPS_VCDB
  4582. {
  4583. NvU8 quantizationRangeYcc : 1;
  4584. NvU8 quantizationRangeRgb : 1;
  4585. NvU8 scanInfoPreferredVideoFormat : 2;
  4586. NvU8 scanInfoITVideoFormats : 2;
  4587. NvU8 scanInfoCEVideoFormats : 2;
  4588. } NV_MONITOR_CAPS_VCDB;
  4589. //! See NvAPI_DISP_GetMonitorCapabilities().
  4590. typedef struct _NV_MONITOR_CAPS_VSDB
  4591. {
  4592. // byte 1
  4593. NvU8 sourcePhysicalAddressB : 4; //!< Byte 1
  4594. NvU8 sourcePhysicalAddressA : 4; //!< Byte 1
  4595. // byte 2
  4596. NvU8 sourcePhysicalAddressD : 4; //!< Byte 2
  4597. NvU8 sourcePhysicalAddressC : 4; //!< Byte 2
  4598. // byte 3
  4599. NvU8 supportDualDviOperation : 1; //!< Byte 3
  4600. NvU8 reserved6 : 2; //!< Byte 3
  4601. NvU8 supportDeepColorYCbCr444 : 1; //!< Byte 3
  4602. NvU8 supportDeepColor30bits : 1; //!< Byte 3
  4603. NvU8 supportDeepColor36bits : 1; //!< Byte 3
  4604. NvU8 supportDeepColor48bits : 1; //!< Byte 3
  4605. NvU8 supportAI : 1; //!< Byte 3
  4606. // byte 4
  4607. NvU8 maxTmdsClock; //!< Bye 4
  4608. // byte 5
  4609. NvU8 cnc0SupportGraphicsTextContent : 1; //!< Byte 5
  4610. NvU8 cnc1SupportPhotoContent : 1; //!< Byte 5
  4611. NvU8 cnc2SupportCinemaContent : 1; //!< Byte 5
  4612. NvU8 cnc3SupportGameContent : 1; //!< Byte 5
  4613. NvU8 reserved8 : 1; //!< Byte 5
  4614. NvU8 hasVicEntries : 1; //!< Byte 5
  4615. NvU8 hasInterlacedLatencyField : 1; //!< Byte 5
  4616. NvU8 hasLatencyField : 1; //!< Byte 5
  4617. // byte 6
  4618. NvU8 videoLatency; //!< Byte 6
  4619. // byte 7
  4620. NvU8 audioLatency; //!< Byte 7
  4621. // byte 8
  4622. NvU8 interlacedVideoLatency; //!< Byte 8
  4623. // byte 9
  4624. NvU8 interlacedAudioLatency; //!< Byte 9
  4625. // byte 10
  4626. NvU8 reserved13 : 7; //!< Byte 10
  4627. NvU8 has3dEntries : 1; //!< Byte 10
  4628. // byte 11
  4629. NvU8 hdmi3dLength : 5; //!< Byte 11
  4630. NvU8 hdmiVicLength : 3; //!< Byte 11
  4631. // Remaining bytes
  4632. NvU8 hdmi_vic[7]; //!< Keeping maximum length for 3 bits
  4633. NvU8 hdmi_3d[31]; //!< Keeping maximum length for 5 bits
  4634. } NV_MONITOR_CAPS_VSDB;
  4635. //! See NvAPI_DISP_GetMonitorCapabilities().
  4636. typedef struct _NV_MONITOR_CAPABILITIES_V1
  4637. {
  4638. NvU32 version;
  4639. NvU16 size;
  4640. NvU32 infoType;
  4641. NvU32 connectorType; //!< Out: VGA, TV, DVI, HDMI, DP
  4642. NvU8 bIsValidInfo : 1; //!< Boolean : Returns invalid if requested info is not present such as VCDB not present
  4643. union {
  4644. NV_MONITOR_CAPS_VSDB vsdb;
  4645. NV_MONITOR_CAPS_VCDB vcdb;
  4646. } data;
  4647. } NV_MONITOR_CAPABILITIES_V1;
  4648. typedef NV_MONITOR_CAPABILITIES_V1 NV_MONITOR_CAPABILITIES;
  4649. //! Macro for constructing the version field of ::NV_MONITOR_CAPABILITIES_V1
  4650. #define NV_MONITOR_CAPABILITIES_VER1 MAKE_NVAPI_VERSION(NV_MONITOR_CAPABILITIES_V1,1)
  4651. #define NV_MONITOR_CAPABILITIES_VER NV_MONITOR_CAPABILITIES_VER1
  4652. //! @}
  4653. //! SUPPORTED OS: Windows Vista and higher
  4654. //!
  4655. //! \ingroup dispcontrol
  4656. NVAPI_INTERFACE NvAPI_DISP_GetMonitorCapabilities(__in NvU32 displayId, __inout NV_MONITOR_CAPABILITIES *pMonitorCapabilities);
  4657. //! \ingroup dispcontrol
  4658. typedef struct _NV_MONITOR_COLOR_DATA
  4659. {
  4660. NvU32 version;
  4661. // We are only supporting DP monitors for now. We need to extend this to HDMI panels as well
  4662. NV_DP_COLOR_FORMAT colorFormat; //!< One of the supported color formats
  4663. NV_DP_BPC backendBitDepths; //!< One of the supported bit depths
  4664. } NV_MONITOR_COLOR_CAPS_V1;
  4665. typedef NV_MONITOR_COLOR_CAPS_V1 NV_MONITOR_COLOR_CAPS;
  4666. //! \ingroup dispcontrol
  4667. #define NV_MONITOR_COLOR_CAPS_VER1 MAKE_NVAPI_VERSION(NV_MONITOR_COLOR_CAPS_V1,1)
  4668. #define NV_MONITOR_COLOR_CAPS_VER NV_MONITOR_COLOR_CAPS_VER1
  4669. ///////////////////////////////////////////////////////////////////////////////
  4670. // FUNCTION NAME: NvAPI_DISP_GetMonitorColorCapabilities
  4671. //
  4672. //! DESCRIPTION: This API returns all the color formats and bit depth values supported by a given DP monitor.
  4673. //!
  4674. //! USAGE: Sequence of calls which caller should make to get the information.
  4675. //! 1. First call NvAPI_DISP_GetMonitorColorCapabilities() with pMonitorColorCapabilities as NULL to get the count.
  4676. //! 2. Allocate memory for color caps(NV_MONITOR_COLOR_CAPS) array.
  4677. //! 3. Call NvAPI_DISP_GetMonitorColorCapabilities() again with the pointer to the memory allocated to get all the
  4678. //! color capabilities.
  4679. //!
  4680. //! Note :
  4681. //! 1. pColorCapsCount should never be NULL, else the API will fail with NVAPI_INVALID_ARGUMENT.
  4682. //! 2. *pColorCapsCount returned from the API will always be the actual count in any/every call.
  4683. //! 3. Memory size to be allocated should be (*pColorCapsCount * sizeof(NV_MONITOR_COLOR_CAPS)).
  4684. //! 4. If the memory allocated is less than what is required to return all the timings, this API will return the
  4685. //! amount of information which can fit in user provided buffer and API will return NVAPI_INSUFFICIENT_BUFFER.
  4686. //! 5. If the caller specifies a greater value for *pColorCapsCount in second call to NvAPI_DISP_GetMonitorColorCapabilities()
  4687. //! than what was returned from first call, the API will return only the actual number of elements in the color
  4688. //! capabilities array and the extra buffer will remain unused.
  4689. //!
  4690. //! SUPPORTED OS: Windows Vista and higher
  4691. //!
  4692. //!
  4693. //! \param [in] displayId Monitor Identifier
  4694. //! \param [in, out] pMonitorColorCapabilities The monitor color capabilities information
  4695. //! \param [in, out] pColorCapsCount - During input, the number of elements allocated for the pMonitorColorCapabilities pointer
  4696. //! - During output, the actual number of color data elements the monitor supports
  4697. //!
  4698. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4699. //! specific meaning for this API, they are listed below.
  4700. //!
  4701. //! \retval NVAPI_INSUFFICIENT_BUFFER The input buffer size is not sufficient to hold the total contents. In this case
  4702. //! *pColorCapsCount will hold the required amount of elements.
  4703. //! \retval NVAPI_INVALID_DISPLAY_ID The input monitor is either not connected or is not a DP panel.
  4704. //!
  4705. //! \ingroup dispcontrol
  4706. //!
  4707. ///////////////////////////////////////////////////////////////////////////////
  4708. NVAPI_INTERFACE NvAPI_DISP_GetMonitorColorCapabilities(__in NvU32 displayId, __inout_ecount_part_opt(*pColorCapsCount, *pColorCapsCount) NV_MONITOR_COLOR_CAPS *pMonitorColorCapabilities, __inout NvU32 *pColorCapsCount);
  4709. //! \ingroup dispcontrol
  4710. //! Used in NvAPI_DISP_EnumCustomDisplay() and NvAPI_DISP_TryCustomDisplay().
  4711. typedef struct
  4712. {
  4713. NvU32 version;
  4714. // the source mode information
  4715. NvU32 width; //!< Source surface(source mode) width
  4716. NvU32 height; //!< Source surface(source mode) height
  4717. NvU32 depth; //!< Source surface color depth."0" means all 8/16/32bpp
  4718. NV_FORMAT colorFormat; //!< Color format (optional)
  4719. NV_VIEWPORTF srcPartition; //!< For multimon support, should be set to (0,0,1.0,1.0) for now.
  4720. float xRatio; //!< Horizontal scaling ratio
  4721. float yRatio; //!< Vertical scaling ratio
  4722. NV_TIMING timing; //!< Timing used to program TMDS/DAC/LVDS/HDMI/TVEncoder, etc.
  4723. NvU32 hwModeSetOnly : 1; //!< If set, it means a hardware modeset without OS update
  4724. }NV_CUSTOM_DISPLAY;
  4725. //! \ingroup dispcontrol
  4726. //! Used in NV_CUSTOM_DISPLAY.
  4727. #define NV_CUSTOM_DISPLAY_VER MAKE_NVAPI_VERSION(NV_CUSTOM_DISPLAY,1)
  4728. ///////////////////////////////////////////////////////////////////////////////
  4729. // FUNCTION NAME: NvAPI_DISP_EnumCustomDisplay
  4730. //
  4731. //! DESCRIPTION: This API enumerates the custom timing specified by the enum index.
  4732. //! The client should keep enumerating until it returns NVAPI_END_ENUMERATION.
  4733. //!
  4734. //! SUPPORTED OS: Windows XP and higher
  4735. //!
  4736. //!
  4737. //! \since Release: 313
  4738. //!
  4739. //! \param [in] displayId Dispaly ID of the display.
  4740. //! \param [in] index Enum index
  4741. //! \param [inout] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure
  4742. //!
  4743. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4744. //! specific meaning for this API, they are listed below.
  4745. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed
  4746. //!
  4747. //! \ingroup dispcontrol
  4748. ///////////////////////////////////////////////////////////////////////////////
  4749. NVAPI_INTERFACE NvAPI_DISP_EnumCustomDisplay( __in NvU32 displayId, __in NvU32 index, __inout NV_CUSTOM_DISPLAY *pCustDisp);
  4750. ///////////////////////////////////////////////////////////////////////////////
  4751. // FUNCTION NAME: NvAPI_DISP_TryCustomDisplay
  4752. //
  4753. //! DESCRIPTION: This API is used to set up a custom display without saving the configuration on multiple displays.
  4754. //!
  4755. //! \note
  4756. //! All the members of srcPartition, present in NV_CUSTOM_DISPLAY structure, should have their range in (0.0,1.0).
  4757. //! In clone mode the timings can applied to both the target monitors but only one target at a time. \n
  4758. //! For the secondary target the applied timings works under the following conditions:
  4759. //! - If the secondary monitor EDID supports the selected timing, OR
  4760. //! - If the selected custom timings can be scaled by the secondary monitor for the selected source resolution on the primary, OR
  4761. //! - If the selected custom timings matches the existing source resolution on the primary.
  4762. //! Setting up a custom display on non-active but connected monitors is supported only for Win7 and above.
  4763. //!
  4764. //! SUPPORTED OS: Windows XP, Windows 7 and higher
  4765. //!
  4766. //!
  4767. //! \since Release: 313
  4768. //!
  4769. //!
  4770. //! \param [in] pDisplayIds Array of the target display Dispaly IDs - See \ref handles.
  4771. //! \param [in] count Total number of the incoming Display IDs and corresponding NV_CUSTOM_DISPLAY structure. This is for the multi-head support.
  4772. //! \param [in] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure array.
  4773. //!
  4774. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4775. //! specific meaning for this API, they are listed below.
  4776. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed
  4777. //!
  4778. //! \ingroup dispcontrol
  4779. ///////////////////////////////////////////////////////////////////////////////
  4780. NVAPI_INTERFACE NvAPI_DISP_TryCustomDisplay( __in_ecount(count) NvU32 *pDisplayIds, __in NvU32 count, __in_ecount(count) NV_CUSTOM_DISPLAY *pCustDisp);
  4781. ///////////////////////////////////////////////////////////////////////////////
  4782. // FUNCTION NAME: NvAPI_DISP_DeleteCustomDisplay
  4783. //
  4784. //! DESCRIPTION: This function deletes the custom display configuration, specified from the registry for all the displays whose display IDs are passed.
  4785. //!
  4786. //! SUPPORTED OS: Windows XP and higher
  4787. //!
  4788. //!
  4789. //! \since Release: 313
  4790. //!
  4791. //!
  4792. //! \param [in] pDisplayIds Array of Dispaly IDs on which custom display configuration is to be saved.
  4793. //! \param [in] count Total number of the incoming Dispaly IDs. This is for the multi-head support.
  4794. //! \param [in] pCustDisp Pointer to the NV_CUSTOM_DISPLAY structure
  4795. //!
  4796. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4797. //! specific meaning for this API, they are listed below.
  4798. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed
  4799. //!
  4800. //! \ingroup dispcontrol
  4801. ///////////////////////////////////////////////////////////////////////////////
  4802. NVAPI_INTERFACE NvAPI_DISP_DeleteCustomDisplay( __in_ecount(count) NvU32 *pDisplayIds, __in NvU32 count, __in NV_CUSTOM_DISPLAY *pCustDisp);
  4803. ///////////////////////////////////////////////////////////////////////////////
  4804. // FUNCTION NAME: NvAPI_DISP_SaveCustomDisplay
  4805. //
  4806. //! DESCRIPTION: This function saves the current hardware display configuration on the specified Display IDs as a custom display configuration.
  4807. //! This function should be called right after NvAPI_DISP_TryCustomDisplay() to save the custom display from the current
  4808. //! hardware context. This function will not do anything if the custom display configuration is not tested on the hardware.
  4809. //!
  4810. //! SUPPORTED OS: Windows XP and higher
  4811. //!
  4812. //!
  4813. //! \since Release: 313
  4814. //!
  4815. //!
  4816. //! \param [in] pDisplayIds Array of Dispaly IDs on which custom display configuration is to be saved.
  4817. //! \param [in] count Total number of the incoming Dispaly IDs. This is for the multi-head support.
  4818. //! \param [in] isThisOutputIdOnly If set, the saved custom display will only be applied on the monitor with the same outputId (see \ref handles).
  4819. //! \param [in] isThisMonitorIdOnly If set, the saved custom display will only be applied on the monitor with the same EDID ID or
  4820. //! the same TV connector in case of analog TV.
  4821. //!
  4822. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4823. //! specific meaning for this API, they are listed below.
  4824. //! \retval NVAPI_INVALID_DISPLAY_ID: Custom Timing is not supported on the Display, whose display id is passed
  4825. //!
  4826. //! \ingroup dispcontrol
  4827. ///////////////////////////////////////////////////////////////////////////////
  4828. NVAPI_INTERFACE NvAPI_DISP_SaveCustomDisplay( __in_ecount(count) NvU32 *pDisplayIds, __in NvU32 count, __in NvU32 isThisOutputIdOnly, __in NvU32 isThisMonitorIdOnly);
  4829. ///////////////////////////////////////////////////////////////////////////////
  4830. // FUNCTION NAME: NvAPI_DISP_RevertCustomDisplayTrial
  4831. //
  4832. //! DESCRIPTION: This API is used to restore the display configuration, that was changed by calling NvAPI_DISP_TryCustomDisplay(). This function
  4833. //! must be called only after a custom display configuration is tested on the hardware, using NvAPI_DISP_TryCustomDisplay(),
  4834. //! otherwise no action is taken. On Vista, NvAPI_DISP_RevertCustomDisplayTrial should be called with an active display that
  4835. //! was affected during the NvAPI_DISP_TryCustomDisplay() call, per GPU.
  4836. //!
  4837. //! SUPPORTED OS: Windows Vista and higher
  4838. //!
  4839. //!
  4840. //! \since Release: 313
  4841. //!
  4842. //!
  4843. //! \param [in] pDisplayIds Pointer to display Id, of an active display.
  4844. //! \param [in] count Total number of incoming Display IDs. For future use only. Currently it is expected to be passed as 1.
  4845. //!
  4846. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4847. //! specific meaning for this API, they are listed below.
  4848. //!
  4849. //! \ingroup dispcontrol
  4850. ///////////////////////////////////////////////////////////////////////////////
  4851. NVAPI_INTERFACE NvAPI_DISP_RevertCustomDisplayTrial( __in_ecount(count) NvU32* pDisplayIds, __in NvU32 count);
  4852. ///////////////////////////////////////////////////////////////////////////////
  4853. // FUNCTION NAME: NvAPI_GetView
  4854. //
  4855. //! This API lets caller retrieve the target display arrangement for selected source display handle.
  4856. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW.
  4857. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs.
  4858. //!
  4859. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.
  4860. //! SUPPORTED OS: Windows Vista and higher
  4861. //!
  4862. //!
  4863. //! \since Release: 85
  4864. //!
  4865. //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from
  4866. //! NvAPI_EnumNVidiaDisplayHandle().
  4867. //! \param [out] pTargets User allocated storage to retrieve an array of NV_VIEW_TARGET_INFO. Can be NULL to retrieve
  4868. //! the targetCount.
  4869. //! \param [in,out] targetMaskCount Count of target device mask specified in pTargetMask.
  4870. //! \param [out] targetView Target view selected from NV_TARGET_VIEW_MODE.
  4871. //!
  4872. //! \retval NVAPI_OK Completed request
  4873. //! \retval NVAPI_ERROR Miscellaneous error occurred
  4874. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  4875. //! \ingroup dispcontrol
  4876. ///////////////////////////////////////////////////////////////////////////////
  4877. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.")
  4878. NVAPI_INTERFACE NvAPI_GetView(NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargets, NvU32 *pTargetMaskCount, NV_TARGET_VIEW_MODE *pTargetView);
  4879. ///////////////////////////////////////////////////////////////////////////////
  4880. // FUNCTION NAME: NvAPI_GetViewEx
  4881. //
  4882. //! DESCRIPTION: This API lets caller retrieve the target display arrangement for selected source display handle.
  4883. //! \note Display PATH with this API is limited to single GPU. DUALVIEW across GPUs will be returned as STANDARD VIEW.
  4884. //! Use NvAPI_SYS_GetDisplayTopologies() to query views across GPUs.
  4885. //!
  4886. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.
  4887. //! SUPPORTED OS: Windows Vista and higher
  4888. //!
  4889. //!
  4890. //! \since Release: 165
  4891. //!
  4892. //! \param [in] hNvDisplay NVIDIA Display selection. #NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with
  4893. //! NvAPI_EnumNVidiaDisplayHandle().
  4894. //! \param [in,out] pPathInfo Count field should be set to NVAPI_MAX_DISPLAY_PATH. Can be NULL to retrieve just the pathCount.
  4895. //! \param [in,out] pPathCount Number of elements in array pPathInfo->path.
  4896. //! \param [out] pTargetViewMode Display view selected from NV_TARGET_VIEW_MODE.
  4897. //!
  4898. //! \retval NVAPI_OK Completed request
  4899. //! \retval NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  4900. //! \retval NVAPI_ERROR Miscellaneous error occurred
  4901. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  4902. //! \retval NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle.
  4903. //!
  4904. //! \ingroup dispcontrol
  4905. ///////////////////////////////////////////////////////////////////////////////
  4906. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_DISP_GetDisplayConfig.")
  4907. NVAPI_INTERFACE NvAPI_GetViewEx(NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NvU32 *pPathCount, NV_TARGET_VIEW_MODE *pTargetViewMode);
  4908. ///////////////////////////////////////////////////////////////////////////////
  4909. // FUNCTION NAME: NvAPI_GetSupportedViews
  4910. //
  4911. //! This API lets caller enumerate all the supported NVIDIA display views - nView and Dualview modes.
  4912. //!
  4913. //! SUPPORTED OS: Windows XP and higher
  4914. //!
  4915. //!
  4916. //! \since Release: 85
  4917. //!
  4918. //! \param [in] hNvDisplay NVIDIA Display selection. It can be #NVAPI_DEFAULT_HANDLE or a handle enumerated from
  4919. //! NvAPI_EnumNVidiaDisplayHandle().
  4920. //! \param [out] pTargetViews Array of supported views. Can be NULL to retrieve the pViewCount first.
  4921. //! \param [in,out] pViewCount Count of supported views.
  4922. //!
  4923. //! \retval NVAPI_OK Completed request
  4924. //! \retval NVAPI_ERROR Miscellaneous error occurred
  4925. //! \retval NVAPI_INVALID_ARGUMENT Invalid input parameter.
  4926. //! \ingroup dispcontrol
  4927. ///////////////////////////////////////////////////////////////////////////////
  4928. NVAPI_INTERFACE NvAPI_GetSupportedViews(NvDisplayHandle hNvDisplay, NV_TARGET_VIEW_MODE *pTargetViews, NvU32 *pViewCount);
  4929. //! SUPPORTED OS: Windows XP and higher
  4930. //!
  4931. ///////////////////////////////////////////////////////////////////////////////
  4932. //
  4933. // FUNCTION NAME: NvAPI_DISP_GetDisplayIdByDisplayName
  4934. //
  4935. //! DESCRIPTION: This API retrieves the Display Id of a given display by
  4936. //! display name. The display must be active to retrieve the
  4937. //! displayId. In the case of clone mode or Surround gaming,
  4938. //! the primary or top-left display will be returned.
  4939. //!
  4940. //! \param [in] displayName Name of display (Eg: "\\DISPLAY1" to
  4941. //! retrieve the displayId for.
  4942. //! \param [out] displayId Display ID of the requested display.
  4943. //!
  4944. //! retval ::NVAPI_OK: Capabilties have been returned.
  4945. //! retval ::NVAPI_INVALID_ARGUMENT: One or more args passed in are invalid.
  4946. //! retval ::NVAPI_API_NOT_INTIALIZED: The NvAPI API needs to be initialized first
  4947. //! retval ::NVAPI_NO_IMPLEMENTATION: This entrypoint not available
  4948. //! retval ::NVAPI_ERROR: Miscellaneous error occurred
  4949. //!
  4950. //! \ingroup dispcontrol
  4951. ///////////////////////////////////////////////////////////////////////////////
  4952. NVAPI_INTERFACE NvAPI_DISP_GetDisplayIdByDisplayName(const char *displayName, NvU32* displayId);
  4953. ///////////////////////////////////////////////////////////////////////////////
  4954. // FUNCTION NAME: NvAPI_DISP_GetDisplayConfig
  4955. //
  4956. //! DESCRIPTION: This API lets caller retrieve the current global display
  4957. //! configuration.
  4958. //! USAGE: The caller might have to call this three times to fetch all the required configuration details as follows:
  4959. //! First Pass: Caller should Call NvAPI_DISP_GetDisplayConfig() with pathInfo set to NULL to fetch pathInfoCount.
  4960. //! Second Pass: Allocate memory for pathInfo with respect to the number of pathInfoCount(from First Pass) to fetch
  4961. //! targetInfoCount. If sourceModeInfo is needed allocate memory or it can be initialized to NULL.
  4962. //! Third Pass(Optional, only required if target information is required): Allocate memory for targetInfo with respect
  4963. //! to number of targetInfoCount(from Second Pass).
  4964. //! SUPPORTED OS: Windows Vista and higher
  4965. //!
  4966. //!
  4967. //! \param [in,out] pathInfoCount Number of elements in pathInfo array, returns number of valid topologies, this cannot be null.
  4968. //! \param [in,out] pathInfo Array of path information
  4969. //!
  4970. //! \return This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  4971. //! specific meaning for this API, they are listed below.
  4972. //!
  4973. //! \retval NVAPI_INVALID_ARGUMENT - Invalid input parameter. Following can be the reason for this return value:
  4974. //! -# pathInfoCount is NULL.
  4975. //! -# *pathInfoCount is 0 and pathInfo is not NULL.
  4976. //! -# *pathInfoCount is not 0 and pathInfo is NULL.
  4977. //! \retval NVAPI_DEVICE_BUSY - ModeSet has not yet completed. Please wait and call it again.
  4978. //!
  4979. //! \ingroup dispcontrol
  4980. ///////////////////////////////////////////////////////////////////////////////
  4981. NVAPI_INTERFACE NvAPI_DISP_GetDisplayConfig(__inout NvU32 *pathInfoCount, __out_ecount_full_opt(*pathInfoCount) NV_DISPLAYCONFIG_PATH_INFO *pathInfo);
  4982. ///////////////////////////////////////////////////////////////////////////////
  4983. // FUNCTION NAME: NvAPI_DISP_SetDisplayConfig
  4984. //
  4985. //
  4986. //! DESCRIPTION: This API lets caller apply a global display configuration
  4987. //! across multiple GPUs.
  4988. //!
  4989. //! If all sourceIds are zero, then NvAPI will pick up sourceId's based on the following criteria :
  4990. //! - If user provides sourceModeInfo then we are trying to assign 0th sourceId always to GDIPrimary.
  4991. //! This is needed since active windows always moves along with 0th sourceId.
  4992. //! - For rest of the paths, we are incrementally assigning the sourceId per adapter basis.
  4993. //! - If user doesn't provide sourceModeInfo then NVAPI just picks up some default sourceId's in incremental order.
  4994. //! Note : NVAPI will not intelligently choose the sourceIDs for any configs that does not need a modeset.
  4995. //!
  4996. //! SUPPORTED OS: Windows Vista and higher
  4997. //!
  4998. //!
  4999. //! \param [in] pathInfoCount Number of supplied elements in pathInfo
  5000. //! \param [in] pathInfo Array of path information
  5001. //! \param [in] flags Flags for applying settings
  5002. //!
  5003. //! \retval ::NVAPI_OK - completed request
  5004. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
  5005. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  5006. //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter.
  5007. //!
  5008. //! \ingroup dispcontrol
  5009. ///////////////////////////////////////////////////////////////////////////////
  5010. NVAPI_INTERFACE NvAPI_DISP_SetDisplayConfig(__in NvU32 pathInfoCount, __in_ecount(pathInfoCount) NV_DISPLAYCONFIG_PATH_INFO* pathInfo, __in NvU32 flags);
  5011. ////////////////////////////////////////////////////////////////////////////////////////
  5012. //
  5013. // MOSAIC allows a multi display target output scanout on a single source.
  5014. //
  5015. // SAMPLE of MOSAIC 1x4 topo with 8 pixel horizontal overlap
  5016. //
  5017. //+-------------------------++-------------------------++-------------------------++-------------------------+
  5018. //| || || || |
  5019. //| || || || |
  5020. //| || || || |
  5021. //| DVI1 || DVI2 || DVI3 || DVI4 |
  5022. //| || || || |
  5023. //| || || || |
  5024. //| || || || |
  5025. //| || || || |
  5026. //+-------------------------++-------------------------++-------------------------++-------------------------+
  5027. //! \addtogroup mosaicapi
  5028. //! @{
  5029. #define NVAPI_MAX_MOSAIC_DISPLAY_ROWS 8
  5030. #define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS 8
  5031. //
  5032. // These bits are used to describe the validity of a topo.
  5033. //
  5034. #define NV_MOSAIC_TOPO_VALIDITY_VALID 0x00000000 //!< The topology is valid
  5035. #define NV_MOSAIC_TOPO_VALIDITY_MISSING_GPU 0x00000001 //!< Not enough SLI GPUs were found to fill the entire
  5036. //! topology. hPhysicalGPU will be 0 for these.
  5037. #define NV_MOSAIC_TOPO_VALIDITY_MISSING_DISPLAY 0x00000002 //!< Not enough displays were found to fill the entire
  5038. //! topology. displayOutputId will be 0 for these.
  5039. #define NV_MOSAIC_TOPO_VALIDITY_MIXED_DISPLAY_TYPES 0x00000004 //!< The topoogy is only possible with displays of the same
  5040. //! NV_GPU_OUTPUT_TYPE. Check displayOutputIds to make
  5041. //! sure they are all CRTs, or all DFPs.
  5042. //
  5043. //! This structure defines the topology details.
  5044. typedef struct
  5045. {
  5046. NvU32 version; //!< Version of this structure
  5047. NvLogicalGpuHandle hLogicalGPU; //!< Logical GPU for this topology
  5048. NvU32 validityMask; //!< 0 means topology is valid with the current hardware.
  5049. //! If not 0, inspect bits against NV_MOSAIC_TOPO_VALIDITY_*.
  5050. NvU32 rowCount; //!< Number of displays in a row
  5051. NvU32 colCount; //!< Number of displays in a column
  5052. struct
  5053. {
  5054. NvPhysicalGpuHandle hPhysicalGPU; //!< Physical GPU to be used in the topology (0 if GPU missing)
  5055. NvU32 displayOutputId; //!< Connected display target (0 if no display connected)
  5056. NvS32 overlapX; //!< Pixels of overlap on left of target: (+overlap, -gap)
  5057. NvS32 overlapY; //!< Pixels of overlap on top of target: (+overlap, -gap)
  5058. } gpuLayout[NVAPI_MAX_MOSAIC_DISPLAY_ROWS][NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS];
  5059. } NV_MOSAIC_TOPO_DETAILS;
  5060. //! Macro for constructing te vesion field of NV_MOSAIC_TOPO_DETAILS
  5061. #define NVAPI_MOSAIC_TOPO_DETAILS_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_DETAILS,1)
  5062. //
  5063. //! These values refer to the different types of Mosaic topologies that are possible. When
  5064. //! getting the supported Mosaic topologies, you can specify one of these types to narrow down
  5065. //! the returned list to only those that match the given type.
  5066. typedef enum
  5067. {
  5068. NV_MOSAIC_TOPO_TYPE_ALL, //!< All mosaic topologies
  5069. NV_MOSAIC_TOPO_TYPE_BASIC, //!< Basic Mosaic topologies
  5070. NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO, //!< Passive Stereo topologies
  5071. NV_MOSAIC_TOPO_TYPE_SCALED_CLONE, //!< Not supported at this time
  5072. NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO_SCALED_CLONE, //!< Not supported at this time
  5073. NV_MOSAIC_TOPO_TYPE_MAX, //!< Always leave this at end of the enum
  5074. } NV_MOSAIC_TOPO_TYPE;
  5075. //
  5076. //! This is a complete list of supported Mosaic topologies.
  5077. //!
  5078. //! Using a "Basic" topology combines multiple monitors to create a single desktop.
  5079. //!
  5080. //! Using a "Passive" topology combines multiples monitors to create a passive stereo desktop.
  5081. //! 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
  5082. //! NOTE: common\inc\nvEscDef.h shadows a couple PASSIVE_STEREO enums. If this
  5083. //! enum list changes and effects the value of NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO
  5084. //! please update the corresponding value in nvEscDef.h
  5085. typedef enum
  5086. {
  5087. NV_MOSAIC_TOPO_NONE,
  5088. // 'BASIC' topos start here
  5089. //
  5090. // The result of using one of these Mosaic topos is that multiple monitors
  5091. // will combine to create a single desktop.
  5092. //
  5093. NV_MOSAIC_TOPO_BEGIN_BASIC,
  5094. NV_MOSAIC_TOPO_1x2_BASIC = NV_MOSAIC_TOPO_BEGIN_BASIC,
  5095. NV_MOSAIC_TOPO_2x1_BASIC,
  5096. NV_MOSAIC_TOPO_1x3_BASIC,
  5097. NV_MOSAIC_TOPO_3x1_BASIC,
  5098. NV_MOSAIC_TOPO_1x4_BASIC,
  5099. NV_MOSAIC_TOPO_4x1_BASIC,
  5100. NV_MOSAIC_TOPO_2x2_BASIC,
  5101. NV_MOSAIC_TOPO_2x3_BASIC,
  5102. NV_MOSAIC_TOPO_2x4_BASIC,
  5103. NV_MOSAIC_TOPO_3x2_BASIC,
  5104. NV_MOSAIC_TOPO_4x2_BASIC,
  5105. NV_MOSAIC_TOPO_1x5_BASIC,
  5106. NV_MOSAIC_TOPO_1x6_BASIC,
  5107. NV_MOSAIC_TOPO_7x1_BASIC,
  5108. // Add padding for 10 more entries. 6 will be enough room to specify every
  5109. // possible topology with 8 or fewer displays, so this gives us a little
  5110. // extra should we need it.
  5111. NV_MOSAIC_TOPO_END_BASIC = NV_MOSAIC_TOPO_7x1_BASIC + 9,
  5112. // 'PASSIVE_STEREO' topos start here
  5113. //
  5114. // The result of using one of these Mosaic topos is that multiple monitors
  5115. // will combine to create a single PASSIVE STEREO desktop. What this means is
  5116. // that there will be two topos that combine to create the overall desktop.
  5117. // One topo will be used for the left eye, and the other topo (of the
  5118. // same rows x cols), will be used for the right eye. The difference between
  5119. // the two topos is that different GPUs and displays will be used.
  5120. //
  5121. NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO, // value shadowed in nvEscDef.h
  5122. NV_MOSAIC_TOPO_1x2_PASSIVE_STEREO = NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO,
  5123. NV_MOSAIC_TOPO_2x1_PASSIVE_STEREO,
  5124. NV_MOSAIC_TOPO_1x3_PASSIVE_STEREO,
  5125. NV_MOSAIC_TOPO_3x1_PASSIVE_STEREO,
  5126. NV_MOSAIC_TOPO_1x4_PASSIVE_STEREO,
  5127. NV_MOSAIC_TOPO_4x1_PASSIVE_STEREO,
  5128. NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO,
  5129. NV_MOSAIC_TOPO_END_PASSIVE_STEREO = NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO + 4,
  5130. //
  5131. // Total number of topos. Always leave this at the end of the enumeration.
  5132. //
  5133. NV_MOSAIC_TOPO_MAX //! Total number of topologies.
  5134. } NV_MOSAIC_TOPO;
  5135. //
  5136. //! This is a "topology brief" structure. It tells you what you need to know about
  5137. //! a topology at a high level. A list of these is returned when you query for the
  5138. //! supported Mosaic information.
  5139. //!
  5140. //! If you need more detailed information about the topology, call
  5141. //! NvAPI_Mosaic_GetTopoGroup() with the topology value from this structure.
  5142. typedef struct
  5143. {
  5144. NvU32 version; //!< Version of this structure
  5145. NV_MOSAIC_TOPO topo; //!< The topology
  5146. NvU32 enabled; //!< 1 if topo is enabled, else 0
  5147. NvU32 isPossible; //!< 1 if topo *can* be enabled, else 0
  5148. } NV_MOSAIC_TOPO_BRIEF;
  5149. //! Macro for constructing the version field of NV_MOSAIC_TOPO_BRIEF
  5150. #define NVAPI_MOSAIC_TOPO_BRIEF_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_BRIEF,1)
  5151. //
  5152. //! Basic per-display settings that are used in setting/getting the Mosaic mode
  5153. typedef struct _NV_MOSAIC_DISPLAY_SETTING_V1
  5154. {
  5155. NvU32 version; //!< Version of this structure
  5156. NvU32 width; //!< Per-display width
  5157. NvU32 height; //!< Per-display height
  5158. NvU32 bpp; //!< Bits per pixel
  5159. NvU32 freq; //!< Display frequency
  5160. } NV_MOSAIC_DISPLAY_SETTING_V1;
  5161. typedef struct NV_MOSAIC_DISPLAY_SETTING_V2
  5162. {
  5163. NvU32 version; //!< Version of this structure
  5164. NvU32 width; //!< Per-display width
  5165. NvU32 height; //!< Per-display height
  5166. NvU32 bpp; //!< Bits per pixel
  5167. NvU32 freq; //!< Display frequency
  5168. NvU32 rrx1k; //!< Display frequency in x1k
  5169. } NV_MOSAIC_DISPLAY_SETTING_V2;
  5170. typedef NV_MOSAIC_DISPLAY_SETTING_V2 NV_MOSAIC_DISPLAY_SETTING;
  5171. //! Macro for constructing the version field of NV_MOSAIC_DISPLAY_SETTING
  5172. #define NVAPI_MOSAIC_DISPLAY_SETTING_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V1,1)
  5173. #define NVAPI_MOSAIC_DISPLAY_SETTING_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V2,2)
  5174. #define NVAPI_MOSAIC_DISPLAY_SETTING_VER NVAPI_MOSAIC_DISPLAY_SETTING_VER2
  5175. //
  5176. // Set a reasonable max number of display settings to support
  5177. // so arrays are bound.
  5178. //
  5179. #define NV_MOSAIC_DISPLAY_SETTINGS_MAX 40 //!< Set a reasonable maximum number of display settings to support
  5180. //! so arrays are bound.
  5181. //
  5182. //! This structure is used to contain a list of supported Mosaic topologies
  5183. //! along with the display settings that can be used.
  5184. typedef struct _NV_MOSAIC_SUPPORTED_TOPO_INFO_V1
  5185. {
  5186. NvU32 version; //!< Version of this structure
  5187. NvU32 topoBriefsCount; //!< Number of topologies in below array
  5188. NV_MOSAIC_TOPO_BRIEF topoBriefs[NV_MOSAIC_TOPO_MAX]; //!< List of supported topologies with only brief details
  5189. NvU32 displaySettingsCount; //!< Number of display settings in below array
  5190. NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings[NV_MOSAIC_DISPLAY_SETTINGS_MAX]; //!< List of per display settings possible
  5191. } NV_MOSAIC_SUPPORTED_TOPO_INFO_V1;
  5192. typedef struct _NV_MOSAIC_SUPPORTED_TOPO_INFO_V2
  5193. {
  5194. NvU32 version; //!< Version of this structure
  5195. NvU32 topoBriefsCount; //!< Number of topologies in below array
  5196. NV_MOSAIC_TOPO_BRIEF topoBriefs[NV_MOSAIC_TOPO_MAX]; //!< List of supported topologies with only brief details
  5197. NvU32 displaySettingsCount; //!< Number of display settings in below array
  5198. NV_MOSAIC_DISPLAY_SETTING_V2 displaySettings[NV_MOSAIC_DISPLAY_SETTINGS_MAX]; //!< List of per display settings possible
  5199. } NV_MOSAIC_SUPPORTED_TOPO_INFO_V2;
  5200. typedef NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 NV_MOSAIC_SUPPORTED_TOPO_INFO;
  5201. //! Macro forconstructing the version field of NV_MOSAIC_SUPPORTED_TOPO_INFO
  5202. #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V1,1)
  5203. #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V2,2)
  5204. #define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2
  5205. //
  5206. // Indices to use to access the topos array within the mosaic topology
  5207. #define NV_MOSAIC_TOPO_IDX_DEFAULT 0
  5208. #define NV_MOSAIC_TOPO_IDX_LEFT_EYE 0
  5209. #define NV_MOSAIC_TOPO_IDX_RIGHT_EYE 1
  5210. #define NV_MOSAIC_TOPO_NUM_EYES 2
  5211. //
  5212. //! This defines the maximum number of topos that can be in a topo group.
  5213. //! At this time, it is set to 2 because our largest topo group (passive
  5214. //! stereo) only needs 2 topos (left eye and right eye).
  5215. //!
  5216. //! If a new topo group with more than 2 topos is added above, then this
  5217. //! number will also have to be incremented.
  5218. #define NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP 2
  5219. //
  5220. //! This structure defines a group of topologies that work together to create one
  5221. //! overall layout. All of the supported topologies are represented with this
  5222. //! structure.
  5223. //!
  5224. //! For example, a 'Passive Stereo' topology would be represented with this
  5225. //! structure, and would have separate topology details for the left and right eyes.
  5226. //! The count would be 2. A 'Basic' topology is also represented by this structure,
  5227. //! with a count of 1.
  5228. //!
  5229. //! The structure is primarily used internally, but is exposed to applications in a
  5230. //! read-only fashion because there are some details in it that might be useful
  5231. //! (like the number of rows/cols, or connected display information). A user can
  5232. //! get the filled-in structure by calling NvAPI_Mosaic_GetTopoGroup().
  5233. //!
  5234. //! You can then look at the detailed values within the structure. There are no
  5235. //! entrypoints which take this structure as input (effectively making it read-only).
  5236. typedef struct
  5237. {
  5238. NvU32 version; //!< Version of this structure
  5239. NV_MOSAIC_TOPO_BRIEF brief; //!< The brief details of this topo
  5240. NvU32 count; //!< Number of topos in array below
  5241. NV_MOSAIC_TOPO_DETAILS topos[NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP];
  5242. } NV_MOSAIC_TOPO_GROUP;
  5243. //! Macro for constructing the version field of NV_MOSAIC_TOPO_GROUP
  5244. #define NVAPI_MOSAIC_TOPO_GROUP_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_GROUP,1)
  5245. //! @}
  5246. ///////////////////////////////////////////////////////////////////////////////
  5247. //
  5248. // FUNCTION NAME: NvAPI_Mosaic_GetSupportedTopoInfo
  5249. //
  5250. //! DESCRIPTION: This API returns information on the topologies and display resolutions
  5251. //! supported by Mosaic mode.
  5252. //!
  5253. //! NOTE: Not all topologies returned can be set immediately.
  5254. //! See 'OUT' Notes below.
  5255. //!
  5256. //! Once you get the list of supported topologies, you can call
  5257. //! NvAPI_Mosaic_GetTopoGroup() with one of the Mosaic topologies if you need
  5258. //! more information about it.
  5259. //!
  5260. //! <b>'IN' Notes:</b> pSupportedTopoInfo->version must be set before calling this function.
  5261. //! If the specified version is not supported by this implementation,
  5262. //! an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION).
  5263. //!
  5264. //! <b>'OUT' Notes:</b> Some of the topologies returned might not be valid for one reason or
  5265. //! another. It could be due to mismatched or missing displays. It
  5266. //! could also be because the required number of GPUs is not found.
  5267. //! At a high level, you can see if the topology is valid and can be enabled
  5268. //! by looking at the pSupportedTopoInfo->topoBriefs[xxx].isPossible flag.
  5269. //! If this is true, the topology can be enabled. If it
  5270. //! is false, you can find out why it cannot be enabled by getting the
  5271. //! details of the topology via NvAPI_Mosaic_GetTopoGroup(). From there,
  5272. //! look at the validityMask of the individual topologies. The bits can
  5273. //! be tested against the NV_MOSAIC_TOPO_VALIDITY_* bits.
  5274. //!
  5275. //! It is possible for this function to return NVAPI_OK with no topologies
  5276. //! listed in the return structure. If this is the case, it means that
  5277. //! the current hardware DOES support Mosaic, but with the given configuration
  5278. //! no valid topologies were found. This most likely means that SLI was not
  5279. //! enabled for the hardware. Once enabled, you should see valid topologies
  5280. //! returned from this function.
  5281. //!
  5282. //! SUPPORTED OS: Windows XP and higher
  5283. //!
  5284. //!
  5285. //! \since Release: 185
  5286. //!
  5287. //!
  5288. //! \param [in,out] pSupportedTopoInfo Information about what topologies and display resolutions
  5289. //! are supported for Mosaic.
  5290. //! \param [in] type The type of topologies the caller is interested in
  5291. //! getting. See NV_MOSAIC_TOPO_TYPE for possible values.
  5292. //!
  5293. //! \retval ::NVAPI_OK No errors in returning supported topologies.
  5294. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5295. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid.
  5296. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5297. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5298. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5299. // compatible with this entry point.
  5300. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred.
  5301. //!
  5302. //! \ingroup mosaicapi
  5303. ///////////////////////////////////////////////////////////////////////////////
  5304. NVAPI_INTERFACE NvAPI_Mosaic_GetSupportedTopoInfo(NV_MOSAIC_SUPPORTED_TOPO_INFO *pSupportedTopoInfo, NV_MOSAIC_TOPO_TYPE type);
  5305. ///////////////////////////////////////////////////////////////////////////////
  5306. //
  5307. // FUNCTION NAME: NvAPI_Mosaic_GetTopoGroup
  5308. //
  5309. //! DESCRIPTION: This API returns a structure filled with the details
  5310. //! of the specified Mosaic topology.
  5311. //!
  5312. //! If the pTopoBrief passed in matches the current topology,
  5313. //! then information in the brief and group structures
  5314. //! will reflect what is current. Thus the brief would have
  5315. //! the current 'enable' status, and the group would have the
  5316. //! current overlap values. If there is no match, then the
  5317. //! returned brief has an 'enable' status of FALSE (since it
  5318. //! is obviously not enabled), and the overlap values will be 0.
  5319. //!
  5320. //! <b>'IN' Notes:</b> pTopoGroup->version must be set before calling this function.
  5321. //! If the specified version is not supported by this implementation,
  5322. //! an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION).
  5323. //!
  5324. //!
  5325. //! SUPPORTED OS: Windows XP and higher
  5326. //!
  5327. //!
  5328. //! \since Release: 185
  5329. //!
  5330. //! \param [in] pTopoBrief The topology for getting the details
  5331. //! This must be one of the topology briefs
  5332. //! returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5333. //! \param [in,out] pTopoGroup The topology details matching the brief
  5334. //!
  5335. //! \retval ::NVAPI_OK Details were retrieved successfully.
  5336. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5337. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss 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_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5341. // compatible with this entry point.
  5342. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred.
  5343. //!
  5344. //! \ingroup mosaicapi
  5345. ///////////////////////////////////////////////////////////////////////////////
  5346. NVAPI_INTERFACE NvAPI_Mosaic_GetTopoGroup(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_TOPO_GROUP *pTopoGroup);
  5347. ///////////////////////////////////////////////////////////////////////////////
  5348. //
  5349. // FUNCTION NAME: NvAPI_Mosaic_GetOverlapLimits
  5350. //
  5351. //! DESCRIPTION: This API returns the X and Y overlap limits required if
  5352. //! the given Mosaic topology and display settings are to be used.
  5353. //!
  5354. //! SUPPORTED OS: Windows XP and higher
  5355. //!
  5356. //!
  5357. //! \since Release: 185
  5358. //!
  5359. //! \param [in] pTopoBrief The topology for getting limits
  5360. //! This must be one of the topo briefs
  5361. //! returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5362. //! \param [in] pDisplaySetting The display settings for getting the limits.
  5363. //! This must be one of the settings
  5364. //! returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5365. //! \param [out] pMinOverlapX X overlap minimum
  5366. //! \param [out] pMaxOverlapX X overlap maximum
  5367. //! \param [out] pMinOverlapY Y overlap minimum
  5368. //! \param [out] pMaxOverlapY Y overlap maximum
  5369. //!
  5370. //! \retval ::NVAPI_OK Details were retrieved successfully.
  5371. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5372. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5373. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5374. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5375. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5376. //! compatible with this entry point.
  5377. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  5378. //!
  5379. //! \ingroup mosaicapi
  5380. ///////////////////////////////////////////////////////////////////////////////
  5381. NVAPI_INTERFACE NvAPI_Mosaic_GetOverlapLimits(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pMinOverlapX, NvS32 *pMaxOverlapX, NvS32 *pMinOverlapY, NvS32 *pMaxOverlapY);
  5382. ///////////////////////////////////////////////////////////////////////////////
  5383. //
  5384. // FUNCTION NAME: NvAPI_Mosaic_SetCurrentTopo
  5385. //
  5386. //! DESCRIPTION: This API sets the Mosaic topology and performs a mode switch
  5387. //! using the given display settings.
  5388. //!
  5389. //! If NVAPI_OK is returned, the current Mosaic topology was set
  5390. //! correctly. Any other status returned means the
  5391. //! topology was not set, and remains what it was before this
  5392. //! function was called.
  5393. //!
  5394. //! SUPPORTED OS: Windows XP and higher
  5395. //!
  5396. //!
  5397. //! \since Release: 185
  5398. //!
  5399. //! \param [in] pTopoBrief The topology to set. This must be one of the topologies returned from
  5400. //! NvAPI_Mosaic_GetSupportedTopoInfo(), and it must have an isPossible value of 1.
  5401. //! \param [in] pDisplaySetting The per display settings to be used in the Mosaic mode. This must be one of the
  5402. //! settings returned from NvAPI_Mosaic_GetSupportedTopoInfo().
  5403. //! \param [in] overlapX The pixel overlap to use between horizontal displays (use positive a number for
  5404. //! overlap, or a negative number to create a gap.) If the overlap is out of bounds
  5405. //! for what is possible given the topo and display setting, the overlap will be clamped.
  5406. //! \param [in] overlapY The pixel overlap to use between vertical displays (use positive a number for
  5407. //! overlap, or a negative number to create a gap.) If the overlap is out of bounds for
  5408. //! what is possible given the topo and display setting, the overlap will be clamped.
  5409. //! \param [in] enable If 1, the topology being set will also be enabled, meaning that the mode set will
  5410. //! occur. \n
  5411. //! If 0, you don't want to be in Mosaic mode right now, but want to set the current
  5412. //! Mosaic topology so you can enable it later with NvAPI_Mosaic_EnableCurrentTopo().
  5413. //!
  5414. //! \retval ::NVAPI_OK The Mosaic topology was set.
  5415. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5416. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5417. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE The topology passed in is not currently possible.
  5418. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5419. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available.
  5420. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION The version of the structure passed in is not
  5421. //! compatible with this entrypoint.
  5422. //! \retval ::NVAPI_MODE_CHANGE_FAILED There was an error changing the display mode.
  5423. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  5424. //!
  5425. //! \ingroup mosaicapi
  5426. ///////////////////////////////////////////////////////////////////////////////
  5427. NVAPI_INTERFACE NvAPI_Mosaic_SetCurrentTopo(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 overlapX, NvS32 overlapY, NvU32 enable);
  5428. ///////////////////////////////////////////////////////////////////////////////
  5429. //
  5430. // FUNCTION NAME: NvAPI_Mosaic_GetCurrentTopo
  5431. //
  5432. //! DESCRIPTION: This API returns information for the current Mosaic topology.
  5433. //! This includes topology, display settings, and overlap values.
  5434. //!
  5435. //! You can call NvAPI_Mosaic_GetTopoGroup() with the topology
  5436. //! if you require more information.
  5437. //!
  5438. //! If there isn't a current topology, then pTopoBrief->topo will
  5439. //! be NV_MOSAIC_TOPO_NONE.
  5440. //!
  5441. //! SUPPORTED OS: Windows XP and higher
  5442. //!
  5443. //!
  5444. //! \since Release: 185
  5445. //!
  5446. //! \param [out] pTopoBrief The current Mosaic topology
  5447. //! \param [out] pDisplaySetting The current per-display settings
  5448. //! \param [out] pOverlapX The pixel overlap between horizontal displays
  5449. //! \param [out] pOverlapY The pixel overlap between vertical displays
  5450. //!
  5451. //! \retval ::NVAPI_OK Success getting current info.
  5452. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5453. //! \retval ::NVAPI_INVALID_ARGUMENT One or more argumentss passed in are invalid.
  5454. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first.
  5455. //! \retval ::NVAPI_NO_IMPLEMENTATION This entry point not available.
  5456. //! \retval ::NVAPI_ERROR Miscellaneous error occurred.
  5457. //!
  5458. //! \ingroup mosaicapi
  5459. ///////////////////////////////////////////////////////////////////////////////
  5460. NVAPI_INTERFACE NvAPI_Mosaic_GetCurrentTopo(NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pOverlapX, NvS32 *pOverlapY);
  5461. ///////////////////////////////////////////////////////////////////////////////
  5462. //
  5463. // FUNCTION NAME: NvAPI_Mosaic_EnableCurrentTopo
  5464. //
  5465. //! DESCRIPTION: This API enables or disables the current Mosaic topology
  5466. //! based on the setting of the incoming 'enable' parameter.
  5467. //!
  5468. //! An "enable" setting enables the current (previously set) Mosaic topology.
  5469. //! Note that when the current Mosaic topology is retrieved, it must have an isPossible value of 1 or
  5470. //! an error will occur.
  5471. //!
  5472. //! A "disable" setting disables the current Mosaic topology.
  5473. //! The topology information will persist, even across reboots.
  5474. //! To re-enable the Mosaic topology, call this function
  5475. //! again with the enable parameter set to 1.
  5476. //!
  5477. //! SUPPORTED OS: Windows XP and higher
  5478. //!
  5479. //!
  5480. //! \since Release: 185
  5481. //!
  5482. //! \param [in] enable 1 to enable the current Mosaic topo, 0 to disable it.
  5483. //!
  5484. //! \retval ::NVAPI_OK The Mosaic topo was enabled/disabled.
  5485. //! \retval ::NVAPI_NOT_SUPPORTED Mosaic is not supported with the existing hardware.
  5486. //! \retval ::NVAPI_INVALID_ARGUMENT One or more arguments passed in are invalid.
  5487. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE The current topology is not currently possible.
  5488. //! \retval ::NVAPI_MODE_CHANGE_FAILED There was an error changing the display mode.
  5489. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred.
  5490. //!
  5491. //! \ingroup mosaicapi
  5492. ///////////////////////////////////////////////////////////////////////////////
  5493. NVAPI_INTERFACE NvAPI_Mosaic_EnableCurrentTopo(NvU32 enable);
  5494. //! \ingroup mosaicapi
  5495. //! @{
  5496. typedef struct _NV_MOSAIC_GRID_TOPO_DISPLAY_V1
  5497. {
  5498. NvU32 displayId; //!< DisplayID of the display
  5499. NvS32 overlapX; //!< (+overlap, -gap)
  5500. NvS32 overlapY; //!< (+overlap, -gap)
  5501. NV_ROTATE rotation; //!< Rotation of display
  5502. NvU32 cloneGroup; //!< Reserved, must be 0
  5503. } NV_MOSAIC_GRID_TOPO_DISPLAY_V1;
  5504. typedef enum _NV_PIXEL_SHIFT_TYPE
  5505. {
  5506. NV_PIXEL_SHIFT_TYPE_NO_PIXEL_SHIFT = 0, //!< No pixel shift will be applied to this display.
  5507. NV_PIXEL_SHIFT_TYPE_2x2_TOP_LEFT_PIXELS = 1, //!< This display will be used to scanout top left pixels in 2x2 PixelShift configuration
  5508. NV_PIXEL_SHIFT_TYPE_2x2_BOTTOM_RIGHT_PIXELS = 2, //!< This display will be used to scanout bottom right pixels in 2x2 PixelShift configuration
  5509. } NV_PIXEL_SHIFT_TYPE;
  5510. typedef struct _NV_MOSAIC_GRID_TOPO_DISPLAY_V2
  5511. {
  5512. NvU32 version; //!< Version of this structure
  5513. NvU32 displayId; //!< DisplayID of the display
  5514. NvS32 overlapX; //!< (+overlap, -gap)
  5515. NvS32 overlapY; //!< (+overlap, -gap)
  5516. NV_ROTATE rotation; //!< Rotation of display
  5517. NvU32 cloneGroup; //!< Reserved, must be 0
  5518. NV_PIXEL_SHIFT_TYPE pixelShiftType; //!< Type of the pixel shift enabled display
  5519. } NV_MOSAIC_GRID_TOPO_DISPLAY_V2;
  5520. #ifndef NV_MOSAIC_GRID_TOPO_DISPLAY_VER
  5521. typedef NV_MOSAIC_GRID_TOPO_DISPLAY_V1 NV_MOSAIC_GRID_TOPO_DISPLAY;
  5522. #endif
  5523. typedef struct _NV_MOSAIC_GRID_TOPO_V1
  5524. {
  5525. NvU32 version; //!< Version of this structure
  5526. NvU32 rows; //!< Number of rows
  5527. NvU32 columns; //!< Number of columns
  5528. NvU32 displayCount; //!< Number of display details
  5529. NvU32 applyWithBezelCorrect : 1; //!< When enabling and doing the modeset, do we switch to the bezel-corrected resolution
  5530. NvU32 immersiveGaming : 1; //!< Enable as immersive gaming instead of Mosaic SLI (for Quadro-boards only)
  5531. NvU32 baseMosaic : 1; //!< Enable as Base Mosaic (Panoramic) instead of Mosaic SLI (for NVS and Quadro-boards only)
  5532. NvU32 driverReloadAllowed : 1; //!< If necessary, reloading the driver is permitted (for Vista and above only). Will not be persisted. Value undefined on get.
  5533. 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.
  5534. NvU32 reserved : 27; //!< Reserved, must be 0
  5535. NV_MOSAIC_GRID_TOPO_DISPLAY_V1 displays[NV_MOSAIC_MAX_DISPLAYS]; //!< Displays are done as [(row * columns) + column]
  5536. NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings; //!< Display settings
  5537. } NV_MOSAIC_GRID_TOPO_V1;
  5538. typedef struct _NV_MOSAIC_GRID_TOPO_V2
  5539. {
  5540. NvU32 version; //!< Version of this structure
  5541. NvU32 rows; //!< Number of rows
  5542. NvU32 columns; //!< Number of columns
  5543. NvU32 displayCount; //!< Number of display details
  5544. NvU32 applyWithBezelCorrect : 1; //!< When enabling and doing the modeset, do we switch to the bezel-corrected resolution
  5545. NvU32 immersiveGaming : 1; //!< Enable as immersive gaming instead of Mosaic SLI (for Quadro-boards only)
  5546. NvU32 baseMosaic : 1; //!< Enable as Base Mosaic (Panoramic) instead of Mosaic SLI (for NVS and Quadro-boards only)
  5547. NvU32 driverReloadAllowed : 1; //!< If necessary, reloading the driver is permitted (for Vista and above only). Will not be persisted. Value undefined on get.
  5548. 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.
  5549. NvU32 pixelShift : 1; //!< Enable Pixel shift
  5550. NvU32 reserved : 26; //!< Reserved, must be 0
  5551. NV_MOSAIC_GRID_TOPO_DISPLAY_V2 displays[NV_MOSAIC_MAX_DISPLAYS]; //!< Displays are done as [(row * columns) + column]
  5552. NV_MOSAIC_DISPLAY_SETTING_V1 displaySettings; //!< Display settings
  5553. } NV_MOSAIC_GRID_TOPO_V2;
  5554. //! Macro for constructing the version field of ::NV_MOSAIC_GRID_TOPO
  5555. #define NV_MOSAIC_GRID_TOPO_VER1 MAKE_NVAPI_VERSION(NV_MOSAIC_GRID_TOPO_V1,1)
  5556. #define NV_MOSAIC_GRID_TOPO_VER2 MAKE_NVAPI_VERSION(NV_MOSAIC_GRID_TOPO_V2,2)
  5557. #ifndef NV_MOSAIC_GRID_TOPO_VER
  5558. typedef NV_MOSAIC_GRID_TOPO_V2 NV_MOSAIC_GRID_TOPO;
  5559. //! Macro for constructing the version field of ::NV_MOSAIC_GRID_TOPO
  5560. #define NV_MOSAIC_GRID_TOPO_VER NV_MOSAIC_GRID_TOPO_VER2
  5561. #endif
  5562. //! @}
  5563. //! since Release R290
  5564. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_DISPLAY_ON_INVALID_GPU NV_BIT(0)
  5565. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_DISPLAY_ON_WRONG_CONNECTOR NV_BIT(1)
  5566. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_COMMON_TIMINGS NV_BIT(2)
  5567. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_EDID_AVAILABLE NV_BIT(3)
  5568. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_MISMATCHED_OUTPUT_TYPE NV_BIT(4)
  5569. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_DISPLAY_CONNECTED NV_BIT(5)
  5570. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_GPU_TOPOLOGY NV_BIT(6)
  5571. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NOT_SUPPORTED NV_BIT(7)
  5572. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_NO_SLI_BRIDGE NV_BIT(8)
  5573. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_ECC_ENABLED NV_BIT(9)
  5574. #define NV_MOSAIC_DISPLAYCAPS_PROBLEM_GPU_TOPOLOGY_NOT_SUPPORTED NV_BIT(10)
  5575. ///////////////////////////////////////////////////////////////////////////////
  5576. //
  5577. // FUNCTION NAME: NvAPI_Mosaic_SetDisplayGrids
  5578. //
  5579. //! DESCRIPTION: Sets a new display topology, replacing any existing topologies
  5580. //! that use the same displays.
  5581. //!
  5582. //! This function will look for an SLI configuration that will
  5583. //! allow the display topology to work.
  5584. //!
  5585. //! To revert to a single display, specify that display as a 1x1
  5586. //! grid.
  5587. //!
  5588. //! SUPPORTED OS: Windows 7 and higher
  5589. //!
  5590. //!
  5591. //! \param [in] pGridTopologies The topology details to set.
  5592. //! \param [in] gridCount The number of elements in the pGridTopologies array.
  5593. //! \param [in] setTopoFlags Zero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_*
  5594. //! flags.
  5595. //!
  5596. //!
  5597. //! \retval ::NVAPI_OK Capabilities have been returned.
  5598. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
  5599. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
  5600. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
  5601. //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY No matching GPU topologies could be found.
  5602. //! \retval ::NVAPI_TOPO_NOT_POSSIBLE One or more of the display grids are not valid.
  5603. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  5604. //! \ingroup mosaicapi
  5605. ///////////////////////////////////////////////////////////////////////////////
  5606. //! Do not change the current GPU topology. If the NO_DRIVER_RELOAD bit is not
  5607. //! specified, then it may still require a driver reload.
  5608. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_CURRENT_GPU_TOPOLOGY NV_BIT(0)
  5609. //! Do not allow a driver reload. That is, stick with the same master GPU as well as the
  5610. //! same SLI configuration.
  5611. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_NO_DRIVER_RELOAD NV_BIT(1)
  5612. //! When choosing a GPU topology, choose the topology with the best performance.
  5613. //! Without this flag, it will choose the topology that uses the smallest number
  5614. //! of GPU's.
  5615. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_MAXIMIZE_PERFORMANCE NV_BIT(2)
  5616. //! Do not return an error if no configuration will work with all of the grids.
  5617. #define NV_MOSAIC_SETDISPLAYTOPO_FLAG_ALLOW_INVALID NV_BIT(3)
  5618. NVAPI_INTERFACE NvAPI_Mosaic_SetDisplayGrids(__in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __in NvU32 gridCount, __in NvU32 setTopoFlags);
  5619. //! \ingroup mosaicapi
  5620. //! Indicates that a display's position in the grid is sub-optimal.
  5621. #define NV_MOSAIC_DISPLAYTOPO_WARNING_DISPLAY_POSITION NV_BIT(0)
  5622. //! \ingroup mosaicapi
  5623. //! Indicates that SetDisplaySettings would need to perform a driver reload.
  5624. #define NV_MOSAIC_DISPLAYTOPO_WARNING_DRIVER_RELOAD_REQUIRED NV_BIT(1)
  5625. //! \ingroup mosaicapi
  5626. typedef struct
  5627. {
  5628. NvU32 version;
  5629. NvU32 errorFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYTOPO_ERROR_* flags.
  5630. NvU32 warningFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYTOPO_WARNING_* flags.
  5631. NvU32 displayCount; //!< (OUT) The number of valid entries in the displays array.
  5632. struct
  5633. {
  5634. NvU32 displayId; //!< (OUT) The DisplayID of this display.
  5635. NvU32 errorFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYCAPS_PROBLEM_* flags.
  5636. NvU32 warningFlags; //!< (OUT) Any of the NV_MOSAIC_DISPLAYTOPO_WARNING_* flags.
  5637. NvU32 supportsRotation : 1; //!< (OUT) This display can be rotated
  5638. NvU32 reserved : 31; //!< (OUT) reserved
  5639. } displays[NVAPI_MAX_DISPLAYS];
  5640. } NV_MOSAIC_DISPLAY_TOPO_STATUS;
  5641. //! \ingroup mosaicapi
  5642. #define NV_MOSAIC_DISPLAY_TOPO_STATUS_VER MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_TOPO_STATUS,1)
  5643. ///////////////////////////////////////////////////////////////////////////////
  5644. //
  5645. // FUNCTION NAME: NvAPI_Mosaic_ValidateDisplayGrids
  5646. //
  5647. //! DESCRIPTION: Determines if a list of grid topologies is valid. It will choose an SLI
  5648. //! configuration in the same way that NvAPI_Mosaic_SetDisplayGrids() does.
  5649. //!
  5650. //! On return, each element in the pTopoStatus array will contain any errors or
  5651. //! warnings about each grid topology. If any error flags are set, then the topology
  5652. //! is not valid. If any warning flags are set, then the topology is valid, but
  5653. //! sub-optimal.
  5654. //!
  5655. //! If the ALLOW_INVALID flag is set, then it will continue to validate the grids
  5656. //! even if no SLI configuration will allow all of the grids. In this case, a grid
  5657. //! grid with no matching GPU topology will have the error
  5658. //! flags NO_GPU_TOPOLOGY or NOT_SUPPORTED set.
  5659. //!
  5660. //! If the ALLOW_INVALID flag is not set and no matching SLI configuration is
  5661. //! found, then it will skip the rest of the validation and return
  5662. //! NVAPI_NO_ACTIVE_SLI_TOPOLOGY.
  5663. //!
  5664. //! SUPPORTED OS: Windows 7 and higher
  5665. //!
  5666. //!
  5667. //! \param [in] setTopoFlags Zero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_*
  5668. //! flags.
  5669. //! \param [in] pGridTopologies The array of grid topologies to verify.
  5670. //! \param [in,out] pTopoStatus The array of problems and warnings with each grid topology.
  5671. //! \param [in] gridCount The number of elements in the pGridTopologies and
  5672. //! pTopoStatus arrays.
  5673. //!
  5674. //!
  5675. //! \retval ::NVAPI_OK: Capabilities have been returned.
  5676. //! \retval ::NVAPI_INVALID_ARGUMENT: One or more args passed in are invalid.
  5677. //! \retval ::NVAPI_API_NOT_INTIALIZED: The NvAPI API needs to be initialized first
  5678. //! \retval ::NVAPI_NO_IMPLEMENTATION: This entrypoint not available
  5679. //! \retval ::NVAPI_NO_ACTIVE_SLI_TOPOLOGY: No matching GPU topologies could be found.
  5680. //! \retval ::NVAPI_ERROR: Miscellaneous error occurred
  5681. //!
  5682. //! \ingroup mosaicapi
  5683. ///////////////////////////////////////////////////////////////////////////////
  5684. NVAPI_INTERFACE NvAPI_Mosaic_ValidateDisplayGrids(__in NvU32 setTopoFlags,
  5685. __in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies,
  5686. __inout_ecount_full(gridCount) NV_MOSAIC_DISPLAY_TOPO_STATUS *pTopoStatus,
  5687. __in NvU32 gridCount);
  5688. ///////////////////////////////////////////////////////////////////////////////
  5689. //
  5690. // FUNCTION NAME: NvAPI_Mosaic_EnumDisplayModes
  5691. //
  5692. //! DESCRIPTION: Determines the set of available display modes for a given grid topology.
  5693. //!
  5694. //! SUPPORTED OS: Windows 7 and higher
  5695. //!
  5696. //!
  5697. //! \param [in] pGridTopology The grid topology to use.
  5698. //! \param [in,out] pDisplaySettings A pointer to an array of display settings to populate,
  5699. //! or NULL to find out the total number of available modes.
  5700. //! \param [in,out] pDisplayCount If pDisplaySettings is not NULL, then pDisplayCount
  5701. //! should point to the number of elements in the
  5702. //! pDisplaySettings array. On return, it will contain the
  5703. //! number of modes that were actually returned. If
  5704. //! pDisplaySettings is NULL, then pDisplayCount will receive
  5705. //! the total number of modes that are available.
  5706. //!
  5707. //!
  5708. //! \retval ::NVAPI_OK Capabilities have been returned.
  5709. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
  5710. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
  5711. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
  5712. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  5713. //!
  5714. //! \ingroup mosaciapi
  5715. ///////////////////////////////////////////////////////////////////////////////
  5716. NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayModes(__in NV_MOSAIC_GRID_TOPO *pGridTopology,
  5717. __inout_ecount_part_opt(*pDisplayCount, *pDisplayCount) NV_MOSAIC_DISPLAY_SETTING *pDisplaySettings,
  5718. __inout NvU32 *pDisplayCount);
  5719. //! SUPPORTED OS: Windows 7 and higher
  5720. //!
  5721. ///////////////////////////////////////////////////////////////////////////////
  5722. //
  5723. // FUNCTION NAME: NvAPI_Mosaic_EnumDisplayGrids
  5724. //
  5725. //! DESCRIPTION: Enumerates the current active grid topologies. This includes Mosaic, IG, and
  5726. //! Panoramic topologies, as well as single displays.
  5727. //!
  5728. //! If pGridTopologies is NULL, then pGridCount will be set to the number of active
  5729. //! grid topologies.
  5730. //!
  5731. //! If pGridTopologies is not NULL, then pGridCount contains the maximum number of
  5732. //! grid topologies to return. On return, pGridCount will be set to the number of
  5733. //! grid topologies that were returned.
  5734. //!
  5735. //! \param [out] pGridTopologies The list of active grid topologies.
  5736. //! \param [in,out] pGridCount A pointer to the number of grid topologies returned.
  5737. //!
  5738. //! \retval ::NVAPI_OK Capabilties have been returned.
  5739. //! \retval ::NVAPI_END_ENUMERATION There are no more topologies to return.
  5740. //! \retval ::NVAPI_INVALID_ARGUMENT One or more args passed in are invalid.
  5741. //! \retval ::NVAPI_API_NOT_INTIALIZED The NvAPI API needs to be initialized first
  5742. //! \retval ::NVAPI_NO_IMPLEMENTATION This entrypoint not available
  5743. //! \retval ::NVAPI_ERROR Miscellaneous error occurred
  5744. //!
  5745. //! \ingroup mosaicapi
  5746. ///////////////////////////////////////////////////////////////////////////////
  5747. NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayGrids(__inout_ecount_part_opt(*pGridCount, *pGridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies,
  5748. __inout NvU32 *pGridCount);
  5749. ////////////////////////////////////////////////////////////////////////////////////////
  5750. //
  5751. // ###########################################################################
  5752. // DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS
  5753. //
  5754. // Below is the Phase 1 Mosaic stuff, the Phase 2 stuff above is what will remain
  5755. // once Phase 2 is complete. For a small amount of time, the two will co-exist. As
  5756. // soon as apps (nvapichk, NvAPITestMosaic, and CPL) are updated to use the Phase 2
  5757. // entrypoints, the code below will be deleted.
  5758. //
  5759. // DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS - DELME_RUSS
  5760. // ###########################################################################
  5761. //
  5762. // Supported topos 1x4, 4x1 and 2x2 to start with.
  5763. //
  5764. // Selected scan out targets can be one per GPU or more than one on the same GPU.
  5765. //
  5766. // SAMPLE of MOSAIC 1x4 SCAN OUT TOPO with 8 pixel horizontal overlap
  5767. //
  5768. //+-------------------------++-------------------------++-------------------------++-------------------------+
  5769. //| || || || |
  5770. //| || || || |
  5771. //| || || || |
  5772. //| DVI1 || DVI2 || DVI3 || DVI4 |
  5773. //| || || || |
  5774. //| || || || |
  5775. //| || || || |
  5776. //| || || || |
  5777. //+-------------------------++-------------------------++-------------------------++-------------------------+
  5778. //! \addtogroup mosaicapi
  5779. //! @{
  5780. //! Used in NV_MOSAIC_TOPOLOGY.
  5781. #define NVAPI_MAX_MOSAIC_DISPLAY_ROWS 8
  5782. //! Used in NV_MOSAIC_TOPOLOGY.
  5783. #define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS 8
  5784. //! Used in NV_MOSAIC_TOPOLOGY.
  5785. #define NVAPI_MAX_MOSAIC_TOPOS 16
  5786. //! Used in NvAPI_GetCurrentMosaicTopology() and NvAPI_SetCurrentMosaicTopology().
  5787. typedef struct
  5788. {
  5789. NvU32 version; //!< Version number of the mosaic topology
  5790. NvU32 rowCount; //!< Horizontal display count
  5791. NvU32 colCount; //!< Vertical display count
  5792. struct
  5793. {
  5794. NvPhysicalGpuHandle hPhysicalGPU; //!< Physical GPU to be used in the topology
  5795. NvU32 displayOutputId; //!< Connected display target
  5796. NvS32 overlapX; //!< Pixels of overlap on the left of target: (+overlap, -gap)
  5797. NvS32 overlapY; //!< Pixels of overlap on the top of target: (+overlap, -gap)
  5798. } gpuLayout[NVAPI_MAX_MOSAIC_DISPLAY_ROWS][NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS];
  5799. } NV_MOSAIC_TOPOLOGY;
  5800. //! Used in NV_MOSAIC_TOPOLOGY.
  5801. #define NVAPI_MOSAIC_TOPOLOGY_VER MAKE_NVAPI_VERSION(NV_MOSAIC_TOPOLOGY,1)
  5802. //! Used in NvAPI_GetSupportedMosaicTopologies().
  5803. typedef struct
  5804. {
  5805. NvU32 version;
  5806. NvU32 totalCount; //!< Count of valid topologies
  5807. NV_MOSAIC_TOPOLOGY topos[NVAPI_MAX_MOSAIC_TOPOS]; //!< Maximum number of topologies
  5808. } NV_MOSAIC_SUPPORTED_TOPOLOGIES;
  5809. //! Used in NV_MOSAIC_SUPPORTED_TOPOLOGIES.
  5810. #define NVAPI_MOSAIC_SUPPORTED_TOPOLOGIES_VER MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPOLOGIES,1)
  5811. //!@}
  5812. ///////////////////////////////////////////////////////////////////////////////
  5813. //
  5814. // FUNCTION NAME: NvAPI_GetSupportedMosaicTopologies
  5815. //
  5816. //! DESCRIPTION: This API returns all valid Mosaic topologies.
  5817. //!
  5818. //! SUPPORTED OS: Windows XP
  5819. //!
  5820. //!
  5821. //! \since Release: 177
  5822. //!
  5823. //! \param [out] pMosaicTopos An array of valid Mosaic topologies.
  5824. //!
  5825. //! \retval NVAPI_OK Call succeeded; 1 or more topologies were returned
  5826. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  5827. //! \retval NVAPI_MIXED_TARGET_TYPES Mosaic topology is only possible with all targets of the same NV_GPU_OUTPUT_TYPE.
  5828. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  5829. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  5830. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  5831. //!
  5832. //! \ingroup mosaicapi
  5833. ///////////////////////////////////////////////////////////////////////////////
  5834. NVAPI_INTERFACE NvAPI_GetSupportedMosaicTopologies(NV_MOSAIC_SUPPORTED_TOPOLOGIES *pMosaicTopos);
  5835. ///////////////////////////////////////////////////////////////////////////////
  5836. //
  5837. // FUNCTION NAME: NvAPI_GetCurrentMosaicTopology
  5838. //
  5839. //! DESCRIPTION: This API gets the current Mosaic topology.
  5840. //!
  5841. //! SUPPORTED OS: Windows XP
  5842. //!
  5843. //!
  5844. //! \since Release: 177
  5845. //!
  5846. //! \param [out] pMosaicTopo The current Mosaic topology
  5847. //! \param [out] pEnabled TRUE if returned topology is currently enabled, else FALSE
  5848. //!
  5849. //! \retval NVAPI_OK Call succeeded
  5850. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  5851. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  5852. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  5853. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  5854. //!
  5855. //! \ingroup mosaicapi
  5856. ///////////////////////////////////////////////////////////////////////////////
  5857. NVAPI_INTERFACE NvAPI_GetCurrentMosaicTopology(NV_MOSAIC_TOPOLOGY *pMosaicTopo, NvU32 *pEnabled);
  5858. ///////////////////////////////////////////////////////////////////////////////
  5859. //
  5860. // FUNCTION NAME: NvAPI_SetCurrentMosaicTopology
  5861. //
  5862. //! DESCRIPTION: This API sets the Mosaic topology, and enables it so that the
  5863. //! Mosaic display settings are enumerated upon request.
  5864. //!
  5865. //! SUPPORTED OS: Windows XP
  5866. //!
  5867. //!
  5868. //! \since Release: 177
  5869. //!
  5870. //! \param [in] pMosaicTopo A valid Mosaic topology
  5871. //!
  5872. //! \retval NVAPI_OK Call succeeded
  5873. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  5874. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  5875. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  5876. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  5877. //!
  5878. //! \ingroup mosaicapi
  5879. ///////////////////////////////////////////////////////////////////////////////
  5880. NVAPI_INTERFACE NvAPI_SetCurrentMosaicTopology(NV_MOSAIC_TOPOLOGY *pMosaicTopo);
  5881. ///////////////////////////////////////////////////////////////////////////////
  5882. //
  5883. // FUNCTION NAME: NvAPI_EnableCurrentMosaicTopology
  5884. //
  5885. //! DESCRIPTION: This API enables or disables the current Mosaic topology.
  5886. //! When enabling, the last Mosaic topology will be set.
  5887. //!
  5888. //! - If enabled, enumeration of display settings will include valid Mosaic resolutions.
  5889. //! - If disabled, enumeration of display settings will not include Mosaic resolutions.
  5890. //!
  5891. //! SUPPORTED OS: Windows XP
  5892. //!
  5893. //!
  5894. //! \since Release: 177
  5895. //!
  5896. //! \param [in] enable TRUE to enable the Mosaic Topology, FALSE to disable it.
  5897. //!
  5898. //! \retval NVAPI_OK Call succeeded
  5899. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid
  5900. //! \retval NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found
  5901. //! \retval NVAPI_NOT_SUPPORTED Mosaic is not supported with GPUs on this system.
  5902. //! \retval NVAPI_NO_ACTIVE_SLI_TOPOLOGY SLI is not enabled, yet needs to be, in order for this function to succeed.
  5903. //!
  5904. //! \ingroup mosaicapi
  5905. ///////////////////////////////////////////////////////////////////////////////
  5906. NVAPI_INTERFACE NvAPI_EnableCurrentMosaicTopology(NvU32 enable);
  5907. #define NVAPI_MAX_GSYNC_DEVICES 4
  5908. // Sync Display APIs
  5909. ///////////////////////////////////////////////////////////////////////////////
  5910. //
  5911. // FUNCTION NAME: NvAPI_GSync_EnumSyncDevices
  5912. //
  5913. //! DESCRIPTION: This API returns an array of Sync device handles. A Sync device handle represents a
  5914. //! single Sync device on the system.
  5915. //!
  5916. //! SUPPORTED OS: Windows 7 and higher
  5917. //!
  5918. //!
  5919. //! \since Release: 313
  5920. //!
  5921. //! \param [out] nvGSyncHandles- The caller provides an array of handles, which must contain at least
  5922. //! NVAPI_MAX_GSYNC_DEVICES elements. The API will zero out the entire array and then fill in one
  5923. //! or more handles. If an error occurs, the array is invalid.
  5924. //! \param [out] *gsyncCount- The caller provides the storage space. NvAPI_GSync_EnumSyncDevices
  5925. //! sets *gsyncCount to indicate how many of the elements in the nvGSyncHandles[] array are valid.
  5926. //! If an error occurs, *gsyncCount will be set to zero.
  5927. //!
  5928. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  5929. //! If there are return error codes with specific meaning for this API, they are listed below.
  5930. //! \retval ::NVAPI_INVALID_ARGUMENT nvGSyncHandles or gsyncCount is NULL.
  5931. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device.
  5932. //!
  5933. //! \ingroup gsyncapi
  5934. ///////////////////////////////////////////////////////////////////////////////
  5935. NVAPI_INTERFACE NvAPI_GSync_EnumSyncDevices(__out NvGSyncDeviceHandle nvGSyncHandles[NVAPI_MAX_GSYNC_DEVICES], __out NvU32 *gsyncCount);
  5936. // GSync boardId values
  5937. #define NVAPI_GSYNC_BOARD_ID_P358 856 //!< GSync board ID 0x358, see NV_GSYNC_CAPABILITIES
  5938. #define NVAPI_GSYNC_BOARD_ID_P2060 8288 //!< GSync board ID 0x2060, see NV_GSYNC_CAPABILITIES
  5939. //! Used in NvAPI_GSync_QueryCapabilities().
  5940. typedef struct _NV_GSYNC_CAPABILITIES_V1
  5941. {
  5942. NvU32 version; //!< Version of the structure
  5943. NvU32 boardId; //!< Board ID
  5944. NvU32 revision; //!< FPGA Revision
  5945. NvU32 capFlags; //!< Capabilities of the Sync board. Reserved for future use
  5946. } NV_GSYNC_CAPABILITIES_V1;
  5947. typedef NV_GSYNC_CAPABILITIES_V1 NV_GSYNC_CAPABILITIES;
  5948. //! \ingroup gsyncapi
  5949. //! Macro for constructing the version field of NV_GSYNC_CAPABILITIES.
  5950. #define NV_GSYNC_CAPABILITIES_VER1 MAKE_NVAPI_VERSION(NV_GSYNC_CAPABILITIES_V1,1)
  5951. #define NV_GSYNC_CAPABILITIES_VER NV_GSYNC_CAPABILITIES_VER1
  5952. ///////////////////////////////////////////////////////////////////////////////
  5953. //
  5954. // FUNCTION NAME: NvAPI_GSync_QueryCapabilities
  5955. //
  5956. //! DESCRIPTION: This API returns the capabilities of the Sync device.
  5957. //!
  5958. //!
  5959. //! SUPPORTED OS: Windows 7 and higher
  5960. //!
  5961. //!
  5962. //! \since Release: 313
  5963. //!
  5964. //! \param [in] hNvGSyncDevice- The handle for a Sync device for which the capabilities will be queried.
  5965. //! \param [inout] *pNvGSyncCapabilities- The caller provides the storage space. NvAPI_GSync_QueryCapabilities() sets
  5966. //! *pNvGSyncCapabilities to the version and capabilities details of the Sync device
  5967. //! If an error occurs, *pNvGSyncCapabilities will be set to NULL.
  5968. //!
  5969. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  5970. //! If there are return error codes with specific meaning for this API, they are listed below.
  5971. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL.
  5972. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device.
  5973. //!
  5974. //! \ingroup gsyncapi
  5975. ///////////////////////////////////////////////////////////////////////////////
  5976. NVAPI_INTERFACE NvAPI_GSync_QueryCapabilities(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CAPABILITIES *pNvGSyncCapabilities);
  5977. //! Connector values for a GPU. Used in NV_GSYNC_GPU.
  5978. typedef enum _NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR
  5979. {
  5980. NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_NONE = 0,
  5981. NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_PRIMARY = 1,
  5982. NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_SECONDARY = 2,
  5983. NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_TERTIARY = 3,
  5984. NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR_QUARTERNARY = 4,
  5985. } NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR;
  5986. //! Display sync states. Used in NV_GSYNC_DISPLAY.
  5987. typedef enum _NVAPI_GSYNC_DISPLAY_SYNC_STATE
  5988. {
  5989. NVAPI_GSYNC_DISPLAY_SYNC_STATE_UNSYNCED = 0,
  5990. NVAPI_GSYNC_DISPLAY_SYNC_STATE_SLAVE = 1,
  5991. NVAPI_GSYNC_DISPLAY_SYNC_STATE_MASTER = 2,
  5992. } NVAPI_GSYNC_DISPLAY_SYNC_STATE;
  5993. typedef struct _NV_GSYNC_GPU
  5994. {
  5995. NvU32 version; //!< Version of the structure
  5996. NvPhysicalGpuHandle hPhysicalGpu; //!< GPU handle
  5997. NVAPI_GSYNC_GPU_TOPOLOGY_CONNECTOR connector; //!< Indicates which connector on the device the GPU is connected to.
  5998. NvPhysicalGpuHandle hProxyPhysicalGpu; //!< GPU through which hPhysicalGpu is connected to the Sync device (if not directly connected)
  5999. //!< - this is NULL otherwise
  6000. NvU32 isSynced : 1; //!< Whether this GPU is sync'd or not.
  6001. NvU32 reserved : 31; //!< Should be set to ZERO
  6002. } NV_GSYNC_GPU;
  6003. typedef struct _NV_GSYNC_DISPLAY
  6004. {
  6005. NvU32 version; //!< Version of the structure
  6006. NvU32 displayId; //!< display identifier for displays.The GPU to which it is connected, can be retireved from NvAPI_SYS_GetPhysicalGpuFromDisplayId
  6007. NvU32 isMasterable : 1; //!< Can this display be the master? (Read only)
  6008. NvU32 reserved : 31; //!< Should be set to ZERO
  6009. NVAPI_GSYNC_DISPLAY_SYNC_STATE syncState; //!< Is this display slave/master
  6010. //!< (Retrieved with topology or set by caller for enable/disable sync)
  6011. } NV_GSYNC_DISPLAY;
  6012. #define NV_GSYNC_DISPLAY_VER MAKE_NVAPI_VERSION(NV_GSYNC_DISPLAY,1)
  6013. #define NV_GSYNC_GPU_VER MAKE_NVAPI_VERSION(NV_GSYNC_GPU,1)
  6014. ///////////////////////////////////////////////////////////////////////////////
  6015. //
  6016. // FUNCTION NAME: NvAPI_GSync_GetTopology
  6017. //
  6018. //! DESCRIPTION: This API returns the topology for the specified Sync device.
  6019. //!
  6020. //!
  6021. //! SUPPORTED OS: Windows 7 and higher
  6022. //!
  6023. //!
  6024. //! \since Release: 313
  6025. //!
  6026. //! \param [in] hNvGSyncDevice- The caller provides the handle for a Sync device for which the topology will be queried.
  6027. //! \param [in, out] gsyncGpuCount- It returns number of GPUs connected to Sync device
  6028. //! \param [in, out] gsyncGPUs- It returns info about GPUs connected to Sync device
  6029. //! \param [in, out] gsyncDisplayCount- It returns number of active displays that belongs to Sync device
  6030. //! \param [in, out] gsyncDisplays- It returns info about all active displays that belongs to Sync device
  6031. //!
  6032. //! HOW TO USE: 1) make a call to get the number of GPUs connected OR displays synced through Sync device
  6033. //! by passing the gsyncGPUs OR gsyncDisplays as NULL respectively. Both gsyncGpuCount and gsyncDisplayCount can be retrieved in same call by passing
  6034. //! both gsyncGPUs and gsyncDisplays as NULL
  6035. //! On call success:
  6036. //! 2) Allocate memory based on gsyncGpuCount(for gsyncGPUs) and/or gsyncDisplayCount(for gsyncDisplays) then make a call to populate gsyncGPUs and/or gsyncDisplays respectively.
  6037. //!
  6038. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6039. //! If there are return error codes with specific meaning for this API, they are listed below.
  6040. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL.
  6041. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device.
  6042. //! \retval ::NVAPI_INSUFFICIENT_BUFFER When the actual number of GPUs/displays in the topology exceed the number of elements allocated for SyncGPUs/SyncDisplays respectively.
  6043. //!
  6044. //! \ingroup gsyncapi
  6045. ///////////////////////////////////////////////////////////////////////////////
  6046. NVAPI_INTERFACE NvAPI_GSync_GetTopology(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout_opt NvU32 *gsyncGpuCount, __inout_ecount_part_opt(*gsyncGpuCount, *gsyncGpuCount) NV_GSYNC_GPU *gsyncGPUs,
  6047. __inout_opt NvU32 *gsyncDisplayCount, __inout_ecount_part_opt(*gsyncDisplayCount, *gsyncDisplayCount) NV_GSYNC_DISPLAY *gsyncDisplays);
  6048. ///////////////////////////////////////////////////////////////////////////////
  6049. //
  6050. // FUNCTION NAME: NvAPI_GSync_SetSyncStateSettings
  6051. //
  6052. //! DESCRIPTION: Sets a new sync state for the displays in system.
  6053. //!
  6054. //!
  6055. //! SUPPORTED OS: Windows 7 and higher
  6056. //!
  6057. //!
  6058. //! \since Release: 313
  6059. //!
  6060. //! \param [in] gsyncDisplayCount- The number of displays in gsyncDisplays.
  6061. //! \param [in] pGsyncDisplays- The caller provides the structure containing all displays that need to be synchronized in the system.
  6062. //! The displays that are not part of pGsyncDisplays, will be un-synchronized.
  6063. //! \param [in] flags- Reserved for future use.
  6064. //!
  6065. //!
  6066. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6067. //! If there are return error codes with specific meaning for this API, they are listed below.
  6068. //!
  6069. //! \retval ::NVAPI_INVALID_ARGUMENT If the display topology or count not valid.
  6070. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device.
  6071. //! \retval ::NVAPI_INVALID_SYNC_TOPOLOGY 1.If any mosaic grid is partial.
  6072. //! 2.If timing(HVisible/VVisible/refreshRate) applied of any display is different.
  6073. //! 3.If There is a across GPU mosaic grid in system and that is not a part of pGsyncDisplays.
  6074. //!
  6075. //! \ingroup gsyncapi
  6076. ///////////////////////////////////////////////////////////////////////////////
  6077. NVAPI_INTERFACE NvAPI_GSync_SetSyncStateSettings(__in NvU32 gsyncDisplayCount, __in_ecount(gsyncDisplayCount) NV_GSYNC_DISPLAY *pGsyncDisplays, __in NvU32 flags);
  6078. //! \ingroup gsyncapi
  6079. //! Source signal edge to be used for output pulse. See NV_GSYNC_CONTROL_PARAMS.
  6080. typedef enum _NVAPI_GSYNC_POLARITY
  6081. {
  6082. NVAPI_GSYNC_POLARITY_RISING_EDGE = 0,
  6083. NVAPI_GSYNC_POLARITY_FALLING_EDGE = 1,
  6084. NVAPI_GSYNC_POLARITY_BOTH_EDGES = 2,
  6085. } NVAPI_GSYNC_POLARITY;
  6086. //! Used in NV_GSYNC_CONTROL_PARAMS.
  6087. typedef enum _NVAPI_GSYNC_VIDEO_MODE
  6088. {
  6089. NVAPI_GSYNC_VIDEO_MODE_NONE = 0,
  6090. NVAPI_GSYNC_VIDEO_MODE_TTL = 1,
  6091. NVAPI_GSYNC_VIDEO_MODE_NTSCPALSECAM = 2,
  6092. NVAPI_GSYNC_VIDEO_MODE_HDTV = 3,
  6093. NVAPI_GSYNC_VIDEO_MODE_COMPOSITE = 4,
  6094. } NVAPI_GSYNC_VIDEO_MODE;
  6095. //! Used in NV_GSYNC_CONTROL_PARAMS.
  6096. typedef enum _NVAPI_GSYNC_SYNC_SOURCE
  6097. {
  6098. NVAPI_GSYNC_SYNC_SOURCE_VSYNC = 0,
  6099. NVAPI_GSYNC_SYNC_SOURCE_HOUSESYNC = 1,
  6100. } NVAPI_GSYNC_SYNC_SOURCE;
  6101. //! Used in NV_GSYNC_CONTROL_PARAMS.
  6102. typedef struct _NV_GSYNC_DELAY
  6103. {
  6104. NvU32 version; //!< Version of the structure
  6105. NvU32 numLines; //!< delay to be induced in number of horizontal lines.
  6106. NvU32 numPixels; //!< delay to be induced in number of pixels.
  6107. NvU32 maxLines; //!< maximum number of lines supported at current display mode to induce delay. Updated by NvAPI_GSync_GetControlParameters(). Read only.
  6108. NvU32 minPixels; //!< minimum number of pixels required at current display mode to induce delay. Updated by NvAPI_GSync_GetControlParameters(). Read only.
  6109. } NV_GSYNC_DELAY;
  6110. #define NV_GSYNC_DELAY_VER MAKE_NVAPI_VERSION(NV_GSYNC_DELAY,1)
  6111. //! Used in NvAPI_GSync_GetControlParameters() and NvAPI_GSync_SetControlParameters().
  6112. typedef struct _NV_GSYNC_CONTROL_PARAMS
  6113. {
  6114. NvU32 version; //!< Version of the structure
  6115. NVAPI_GSYNC_POLARITY polarity; //!< Leading edge / Falling edge / both
  6116. NVAPI_GSYNC_VIDEO_MODE vmode; //!< None, TTL, NTSCPALSECAM, HDTV
  6117. NvU32 interval; //!< Number of pulses to wait between framelock signal generation
  6118. NVAPI_GSYNC_SYNC_SOURCE source; //!< VSync/House sync
  6119. NvU32 interlaceMode:1; //!< interlace mode for a Sync device
  6120. NvU32 reserved:31; //!< should be set zero
  6121. NV_GSYNC_DELAY syncSkew; //!< The time delay between the frame sync signal and the GPUs signal.
  6122. NV_GSYNC_DELAY startupDelay; //!< Sync start delay for master.
  6123. } NV_GSYNC_CONTROL_PARAMS;
  6124. #define NV_GSYNC_CONTROL_PARAMS_VER MAKE_NVAPI_VERSION(NV_GSYNC_CONTROL_PARAMS,1)
  6125. ///////////////////////////////////////////////////////////////////////////////
  6126. //
  6127. // FUNCTION NAME: NvAPI_GSync_GetControlParameters
  6128. //
  6129. //! DESCRIPTION: This API queries for sync control parameters as defined in NV_GSYNC_CONTROL_PARAMS.
  6130. //!
  6131. //! SUPPORTED OS: Windows 7 and higher
  6132. //!
  6133. //!
  6134. //! \since Release: 313
  6135. //!
  6136. //! \param [in] hNvGSyncDevice- The caller provides the handle of the Sync device for which to get parameters
  6137. //! \param [inout] *pGsyncControls- The caller provides the storage space. NvAPI_GSync_GetControlParameters() populates *pGsyncControls with values.
  6138. //!
  6139. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6140. //! If there are return error codes with specific meaning for this API, they are listed below.
  6141. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL.
  6142. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device.
  6143. //!
  6144. //! \ingroup gsyncapi
  6145. ///////////////////////////////////////////////////////////////////////////////
  6146. NVAPI_INTERFACE NvAPI_GSync_GetControlParameters(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CONTROL_PARAMS *pGsyncControls);
  6147. //////////////////////////////////////////////////////////////////////////////
  6148. //
  6149. // FUNCTION NAME: NvAPI_GSync_SetControlParameters
  6150. //
  6151. //! DESCRIPTION: This API sets control parameters as defined in NV_SYNC_CONTROL_PARAMS.
  6152. //!
  6153. //! SUPPORTED OS: Windows 7 and higher
  6154. //!
  6155. //!
  6156. //! \since Release: 313
  6157. //!
  6158. //! \param [in] hNvGSyncDevice- The caller provides the handle of the Sync device for which to get parameters
  6159. //! \param [inout] *pGsyncControls- The caller provides NV_GSYNC_CONTROL_PARAMS. skew and startDelay will be updated to the applied values.
  6160. //!
  6161. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6162. //! If there are return error codes with specific meaning for this API, they are listed below.
  6163. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL.
  6164. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any Sync Device.
  6165. //! \retval ::NVAPI_SYNC_MASTER_NOT_FOUND Control Parameters can only be set if there is a Sync Master enabled on the Gsync card.
  6166. //!
  6167. //! \ingroup gsyncapi
  6168. ///////////////////////////////////////////////////////////////////////////////
  6169. NVAPI_INTERFACE NvAPI_GSync_SetControlParameters(__in NvGSyncDeviceHandle hNvGSyncDevice, __inout NV_GSYNC_CONTROL_PARAMS *pGsyncControls);
  6170. //! Used in NvAPI_GSync_AdjustSyncDelay()
  6171. typedef enum _NVAPI_GSYNC_DELAY_TYPE
  6172. {
  6173. NVAPI_GSYNC_DELAY_TYPE_UNKNOWN = 0,
  6174. NVAPI_GSYNC_DELAY_TYPE_SYNC_SKEW = 1,
  6175. NVAPI_GSYNC_DELAY_TYPE_STARTUP = 2
  6176. } NVAPI_GSYNC_DELAY_TYPE;
  6177. //////////////////////////////////////////////////////////////////////////////
  6178. //
  6179. // FUNCTION NAME: NvAPI_GSync_AdjustSyncDelay
  6180. //
  6181. //! DESCRIPTION: This API adjusts the skew and startDelay to the closest possible values. Use this API before calling NvAPI_GSync_SetControlParameters for skew or startDelay.
  6182. //!
  6183. //! SUPPORTED OS: Windows 7 and higher
  6184. //!
  6185. //!
  6186. //! \since Release: 319
  6187. //!
  6188. //! \param [in] hNvGSyncDevice- The caller provides the handle of the Sync device for which to get parameters
  6189. //! \param [in] delayType- Specifies whether the delay is syncSkew or startupDelay.
  6190. //! \param [inout] *pGsyncDelay- The caller provides NV_GSYNC_DELAY. skew and startDelay will be adjusted and updated to the closest values.
  6191. //! \param [out] *syncSteps- This parameter is optional. It returns the sync delay in unit steps. If 0, it means either the NV_GSYNC_DELAY::numPixels is less than NV_GSYNC_DELAY::minPixels or NV_GSYNC_DELAY::numOfLines exceeds the NV_GSYNC_DELAY::maxLines.
  6192. //!
  6193. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6194. //! If there are return error codes with specific meaning for this API, they are listed below.
  6195. //!
  6196. //! \ingroup gsyncapi
  6197. ///////////////////////////////////////////////////////////////////////////////
  6198. NVAPI_INTERFACE NvAPI_GSync_AdjustSyncDelay(__in NvGSyncDeviceHandle hNvGSyncDevice, __in NVAPI_GSYNC_DELAY_TYPE delayType, __inout NV_GSYNC_DELAY *pGsyncDelay, __out_opt NvU32* syncSteps);
  6199. //! Used in NvAPI_GSync_GetSyncStatus().
  6200. typedef struct _NV_GSYNC_STATUS
  6201. {
  6202. NvU32 version; //!< Version of the structure
  6203. NvU32 bIsSynced; //!< Is timing in sync?
  6204. NvU32 bIsStereoSynced; //!< Does the phase of the timing signal from the GPU = the phase of the master sync signal?
  6205. NvU32 bIsSyncSignalAvailable; //!< Is the sync signal available?
  6206. } NV_GSYNC_STATUS;
  6207. //! Macro for constructing the version field for NV_GSYNC_STATUS.
  6208. #define NV_GSYNC_STATUS_VER MAKE_NVAPI_VERSION(NV_GSYNC_STATUS,1)
  6209. ///////////////////////////////////////////////////////////////////////////////
  6210. //
  6211. // FUNCTION NAME: NvAPI_GSync_GetSyncStatus
  6212. //
  6213. //! DESCRIPTION: This API queries the sync status of a GPU - timing, stereosync and sync signal availability.
  6214. //!
  6215. //! SUPPORTED OS: Windows 7 and higher
  6216. //!
  6217. //!
  6218. //! \since Release: 313
  6219. //!
  6220. //! \param [in] hNvGSyncDevice- Handle of the Sync device
  6221. //! \param [in] hPhysicalGpu- GPU to be queried for sync status.
  6222. //! \param [out] *status- The caller provides the storage space. NvAPI_GSync_GetSyncStatus() populates *status with
  6223. //! values - timing, stereosync and signal availability. On error, *status is set to NULL.
  6224. //!
  6225. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6226. //! If there are return error codes with specific meaning for this API, they are listed below.
  6227. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL / SyncTarget is NULL.
  6228. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any G-Sync Device.
  6229. //!
  6230. //! \ingroup gsyncapi
  6231. ///////////////////////////////////////////////////////////////////////////////
  6232. NVAPI_INTERFACE NvAPI_GSync_GetSyncStatus(__in NvGSyncDeviceHandle hNvGSyncDevice, __in NvPhysicalGpuHandle hPhysicalGpu, __inout NV_GSYNC_STATUS *status);
  6233. //! \ingroup gsyncapi
  6234. #define NVAPI_MAX_RJ45_PER_GSYNC 2
  6235. //! Used in NV_GSYNC_STATUS_PARAMS.
  6236. typedef enum _NVAPI_GSYNC_RJ45_IO
  6237. {
  6238. NVAPI_GSYNC_RJ45_OUTPUT = 0,
  6239. NVAPI_GSYNC_RJ45_INPUT = 1,
  6240. NVAPI_GSYNC_RJ45_UNUSED = 2 //!< This field is used to notify that the framelock is not actually present.
  6241. } NVAPI_GSYNC_RJ45_IO;
  6242. //! \ingroup gsyncapi
  6243. //! Used in NvAPI_GSync_GetStatusParameters().
  6244. typedef struct _NV_GSYNC_STATUS_PARAMS
  6245. {
  6246. NvU32 version;
  6247. NvU32 refreshRate; //!< The refresh rate
  6248. NVAPI_GSYNC_RJ45_IO RJ45_IO[NVAPI_MAX_RJ45_PER_GSYNC]; //!< Configured as input / output
  6249. NvU32 RJ45_Ethernet[NVAPI_MAX_RJ45_PER_GSYNC]; //!< Connected to ethernet hub? [ERRONEOUSLY CONNECTED!]
  6250. NvU32 houseSyncIncoming; //!< Incoming house sync frequency in Hz
  6251. NvU32 bHouseSync; //!< Is house sync connected?
  6252. } NV_GSYNC_STATUS_PARAMS;
  6253. //! \ingroup gsyncapi
  6254. //! Macro for constructing the version field of NV_GSYNC_STATUS_PARAMS
  6255. #define NV_GSYNC_STATUS_PARAMS_VER MAKE_NVAPI_VERSION(NV_GSYNC_STATUS_PARAMS,1)
  6256. ///////////////////////////////////////////////////////////////////////////////
  6257. //
  6258. // FUNCTION NAME: NvAPI_GSync_GetStatusParameters
  6259. //
  6260. //! DESCRIPTION: This API queries for sync status parameters as defined in NV_GSYNC_STATUS_PARAMS.
  6261. //!
  6262. //! SUPPORTED OS: Windows XP and higher
  6263. //!
  6264. //!
  6265. //! \since Release: 313
  6266. //!
  6267. //! \param [in] hNvGSyncDevice The caller provides the handle of the GSync device for which to get parameters
  6268. //! \param [out] *pStatusParams The caller provides the storage space. NvAPI_GSync_GetStatusParameters populates *pStatusParams with
  6269. //! values.
  6270. //!
  6271. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6272. //! If there are return error codes with specific meaning for this API, they are listed below.
  6273. //! \retval ::NVAPI_INVALID_ARGUMENT hNvGSyncDevice is NULL / pStatusParams is NULL.
  6274. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND The queried Graphics system does not have any GSync Device.
  6275. //!
  6276. //! \ingroup gsyncapi
  6277. ///////////////////////////////////////////////////////////////////////////////
  6278. NVAPI_INTERFACE NvAPI_GSync_GetStatusParameters(NvGSyncDeviceHandle hNvGSyncDevice, NV_GSYNC_STATUS_PARAMS *pStatusParams);
  6279. //! @}
  6280. #if defined(_D3D9_H_)
  6281. ///////////////////////////////////////////////////////////////////////////////
  6282. //
  6283. // FUNCTION NAME: NvAPI_D3D9_RegisterResource
  6284. //
  6285. //! DESCRIPTION: This API binds a resource (surface/texture) so that it can be retrieved
  6286. //! internally by NVAPI.
  6287. //!
  6288. //! SUPPORTED OS: Windows XP and higher
  6289. //!
  6290. //! \param [in] pResource surface/texture
  6291. //!
  6292. //! \return ::NVAPI_OK, ::NVAPI_ERROR
  6293. //!
  6294. //! \ingroup dx
  6295. ///////////////////////////////////////////////////////////////////////////////
  6296. NVAPI_INTERFACE NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResource);
  6297. #endif //defined(_D3D9_H_)
  6298. #if defined(_D3D9_H_)
  6299. ///////////////////////////////////////////////////////////////////////////////
  6300. //
  6301. // FUNCTION NAME: NvAPI_D3D9_UnregisterResource
  6302. //
  6303. //! DESCRIPTION: This API unbinds a resource (surface/texture) after use.
  6304. //!
  6305. //! SUPPORTED OS: Windows XP and higher
  6306. //!
  6307. //!
  6308. //! \param [in] pResource surface/texture
  6309. //!
  6310. //! \return ::NVAPI_OK, ::NVAPI_ERROR
  6311. //!
  6312. //! \ingroup dx
  6313. ///////////////////////////////////////////////////////////////////////////////
  6314. NVAPI_INTERFACE NvAPI_D3D9_UnregisterResource(IDirect3DResource9* pResource);
  6315. #endif //defined(_D3D9_H_)
  6316. #if defined(_D3D9_H_)
  6317. ///////////////////////////////////////////////////////////////////////////////
  6318. //
  6319. // FUNCTION NAME: NvAPI_D3D9_AliasSurfaceAsTexture
  6320. //
  6321. //! \fn NvAPI_D3D9_AliasSurfaceAsTexture(IDirect3DDevice9* pDev,
  6322. //! IDirect3DSurface9* pSurface,
  6323. //! IDirect3DTexture9 **ppTexture,
  6324. //! DWORD dwFlag);
  6325. //! DESCRIPTION: Create a texture that is an alias of a surface registered with NvAPI. The
  6326. //! new texture can be bound with IDirect3DDevice9::SetTexture(). Note that the texture must
  6327. //! be unbound before drawing to the surface again.
  6328. //! Unless the USE_SUPER flag is passed, MSAA surfaces will be resolved before
  6329. //! being used as a texture. MSAA depth buffers are resolved with a point filter,
  6330. //! and non-depth MSAA surfaces are resolved with a linear filter.
  6331. //!
  6332. //! SUPPORTED OS: Windows XP and higher
  6333. //!
  6334. //!
  6335. //! \param [in] pDev The D3D device that owns the objects
  6336. //! \param [in] pSurface Pointer to a surface that has been registered with NvAPI
  6337. //! to which a texture alias is to be provided
  6338. //! \param [out] ppTexture Fill with the texture created
  6339. //! \param [in] dwFlag NVAPI_ALIAS_SURFACE_FLAG to describe how to handle the texture
  6340. //!
  6341. //! \retval ::NVAPI_OK completed request
  6342. //! \retval ::NVAPI_INVALID_POINTER A null pointer was passed as an argument
  6343. //! \retval ::NVAPI_INVALID_ARGUMENT One of the arguments was invalid, probably dwFlag.
  6344. //! \retval ::NVAPI_UNREGISTERED_RESOURCE pSurface has not been registered with NvAPI
  6345. //! \retval ::NVAPI_ERROR error occurred
  6346. //
  6347. ///////////////////////////////////////////////////////////////////////////////
  6348. //! \ingroup dx
  6349. //! See NvAPI_D3D9_AliasSurfaceAsTexture().
  6350. typedef enum {
  6351. NVAPI_ALIAS_SURFACE_FLAG_NONE = 0x00000000,
  6352. 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.)
  6353. NVAPI_ALIAS_SURFACE_FLAG_MASK = 0x00000001
  6354. } NVAPI_ALIAS_SURFACE_FLAG;
  6355. //! \ingroup dx
  6356. NVAPI_INTERFACE NvAPI_D3D9_AliasSurfaceAsTexture(IDirect3DDevice9* pDev,
  6357. IDirect3DSurface9* pSurface,
  6358. IDirect3DTexture9 **ppTexture,
  6359. DWORD dwFlag);
  6360. #endif //defined(_D3D9_H_)
  6361. #if defined(_D3D9_H_)
  6362. ///////////////////////////////////////////////////////////////////////////////
  6363. //
  6364. // FUNCTION NAME: NvAPI_D3D9_StretchRectEx
  6365. //
  6366. //! DESCRIPTION: This API copies the contents of the source resource to the destination
  6367. //! resource. This function can convert
  6368. //! between a wider range of surfaces than
  6369. //! IDirect3DDevice9::StretchRect. For example, it can copy
  6370. //! from a depth/stencil surface to a texture.
  6371. //!
  6372. //! The source and destination resources *must* be registered
  6373. //! with NvAPI before being used with NvAPI_D3D9_StretchRectEx().
  6374. //!
  6375. //! SUPPORTED OS: Windows XP and higher
  6376. //!
  6377. //!
  6378. //! \param [in] pDevice The D3D device that owns the objects.
  6379. //! \param [in] pSourceResource Pointer to the source resource.
  6380. //! \param [in] pSrcRect Defines the rectangle on the source to copy from. If NULL, copy from the entire resource.
  6381. //! \param [in] pDestResource Pointer to the destination resource.
  6382. //! \param [in] pDstRect Defines the rectangle on the destination to copy to. If NULL, copy to the entire resource.
  6383. //! \param [in] Filter Choose a filtering method: D3DTEXF_NONE, D3DTEXF_POINT, D3DTEXF_LINEAR.
  6384. //!
  6385. //! \retval ::NVAPI_OK completed request
  6386. //! \retval ::NVAPI_INVALID_POINTER An invalid pointer was passed as an argument (probably NULL)
  6387. //! \retval ::NVAPI_INVALID_ARGUMENT One of the arguments was invalid
  6388. //! \retval ::NVAPI_UNREGISTERED_RESOURCE a resource was passed in without being registered
  6389. //! \retval ::NVAPI_ERROR error occurred
  6390. //!
  6391. //! \ingroup dx
  6392. ///////////////////////////////////////////////////////////////////////////////
  6393. NVAPI_INTERFACE NvAPI_D3D9_StretchRectEx(IDirect3DDevice9 * pDevice,
  6394. IDirect3DResource9 * pSourceResource,
  6395. CONST RECT * pSourceRect,
  6396. IDirect3DResource9 * pDestResource,
  6397. CONST RECT * pDestRect,
  6398. D3DTEXTUREFILTERTYPE Filter);
  6399. #endif //defined(_D3D9_H_)
  6400. #if defined(_D3D9_H_)
  6401. ///////////////////////////////////////////////////////////////////////////////
  6402. //
  6403. // FUNCTION NAME: NvAPI_D3D9_ClearRT
  6404. //
  6405. //! DESCRIPTION: This API Clears the currently bound render target(s) with the
  6406. //! given color
  6407. //!
  6408. //!
  6409. //! SUPPORTED OS: Windows XP and higher
  6410. //!
  6411. //!
  6412. //! \param [in] pDevice The D3D device that owns the objects.
  6413. //! \param [in] dwNumRects The no of rectangles to clear. If 0, clear the entire surface (clipped to viewport)
  6414. //! \param [in] pRects Defines the rectangles to clear. Should be NULL if dwNumRects == 0
  6415. //! \param [in] r red component of the clear color
  6416. //! \param [in] g green component of the clear color
  6417. //! \param [in] b blue component of the clear color
  6418. //! \param [in] a alpha component of the clear color
  6419. //!
  6420. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  6421. //!
  6422. //! \ingroup dx
  6423. ///////////////////////////////////////////////////////////////////////////////
  6424. NVAPI_INTERFACE NvAPI_D3D9_ClearRT(IDirect3DDevice9 * pDevice,
  6425. NvU32 dwNumRects,
  6426. CONST RECT * pRects,
  6427. float r, float g, float b, float a);
  6428. #endif //if defined(_D3D9_H_)
  6429. #if defined(_D3D9_H_) && defined(__cplusplus)
  6430. //! SUPPORTED OS: Windows XP and higher
  6431. //!
  6432. ///////////////////////////////////////////////////////////////////////////////
  6433. //
  6434. // FUNCTION NAME: NvAPI_D3D9_GetSurfaceHandle
  6435. //
  6436. //! This function gets the handle of a given surface. This handle uniquely
  6437. //! identifies the surface through all NvAPI entries.
  6438. //!
  6439. //!
  6440. //! \since Release: 313
  6441. //!
  6442. //! \param [in] pSurface Surface to be identified
  6443. //! \param [out] pHandle Will be filled by the return handle
  6444. //!
  6445. //! \return An int which could be an NvAPI status or DX HRESULT code
  6446. //! \ingroup dx
  6447. ///////////////////////////////////////////////////////////////////////////////
  6448. NVAPI_INTERFACE NvAPI_D3D9_GetSurfaceHandle(IDirect3DSurface9 *pSurface,
  6449. NVDX_ObjectHandle *pHandle);
  6450. #endif //defined(_D3D9_H_) && defined(__cplusplus)
  6451. #if defined(_D3D9_H_) && defined(__cplusplus)
  6452. //! SUPPORTED OS: Windows Vista and higher
  6453. //!
  6454. //! \addtogroup dxvidcontrol
  6455. //! @{
  6456. ///////////////////////////////////////////////////////////////////////////////
  6457. //
  6458. // FUNCTION_NAME: NvAPI_D3D9_VideoSetStereoInfo
  6459. //
  6460. //! \fn NvAPI_D3D9_VideoSetStereoInfo(IDirect3DDevice9 *pDev,
  6461. //! NV_DX_VIDEO_STEREO_INFO *pStereoInfo);
  6462. //! \code
  6463. //! DESCRIPTION: This api specifies the stereo format of a surface, so that the
  6464. //! surface could be used for stereo video processing or compositing.
  6465. //! In particular, this api could be used to link the left and right
  6466. //! views of a decoded picture.
  6467. //!
  6468. //! \since Release: 313
  6469. //!
  6470. //! INPUT: pDev - The device on which the stereo surface will be used
  6471. //! pStereoInfo - The stereo format of the surface
  6472. //!
  6473. //! RETURN STATUS: an int which could be an NvAPI status or DX HRESULT code
  6474. //! \endcode
  6475. ///////////////////////////////////////////////////////////////////////////////
  6476. #ifndef NV_STEREO_VIDEO_FORMAT_DEFINE
  6477. #define NV_STEREO_VIDEO_FORMAT_DEFINE
  6478. typedef enum _NV_STEREO_VIDEO_FORMAT
  6479. {
  6480. NV_STEREO_VIDEO_FORMAT_NOT_STEREO = 0,
  6481. NV_STEREO_VIDEO_FORMAT_SIDE_BY_SIDE_LR = 1,
  6482. NV_STEREO_VIDEO_FORMAT_SIDE_BY_SIDE_RL = 2,
  6483. NV_STEREO_VIDEO_FORMAT_TOP_BOTTOM_LR = 3,
  6484. NV_STEREO_VIDEO_FORMAT_TOP_BOTTOM_RL = 4,
  6485. NV_STEREO_VIDEO_FORMAT_ROW_INTERLEAVE_LR = 5,
  6486. NV_STEREO_VIDEO_FORMAT_ROW_INTERLEAVE_RL = 6,
  6487. NV_STEREO_VIDEO_FORMAT_TWO_FRAMES_LR = 7,
  6488. NV_STEREO_VIDEO_FORMAT_MONO_PLUS_OFFSET = 8,
  6489. NV_STEREO_VIDEO_FORMAT_LAST = 9,
  6490. } NV_STEREO_VIDEO_FORMAT;
  6491. #endif // NV_STEREO_VIDEO_FORMAT_DEFINE
  6492. typedef struct _NV_DX_VIDEO_STEREO_INFO {
  6493. NvU32 dwVersion; //!< Must be NV_DX_VIDEO_STEREO_INFO_VER
  6494. NVDX_ObjectHandle hSurface; //!< The surface whose stereo format is to be set
  6495. NVDX_ObjectHandle hLinkedSurface; //!< The linked surface (must be valid when eFormat==NV_STEREO_VIDEO_FORMAT_TWO_FRAMES_LR)
  6496. NV_STEREO_VIDEO_FORMAT eFormat; //!< Stereo format of the surface
  6497. NvS32 sViewOffset; //!< Signed offset of each view (positive offset indicating left view is shifted left)
  6498. BOOL bStereoEnable; //!< Whether stereo rendering should be enabled (if FALSE, only left view will be used)
  6499. } NV_DX_VIDEO_STEREO_INFO;
  6500. //! Macro for constructing the version field of ::NV_DX_VIDEO_STEREO_INFO
  6501. #define NV_DX_VIDEO_STEREO_INFO_VER MAKE_NVAPI_VERSION(NV_DX_VIDEO_STEREO_INFO,1)
  6502. NVAPI_INTERFACE NvAPI_D3D9_VideoSetStereoInfo(IDirect3DDevice9 *pDev,
  6503. NV_DX_VIDEO_STEREO_INFO *pStereoInfo);
  6504. //! @}
  6505. #endif //defined(_D3D9_H_) && defined(__cplusplus)
  6506. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6507. ///////////////////////////////////////////////////////////////////////////////
  6508. //
  6509. // FUNCTION NAME: NvAPI_D3D11_IsNvShaderExtnOpCodeSupported
  6510. //
  6511. //! DESCRIPTION: This function checks if a nv HLSL shader extension opcode is
  6512. //! supported on current hardware. List of opcodes is in nvShaderExtnEnums.h
  6513. //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h
  6514. //! in the hlsl shader code. See nvHLSLExtns.h for more details on supported opcodes.
  6515. //! SUPPORTED OS: Windows Vista and higher
  6516. //!
  6517. //!
  6518. //! \param [in] pDev The device on which to query for support,
  6519. //! should be a ID3D11Device+ device
  6520. //! \param [in] opCode the opcode to check
  6521. //! \param [out] pSupported true if supported, false otherwise
  6522. //!
  6523. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  6524. //! If there are return error codes with specific meaning for this API, they are listed below.
  6525. //! \retval :: NVAPI_OK if the call succeeded
  6526. //!
  6527. //! \ingroup dx
  6528. ///////////////////////////////////////////////////////////////////////////////
  6529. NVAPI_INTERFACE NvAPI_D3D11_IsNvShaderExtnOpCodeSupported(__in IUnknown *pDev,
  6530. __in NvU32 opCode,
  6531. __out bool *pSupported);
  6532. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6533. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6534. ///////////////////////////////////////////////////////////////////////////////
  6535. //
  6536. // FUNCTION NAME: NvAPI_D3D11_SetNvShaderExtnSlot
  6537. //
  6538. //! DESCRIPTION: This function sets the fake UAV slot that is used by Nvidia HLSL
  6539. //! shader extensions. All createShader calls made to the driver after
  6540. //! setting this slot would treat writes/reads to this UAV in a
  6541. //! different way. Applications are expected to bind null UAV to this slot.
  6542. //! The same slot is used for all shader stages.
  6543. //! To disable shader extensions the app may set this uav slot
  6544. //! to some value that is bigger than the max allowed slot index
  6545. //! e.g, 128 or 0xFFFFFFFF.
  6546. //! To use Nvidia HLSL extensions the application must include nvHLSLExtns.h
  6547. //! in the hlsl shader code. See nvHLSLExtns.h for more details.
  6548. //!
  6549. //! SUPPORTED OS: Windows Vista and higher
  6550. //!
  6551. //!
  6552. //! \param [in] pDev The device for which to set the extension slot
  6553. //! should be a ID3D11Device+ device
  6554. //! \param [in] uavSlot the uav slot to use
  6555. //!
  6556. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  6557. //! If there are return error codes with specific meaning for this API, they are listed below.
  6558. //! \retval :: NVAPI_OK : success, the uavSlot was set sucessfully
  6559. //!
  6560. //! \ingroup dx
  6561. ///////////////////////////////////////////////////////////////////////////////
  6562. NVAPI_INTERFACE NvAPI_D3D11_SetNvShaderExtnSlot(__in IUnknown *pDev,
  6563. __in NvU32 uavSlot);
  6564. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6565. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6566. ///////////////////////////////////////////////////////////////////////////////
  6567. //
  6568. // FUNCTION NAME: NvAPI_D3D11_BeginUAVOverlapEx
  6569. //
  6570. //! DESCRIPTION: Causes the driver to skip synchronization that is normally needed when accessing UAVs.
  6571. //! Applications must use this with caution otherwise this might cause data hazards when
  6572. //! multiple draw calls/compute shader launches are accessing same memory locations
  6573. //!
  6574. //! SUPPORTED OS: Windows Vista and higher
  6575. //!
  6576. //!
  6577. //! \param [in] *pDeviceOrContext pointer to D3D11 device, or D3D11 device context
  6578. //! \param [in] insertWFIFlags bit fields to indicate which WFI would be inserted (gfx / compute / both).
  6579. //!
  6580. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  6581. //! If there are return error codes with specific meaning for this API, they are listed below.
  6582. //!
  6583. //! \ingroup dx
  6584. ///////////////////////////////////////////////////////////////////////////////
  6585. typedef enum _NVAPI_D3D11_INSERTWFI_FLAG
  6586. {
  6587. NVAPI_D3D_BEGIN_UAV_OVERLAP_NO_WFI = 0x00000000, //!< no WFI
  6588. NVAPI_D3D_BEGIN_UAV_OVERLAP_GFX_WFI = 0x00000001, //!< (bit 0) force graphics WFI
  6589. NVAPI_D3D_BEGIN_UAV_OVERLAP_COMP_WFI = 0x00000002, //!< (bit 1) force compute WFI
  6590. } NVAPI_D3D11_INSERTWFI_FLAG;
  6591. NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlapEx(__in IUnknown *pDeviceOrContext, __in NvU32 insertWFIFlags);
  6592. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6593. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6594. ///////////////////////////////////////////////////////////////////////////////
  6595. //
  6596. // FUNCTION NAME: NvAPI_D3D11_BeginUAVOverlap
  6597. //
  6598. //! DESCRIPTION: Causes the driver to skip synchronization that is normally needed when accessing UAVs.
  6599. //! Applications must use this with caution otherwise this might cause data hazards when
  6600. //! multiple draw calls/compute shader launches are accessing same memory locations
  6601. //!
  6602. //! SUPPORTED OS: Windows Vista and higher
  6603. //!
  6604. //!
  6605. //! \param [in] *pDeviceOrContext pointer to D3D11 device, or D3D11 device context
  6606. //!
  6607. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  6608. //! If there are return error codes with specific meaning for this API, they are listed below.
  6609. //!
  6610. //! \ingroup dx
  6611. ///////////////////////////////////////////////////////////////////////////////
  6612. NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlap(__in IUnknown *pDeviceOrContext);
  6613. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6614. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6615. ///////////////////////////////////////////////////////////////////////////////
  6616. //
  6617. // FUNCTION NAME: NvAPI_D3D11_EndUAVOverlap
  6618. //
  6619. //! DESCRIPTION: Re-enables driver synchronization between calls that access same UAVs
  6620. //! See NvAPI_D3D_BeginUAVOverlap for more details.
  6621. //!
  6622. //! SUPPORTED OS: Windows Vista and higher
  6623. //!
  6624. //!
  6625. //! \param [in] *pDeviceOrContext pointer to D3D11 device, or D3D11 device context
  6626. //!
  6627. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  6628. //! If there are return error codes with specific meaning for this API, they are listed below.
  6629. //!
  6630. //! \ingroup dx
  6631. ///////////////////////////////////////////////////////////////////////////////
  6632. NVAPI_INTERFACE NvAPI_D3D11_EndUAVOverlap(__in IUnknown *pDeviceOrContext);
  6633. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6634. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  6635. ///////////////////////////////////////////////////////////////////////////////
  6636. //
  6637. // FUNCTION NAME: NvAPI_D3D_SetFPSIndicatorState
  6638. //
  6639. //! DESCRIPTION: Display an overlay that tracks the number of times the app presents per second, or,
  6640. //! the number of frames-per-second (FPS)
  6641. //!
  6642. //! SUPPORTED OS: Windows XP and higher
  6643. //!
  6644. //!
  6645. //! \param [in] bool Whether or not to enable the fps indicator.
  6646. //!
  6647. //! \return ::NVAPI_OK,
  6648. //! ::NVAPI_ERROR
  6649. //!
  6650. //! \ingroup dx
  6651. ///////////////////////////////////////////////////////////////////////////////
  6652. NVAPI_INTERFACE NvAPI_D3D_SetFPSIndicatorState(IUnknown *pDev, NvU8 doEnable);
  6653. #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  6654. //! SUPPORTED OS: Windows Vista and higher
  6655. //!
  6656. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__) || defined(__d3d12_h__))
  6657. enum NVAPI_QUAD_FILLMODE
  6658. {
  6659. NVAPI_QUAD_FILLMODE_DISABLED = 0,
  6660. NVAPI_QUAD_FILLMODE_BBOX = 1,
  6661. NVAPI_QUAD_FILLMODE_FULL_VIEWPORT = 2,
  6662. };
  6663. #endif //defined(__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__) || defined(__d3d12_h__))
  6664. //! SUPPORTED OS: Windows Vista and higher
  6665. //!
  6666. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6667. typedef struct NvAPI_D3D11_RASTERIZER_DESC_EX
  6668. {
  6669. // D3D11_RASTERIZER_DESC member variables
  6670. D3D11_FILL_MODE FillMode;
  6671. D3D11_CULL_MODE CullMode;
  6672. BOOL FrontCounterClockwise;
  6673. INT DepthBias;
  6674. FLOAT DepthBiasClamp;
  6675. FLOAT SlopeScaledDepthBias;
  6676. BOOL DepthClipEnable;
  6677. BOOL ScissorEnable;
  6678. BOOL MultisampleEnable;
  6679. BOOL AntialiasedLineEnable;
  6680. // NvAPI_D3D11_RASTERIZER_DESC_EX specific member variables
  6681. NvU32 ForcedSampleCount; //<! Added DX 11.1, part of _DESC1 version of this struct.
  6682. bool ProgrammableSamplePositionsEnable; //<! enable Programmable Samples feature
  6683. bool InterleavedSamplingEnable; //<! when jitter is enabled, an app need to fill the whole arrays below, otherwise only as much entries as samples
  6684. NvU8 SampleCount; //<! number of samples. In TIR N->1 it needs to match N, in non-TIR it needs to match RT sample count. Ignored if ForcePerSampleInterlock is set
  6685. NvU8 SamplePositionsX[16]; //<! x positions in API sample order
  6686. NvU8 SamplePositionsY[16]; //<! y positions in API sample order
  6687. bool ConservativeRasterEnable; //<! rasterize all pixels a primitive touches in any way instead of just those with the centroid covered.
  6688. NVAPI_QUAD_FILLMODE QuadFillMode; //<! Fill a triangle outside its bounds as a screen-aligned quad, matching the tri's bounding-box or filling the full viewport.
  6689. bool PostZCoverageEnable; //<! Enable pixel-shader input SV_COVERAGE to account for z-test in early-z mode.
  6690. bool CoverageToColorEnable; //<! Enable output of coverage to a color render-target.
  6691. NvU8 CoverageToColorRTIndex; //<! Index of RT for coverage-to-color.
  6692. NvU32 reserved[16]; //<! reserved for expansion, set to zero.
  6693. } NvAPI_D3D11_RASTERIZER_DESC_EX;
  6694. ///////////////////////////////////////////////////////////////////////////////
  6695. //
  6696. // FUNCTION NAME: NvAPI_D3D11_CreateRasterizerState
  6697. //
  6698. //! \code
  6699. //! DESCRIPTION: This function is an extension of ID3D11Device::CreateRasterizerState with additional raster states
  6700. //!
  6701. //! \param [in] pDevice current d3d device
  6702. //! \param [in] pRasterizerDesc Rasterizer state description of type NVAPI_D3D11_RASTERIZER_DESC_EX
  6703. //! \param [out] ppRasterizerState ID3D11RasterizerState
  6704. //!
  6705. //!
  6706. //! \return ::NVAPI_OK if the call succeeds.
  6707. //! \endcode
  6708. //! \ingroup dx
  6709. ///////////////////////////////////////////////////////////////////////////////
  6710. NVAPI_INTERFACE NvAPI_D3D11_CreateRasterizerState(__in ID3D11Device *pDevice,
  6711. __in const NvAPI_D3D11_RASTERIZER_DESC_EX *pRasterizerDesc,
  6712. __out ID3D11RasterizerState **ppRasterizerState);
  6713. #endif //defined(__cplusplus) && defined(__d3d11_h__)
  6714. //! SUPPORTED OS: Windows Vista and higher
  6715. //!
  6716. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  6717. ///////////////////////////////////////////////////////////////////////////////
  6718. //
  6719. // FUNCTION NAME: NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA
  6720. //
  6721. //! \code
  6722. //! DESCRIPTION: This function allows creating (aliasing) a non-MSAA Texture2D object using the same memory as the given multi-sampled
  6723. //! texture (pInputTex). The surface created would be bloated in width and height but it will have SampleCount = 1
  6724. //! For 2X MSAA: OutTex.Width = InputTex.Width * 2, outTex.Height = InputTex.Height
  6725. //! For 4X MSAA: OutTex.Width = InputTex.Width * 2, outTex.Height = InputTex.Height * 2
  6726. //! For 8X MSAA: OutTex.Width = InputTex.Width * 4, outTex.Height = InputTex.Height * 2
  6727. //! Only textures SampleQuality = 0 can be aliased as Non MSAA
  6728. //! The app should ensure that original texture is released only after the aliased copy is released.
  6729. //!
  6730. //! \param [in] pDevice current d3d device
  6731. //! \param [in] pInputTex The MultiSampled Texture2D resource that is being aliased
  6732. //! \param [out] ppOutTex The aliased non AA copy MultiSampled Texture2D resource
  6733. //!
  6734. //!
  6735. //! \return :: NVAPI_OK if the call succeeds.
  6736. //! \endcode
  6737. //! \ingroup dx
  6738. ///////////////////////////////////////////////////////////////////////////////
  6739. NVAPI_INTERFACE NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA(__in ID3D11Device *pDevice,
  6740. __in ID3D11Texture2D *pInputTex,
  6741. __out ID3D11Texture2D **ppOutTex);
  6742. #endif //defined(__cplusplus) && defined(__d3d11_h__)
  6743. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE))
  6744. typedef UINT NvAPI_D3D11_SWIZZLE_MODE;
  6745. typedef enum _NV_SWIZZLE_MODE
  6746. {
  6747. NV_SWIZZLE_POS_X = 0,
  6748. NV_SWIZZLE_NEG_X = 1,
  6749. NV_SWIZZLE_POS_Y = 2,
  6750. NV_SWIZZLE_NEG_Y = 3,
  6751. NV_SWIZZLE_POS_Z = 4,
  6752. NV_SWIZZLE_NEG_Z = 5,
  6753. NV_SWIZZLE_POS_W = 6,
  6754. NV_SWIZZLE_NEG_W = 7
  6755. }NV_SWIZZLE_MODE;
  6756. typedef enum _NV_SWIZZLE_OFFSET
  6757. {
  6758. NV_SWIZZLE_OFFSET_X = 0,
  6759. NV_SWIZZLE_OFFSET_Y = 4,
  6760. NV_SWIZZLE_OFFSET_Z = 8,
  6761. NV_SWIZZLE_OFFSET_W = 12
  6762. }NV_SWIZZLE_OFFSET;
  6763. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d12_h__)) && (!defined(CINTERFACE))
  6764. //! SUPPORTED OS: Windows Vista and higher
  6765. //!
  6766. #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) )
  6767. typedef enum _NV_FASTGS_FLAGS
  6768. {
  6769. NV_FASTGS_USE_VIEWPORT_MASK = 0x01, // Causes SV_ViewportArrayIndex value to be interpreted as a bitmask of viewports to broadcast to.
  6770. NV_FASTGS_OFFSET_RT_INDEX_BY_VP_INDEX = 0x02, // Causes SV_RenderTargetArrayIndex value to be offset by the viewport index when broadcasting.
  6771. NV_FASTGS_STRICT_API_ORDER = 0x04, // Causes broadcast primitives to be rendered strictly in API order (slow).
  6772. // By default, primitives may be batched per viewport to improve performance.
  6773. } NV_FASTGS_FLAGS;
  6774. struct NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1
  6775. {
  6776. NvU32 version; // ALWAYS == NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER
  6777. NvU32 flags; // A combination of flags from NV_FASTGS_FLAGS
  6778. NvAPI_D3D11_SWIZZLE_MODE *pCoordinateSwizzling; // [optional] Array of 16 coordinate swizzle modes, one per viewport. NULL if not used.
  6779. // The output x, y, z, and w coordinates of all vertices can be set to any of the coordinates or their
  6780. // negated versions i.e. {x, y, z, w, -x, -y, -z, -w}. Coordinates are swizzled before any viewport
  6781. // operation occurs i.e. before frustum clipping, scaling, and viewport clipping. And after
  6782. // last of vertex/tesselation/geometry shader stage, stream-out and viewport broadcast expansion (see NV_FASTGS_USE_VIEWPORT_MASK)
  6783. // pCoordinateSwizzling[i] sets the swizzle-mode of each component for viewport i.
  6784. // See NV_SWIZZLE_MODE for values of allowed swizzle modes.
  6785. // See NV_SWIZZLE_OFFSET for bit offset from where NV_SWIZZLE_MODE to be set for each component.
  6786. // For example :
  6787. // 1. To set swizzle for viewport 0 such that - w and z are unchanged and values of x and y are swapped :
  6788. // pCoordinateSwizzling[0] = (NV_SWIZZLE_POS_W << NV_SWIZZLE_OFFSET_W) |
  6789. // (NV_SWIZZLE_POS_Z << NV_SWIZZLE_OFFSET_Z) |
  6790. // (NV_SWIZZLE_POS_X << NV_SWIZZLE_OFFSET_Y) |
  6791. // (NV_SWIZZLE_POS_Y << NV_SWIZZLE_OFFSET_X);
  6792. // 2. To set swizzle for viewport 0 such that - w, z and y are unchanged and value of x is negated :
  6793. // pCoordinateSwizzling[0] = (NV_SWIZZLE_POS_W << NV_SWIZZLE_OFFSET_W) |
  6794. // (NV_SWIZZLE_POS_Z << NV_SWIZZLE_OFFSET_Z) |
  6795. // (NV_SWIZZLE_POS_Y << NV_SWIZZLE_OFFSET_Y) |
  6796. // (NV_SWIZZLE_NEG_X << NV_SWIZZLE_OFFSET_X);
  6797. // Need to set some valid combination of swizzle-modes for all viewports, irrespective of whether that viewport is set.
  6798. // Invalid swizzle-mode for any viewport (even if that viewport is not set) may result in removal of device.
  6799. };
  6800. #define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1, 1)
  6801. #define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1
  6802. typedef NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1 NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC;
  6803. ////////////////////////////////////////////////////////////////////////////////////////////////////
  6804. //
  6805. // FUNCTION NAME: NvAPI_D3D11_CreateFastGeometryShaderExplicit
  6806. //
  6807. //! \fn NvAPI_D3D11_CreateFastGeometryShaderExplicit
  6808. //!
  6809. //! DESCRIPTION: This function will create a fast geometry shader written using an "explicit"
  6810. //! coding style, rather than converting a standard GS. For the explicit coding
  6811. //! style, the GS must be written with maxvertexcount(1), and must pass-through
  6812. //! input vertex 0 to the output without modification.
  6813. //!
  6814. //! Additional per-primitive outputs may also be computed and written to the single
  6815. //! output vertex. If these outputs are read by the pixel shader, they must be
  6816. //! declared with the "nointerpolation" attribute in the PS input signature;
  6817. //! otherwise, visual corruption may occur. Also, unlike D3D API, there is no guarantee
  6818. //! that pixel shader will get the default value of an attribute if that attribute is not written
  6819. //! by the earlier shader stage in the pipeline.
  6820. //!
  6821. //! The first four parameters are identical to ID3D11Device::CreateGeometryShader(),
  6822. //! so please refer to its documentation for their usage.
  6823. //!
  6824. //! \since Release:
  6825. //!
  6826. //! \param [in] pDevice The device pointer
  6827. //! \param [in] pShaderBytecode A pointer to the compiled shader.
  6828. //! \param [in] BytecodeLength Size of the compiled geometry shader.
  6829. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL.
  6830. //! \param [in] pCreateFastGSArgs A pointer to a NvAPI_D3D11_CREATE_FASTGS_EXPLICIT struct.
  6831. //! \param [out] ppGeometryShader Address of a pointer to a ID3D11GeometryShader interface.
  6832. //!
  6833. //! \return This API can return any of the error codes enumerated in
  6834. //! #NvAPI_Status. If there are return error codes with specific
  6835. //! meaning for this API, they are listed below.
  6836. //
  6837. ////////////////////////////////////////////////////////////////////////////////////////////////////
  6838. NVAPI_INTERFACE NvAPI_D3D11_CreateFastGeometryShaderExplicit(__in ID3D11Device *pDevice, __in const void *pShaderBytecode,
  6839. __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage,
  6840. __in const NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC *pCreateFastGSArgs,
  6841. __out ID3D11GeometryShader **ppGeometryShader);
  6842. #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE))
  6843. //! SUPPORTED OS: Windows Vista and higher
  6844. //!
  6845. #if defined (__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE) )
  6846. ////////////////////////////////////////
  6847. //
  6848. // FUNCTION NAME: NvAPI_D3D11_CreateFastGeometryShader
  6849. //
  6850. //! \fn NvAPI_D3D11_CreateFastGeometryShader
  6851. //!
  6852. //! DESCRIPTION: This function will convert a regular geometry shader into a fast GS variant if possible.
  6853. //! It will not do any validation regarding the compatibility of the resulting fast GS with any
  6854. //! Pixel shader. The validation has to be done by the application manually.
  6855. //!
  6856. //! The parameters are identical to ID3D11Device::CreateGeometryShader()
  6857. //! so please refer to its documentation for their usage.
  6858. //!
  6859. //! If the shader is too complex or is not in adequate form to be converted to fast GS
  6860. //! this function will simply fail. You should then call ID3D11Device::CreateGeometryShader()
  6861. //! to create the regular geometry shader.
  6862. //!
  6863. //! \since Release:
  6864. //!
  6865. //! \param [in] pDevice The device pointer
  6866. //! \param [in] pShaderBytecode A pointer to the compiled shader.
  6867. //! \param [in] BytecodeLength Size of the compiled geometry shader.
  6868. //! \param [in] pClassLinkage A pointer to a class linkage interface. Can be NULL.
  6869. //! \param [out] ppGeometryShader Address of a pointer to a ID3D11GeometryShader interface.
  6870. //!
  6871. //! \return This API can return any of the error codes enumerated in
  6872. //! #NvAPI_Status. If there are return error codes with specific
  6873. //! meaning for this API, they are listed below.
  6874. //
  6875. ///////////////////////////////////////////////////////////////////////////////
  6876. NVAPI_INTERFACE NvAPI_D3D11_CreateFastGeometryShader(__in ID3D11Device *pDevice, __in const void *pShaderBytecode,
  6877. __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage,
  6878. __out ID3D11GeometryShader **ppGeometryShader);
  6879. #endif //defined(__cplusplus) && defined(__d3d11_h__) && (!defined(CINTERFACE))
  6880. #if defined (__cplusplus) && defined(__d3d12_h__)
  6881. //! Enum for CreatePSO extensions.
  6882. //! \ingroup dx
  6883. typedef enum _NV_PSO_EXTENSION
  6884. {
  6885. NV_PSO_RASTER_EXTENSION = 0,
  6886. NV_PSO_REQUEST_FASTGS_EXTENSION = 1,
  6887. NV_PSO_ENABLE_DEPTH_BOUND_TEST_EXTENSION = 3,
  6888. NV_PSO_EXPLICIT_FASTGS_EXTENSION = 4,
  6889. }NV_PSO_EXTENSION;
  6890. struct NVAPI_D3D12_PSO_EXTENSION_DESC_V1
  6891. {
  6892. NvU32 baseVersion; //<! Always use NV_PSO_EXTENSION_DESC_VER
  6893. NV_PSO_EXTENSION psoExtension;
  6894. };
  6895. #define NV_PSO_EXTENSION_DESC_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_EXTENSION_DESC_V1, 1)
  6896. #define NV_PSO_EXTENSION_DESC_VER NV_PSO_EXTENSION_DESC_VER_1
  6897. typedef NVAPI_D3D12_PSO_EXTENSION_DESC_V1 NVAPI_D3D12_PSO_EXTENSION_DESC;
  6898. struct NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1 : public NVAPI_D3D12_PSO_EXTENSION_DESC
  6899. {
  6900. NvU32 version; //<! Always use NV_RASTERIZER_PSO_EXTENSION_DESC_VER
  6901. // These are additional parameters on the top of D3D12_RASTERIZER_DESC
  6902. bool ProgrammableSamplePositionsEnable; //<! enable Programmable Samples feature
  6903. bool InterleavedSamplingEnable; //<! when jitter is enabled, an app need to fill the whole arrays below, otherwise only as much entries as samples
  6904. NvU8 SampleCount; //<! number of samples. In TIR N->1 it needs to match N, in non-TIR it needs to match RT sample count. Ignored if ForcePerSampleInterlock is set
  6905. NvU8 SamplePositionsX[16]; //<! x positions in API sample order
  6906. NvU8 SamplePositionsY[16]; //<! y positions in API sample order
  6907. NVAPI_QUAD_FILLMODE QuadFillMode; //<! Fill a triangle outside its bounds as a screen-aligned quad, matching the tri's bounding-box or filling the full viewport.
  6908. bool PostZCoverageEnable; //<! Enable pixel-shader input SV_COVERAGE to account for z-test in early-z mode.
  6909. bool CoverageToColorEnable; //<! Enable output of coverage to a color render-target.
  6910. NvU8 CoverageToColorRTIndex; //<! Index of RT for coverage-to-color.
  6911. NvU32 reserved[16]; //<! reserved for expansion, set to zero.
  6912. };
  6913. #define NV_RASTERIZER_PSO_EXTENSION_DESC_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1, 1)
  6914. #define NV_RASTERIZER_PSO_EXTENSION_DESC_VER NV_RASTERIZER_PSO_EXTENSION_DESC_VER_1
  6915. typedef NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1 NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC;
  6916. struct NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1 : public NVAPI_D3D12_PSO_EXTENSION_DESC
  6917. {
  6918. NvU32 version; // ALWAYS == NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER
  6919. NvU32 flags; // A combination of flags from NV_FASTGS_FLAGS
  6920. NvAPI_D3D11_SWIZZLE_MODE *pCoordinateSwizzling; // [optional] Array of 16 coordinate swizzle modes, one per viewport. NULL if not used.
  6921. // The output x, y, z, and w coordinates of all vertices can be set to any of the coordinates or their
  6922. // negated versions i.e. {x, y, z, w, -x, -y, -z, -w}. Coordinates are swizzled before any viewport
  6923. // operation occurs i.e. before frustum clipping, scaling, and viewport clipping. And after
  6924. // last of vertex/tesselation/geometry shader stage, stream-out and viewport broadcast expansion (see NV_FASTGS_USE_VIEWPORT_MASK)
  6925. // pCoordinateSwizzling[i] sets the swizzle-mode of each component for viewport i.
  6926. // See NV_SWIZZLE_MODE for values of allowed swizzle modes.
  6927. // See NV_SWIZZLE_OFFSET for bit offset from where NV_SWIZZLE_MODE to be set for each component.
  6928. // For example :
  6929. // 1. To set swizzle for viewport 0 such that - w and z are unchanged and values of x and y are swapped :
  6930. // pCoordinateSwizzling[0] = (NV_SWIZZLE_POS_W << NV_SWIZZLE_OFFSET_W) |
  6931. // (NV_SWIZZLE_POS_Z << NV_SWIZZLE_OFFSET_Z) |
  6932. // (NV_SWIZZLE_POS_X << NV_SWIZZLE_OFFSET_Y) |
  6933. // (NV_SWIZZLE_POS_Y << NV_SWIZZLE_OFFSET_X);
  6934. // 2. To set swizzle for viewport 0 such that - w, z and y are unchanged and value of x is negated :
  6935. // pCoordinateSwizzling[0] = (NV_SWIZZLE_POS_W << NV_SWIZZLE_OFFSET_W) |
  6936. // (NV_SWIZZLE_POS_Z << NV_SWIZZLE_OFFSET_Z) |
  6937. // (NV_SWIZZLE_POS_Y << NV_SWIZZLE_OFFSET_Y) |
  6938. // (NV_SWIZZLE_NEG_X << NV_SWIZZLE_OFFSET_X);
  6939. // Need to set some valid combination of swizzle-modes for all viewports, irrespective of whether that viewport is set.
  6940. // Invalid swizzle-mode for any viewport (even if that viewport is not set) may result in removal of device.
  6941. };
  6942. #define NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1, 1)
  6943. #define NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_1
  6944. typedef NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1 NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC;
  6945. struct NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1 : public NVAPI_D3D12_PSO_EXTENSION_DESC
  6946. {
  6947. NvU32 version; //<! Always use NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER
  6948. };
  6949. #define NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1, 1)
  6950. #define NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER_1
  6951. typedef NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1 NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC;
  6952. struct NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC_V1 : public NVAPI_D3D12_PSO_EXTENSION_DESC
  6953. {
  6954. NvU32 version; //<! Always use NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER
  6955. bool EnableDBT;
  6956. };
  6957. #define NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC_V1, 1)
  6958. #define NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER_1
  6959. typedef NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC_V1 NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC;
  6960. ///////////////////////////////////////////////////////////////////////////////
  6961. //
  6962. // FUNCTION NAME: NvAPI_D3D12_CreateGraphicsPipelineState
  6963. //
  6964. //! \code
  6965. //! DESCRIPTION: This function will create PSO with provided extensions
  6966. //!
  6967. //! \param [in] pDevice Current d3d device
  6968. //! \param [in] pPSODesc PSO description of type D3D12_GRAPHICS_PIPELINE_STATE_DESC
  6969. //! \param [in] numExtensions Number of extensions
  6970. //! \param [in] ppExtensions Array of PSO extensions (see NV_PSO_EXTENSION for possible extensions)
  6971. //! \param [out] ppPSO Output PSO object of type ID3D12PipelineState
  6972. //!
  6973. //! SUPPORTED OS: Windows 10
  6974. //!
  6975. //! \return ::NVAPI_OK if the call succeeds.
  6976. //! \endcode
  6977. //! \ingroup dx
  6978. ///////////////////////////////////////////////////////////////////////////////
  6979. NVAPI_INTERFACE NvAPI_D3D12_CreateGraphicsPipelineState(__in ID3D12Device *pDevice,
  6980. __in const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pPSODesc,
  6981. NvU32 numExtensions,
  6982. __in const NVAPI_D3D12_PSO_EXTENSION_DESC** ppExtensions,
  6983. __out ID3D12PipelineState **ppPSO);
  6984. #endif //defined(__cplusplus) && defined(__d3d12_h__)
  6985. #if defined (__cplusplus) && defined(__d3d12_h__)
  6986. ///////////////////////////////////////////////////////////////////////////////
  6987. //
  6988. // FUNCTION NAME: NvAPI_D3D12_SetDepthBoundsTestValues
  6989. //
  6990. //! \code
  6991. //! DESCRIPTION: This function will set the minDepth and maxDepth values for depth bounds test
  6992. //! To enable/ disable depth bounds test use PSO extension NV_PSO_ENABLE_DEPTH_BOUND_TEST_EXTENSION
  6993. //! in the nvapi NvAPI_D3D12_CreateGraphicsPipelineState
  6994. //!
  6995. //! \param [in] pCommandList Command List to set depth bounds test
  6996. //! \param [in] minDepth min value for depth bound test
  6997. //! \param [in] maxDepth max value for depth bound test
  6998. //!
  6999. //! The valid values for minDepth and maxDepth are such that 0 <= minDepth <= maxDepth <= 1
  7000. //!
  7001. //! SUPPORTED OS: Windows 10
  7002. //!
  7003. //! \return ::NVAPI_OK if the call succeeds.
  7004. //! \endcode
  7005. //! \ingroup dx
  7006. ///////////////////////////////////////////////////////////////////////////////
  7007. NVAPI_INTERFACE NvAPI_D3D12_SetDepthBoundsTestValues(__in ID3D12GraphicsCommandList *pCommandList,
  7008. __in const float minDepth,
  7009. __in const float maxDepth);
  7010. #endif //defined(__cplusplus) && defined(__d3d12_h__)
  7011. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  7012. ///////////////////////////////////////////////////////////////////////////////
  7013. //!
  7014. //! FUNCTION NAME: NvAPI_D3D_IsGSyncCapable
  7015. //! DESCRIPTION: This API gets G-Sync capability for the given device context.
  7016. //! This is only reliable after the first present call has completed.
  7017. //! \param [in] pDeviceOrContext The D3D9, D3D10, D3D11 device, or D3D11 device context
  7018. //! \param [in] NVDX_ObjectHandle The handle of primary surface
  7019. //! \param [out] pIsGsyncCapable if G-Sync can be enabled, *pIsGsyncCapable is true.
  7020. //!
  7021. //! SUPPORTED OS: Windows Vista and higher
  7022. //!
  7023. //!
  7024. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  7025. //! If there are return error codes with specific meaning for this API, they are listed below.
  7026. //!
  7027. //! \ingroup dx
  7028. ///////////////////////////////////////////////////////////////////////////////
  7029. NVAPI_INTERFACE NvAPI_D3D_IsGSyncCapable(__in IUnknown *pDeviceOrContext, __in NVDX_ObjectHandle primarySurface, __out BOOL *pIsGsyncCapable);
  7030. #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  7031. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  7032. ///////////////////////////////////////////////////////////////////////////////
  7033. //!
  7034. //! FUNCTION NAME: NvAPI_D3D_IsGSyncActive
  7035. //! DESCRIPTION: This API get the G-Sync state for the given device context.
  7036. //! This is only reliable after the first present call has completed.
  7037. //! As it is a bit time consuming, It should not be called per frame.
  7038. //! \param [in] pDeviceOrContext The D3D9, D3D10, D3D11 device, or D3D11 device context
  7039. //! \param [in] NVDX_ObjectHandle The handle of primary surface
  7040. //! \param [out] pIsGsyncActive if G-Sync is active, *pisGsyncActive is true.
  7041. //!
  7042. //! SUPPORTED OS: Windows Vista and higher
  7043. //!
  7044. //!
  7045. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  7046. //! If there are return error codes with specific meaning for this API, they are listed below.
  7047. //!
  7048. //! \ingroup dx
  7049. ///////////////////////////////////////////////////////////////////////////////
  7050. NVAPI_INTERFACE NvAPI_D3D_IsGSyncActive(__in IUnknown *pDeviceOrContext, __in NVDX_ObjectHandle primarySurface, __out BOOL *pIsGsyncActive);
  7051. #endif //if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  7052. //! SUPPORTED OS: Windows Vista and higher
  7053. //!
  7054. #if defined (__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) )
  7055. ///////////////////////////////////////////////////////////////////////////////
  7056. //
  7057. // FUNCTION NAME: NvAPI_D3D1x_DisableShaderDiskCache
  7058. //
  7059. //! DESCRIPTION: Disables driver managed caching of shader compilations to disk
  7060. //!
  7061. //! \param [in] pDevice Device to disabled the shader disk cache on
  7062. //!
  7063. //!
  7064. //! \retval ::NVAPI_OK Shader disk cache was disabled
  7065. //! \retval ::NVAPI_ERROR The operation failed.
  7066. //! \retval ::NVAPI_INVALID_ARGUMENT Argument passed in is invalid.
  7067. //! \ingroup dx
  7068. ///////////////////////////////////////////////////////////////////////////////
  7069. NVAPI_INTERFACE NvAPI_D3D1x_DisableShaderDiskCache(IUnknown *pDevice);
  7070. #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) )
  7071. //! SUPPORTED OS: Windows Vista and higher
  7072. //!
  7073. #if defined (__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) )
  7074. ///////////////////////////////////////////////////////////////////////////////
  7075. //
  7076. // FUNCTION NAME: NvAPI_D3D1x_HintCreateLowLatencyDevice
  7077. //
  7078. //! DESCRIPTION: Hint driver what type of D3D1x device has to be created
  7079. //!
  7080. //! \param [in] bool true - Next CreateDevice call has to create low latency device.
  7081. //! false - Next CreateDevice call has to create normal device.
  7082. //! Caller has explicitely change state of the hint from true to false
  7083. //! after low latency device is created.
  7084. //! Default hint state is false.
  7085. //! \retval ::NVAPI_OK Hint is set.
  7086. //! \retval ::NVAPI_ERROR Hint was not set.
  7087. //! \ingroup dx
  7088. ///////////////////////////////////////////////////////////////////////////////
  7089. NVAPI_INTERFACE NvAPI_D3D1x_HintCreateLowLatencyDevice(bool bCreateLowLatencyDevice);
  7090. #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) )
  7091. //! SUPPORTED OS: Windows Vista and higher
  7092. //!
  7093. #if defined (__cplusplus) && defined(__d3d11_h__)
  7094. ///////////////////////////////////////////////////////////////////////////////
  7095. //
  7096. // FUNCTION NAME: NvAPI_D3D11_MultiGPU_GetCaps
  7097. //
  7098. //! DESCRIPTION: Request to get multi GPU extension caps.
  7099. //!
  7100. //! \param [out] pMultiGPUCaps Pointer to a structure returning multi GPU caps
  7101. //! \retval ::NVAPI_OK Call succeeded.
  7102. //! \retval ::NVAPI_ERROR Call failed.
  7103. //! \ingroup dx
  7104. ///////////////////////////////////////////////////////////////////////////////
  7105. //! \ingroup dx
  7106. typedef struct
  7107. {
  7108. NvU32 multiGPUVersion;
  7109. NvU32 reserved;
  7110. NvU32 nTotalGPUs;
  7111. NvU32 nSLIGPUs;
  7112. NvU32 videoBridgePresent;
  7113. } NV_MULTIGPU_CAPS, *PNV_MULTIGPU_CAPS;
  7114. //! \ingroup dx
  7115. NVAPI_INTERFACE NvAPI_D3D11_MultiGPU_GetCaps(__out PNV_MULTIGPU_CAPS pMultiGPUCaps);
  7116. #endif //defined(__cplusplus) && defined(__d3d11_h__)
  7117. //! SUPPORTED OS: Windows Vista and higher
  7118. //!
  7119. #if defined (__cplusplus) && defined(__d3d11_h__)
  7120. ///////////////////////////////////////////////////////////////////////////////
  7121. //
  7122. // FUNCTION NAME: NvAPI_D3D11_MultiGPU_Init
  7123. //
  7124. //! DESCRIPTION: Request to enable/disable multi GPU extension. Also if enabled automatically disables auto stereo.
  7125. //!
  7126. //! \param [in] bEnable if true enables the extension for all subsequently created devices. Otherwise disables it
  7127. //! \retval ::NVAPI_OK Call succeeded.
  7128. //! \retval ::NVAPI_ERROR Call failed.
  7129. //! \ingroup dx
  7130. ///////////////////////////////////////////////////////////////////////////////
  7131. NVAPI_INTERFACE NvAPI_D3D11_MultiGPU_Init(__in bool bEnable);
  7132. #endif //defined(__cplusplus) && defined(__d3d11_h__)
  7133. //! SUPPORTED OS: Windows Vista and higher
  7134. //!
  7135. #if defined (__cplusplus) && defined(__d3d11_h__)
  7136. ///////////////////////////////////////////////////////////////////////////////
  7137. //
  7138. // FUNCTION NAME: NvAPI_D3D11_CreateMultiGPUDevice
  7139. //! \code
  7140. //! DESCRIPTION: This function returns ID3D11MultiGPUDevice used for multi GPU VR support
  7141. //!
  7142. //! \param [in] pDevice current d3d device
  7143. //! \param [in] version version of requested ID3D11MultiGPUDevice.
  7144. //! \param [out] currentVersion pointer to returned current version of ID3D11MultiGPUDevice.
  7145. //! \param [out] ppD3D11MultiGPUDevice pointer to returned ID3D11MultiGPUDevice.
  7146. //! \param [in] maxGpus max number of gpus this ID3D11MultiGPUDevice is allowed to use
  7147. //!
  7148. //!
  7149. //! \return ::NVAPI_OK if the call succeeds.
  7150. //! \endcode
  7151. ///////////////////////////////////////////////////////////////////////////////
  7152. //! \ingroup dx
  7153. #define NVAPI_COPY_ASYNCHRONOUSLY 1
  7154. #define NVAPI_CPU_RESOURCE 0xffffffff
  7155. DECLARE_INTERFACE(ID3D11MultiGPUDevice_V1)
  7156. {
  7157. STDMETHOD_(void,Destroy)(THIS) PURE;
  7158. STDMETHOD_(UINT,SetGPUMask)(THIS_ __in UINT GPUMask) PURE;
  7159. STDMETHOD_(NvAPI_Status,CopySubresourceRegion)(THIS_ __in ID3D11DeviceContext *pContext, __in ID3D11Resource *pDstResource, __in UINT DstSubresource,
  7160. __in UINT DstGPUIndex, __in UINT DstX, __in UINT DstY, __in UINT DstZ,
  7161. __in ID3D11Resource *pSrcResource, __in UINT SrcSubresource, __in UINT SrcGPUIndex,
  7162. __in const D3D11_BOX *pSrcBox, __in UINT ExtendedFlags = 0) PURE;
  7163. #if defined(__d3d11_1_h__)
  7164. STDMETHOD_(NvAPI_Status,CopySubresourceRegion1)(THIS_ __in ID3D11DeviceContext1 *pContext1, __in ID3D11Resource *pDstResource, __in UINT DstSubresource,
  7165. __in UINT DstGPUIndex, __in UINT DstX, __in UINT DstY, __in UINT DstZ,
  7166. __in ID3D11Resource *pSrcResource, __in UINT SrcSubresource, __in UINT SrcGPUIndex,
  7167. __in const D3D11_BOX *pSrcBox, __in UINT CopyFlags, __in UINT ExtendedFlags = 0 ) PURE;
  7168. #else
  7169. STDMETHOD_(NvAPI_Status,CopySubresourceRegion1)(THIS_ __in void *pContext1, __in ID3D11Resource *pDstResource, __in UINT DstSubresource,
  7170. __in UINT DstGPUIndex, __in UINT DstX, __in UINT DstY, __in UINT DstZ,
  7171. __in ID3D11Resource *pSrcResource, __in UINT SrcSubresource, __in UINT SrcGPUIndex,
  7172. __in const D3D11_BOX *pSrcBox, __in UINT CopyFlags, __in UINT ExtendedFlags = 0 ) PURE;
  7173. #endif
  7174. STDMETHOD_(NvAPI_Status,UpdateSubresource)(THIS_ __in ID3D11DeviceContext *pContext,__in ID3D11Resource *pDstResource, __in UINT DstSubresource, __in UINT DstGPUIndex,
  7175. __in const D3D11_BOX *pDstBox, __in const void *pSrcData, __in UINT SrcRowPitch, __in UINT SrcDepthPitch) PURE;
  7176. STDMETHOD_(NvAPI_Status,VSSetConstantBuffers)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT StartSlot,
  7177. __in UINT NumBuffers, __in ID3D11Buffer *const *ppConstantBuffers,
  7178. __in UINT *const pFirstConstant = NULL, __in UINT *const pNumConstants = NULL) PURE;
  7179. STDMETHOD_(NvAPI_Status,PSSetConstantBuffers)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT StartSlot,
  7180. __in UINT NumBuffers, __in ID3D11Buffer *const *ppConstantBuffers,
  7181. __in UINT *const pFirstConstant = NULL, __in UINT *const pNumConstants = NULL) PURE;
  7182. STDMETHOD_(NvAPI_Status,GSSetConstantBuffers)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT StartSlot,
  7183. __in UINT NumBuffers, __in ID3D11Buffer *const *ppConstantBuffers,
  7184. __in UINT *const pFirstConstant = NULL, __in UINT *const pNumConstants = NULL) PURE;
  7185. STDMETHOD_(NvAPI_Status,DSSetConstantBuffers)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT StartSlot,
  7186. __in UINT NumBuffers, __in ID3D11Buffer *const *ppConstantBuffers,
  7187. __in UINT *const pFirstConstant = NULL, __in UINT *const pNumConstants = NULL) PURE;
  7188. STDMETHOD_(NvAPI_Status,HSSetConstantBuffers)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT StartSlot,
  7189. __in UINT NumBuffers, __in ID3D11Buffer *const *ppConstantBuffers,
  7190. __in UINT *const pFirstConstant = NULL, __in UINT *const pNumConstants = NULL) PURE;
  7191. STDMETHOD_(NvAPI_Status,CSSetConstantBuffers)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT StartSlot,
  7192. __in UINT NumBuffers, __in ID3D11Buffer *const *ppConstantBuffers,
  7193. __in UINT *const pFirstConstant = NULL, __in UINT *const pNumConstants = NULL) PURE;
  7194. STDMETHOD_(NvAPI_Status,SetViewports)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT NumViewports,
  7195. __in const D3D11_VIEWPORT *pViewports) PURE;
  7196. STDMETHOD_(NvAPI_Status,SetScissorRects)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask, __in UINT NumRects,
  7197. __in const D3D11_RECT *pRects) PURE;
  7198. STDMETHOD_(HRESULT,GetData)(THIS_ __in ID3D11DeviceContext *pContext, __in ID3D11Asynchronous *pAsync, __in UINT GPUIndex,
  7199. __out void *pData, __in UINT DataSize, __in UINT GetDataFlags) PURE;
  7200. #if defined(__d3d11_2_h__)
  7201. STDMETHOD_(NvAPI_Status,UpdateTiles)(THIS_ __in ID3D11DeviceContext2 *pContext2, __in ID3D11Resource *pDestTiledResource,
  7202. __in UINT GPUMask, __in const D3D11_TILED_RESOURCE_COORDINATE *pDestTileRegionStartCoordinate,
  7203. __in const D3D11_TILE_REGION_SIZE *pDestTileRegionSize, __in const void *pSourceTileData,
  7204. __in UINT Flags) PURE;
  7205. #else
  7206. STDMETHOD_(NvAPI_Status,UpdateTiles)(THIS_ __in void *pContext2, __in ID3D11Resource *pDestTiledResource,
  7207. __in UINT GPUMask, __in const void *pDestTileRegionStartCoordinate,
  7208. __in const void *pDestTileRegionSize, __in const void *pSourceTileData,
  7209. __in UINT Flags) PURE;
  7210. #endif
  7211. STDMETHOD_(NvAPI_Status,CreateFences)(THIS_ __in UINT count, __out void **ppFences) PURE;
  7212. STDMETHOD_(NvAPI_Status,SetFence)(THIS_ __in UINT GPUIndex, __in void *hFence, __in UINT64 value) PURE;
  7213. STDMETHOD_(NvAPI_Status,WaitForFence)(THIS_ __in UINT GPUIMask, __in void *hFence, __in UINT64 value) PURE;
  7214. STDMETHOD_(NvAPI_Status,FreeFences)(THIS_ __in UINT count, __in void **ppFences) PURE;
  7215. STDMETHOD_(NvAPI_Status,PresentCompositingConfig )(THIS_ __in IUnknown *pSwapChain, __in UINT GPUMask,
  7216. __in const D3D11_RECT *pRects, __in UINT flags) PURE;
  7217. STDMETHOD_(NvAPI_Status,SetContextGPUMask)(THIS_ __in ID3D11DeviceContext *pContext, __in UINT GPUMask) PURE;
  7218. STDMETHOD_(NvAPI_Status,GetVideoBridgeStatus)(THIS_ __in IUnknown *pSwapChain, __in UINT* pVideoBridgeStatus) PURE;
  7219. };
  7220. //! Synchronization macros based on fences.
  7221. #define FENCE_SYNCHRONIZATION_START(pMultiGPUDevice, hFence, Value, srcGpu, dstGpu) \
  7222. pMultiGPUDevice->SetFence(dstGpu, hFence, Value); \
  7223. pMultiGPUDevice->WaitForFence(1 << (srcGpu), hFence, Value); \
  7224. Value++;
  7225. #define FENCE_SYNCHRONIZATION_END(pMultiGPUDevice, hFence, Value, srcGpu, dstGpu) \
  7226. pMultiGPUDevice->SetFence(srcGpu, hFence, Value); \
  7227. pMultiGPUDevice->WaitForFence(1 << (dstGpu), hFence, Value); \
  7228. Value++;
  7229. //! PresentCompositingConfig method flags.
  7230. #define NVAPI_PRESENT_COMPOSITING_CONFIG_FLAG_USE_VIDEO_BRIDGE 0x01
  7231. #define NVAPI_PRESENT_COMPOSITING_CONFIG_FLAG_CLEAR_OUTBANDS 0x02
  7232. #define NVAPI_PRESENT_COMPOSITING_CONFIG_FLAG_GET_VIDEO_BRIDGE_STATUS 0x80000000
  7233. #define NVAPI_VIDEO_BRIDGE_STATUS_AVAILABLE 0
  7234. #define NVAPI_VIDEO_BRIDGE_STATUS_NOT_AVAILABLE 1
  7235. #define NVAPI_VIDEO_BRIDGE_STATUS_FAILED_ACCESS 2
  7236. #define NVAPI_VIDEO_BRIDGE_STATUS_UNKNOWN 3
  7237. #define NVAPI_ALL_GPUS 0
  7238. typedef ID3D11MultiGPUDevice_V1 ID3D11MultiGPUDevice;
  7239. #define ID3D11MultiGPUDevice_VER1 MAKE_NVAPI_VERSION(ID3D11MultiGPUDevice_V1, 1)
  7240. #define ID3D11MultiGPUDevice_VER2 MAKE_NVAPI_VERSION(ID3D11MultiGPUDevice_V1, 2)
  7241. #define ID3D11MultiGPUDevice_VER ID3D11MultiGPUDevice_VER2
  7242. #define ALL_GPUS 0
  7243. //! \ingroup dx
  7244. NVAPI_INTERFACE NvAPI_D3D11_CreateMultiGPUDevice(__in ID3D11Device *pDevice, __in ULONG version, __out ULONG *currentVersion, __out ID3D11MultiGPUDevice **ppD3D11MultiGPUDevice, __in UINT maxGpus=ALL_GPUS);
  7245. #endif //defined(__cplusplus) && defined(__d3d11_h__)
  7246. #if defined (__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__))
  7247. ///////////////////////////////////////////////////////////////////////////////
  7248. //
  7249. // FUNCTION NAME: NvAPI_D3D_RegisterDevice
  7250. //
  7251. //! DESCRIPTION: Tells NvAPI about a D3D device. This must be called prior to using any DX1x
  7252. //! deferred-context calls.
  7253. //!
  7254. //! SUPPORTED OS: Windows Vista and higher
  7255. //!
  7256. //!
  7257. //! \param [in] pDev The ID3D10Device or ID3D11Device to use.
  7258. //!
  7259. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  7260. //! If there are return error codes with specific meaning for this API, they are listed below.
  7261. //!
  7262. //! \ingroup dx
  7263. ///////////////////////////////////////////////////////////////////////////////
  7264. NVAPI_INTERFACE NvAPI_D3D_RegisterDevice(__in IUnknown *pDev);
  7265. #endif //if defined(__cplusplus) && (defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__))
  7266. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  7267. ///////////////////////////////////////////////////////////////////////////////
  7268. //
  7269. // FUNCTION NAME: NvAPI_D3D11_MultiDrawInstancedIndirect
  7270. //
  7271. //! DESCRIPTION: Extension of DrawInstancedIndirect that takes a draw count in. The effect of this function is to loop over
  7272. //! that draw count and perform the DrawInstancedIndirect operation each time, incrementing the buffer offset
  7273. //! by the supplied stride each time.
  7274. //!
  7275. //! SUPPORTED OS: Windows Vista and higher
  7276. //!
  7277. //!
  7278. //! \param [in] *pDevContext11 Pointer to D3D11 device context (IC or DC)
  7279. //! \param [in] drawCount Do DrawInstancedIndirect operation this many times
  7280. //! \param [in] *pBuffer ID3D11Buffer that contains the command parameters
  7281. //! \param [in] alignedByteOffsetForArgs Start in pBuffer of the command parameters
  7282. //! \param [in] alignedByteStrideForArgs Stride of the command parameters - must be >= 4 * sizeof(NvU32)
  7283. //!
  7284. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  7285. //! If there are return error codes with specific meaning for this API, they are listed below.
  7286. //!
  7287. //! \retval NVAPI_D3D_DEVICE_NOT_REGISTERED When MultiDraw is called on a deferred context, and the device has not yet
  7288. //! been registered (NvAPI_D3D_RegisterDevice), this error is returned.
  7289. //! \ingroup dx
  7290. ///////////////////////////////////////////////////////////////////////////////
  7291. NVAPI_INTERFACE NvAPI_D3D11_MultiDrawInstancedIndirect(__in ID3D11DeviceContext *pDevContext11,
  7292. __in NvU32 drawCount,
  7293. __in ID3D11Buffer *pBuffer,
  7294. __in NvU32 alignedByteOffsetForArgs,
  7295. __in NvU32 alignedByteStrideForArgs);
  7296. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  7297. #if defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  7298. ///////////////////////////////////////////////////////////////////////////////
  7299. //
  7300. // FUNCTION NAME: NvAPI_D3D11_MultiDrawIndexedInstancedIndirect
  7301. //
  7302. //! DESCRIPTION: Extension of DrawIndexedInstancedIndirect that takes a draw count in. The effect of this function is to loop over
  7303. //! that draw count and perform the DrawIndexedInstancedIndirect operation each time, incrementing the buffer offset
  7304. //! by the supplied stride each time.
  7305. //!
  7306. //! SUPPORTED OS: Windows Vista and higher
  7307. //!
  7308. //!
  7309. //! \param [in] *pDevContext11 Pointer to D3D11 device context (IC or DC)
  7310. //! \param [in] drawCount Do DrawIndexedInstancedIndirect operation this many times
  7311. //! \param [in] *pBuffer ID3D11Buffer that contains the command parameters
  7312. //! \param [in] alignedByteOffsetForArgs Start in pBuffer of the command parameters
  7313. //! \param [in] alignedByteStrideForArgs Stride of the command parameters - must be >= 5 * sizeof(NvU32)
  7314. //!
  7315. //! RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status.
  7316. //! If there are return error codes with specific meaning for this API, they are listed below.
  7317. //!
  7318. //! \retval NVAPI_D3D_DEVICE_NOT_REGISTERED When MultiDraw is called on a deferred context, and the device has not yet
  7319. //! been registered (NvAPI_D3D_RegisterDevice), this error is returned.
  7320. //! \ingroup dx
  7321. ///////////////////////////////////////////////////////////////////////////////
  7322. NVAPI_INTERFACE NvAPI_D3D11_MultiDrawIndexedInstancedIndirect(__in ID3D11DeviceContext *pDevContext11,
  7323. __in NvU32 drawCount,
  7324. __in ID3D11Buffer *pBuffer,
  7325. __in NvU32 alignedByteOffsetForArgs,
  7326. __in NvU32 alignedByteStrideForArgs);
  7327. #endif //defined (__cplusplus) && (defined(__d3d11_h__) || defined(__d3d11_1_h__))
  7328. //! SUPPORTED OS: Windows 7 and higher
  7329. //!
  7330. #if defined (__cplusplus) && ( defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) )
  7331. ///////////////////////////////////////////////////////////////////////////////
  7332. //
  7333. // FUNCTION NAME: NvAPI_D3D_ImplicitSLIControl
  7334. //
  7335. //! This function enables/disables the SLI rendering mode. It has to be called prior to D3D device creation. Once this function is called with DISABLE_IMPLICIT_SLI
  7336. //! parameter all subsequently created devices will be forced to run in a single gpu mode until the same function is called with ENABLE_IMPLICIT_SLI parameter. The enable
  7337. //! call will force all subsequently created devices to run in default implicit SLI mode being determined by an application profile or a global control panel SLI setting.
  7338. //! This NvAPI call is supported in all DX10+ versions of the driver. It is supported on all Windows versions.
  7339. //!
  7340. //! \retval NVAPI_OK Completed request
  7341. //! \retval NVAPI_ERROR Error occurred
  7342. //! \ingroup dx
  7343. ///////////////////////////////////////////////////////////////////////////////
  7344. //! \ingroup dx
  7345. typedef enum _IMPLICIT_SLI_CONTROL
  7346. {
  7347. DISABLE_IMPLICIT_SLI = 0,
  7348. ENABLE_IMPLICIT_SLI = 1,
  7349. } IMPLICIT_SLI_CONTROL;
  7350. //! \ingroup dx
  7351. NVAPI_INTERFACE NvAPI_D3D_ImplicitSLIControl(__in IMPLICIT_SLI_CONTROL implicitSLIControl);
  7352. #endif //defined (__cplusplus) && ( defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d10_1_h__) ||defined(__d3d11_h__) )
  7353. //! SUPPORTED OS: Windows Vista and higher
  7354. //!
  7355. #if defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) )
  7356. ///////////////////////////////////////////////////////////////////////////////
  7357. //
  7358. // FUNCTION NAME: NvAPI_D3D1x_GetLowLatencySupport
  7359. //
  7360. //! DESCRIPTION: Query support for low latency nodes
  7361. //!
  7362. //!
  7363. //! \param [in] adapterId The adapter ID that specifies the GPU to query.
  7364. //! \param [out] pIsLowLatencySupported Returns true if and only if low latency nodes are supported.
  7365. //!
  7366. //! \retval NVAPI_OK Call succeeded.
  7367. //! \retval NVAPI_ERROR Call failed.
  7368. //! \retval NVAPI_INVALID_ARGUMENT One or more arguments are invalid.
  7369. //! \retval NVAPI_INVALID_POINTER A NULL pointer was passed
  7370. //!
  7371. //! \ingroup dx
  7372. ///////////////////////////////////////////////////////////////////////////////
  7373. NVAPI_INTERFACE NvAPI_D3D1x_GetLowLatencySupport(__in LUID pAdapterId,
  7374. __out BOOL *pIsLowLatencySupported);
  7375. #endif //defined(__cplusplus) && ( defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__) )
  7376. /////////////////////////////////////////////////////////////////////////
  7377. // Video Input Output (VIO) API
  7378. /////////////////////////////////////////////////////////////////////////
  7379. //! \ingroup vidio
  7380. //! Unique identifier for VIO owner (process identifier or NVVIOOWNERID_NONE)
  7381. typedef NvU32 NVVIOOWNERID;
  7382. //! \addtogroup vidio
  7383. //! @{
  7384. #define NVVIOOWNERID_NONE 0 //!< Unregistered ownerId
  7385. //! Owner type for device
  7386. typedef enum _NVVIOOWNERTYPE
  7387. {
  7388. NVVIOOWNERTYPE_NONE , //!< No owner for the device
  7389. NVVIOOWNERTYPE_APPLICATION , //!< Application owns the device
  7390. NVVIOOWNERTYPE_DESKTOP , //!< Desktop transparent mode owns the device (not applicable for video input)
  7391. }NVVIOOWNERTYPE;
  7392. // Access rights for NvAPI_VIO_Open()
  7393. //! Read access (not applicable for video output)
  7394. #define NVVIO_O_READ 0x00000000
  7395. //! Write exclusive access (not applicable for video input)
  7396. #define NVVIO_O_WRITE_EXCLUSIVE 0x00010001
  7397. //!
  7398. #define NVVIO_VALID_ACCESSRIGHTS (NVVIO_O_READ | \
  7399. NVVIO_O_WRITE_EXCLUSIVE )
  7400. //! VIO_DATA.ulOwnerID high-bit is set only if device has been initialized by VIOAPI
  7401. //! examined at NvAPI_GetCapabilities|NvAPI_VIO_Open to determine if settings need to be applied from registry or POR state read
  7402. #define NVVIO_OWNERID_INITIALIZED 0x80000000
  7403. //! VIO_DATA.ulOwnerID next-bit is set only if device is currently in exclusive write access mode from NvAPI_VIO_Open()
  7404. #define NVVIO_OWNERID_EXCLUSIVE 0x40000000
  7405. //! VIO_DATA.ulOwnerID lower bits are:
  7406. //! NVGVOOWNERTYPE_xxx enumerations indicating use context
  7407. #define NVVIO_OWNERID_TYPEMASK 0x0FFFFFFF //!< mask for NVVIOOWNERTYPE_xxx
  7408. //! @}
  7409. //---------------------------------------------------------------------
  7410. // Enumerations
  7411. //---------------------------------------------------------------------
  7412. //! \addtogroup vidio
  7413. //! @{
  7414. //! Video signal format and resolution
  7415. typedef enum _NVVIOSIGNALFORMAT
  7416. {
  7417. NVVIOSIGNALFORMAT_NONE, //!< Invalid signal format
  7418. NVVIOSIGNALFORMAT_487I_59_94_SMPTE259_NTSC, //!< 01 487i 59.94Hz (SMPTE259) NTSC
  7419. NVVIOSIGNALFORMAT_576I_50_00_SMPTE259_PAL, //!< 02 576i 50.00Hz (SMPTE259) PAL
  7420. NVVIOSIGNALFORMAT_1035I_60_00_SMPTE260, //!< 03 1035i 60.00Hz (SMPTE260)
  7421. NVVIOSIGNALFORMAT_1035I_59_94_SMPTE260, //!< 04 1035i 59.94Hz (SMPTE260)
  7422. NVVIOSIGNALFORMAT_1080I_50_00_SMPTE295, //!< 05 1080i 50.00Hz (SMPTE295)
  7423. NVVIOSIGNALFORMAT_1080I_60_00_SMPTE274, //!< 06 1080i 60.00Hz (SMPTE274)
  7424. NVVIOSIGNALFORMAT_1080I_59_94_SMPTE274, //!< 07 1080i 59.94Hz (SMPTE274)
  7425. NVVIOSIGNALFORMAT_1080I_50_00_SMPTE274, //!< 08 1080i 50.00Hz (SMPTE274)
  7426. NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274, //!< 09 1080p 30.00Hz (SMPTE274)
  7427. NVVIOSIGNALFORMAT_1080P_29_97_SMPTE274, //!< 10 1080p 29.97Hz (SMPTE274)
  7428. NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274, //!< 11 1080p 25.00Hz (SMPTE274)
  7429. NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274, //!< 12 1080p 24.00Hz (SMPTE274)
  7430. NVVIOSIGNALFORMAT_1080P_23_976_SMPTE274, //!< 13 1080p 23.976Hz (SMPTE274)
  7431. NVVIOSIGNALFORMAT_720P_60_00_SMPTE296, //!< 14 720p 60.00Hz (SMPTE296)
  7432. NVVIOSIGNALFORMAT_720P_59_94_SMPTE296, //!< 15 720p 59.94Hz (SMPTE296)
  7433. NVVIOSIGNALFORMAT_720P_50_00_SMPTE296, //!< 16 720p 50.00Hz (SMPTE296)
  7434. NVVIOSIGNALFORMAT_1080I_48_00_SMPTE274, //!< 17 1080I 48.00Hz (SMPTE274)
  7435. NVVIOSIGNALFORMAT_1080I_47_96_SMPTE274, //!< 18 1080I 47.96Hz (SMPTE274)
  7436. NVVIOSIGNALFORMAT_720P_30_00_SMPTE296, //!< 19 720p 30.00Hz (SMPTE296)
  7437. NVVIOSIGNALFORMAT_720P_29_97_SMPTE296, //!< 20 720p 29.97Hz (SMPTE296)
  7438. NVVIOSIGNALFORMAT_720P_25_00_SMPTE296, //!< 21 720p 25.00Hz (SMPTE296)
  7439. NVVIOSIGNALFORMAT_720P_24_00_SMPTE296, //!< 22 720p 24.00Hz (SMPTE296)
  7440. NVVIOSIGNALFORMAT_720P_23_98_SMPTE296, //!< 23 720p 23.98Hz (SMPTE296)
  7441. NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372, //!< 24 2048p 30.00Hz (SMPTE372)
  7442. NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372, //!< 25 2048p 29.97Hz (SMPTE372)
  7443. NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372, //!< 26 2048i 60.00Hz (SMPTE372)
  7444. NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372, //!< 27 2048i 59.94Hz (SMPTE372)
  7445. NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372, //!< 28 2048p 25.00Hz (SMPTE372)
  7446. NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372, //!< 29 2048i 50.00Hz (SMPTE372)
  7447. NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372, //!< 30 2048p 24.00Hz (SMPTE372)
  7448. NVVIOSIGNALFORMAT_2048P_23_98_SMPTE372, //!< 31 2048p 23.98Hz (SMPTE372)
  7449. NVVIOSIGNALFORMAT_2048I_48_00_SMPTE372, //!< 32 2048i 48.00Hz (SMPTE372)
  7450. NVVIOSIGNALFORMAT_2048I_47_96_SMPTE372, //!< 33 2048i 47.96Hz (SMPTE372)
  7451. NVVIOSIGNALFORMAT_1080PSF_25_00_SMPTE274, //!< 34 1080PsF 25.00Hz (SMPTE274)
  7452. NVVIOSIGNALFORMAT_1080PSF_29_97_SMPTE274, //!< 35 1080PsF 29.97Hz (SMPTE274)
  7453. NVVIOSIGNALFORMAT_1080PSF_30_00_SMPTE274, //!< 36 1080PsF 30.00Hz (SMPTE274)
  7454. NVVIOSIGNALFORMAT_1080PSF_24_00_SMPTE274, //!< 37 1080PsF 24.00Hz (SMPTE274)
  7455. NVVIOSIGNALFORMAT_1080PSF_23_98_SMPTE274, //!< 38 1080PsF 23.98Hz (SMPTE274)
  7456. NVVIOSIGNALFORMAT_1080P_50_00_SMPTE274_3G_LEVEL_A, //!< 39 1080P 50.00Hz (SMPTE274) 3G Level A
  7457. NVVIOSIGNALFORMAT_1080P_59_94_SMPTE274_3G_LEVEL_A, //!< 40 1080P 59.94Hz (SMPTE274) 3G Level A
  7458. NVVIOSIGNALFORMAT_1080P_60_00_SMPTE274_3G_LEVEL_A, //!< 41 1080P 60.00Hz (SMPTE274) 3G Level A
  7459. NVVIOSIGNALFORMAT_1080P_60_00_SMPTE274_3G_LEVEL_B, //!< 42 1080p 60.00Hz (SMPTE274) 3G Level B
  7460. NVVIOSIGNALFORMAT_1080I_60_00_SMPTE274_3G_LEVEL_B, //!< 43 1080i 60.00Hz (SMPTE274) 3G Level B
  7461. NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372_3G_LEVEL_B, //!< 44 2048i 60.00Hz (SMPTE372) 3G Level B
  7462. NVVIOSIGNALFORMAT_1080P_50_00_SMPTE274_3G_LEVEL_B, //!< 45 1080p 50.00Hz (SMPTE274) 3G Level B
  7463. NVVIOSIGNALFORMAT_1080I_50_00_SMPTE274_3G_LEVEL_B, //!< 46 1080i 50.00Hz (SMPTE274) 3G Level B
  7464. NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372_3G_LEVEL_B, //!< 47 2048i 50.00Hz (SMPTE372) 3G Level B
  7465. NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274_3G_LEVEL_B, //!< 48 1080p 30.00Hz (SMPTE274) 3G Level B
  7466. NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372_3G_LEVEL_B, //!< 49 2048p 30.00Hz (SMPTE372) 3G Level B
  7467. NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274_3G_LEVEL_B, //!< 50 1080p 25.00Hz (SMPTE274) 3G Level B
  7468. NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372_3G_LEVEL_B, //!< 51 2048p 25.00Hz (SMPTE372) 3G Level B
  7469. NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274_3G_LEVEL_B, //!< 52 1080p 24.00Hz (SMPTE274) 3G Level B
  7470. NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372_3G_LEVEL_B, //!< 53 2048p 24.00Hz (SMPTE372) 3G Level B
  7471. NVVIOSIGNALFORMAT_1080I_48_00_SMPTE274_3G_LEVEL_B, //!< 54 1080i 48.00Hz (SMPTE274) 3G Level B
  7472. NVVIOSIGNALFORMAT_2048I_48_00_SMPTE372_3G_LEVEL_B, //!< 55 2048i 48.00Hz (SMPTE372) 3G Level B
  7473. NVVIOSIGNALFORMAT_1080P_59_94_SMPTE274_3G_LEVEL_B, //!< 56 1080p 59.94Hz (SMPTE274) 3G Level B
  7474. NVVIOSIGNALFORMAT_1080I_59_94_SMPTE274_3G_LEVEL_B, //!< 57 1080i 59.94Hz (SMPTE274) 3G Level B
  7475. NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372_3G_LEVEL_B, //!< 58 2048i 59.94Hz (SMPTE372) 3G Level B
  7476. NVVIOSIGNALFORMAT_1080P_29_97_SMPTE274_3G_LEVEL_B, //!< 59 1080p 29.97Hz (SMPTE274) 3G Level B
  7477. NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372_3G_LEVEL_B, //!< 60 2048p 29.97Hz (SMPTE372) 3G Level B
  7478. NVVIOSIGNALFORMAT_1080P_23_98_SMPTE274_3G_LEVEL_B, //!< 61 1080p 29.98Hz (SMPTE274) 3G Level B
  7479. NVVIOSIGNALFORMAT_2048P_23_98_SMPTE372_3G_LEVEL_B, //!< 62 2048p 29.98Hz (SMPTE372) 3G Level B
  7480. NVVIOSIGNALFORMAT_1080I_47_96_SMPTE274_3G_LEVEL_B, //!< 63 1080i 47.96Hz (SMPTE274) 3G Level B
  7481. NVVIOSIGNALFORMAT_2048I_47_96_SMPTE372_3G_LEVEL_B, //!< 64 2048i 47.96Hz (SMPTE372) 3G Level B
  7482. NVVIOSIGNALFORMAT_END //!< 65 To indicate end of signal format list
  7483. }NVVIOSIGNALFORMAT;
  7484. //! SMPTE standards format
  7485. typedef enum _NVVIOVIDEOSTANDARD
  7486. {
  7487. NVVIOVIDEOSTANDARD_SMPTE259 , //!< SMPTE259
  7488. NVVIOVIDEOSTANDARD_SMPTE260 , //!< SMPTE260
  7489. NVVIOVIDEOSTANDARD_SMPTE274 , //!< SMPTE274
  7490. NVVIOVIDEOSTANDARD_SMPTE295 , //!< SMPTE295
  7491. NVVIOVIDEOSTANDARD_SMPTE296 , //!< SMPTE296
  7492. NVVIOVIDEOSTANDARD_SMPTE372 , //!< SMPTE372
  7493. }NVVIOVIDEOSTANDARD;
  7494. //! HD or SD video type
  7495. typedef enum _NVVIOVIDEOTYPE
  7496. {
  7497. NVVIOVIDEOTYPE_SD , //!< Standard-definition (SD)
  7498. NVVIOVIDEOTYPE_HD , //!< High-definition (HD)
  7499. }NVVIOVIDEOTYPE;
  7500. //! Interlace mode
  7501. typedef enum _NVVIOINTERLACEMODE
  7502. {
  7503. NVVIOINTERLACEMODE_PROGRESSIVE , //!< Progressive (p)
  7504. NVVIOINTERLACEMODE_INTERLACE , //!< Interlace (i)
  7505. NVVIOINTERLACEMODE_PSF , //!< Progressive Segment Frame (psf)
  7506. }NVVIOINTERLACEMODE;
  7507. //! Video data format
  7508. typedef enum _NVVIODATAFORMAT
  7509. {
  7510. NVVIODATAFORMAT_UNKNOWN = -1 , //!< Invalid DataFormat
  7511. NVVIODATAFORMAT_R8G8B8_TO_YCRCB444 , //!< R8:G8:B8 => YCrCb (4:4:4)
  7512. NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4444 , //!< R8:G8:B8:A8 => YCrCbA (4:4:4:4)
  7513. NVVIODATAFORMAT_R8G8B8Z10_TO_YCRCBZ4444 , //!< R8:G8:B8:Z10 => YCrCbZ (4:4:4:4)
  7514. NVVIODATAFORMAT_R8G8B8_TO_YCRCB422 , //!< R8:G8:B8 => YCrCb (4:2:2)
  7515. NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4224 , //!< R8:G8:B8:A8 => YCrCbA (4:2:2:4)
  7516. NVVIODATAFORMAT_R8G8B8Z10_TO_YCRCBZ4224 , //!< R8:G8:B8:Z10 => YCrCbZ (4:2:2:4)
  7517. NVVIODATAFORMAT_X8X8X8_444_PASSTHRU , //!< R8:G8:B8 => RGB (4:4:4)
  7518. NVVIODATAFORMAT_X8X8X8A8_4444_PASSTHRU , //!< R8:G8:B8:A8 => RGBA (4:4:4:4)
  7519. NVVIODATAFORMAT_X8X8X8Z10_4444_PASSTHRU , //!< R8:G8:B8:Z10 => RGBZ (4:4:4:4)
  7520. NVVIODATAFORMAT_X10X10X10_444_PASSTHRU , //!< Y10:CR10:CB10 => YCrCb (4:4:4)
  7521. NVVIODATAFORMAT_X10X8X8_444_PASSTHRU , //!< Y10:CR8:CB8 => YCrCb (4:4:4)
  7522. NVVIODATAFORMAT_X10X8X8A10_4444_PASSTHRU , //!< Y10:CR8:CB8:A10 => YCrCbA (4:4:4:4)
  7523. NVVIODATAFORMAT_X10X8X8Z10_4444_PASSTHRU , //!< Y10:CR8:CB8:Z10 => YCrCbZ (4:4:4:4)
  7524. NVVIODATAFORMAT_DUAL_R8G8B8_TO_DUAL_YCRCB422 , //!< R8:G8:B8 + R8:G8:B8 => YCrCb (4:2:2 + 4:2:2)
  7525. NVVIODATAFORMAT_DUAL_X8X8X8_TO_DUAL_422_PASSTHRU , //!< Y8:CR8:CB8 + Y8:CR8:CB8 => YCrCb (4:2:2 + 4:2:2)
  7526. NVVIODATAFORMAT_R10G10B10_TO_YCRCB422 , //!< R10:G10:B10 => YCrCb (4:2:2)
  7527. NVVIODATAFORMAT_R10G10B10_TO_YCRCB444 , //!< R10:G10:B10 => YCrCb (4:4:4)
  7528. NVVIODATAFORMAT_X12X12X12_444_PASSTHRU , //!< X12:X12:X12 => XXX (4:4:4)
  7529. NVVIODATAFORMAT_X12X12X12_422_PASSTHRU , //!< X12:X12:X12 => XXX (4:2:2)
  7530. NVVIODATAFORMAT_Y10CR10CB10_TO_YCRCB422 , //!< Y10:CR10:CB10 => YCrCb (4:2:2)
  7531. NVVIODATAFORMAT_Y8CR8CB8_TO_YCRCB422 , //!< Y8:CR8:CB8 => YCrCb (4:2:2)
  7532. NVVIODATAFORMAT_Y10CR8CB8A10_TO_YCRCBA4224 , //!< Y10:CR8:CB8:A10 => YCrCbA (4:2:2:4)
  7533. NVVIODATAFORMAT_R10G10B10_TO_RGB444 , //!< R10:G10:B10 => RGB (4:4:4)
  7534. NVVIODATAFORMAT_R12G12B12_TO_YCRCB444 , //!< R12:G12:B12 => YCrCb (4:4:4)
  7535. NVVIODATAFORMAT_R12G12B12_TO_YCRCB422 , //!< R12:G12:B12 => YCrCb (4:2:2)
  7536. }NVVIODATAFORMAT;
  7537. //! Video output area
  7538. typedef enum _NVVIOOUTPUTAREA
  7539. {
  7540. NVVIOOUTPUTAREA_FULLSIZE , //!< Output to entire video resolution (full size)
  7541. NVVIOOUTPUTAREA_SAFEACTION , //!< Output to centered 90% of video resolution (safe action)
  7542. NVVIOOUTPUTAREA_SAFETITLE , //!< Output to centered 80% of video resolution (safe title)
  7543. }NVVIOOUTPUTAREA;
  7544. //! Synchronization source
  7545. typedef enum _NVVIOSYNCSOURCE
  7546. {
  7547. NVVIOSYNCSOURCE_SDISYNC , //!< SDI Sync (Digital input)
  7548. NVVIOSYNCSOURCE_COMPSYNC , //!< COMP Sync (Composite input)
  7549. }NVVIOSYNCSOURCE;
  7550. //! Composite synchronization type
  7551. typedef enum _NVVIOCOMPSYNCTYPE
  7552. {
  7553. NVVIOCOMPSYNCTYPE_AUTO , //!< Auto-detect
  7554. NVVIOCOMPSYNCTYPE_BILEVEL , //!< Bi-level signal
  7555. NVVIOCOMPSYNCTYPE_TRILEVEL , //!< Tri-level signal
  7556. }NVVIOCOMPSYNCTYPE;
  7557. //! Video input output status
  7558. typedef enum _NVVIOINPUTOUTPUTSTATUS
  7559. {
  7560. NVINPUTOUTPUTSTATUS_OFF , //!< Not in use
  7561. NVINPUTOUTPUTSTATUS_ERROR , //!< Error detected
  7562. NVINPUTOUTPUTSTATUS_SDI_SD , //!< SDI (standard-definition)
  7563. NVINPUTOUTPUTSTATUS_SDI_HD , //!< SDI (high-definition)
  7564. }NVVIOINPUTOUTPUTSTATUS;
  7565. //! Synchronization input status
  7566. typedef enum _NVVIOSYNCSTATUS
  7567. {
  7568. NVVIOSYNCSTATUS_OFF , //!< Sync not detected
  7569. NVVIOSYNCSTATUS_ERROR , //!< Error detected
  7570. NVVIOSYNCSTATUS_SYNCLOSS , //!< Genlock in use, format mismatch with output
  7571. NVVIOSYNCSTATUS_COMPOSITE , //!< Composite sync
  7572. NVVIOSYNCSTATUS_SDI_SD , //!< SDI sync (standard-definition)
  7573. NVVIOSYNCSTATUS_SDI_HD , //!< SDI sync (high-definition)
  7574. }NVVIOSYNCSTATUS;
  7575. //! Video Capture Status
  7576. typedef enum _NVVIOCAPTURESTATUS
  7577. {
  7578. NVVIOSTATUS_STOPPED , //!< Sync not detected
  7579. NVVIOSTATUS_RUNNING , //!< Error detected
  7580. NVVIOSTATUS_ERROR , //!< Genlock in use, format mismatch with output
  7581. }NVVIOCAPTURESTATUS;
  7582. //! Video Capture Status
  7583. typedef enum _NVVIOSTATUSTYPE
  7584. {
  7585. NVVIOSTATUSTYPE_IN , //!< Input Status
  7586. NVVIOSTATUSTYPE_OUT , //!< Output Status
  7587. }NVVIOSTATUSTYPE;
  7588. //! Assumption, maximum 4 SDI input and 4 SDI output cards supported on a system
  7589. #define NVAPI_MAX_VIO_DEVICES 8
  7590. //! 4 physical jacks supported on each SDI input card.
  7591. #define NVAPI_MAX_VIO_JACKS 4
  7592. //! Each physical jack an on SDI input card can have
  7593. //! two "channels" in the case of "3G" VideoFormats, as specified
  7594. //! by SMPTE 425; for non-3G VideoFormats, only the first channel within
  7595. //! a physical jack is valid.
  7596. #define NVAPI_MAX_VIO_CHANNELS_PER_JACK 2
  7597. //! 4 Streams, 1 per physical jack
  7598. #define NVAPI_MAX_VIO_STREAMS 4
  7599. #define NVAPI_MIN_VIO_STREAMS 1
  7600. //! SDI input supports a max of 2 links per stream
  7601. #define NVAPI_MAX_VIO_LINKS_PER_STREAM 2
  7602. #define NVAPI_MAX_FRAMELOCK_MAPPING_MODES 20
  7603. //! Min number of capture images
  7604. #define NVAPI_GVI_MIN_RAW_CAPTURE_IMAGES 1
  7605. //! Max number of capture images
  7606. #define NVAPI_GVI_MAX_RAW_CAPTURE_IMAGES 32
  7607. //! Default number of capture images
  7608. #define NVAPI_GVI_DEFAULT_RAW_CAPTURE_IMAGES 5
  7609. // Data Signal notification events. These need a event handler in RM.
  7610. // Register/Unregister and PopEvent NVAPI's are already available.
  7611. //! Device configuration
  7612. typedef enum _NVVIOCONFIGTYPE
  7613. {
  7614. NVVIOCONFIGTYPE_IN , //!< Input Status
  7615. NVVIOCONFIGTYPE_OUT , //!< Output Status
  7616. }NVVIOCONFIGTYPE;
  7617. typedef enum _NVVIOCOLORSPACE
  7618. {
  7619. NVVIOCOLORSPACE_UNKNOWN,
  7620. NVVIOCOLORSPACE_YCBCR,
  7621. NVVIOCOLORSPACE_YCBCRA,
  7622. NVVIOCOLORSPACE_YCBCRD,
  7623. NVVIOCOLORSPACE_GBR,
  7624. NVVIOCOLORSPACE_GBRA,
  7625. NVVIOCOLORSPACE_GBRD,
  7626. } NVVIOCOLORSPACE;
  7627. //! Component sampling
  7628. typedef enum _NVVIOCOMPONENTSAMPLING
  7629. {
  7630. NVVIOCOMPONENTSAMPLING_UNKNOWN,
  7631. NVVIOCOMPONENTSAMPLING_4444,
  7632. NVVIOCOMPONENTSAMPLING_4224,
  7633. NVVIOCOMPONENTSAMPLING_444,
  7634. NVVIOCOMPONENTSAMPLING_422
  7635. } NVVIOCOMPONENTSAMPLING;
  7636. typedef enum _NVVIOBITSPERCOMPONENT
  7637. {
  7638. NVVIOBITSPERCOMPONENT_UNKNOWN,
  7639. NVVIOBITSPERCOMPONENT_8,
  7640. NVVIOBITSPERCOMPONENT_10,
  7641. NVVIOBITSPERCOMPONENT_12,
  7642. } NVVIOBITSPERCOMPONENT;
  7643. typedef enum _NVVIOLINKID
  7644. {
  7645. NVVIOLINKID_UNKNOWN,
  7646. NVVIOLINKID_A,
  7647. NVVIOLINKID_B,
  7648. NVVIOLINKID_C,
  7649. NVVIOLINKID_D
  7650. } NVVIOLINKID;
  7651. typedef enum _NVVIOANCPARITYCOMPUTATION
  7652. {
  7653. NVVIOANCPARITYCOMPUTATION_AUTO,
  7654. NVVIOANCPARITYCOMPUTATION_ON,
  7655. NVVIOANCPARITYCOMPUTATION_OFF
  7656. } NVVIOANCPARITYCOMPUTATION;
  7657. //! @}
  7658. //---------------------------------------------------------------------
  7659. // Structures
  7660. //---------------------------------------------------------------------
  7661. //! \addtogroup vidio
  7662. //! @{
  7663. //! Supports Serial Digital Interface (SDI) output
  7664. #define NVVIOCAPS_VIDOUT_SDI 0x00000001
  7665. //! Supports Internal timing source
  7666. #define NVVIOCAPS_SYNC_INTERNAL 0x00000100
  7667. //! Supports Genlock timing source
  7668. #define NVVIOCAPS_SYNC_GENLOCK 0x00000200
  7669. //! Supports Serial Digital Interface (SDI) synchronization input
  7670. #define NVVIOCAPS_SYNCSRC_SDI 0x00001000
  7671. //! Supports Composite synchronization input
  7672. #define NVVIOCAPS_SYNCSRC_COMP 0x00002000
  7673. //! Supports Desktop transparent mode
  7674. #define NVVIOCAPS_OUTPUTMODE_DESKTOP 0x00010000
  7675. //! Supports OpenGL application mode
  7676. #define NVVIOCAPS_OUTPUTMODE_OPENGL 0x00020000
  7677. //! Supports Serial Digital Interface (SDI) input
  7678. #define NVVIOCAPS_VIDIN_SDI 0x00100000
  7679. //! Supports Packed ANC
  7680. #define NVVIOCAPS_PACKED_ANC_SUPPORTED 0x00200000
  7681. //! Supports ANC audio blanking
  7682. #define NVVIOCAPS_AUDIO_BLANKING_SUPPORTED 0x00400000
  7683. //! SDI-class interface: SDI output with two genlock inputs
  7684. #define NVVIOCLASS_SDI 0x00000001
  7685. //! Device capabilities
  7686. typedef struct _NVVIOCAPS
  7687. {
  7688. NvU32 version; //!< Structure version
  7689. NvAPI_String adapterName; //!< Graphics adapter name
  7690. NvU32 adapterClass; //!< Graphics adapter classes (NVVIOCLASS_SDI mask)
  7691. NvU32 adapterCaps; //!< Graphics adapter capabilities (NVVIOCAPS_* mask)
  7692. NvU32 dipSwitch; //!< On-board DIP switch settings bits
  7693. NvU32 dipSwitchReserved; //!< On-board DIP switch settings reserved bits
  7694. NvU32 boardID; //!< Board ID
  7695. //! Driver version
  7696. struct //
  7697. {
  7698. NvU32 majorVersion; //!< Major version. For GVI, majorVersion contains MajorVersion(HIWORD) And MinorVersion(LOWORD)
  7699. NvU32 minorVersion; //!< Minor version. For GVI, minorVersion contains Revison(HIWORD) And Build(LOWORD)
  7700. } driver; //
  7701. //! Firmware version
  7702. struct
  7703. {
  7704. NvU32 majorVersion; //!< Major version. In version 2, for both GVI and GVO, majorVersion contains MajorVersion(HIWORD) And MinorVersion(LOWORD)
  7705. NvU32 minorVersion; //!< Minor version. In version 2, for both GVI and GVO, minorVersion contains Revison(HIWORD) And Build(LOWORD)
  7706. } firmWare; //
  7707. NVVIOOWNERID ownerId; //!< Unique identifier for owner of video output (NVVIOOWNERID_INVALID if free running)
  7708. NVVIOOWNERTYPE ownerType; //!< Owner type (OpenGL application or Desktop mode)
  7709. } NVVIOCAPS;
  7710. //! Macro for constructing the version field of NVVIOCAPS
  7711. #define NVVIOCAPS_VER1 MAKE_NVAPI_VERSION(NVVIOCAPS,1)
  7712. #define NVVIOCAPS_VER2 MAKE_NVAPI_VERSION(NVVIOCAPS,2)
  7713. #define NVVIOCAPS_VER NVVIOCAPS_VER2
  7714. //! Input channel status
  7715. typedef struct _NVVIOCHANNELSTATUS
  7716. {
  7717. NvU32 smpte352; //!< 4-byte SMPTE 352 video payload identifier
  7718. NVVIOSIGNALFORMAT signalFormat; //!< Signal format
  7719. NVVIOBITSPERCOMPONENT bitsPerComponent; //!< Bits per component
  7720. NVVIOCOMPONENTSAMPLING samplingFormat; //!< Sampling format
  7721. NVVIOCOLORSPACE colorSpace; //!< Color space
  7722. NVVIOLINKID linkID; //!< Link ID
  7723. } NVVIOCHANNELSTATUS;
  7724. //! Input device status
  7725. typedef struct _NVVIOINPUTSTATUS
  7726. {
  7727. NVVIOCHANNELSTATUS vidIn[NVAPI_MAX_VIO_JACKS][NVAPI_MAX_VIO_CHANNELS_PER_JACK]; //!< Video input status per channel within a jack
  7728. NVVIOCAPTURESTATUS captureStatus; //!< status of video capture
  7729. } NVVIOINPUTSTATUS;
  7730. //! Output device status
  7731. typedef struct _NVVIOOUTPUTSTATUS
  7732. {
  7733. NVVIOINPUTOUTPUTSTATUS vid1Out; //!< Video 1 output status
  7734. NVVIOINPUTOUTPUTSTATUS vid2Out; //!< Video 2 output status
  7735. NVVIOSYNCSTATUS sdiSyncIn; //!< SDI sync input status
  7736. NVVIOSYNCSTATUS compSyncIn; //!< Composite sync input status
  7737. NvU32 syncEnable; //!< Sync enable (TRUE if using syncSource)
  7738. NVVIOSYNCSOURCE syncSource; //!< Sync source
  7739. NVVIOSIGNALFORMAT syncFormat; //!< Sync format
  7740. NvU32 frameLockEnable; //!< Framelock enable flag
  7741. NvU32 outputVideoLocked; //!< Output locked status
  7742. NvU32 dataIntegrityCheckErrorCount; //!< Data integrity check error count
  7743. NvU32 dataIntegrityCheckEnabled; //!< Data integrity check status enabled
  7744. NvU32 dataIntegrityCheckFailed; //!< Data integrity check status failed
  7745. NvU32 uSyncSourceLocked; //!< genlocked to framelocked to ref signal
  7746. NvU32 uPowerOn; //!< TRUE: indicates there is sufficient power
  7747. } NVVIOOUTPUTSTATUS;
  7748. //! Video device status.
  7749. typedef struct _NVVIOSTATUS
  7750. {
  7751. NvU32 version; //!< Structure version
  7752. NVVIOSTATUSTYPE nvvioStatusType; //!< Input or Output status
  7753. union
  7754. {
  7755. NVVIOINPUTSTATUS inStatus; //!< Input device status
  7756. NVVIOOUTPUTSTATUS outStatus; //!< Output device status
  7757. }vioStatus;
  7758. } NVVIOSTATUS;
  7759. //! Macro for constructingthe version field of NVVIOSTATUS
  7760. #define NVVIOSTATUS_VER MAKE_NVAPI_VERSION(NVVIOSTATUS,1)
  7761. //! Output region
  7762. typedef struct _NVVIOOUTPUTREGION
  7763. {
  7764. NvU32 x; //!< Horizontal origin in pixels
  7765. NvU32 y; //!< Vertical origin in pixels
  7766. NvU32 width; //!< Width of region in pixels
  7767. NvU32 height; //!< Height of region in pixels
  7768. } NVVIOOUTPUTREGION;
  7769. //! Gamma ramp (8-bit index)
  7770. typedef struct _NVVIOGAMMARAMP8
  7771. {
  7772. NvU16 uRed[256]; //!< Red channel gamma ramp (8-bit index, 16-bit values)
  7773. NvU16 uGreen[256]; //!< Green channel gamma ramp (8-bit index, 16-bit values)
  7774. NvU16 uBlue[256]; //!< Blue channel gamma ramp (8-bit index, 16-bit values)
  7775. } NVVIOGAMMARAMP8;
  7776. //! Gamma ramp (10-bit index)
  7777. typedef struct _NVVIOGAMMARAMP10
  7778. {
  7779. NvU16 uRed[1024]; //!< Red channel gamma ramp (10-bit index, 16-bit values)
  7780. NvU16 uGreen[1024]; //!< Green channel gamma ramp (10-bit index, 16-bit values)
  7781. NvU16 uBlue[1024]; //!< Blue channel gamma ramp (10-bit index, 16-bit values)
  7782. } NVVIOGAMMARAMP10;
  7783. //! Sync delay
  7784. typedef struct _NVVIOSYNCDELAY
  7785. {
  7786. NvU32 version; //!< Structure version
  7787. NvU32 horizontalDelay; //!< Horizontal delay in pixels
  7788. NvU32 verticalDelay; //!< Vertical delay in lines
  7789. } NVVIOSYNCDELAY;
  7790. //! Macro for constructing the version field of NVVIOSYNCDELAY
  7791. #define NVVIOSYNCDELAY_VER MAKE_NVAPI_VERSION(NVVIOSYNCDELAY,1)
  7792. //! Video mode information
  7793. typedef struct _NVVIOVIDEOMODE
  7794. {
  7795. NvU32 horizontalPixels; //!< Horizontal resolution (in pixels)
  7796. NvU32 verticalLines; //!< Vertical resolution for frame (in lines)
  7797. float fFrameRate; //!< Frame rate
  7798. NVVIOINTERLACEMODE interlaceMode; //!< Interlace mode
  7799. NVVIOVIDEOSTANDARD videoStandard; //!< SMPTE standards format
  7800. NVVIOVIDEOTYPE videoType; //!< HD or SD signal classification
  7801. } NVVIOVIDEOMODE;
  7802. //! Signal format details
  7803. typedef struct _NVVIOSIGNALFORMATDETAIL
  7804. {
  7805. NVVIOSIGNALFORMAT signalFormat; //!< Signal format enumerated value
  7806. NVVIOVIDEOMODE videoMode; //!< Video mode for signal format
  7807. }NVVIOSIGNALFORMATDETAIL;
  7808. //! R8:G8:B8
  7809. #define NVVIOBUFFERFORMAT_R8G8B8 0x00000001
  7810. //! R8:G8:B8:Z24
  7811. #define NVVIOBUFFERFORMAT_R8G8B8Z24 0x00000002
  7812. //! R8:G8:B8:A8
  7813. #define NVVIOBUFFERFORMAT_R8G8B8A8 0x00000004
  7814. //! R8:G8:B8:A8:Z24
  7815. #define NVVIOBUFFERFORMAT_R8G8B8A8Z24 0x00000008
  7816. //! R16FP:G16FP:B16FP
  7817. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FP 0x00000010
  7818. //! R16FP:G16FP:B16FP:Z24
  7819. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPZ24 0x00000020
  7820. //! R16FP:G16FP:B16FP:A16FP
  7821. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPA16FP 0x00000040
  7822. //! R16FP:G16FP:B16FP:A16FP:Z24
  7823. #define NVVIOBUFFERFORMAT_R16FPG16FPB16FPA16FPZ24 0x00000080
  7824. //! Data format details
  7825. typedef struct _NVVIODATAFORMATDETAIL
  7826. {
  7827. NVVIODATAFORMAT dataFormat; //!< Data format enumerated value
  7828. NvU32 vioCaps; //!< Data format capabilities (NVVIOCAPS_* mask)
  7829. }NVVIODATAFORMATDETAIL;
  7830. //! Colorspace conversion
  7831. typedef struct _NVVIOCOLORCONVERSION
  7832. {
  7833. NvU32 version; //!< Structure version
  7834. float colorMatrix[3][3]; //!< Output[n] =
  7835. float colorOffset[3]; //!< Input[0] * colorMatrix[n][0] +
  7836. float colorScale[3]; //!< Input[1] * colorMatrix[n][1] +
  7837. //!< Input[2] * colorMatrix[n][2] +
  7838. //!< OutputRange * colorOffset[n]
  7839. //!< where OutputRange is the standard magnitude of
  7840. //!< Output[n][n] and colorMatrix and colorOffset
  7841. //!< values are within the range -1.0 to +1.0
  7842. NvU32 compositeSafe; //!< compositeSafe constrains luminance range when using composite output
  7843. } NVVIOCOLORCONVERSION;
  7844. //! macro for constructing the version field of _NVVIOCOLORCONVERSION.
  7845. #define NVVIOCOLORCONVERSION_VER MAKE_NVAPI_VERSION(NVVIOCOLORCONVERSION,1)
  7846. //! Gamma correction
  7847. typedef struct _NVVIOGAMMACORRECTION
  7848. {
  7849. NvU32 version; //!< Structure version
  7850. NvU32 vioGammaCorrectionType; //!< Gamma correction type (8-bit or 10-bit)
  7851. //! Gamma correction:
  7852. union
  7853. {
  7854. NVVIOGAMMARAMP8 gammaRamp8; //!< Gamma ramp (8-bit index, 16-bit values)
  7855. NVVIOGAMMARAMP10 gammaRamp10; //!< Gamma ramp (10-bit index, 16-bit values)
  7856. }gammaRamp;
  7857. float fGammaValueR; //!< Red Gamma value within gamma ranges. 0.5 - 6.0
  7858. float fGammaValueG; //!< Green Gamma value within gamma ranges. 0.5 - 6.0
  7859. float fGammaValueB; //!< Blue Gamma value within gamma ranges. 0.5 - 6.0
  7860. } NVVIOGAMMACORRECTION;
  7861. //! Macro for constructing thevesion field of _NVVIOGAMMACORRECTION
  7862. #define NVVIOGAMMACORRECTION_VER MAKE_NVAPI_VERSION(NVVIOGAMMACORRECTION,1)
  7863. //! Maximum number of ranges per channel
  7864. #define MAX_NUM_COMPOSITE_RANGE 2
  7865. typedef struct _NVVIOCOMPOSITERANGE
  7866. {
  7867. NvU32 uRange;
  7868. NvU32 uEnabled;
  7869. NvU32 uMin;
  7870. NvU32 uMax;
  7871. } NVVIOCOMPOSITERANGE;
  7872. // Device configuration (fields masks indicating NVVIOCONFIG fields to use for NvAPI_VIO_GetConfig/NvAPI_VIO_SetConfig() )
  7873. //
  7874. #define NVVIOCONFIG_SIGNALFORMAT 0x00000001 //!< fields: signalFormat
  7875. #define NVVIOCONFIG_DATAFORMAT 0x00000002 //!< fields: dataFormat
  7876. #define NVVIOCONFIG_OUTPUTREGION 0x00000004 //!< fields: outputRegion
  7877. #define NVVIOCONFIG_OUTPUTAREA 0x00000008 //!< fields: outputArea
  7878. #define NVVIOCONFIG_COLORCONVERSION 0x00000010 //!< fields: colorConversion
  7879. #define NVVIOCONFIG_GAMMACORRECTION 0x00000020 //!< fields: gammaCorrection
  7880. #define NVVIOCONFIG_SYNCSOURCEENABLE 0x00000040 //!< fields: syncSource and syncEnable
  7881. #define NVVIOCONFIG_SYNCDELAY 0x00000080 //!< fields: syncDelay
  7882. #define NVVIOCONFIG_COMPOSITESYNCTYPE 0x00000100 //!< fields: compositeSyncType
  7883. #define NVVIOCONFIG_FRAMELOCKENABLE 0x00000200 //!< fields: EnableFramelock
  7884. #define NVVIOCONFIG_422FILTER 0x00000400 //!< fields: bEnable422Filter
  7885. #define NVVIOCONFIG_COMPOSITETERMINATE 0x00000800 //!< fields: bCompositeTerminate (Not supported on Quadro FX 4000 SDI)
  7886. #define NVVIOCONFIG_DATAINTEGRITYCHECK 0x00001000 //!< fields: bEnableDataIntegrityCheck (Not supported on Quadro FX 4000 SDI)
  7887. #define NVVIOCONFIG_CSCOVERRIDE 0x00002000 //!< fields: colorConversion override
  7888. #define NVVIOCONFIG_FLIPQUEUELENGTH 0x00004000 //!< fields: flipqueuelength control
  7889. #define NVVIOCONFIG_ANCTIMECODEGENERATION 0x00008000 //!< fields: bEnableANCTimeCodeGeneration
  7890. #define NVVIOCONFIG_COMPOSITE 0x00010000 //!< fields: bEnableComposite
  7891. #define NVVIOCONFIG_ALPHAKEYCOMPOSITE 0x00020000 //!< fields: bEnableAlphaKeyComposite
  7892. #define NVVIOCONFIG_COMPOSITE_Y 0x00040000 //!< fields: compRange
  7893. #define NVVIOCONFIG_COMPOSITE_CR 0x00080000 //!< fields: compRange
  7894. #define NVVIOCONFIG_COMPOSITE_CB 0x00100000 //!< fields: compRange
  7895. #define NVVIOCONFIG_FULL_COLOR_RANGE 0x00200000 //!< fields: bEnableFullColorRange
  7896. #define NVVIOCONFIG_RGB_DATA 0x00400000 //!< fields: bEnableRGBData
  7897. #define NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE 0x00800000 //!< fields: bEnableSDIOutput
  7898. #define NVVIOCONFIG_STREAMS 0x01000000 //!< fields: streams
  7899. #define NVVIOCONFIG_ANC_PARITY_COMPUTATION 0x02000000 //!< fields: ancParityComputation
  7900. #define NVVIOCONFIG_ANC_AUDIO_REPEAT 0x04000000 //!< fields: enableAudioBlanking
  7901. // Don't forget to update NVVIOCONFIG_VALIDFIELDS in nvapi.spec when NVVIOCONFIG_ALLFIELDS changes.
  7902. #define NVVIOCONFIG_ALLFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  7903. NVVIOCONFIG_DATAFORMAT | \
  7904. NVVIOCONFIG_OUTPUTREGION | \
  7905. NVVIOCONFIG_OUTPUTAREA | \
  7906. NVVIOCONFIG_COLORCONVERSION | \
  7907. NVVIOCONFIG_GAMMACORRECTION | \
  7908. NVVIOCONFIG_SYNCSOURCEENABLE | \
  7909. NVVIOCONFIG_SYNCDELAY | \
  7910. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  7911. NVVIOCONFIG_FRAMELOCKENABLE | \
  7912. NVVIOCONFIG_422FILTER | \
  7913. NVVIOCONFIG_COMPOSITETERMINATE | \
  7914. NVVIOCONFIG_DATAINTEGRITYCHECK | \
  7915. NVVIOCONFIG_CSCOVERRIDE | \
  7916. NVVIOCONFIG_FLIPQUEUELENGTH | \
  7917. NVVIOCONFIG_ANCTIMECODEGENERATION | \
  7918. NVVIOCONFIG_COMPOSITE | \
  7919. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  7920. NVVIOCONFIG_COMPOSITE_Y | \
  7921. NVVIOCONFIG_COMPOSITE_CR | \
  7922. NVVIOCONFIG_COMPOSITE_CB | \
  7923. NVVIOCONFIG_FULL_COLOR_RANGE | \
  7924. NVVIOCONFIG_RGB_DATA | \
  7925. NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \
  7926. NVVIOCONFIG_STREAMS | \
  7927. NVVIOCONFIG_ANC_PARITY_COMPUTATION | \
  7928. NVVIOCONFIG_ANC_AUDIO_REPEAT )
  7929. #define NVVIOCONFIG_VALIDFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  7930. NVVIOCONFIG_DATAFORMAT | \
  7931. NVVIOCONFIG_OUTPUTREGION | \
  7932. NVVIOCONFIG_OUTPUTAREA | \
  7933. NVVIOCONFIG_COLORCONVERSION | \
  7934. NVVIOCONFIG_GAMMACORRECTION | \
  7935. NVVIOCONFIG_SYNCSOURCEENABLE | \
  7936. NVVIOCONFIG_SYNCDELAY | \
  7937. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  7938. NVVIOCONFIG_FRAMELOCKENABLE | \
  7939. NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \
  7940. NVVIOCONFIG_422FILTER | \
  7941. NVVIOCONFIG_COMPOSITETERMINATE | \
  7942. NVVIOCONFIG_DATAINTEGRITYCHECK | \
  7943. NVVIOCONFIG_CSCOVERRIDE | \
  7944. NVVIOCONFIG_FLIPQUEUELENGTH | \
  7945. NVVIOCONFIG_ANCTIMECODEGENERATION | \
  7946. NVVIOCONFIG_COMPOSITE | \
  7947. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  7948. NVVIOCONFIG_COMPOSITE_Y | \
  7949. NVVIOCONFIG_COMPOSITE_CR | \
  7950. NVVIOCONFIG_COMPOSITE_CB | \
  7951. NVVIOCONFIG_FULL_COLOR_RANGE | \
  7952. NVVIOCONFIG_RGB_DATA | \
  7953. NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE | \
  7954. NVVIOCONFIG_STREAMS | \
  7955. NVVIOCONFIG_ANC_PARITY_COMPUTATION | \
  7956. NVVIOCONFIG_ANC_AUDIO_REPEAT)
  7957. #define NVVIOCONFIG_DRIVERFIELDS ( NVVIOCONFIG_OUTPUTREGION | \
  7958. NVVIOCONFIG_OUTPUTAREA | \
  7959. NVVIOCONFIG_COLORCONVERSION | \
  7960. NVVIOCONFIG_FLIPQUEUELENGTH)
  7961. #define NVVIOCONFIG_GAMMAFIELDS ( NVVIOCONFIG_GAMMACORRECTION )
  7962. #define NVVIOCONFIG_RMCTRLFIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  7963. NVVIOCONFIG_DATAFORMAT | \
  7964. NVVIOCONFIG_SYNCSOURCEENABLE | \
  7965. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  7966. NVVIOCONFIG_FRAMELOCKENABLE | \
  7967. NVVIOCONFIG_422FILTER | \
  7968. NVVIOCONFIG_COMPOSITETERMINATE | \
  7969. NVVIOCONFIG_DATAINTEGRITYCHECK | \
  7970. NVVIOCONFIG_COMPOSITE | \
  7971. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  7972. NVVIOCONFIG_COMPOSITE_Y | \
  7973. NVVIOCONFIG_COMPOSITE_CR | \
  7974. NVVIOCONFIG_COMPOSITE_CB)
  7975. #define NVVIOCONFIG_RMSKEWFIELDS ( NVVIOCONFIG_SYNCDELAY )
  7976. #define NVVIOCONFIG_ALLOWSDIRUNNING_FIELDS ( NVVIOCONFIG_DATAINTEGRITYCHECK | \
  7977. NVVIOCONFIG_SYNCDELAY | \
  7978. NVVIOCONFIG_CSCOVERRIDE | \
  7979. NVVIOCONFIG_ANCTIMECODEGENERATION | \
  7980. NVVIOCONFIG_COMPOSITE | \
  7981. NVVIOCONFIG_ALPHAKEYCOMPOSITE | \
  7982. NVVIOCONFIG_COMPOSITE_Y | \
  7983. NVVIOCONFIG_COMPOSITE_CR | \
  7984. NVVIOCONFIG_COMPOSITE_CB | \
  7985. NVVIOCONFIG_ANC_PARITY_COMPUTATION)
  7986. #define NVVIOCONFIG_RMMODESET_FIELDS ( NVVIOCONFIG_SIGNALFORMAT | \
  7987. NVVIOCONFIG_DATAFORMAT | \
  7988. NVVIOCONFIG_SYNCSOURCEENABLE | \
  7989. NVVIOCONFIG_FRAMELOCKENABLE | \
  7990. NVVIOCONFIG_COMPOSITESYNCTYPE | \
  7991. NVVIOCONFIG_ANC_AUDIO_REPEAT)
  7992. //! Output device configuration
  7993. // No members can be deleted from below structure. Only add new members at the
  7994. // end of the structure.
  7995. typedef struct _NVVIOOUTPUTCONFIG_V1
  7996. {
  7997. NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output
  7998. NVVIODATAFORMAT dataFormat; //!< Data format for video output
  7999. NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode)
  8000. NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area)
  8001. NVVIOCOLORCONVERSION colorConversion; //!< Color conversion.
  8002. NVVIOGAMMACORRECTION gammaCorrection;
  8003. NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource)
  8004. NVVIOSYNCSOURCE syncSource; //!< Sync source
  8005. NVVIOSYNCDELAY syncDelay; //!< Sync delay
  8006. NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type
  8007. NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off
  8008. NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format
  8009. NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter
  8010. NvU32 compositeTerminate; //!< Composite termination
  8011. NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable
  8012. NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite
  8013. NvU32 flipQueueLength; //!< Number of buffers used for the internal flipqueue
  8014. NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation
  8015. NvU32 enableComposite; //!< Enable composite
  8016. NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite
  8017. NVVIOCOMPOSITERANGE compRange; //!< Composite ranges
  8018. NvU8 reservedData[256]; //!< Inicates last stored SDI output state TRUE-ON / FALSE-OFF
  8019. NvU32 enableFullColorRange; //!< Flag indicating Full Color Range
  8020. NvU32 enableRGBData; //!< Indicates data is in RGB format
  8021. } NVVIOOUTPUTCONFIG_V1;
  8022. typedef struct _NVVIOOUTPUTCONFIG_V2
  8023. {
  8024. NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output
  8025. NVVIODATAFORMAT dataFormat; //!< Data format for video output
  8026. NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode)
  8027. NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area)
  8028. NVVIOCOLORCONVERSION colorConversion; //!< Color conversion.
  8029. NVVIOGAMMACORRECTION gammaCorrection;
  8030. NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource)
  8031. NVVIOSYNCSOURCE syncSource; //!< Sync source
  8032. NVVIOSYNCDELAY syncDelay; //!< Sync delay
  8033. NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type
  8034. NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off
  8035. NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format
  8036. NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter
  8037. NvU32 compositeTerminate; //!< Composite termination
  8038. NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable
  8039. NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite
  8040. NvU32 flipQueueLength; //!< Number of buffers used for the internal flip queue
  8041. NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation
  8042. NvU32 enableComposite; //!< Enable composite
  8043. NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite
  8044. NVVIOCOMPOSITERANGE compRange; //!< Composite ranges
  8045. NvU8 reservedData[256]; //!< Indicates last stored SDI output state TRUE-ON / FALSE-OFF
  8046. NvU32 enableFullColorRange; //!< Flag indicating Full Color Range
  8047. NvU32 enableRGBData; //!< Indicates data is in RGB format
  8048. NVVIOANCPARITYCOMPUTATION ancParityComputation; //!< Enable HW ANC parity bit computation (auto/on/off)
  8049. } NVVIOOUTPUTCONFIG_V2;
  8050. typedef struct _NVVIOOUTPUTCONFIG_V3
  8051. {
  8052. NVVIOSIGNALFORMAT signalFormat; //!< Signal format for video output
  8053. NVVIODATAFORMAT dataFormat; //!< Data format for video output
  8054. NVVIOOUTPUTREGION outputRegion; //!< Region for video output (Desktop mode)
  8055. NVVIOOUTPUTAREA outputArea; //!< Usable resolution for video output (safe area)
  8056. NVVIOCOLORCONVERSION colorConversion; //!< Color conversion.
  8057. NVVIOGAMMACORRECTION gammaCorrection;
  8058. NvU32 syncEnable; //!< Sync enable (TRUE to use syncSource)
  8059. NVVIOSYNCSOURCE syncSource; //!< Sync source
  8060. NVVIOSYNCDELAY syncDelay; //!< Sync delay
  8061. NVVIOCOMPSYNCTYPE compositeSyncType; //!< Composite sync type
  8062. NvU32 frameLockEnable; //!< Flag indicating whether framelock was on/off
  8063. NvU32 psfSignalFormat; //!< Indicates whether contained format is PSF Signal format
  8064. NvU32 enable422Filter; //!< Enables/Disables 4:2:2 filter
  8065. NvU32 compositeTerminate; //!< Composite termination
  8066. NvU32 enableDataIntegrityCheck; //!< Enable data integrity check: true - enable, false - disable
  8067. NvU32 cscOverride; //!< Use provided CSC color matrix to overwrite
  8068. NvU32 flipQueueLength; //!< Number of buffers used for the internal flip queue
  8069. NvU32 enableANCTimeCodeGeneration; //!< Enable SDI ANC time code generation
  8070. NvU32 enableComposite; //!< Enable composite
  8071. NvU32 enableAlphaKeyComposite; //!< Enable Alpha key composite
  8072. NVVIOCOMPOSITERANGE compRange; //!< Composite ranges
  8073. NvU8 reservedData[256]; //!< Indicates last stored SDI output state TRUE-ON / FALSE-OFF
  8074. NvU32 enableFullColorRange; //!< Flag indicating Full Color Range
  8075. NvU32 enableRGBData; //!< Indicates data is in RGB format
  8076. NVVIOANCPARITYCOMPUTATION ancParityComputation; //!< Enable HW ANC parity bit computation (auto/on/off)
  8077. NvU32 enableAudioBlanking; //!< Enable HANC audio blanking on repeat frames
  8078. } NVVIOOUTPUTCONFIG_V3;
  8079. //! Stream configuration
  8080. typedef struct _NVVIOSTREAM
  8081. {
  8082. NvU32 bitsPerComponent; //!< Bits per component
  8083. NVVIOCOMPONENTSAMPLING sampling; //!< Sampling
  8084. NvU32 expansionEnable; //!< Enable/disable 4:2:2->4:4:4 expansion
  8085. NvU32 numLinks; //!< Number of active links
  8086. struct
  8087. {
  8088. NvU32 jack; //!< This stream's link[i] will use the specified (0-based) channel within the
  8089. NvU32 channel; //!< specified (0-based) jack
  8090. } links[NVAPI_MAX_VIO_LINKS_PER_STREAM];
  8091. } NVVIOSTREAM;
  8092. //! Input device configuration
  8093. typedef struct _NVVIOINPUTCONFIG
  8094. {
  8095. NvU32 numRawCaptureImages; //!< numRawCaptureImages is the number of frames to keep in the capture queue.
  8096. //!< must be between NVAPI_GVI_MIN_RAW_CAPTURE_IMAGES and NVAPI_GVI_MAX_RAW_CAPTURE_IMAGES,
  8097. NVVIOSIGNALFORMAT signalFormat; //!< Signal format.
  8098. //!< Please note that both numRawCaptureImages and signalFormat should be set together.
  8099. NvU32 numStreams; //!< Number of active streams.
  8100. NVVIOSTREAM streams[NVAPI_MAX_VIO_STREAMS]; //!< Stream configurations
  8101. NvU32 bTestMode; //!< This attribute controls the GVI test mode.
  8102. //!< Possible values 0/1. When testmode enabled, the
  8103. //!< GVI device will generate fake data as quickly as possible.
  8104. } NVVIOINPUTCONFIG;
  8105. typedef struct _NVVIOCONFIG_V1
  8106. {
  8107. NvU32 version; //!< Structure version
  8108. NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use
  8109. NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration
  8110. union
  8111. {
  8112. NVVIOINPUTCONFIG inConfig; //!< Input device configuration
  8113. NVVIOOUTPUTCONFIG_V1 outConfig; //!< Output device configuration
  8114. }vioConfig;
  8115. } NVVIOCONFIG_V1;
  8116. typedef struct _NVVIOCONFIG_V2
  8117. {
  8118. NvU32 version; //!< Structure version
  8119. NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use
  8120. NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration
  8121. union
  8122. {
  8123. NVVIOINPUTCONFIG inConfig; //!< Input device configuration
  8124. NVVIOOUTPUTCONFIG_V2 outConfig; //!< Output device configuration
  8125. }vioConfig;
  8126. } NVVIOCONFIG_V2;
  8127. typedef struct _NVVIOCONFIG_V3
  8128. {
  8129. NvU32 version; //!< Structure version
  8130. NvU32 fields; //!< Caller sets to NVVIOCONFIG_* mask for fields to use
  8131. NVVIOCONFIGTYPE nvvioConfigType; //!< Input or Output configuration
  8132. union
  8133. {
  8134. NVVIOINPUTCONFIG inConfig; //!< Input device configuration
  8135. NVVIOOUTPUTCONFIG_V3 outConfig; //!< Output device configuration
  8136. }vioConfig;
  8137. } NVVIOCONFIG_V3;
  8138. typedef NVVIOOUTPUTCONFIG_V3 NVVIOOUTPUTCONFIG;
  8139. typedef NVVIOCONFIG_V3 NVVIOCONFIG;
  8140. #define NVVIOCONFIG_VER1 MAKE_NVAPI_VERSION(NVVIOCONFIG_V1,1)
  8141. #define NVVIOCONFIG_VER2 MAKE_NVAPI_VERSION(NVVIOCONFIG_V2,2)
  8142. #define NVVIOCONFIG_VER3 MAKE_NVAPI_VERSION(NVVIOCONFIG_V3,3)
  8143. #define NVVIOCONFIG_VER NVVIOCONFIG_VER3
  8144. typedef struct
  8145. {
  8146. NvPhysicalGpuHandle hPhysicalGpu; //!< Handle to Physical GPU (This could be NULL for GVI device if its not binded)
  8147. NvVioHandle hVioHandle; //!<handle to SDI Input/Output device
  8148. NvU32 vioId; //!<device Id of SDI Input/Output device
  8149. NvU32 outputId; //!<deviceMask of the SDI display connected to GVO device.
  8150. //!<outputId will be 0 for GVI device.
  8151. } NVVIOTOPOLOGYTARGET;
  8152. typedef struct _NV_VIO_TOPOLOGY
  8153. {
  8154. NvU32 version;
  8155. NvU32 vioTotalDeviceCount; //!<How many video I/O targets are valid
  8156. NVVIOTOPOLOGYTARGET vioTarget[NVAPI_MAX_VIO_DEVICES]; //!<Array of video I/O targets
  8157. }NV_VIO_TOPOLOGY, NVVIOTOPOLOGY;
  8158. //! Macro for constructing the version field of NV_VIO_TOPOLOGY
  8159. #define NV_VIO_TOPOLOGY_VER MAKE_NVAPI_VERSION(NV_VIO_TOPOLOGY,1)
  8160. //! Macro for constructing the version field of NVVIOTOPOLOGY
  8161. #define NVVIOTOPOLOGY_VER MAKE_NVAPI_VERSION(NVVIOTOPOLOGY,1)
  8162. //! @}
  8163. //! \addtogroup vidio
  8164. //! @{
  8165. ///////////////////////////////////////////////////////////////////////////////
  8166. //!
  8167. //! Function: NvAPI_VIO_GetCapabilities
  8168. //!
  8169. //! Description: This API determine the graphics adapter video I/O capabilities.
  8170. //!
  8171. //! SUPPORTED OS: Windows XP and higher
  8172. //!
  8173. //!
  8174. //! \since Release: 190
  8175. //!
  8176. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8177. //! \param [out] pAdapterCaps Pointer to receive capabilities
  8178. //!
  8179. //! \retval ::NVAPI_OK Success
  8180. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8181. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8182. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION NVVIOCAPS struct version used by the app is not compatible
  8183. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8184. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8185. ///////////////////////////////////////////////////////////////////////////////
  8186. NVAPI_INTERFACE NvAPI_VIO_GetCapabilities(NvVioHandle hVioHandle,
  8187. NVVIOCAPS *pAdapterCaps);
  8188. ////////////////////////////////////////////////////////////////////////////////
  8189. //! Function: NvAPI_VIO_Open
  8190. //!
  8191. //! Description: This API opens the graphics adapter for video I/O operations
  8192. //! using the OpenGL application interface. Read operations
  8193. //! are permitted in this mode by multiple clients, but Write
  8194. //! operations are application exclusive.
  8195. //!
  8196. //! SUPPORTED OS: Windows XP and higher
  8197. //!
  8198. //!
  8199. //! \since Release: 190
  8200. //!
  8201. //! \param [in] NvVioHandle The caller provides the SDI output device handle as input.
  8202. //! \param [in] vioClass Class interface (NVVIOCLASS_* value)
  8203. //! \param [in] ownerType Specify NVVIOOWNERTYPE_APPLICATION or NVVIOOWNERTYPE_DESKTOP.
  8204. //!
  8205. //! \retval ::NVAPI_OK Success
  8206. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8207. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8208. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8209. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8210. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8211. ///////////////////////////////////////////////////////////////////////////////
  8212. NVAPI_INTERFACE NvAPI_VIO_Open(NvVioHandle hVioHandle,
  8213. NvU32 vioClass,
  8214. NVVIOOWNERTYPE ownerType);
  8215. ///////////////////////////////////////////////////////////////////////////////
  8216. //! Function: NvAPI_VIO_Close
  8217. //!
  8218. //! Description: This API closes the graphics adapter for graphics-to-video operations
  8219. //! using the OpenGL application interface. Closing an
  8220. //! OpenGL handle releases the device.
  8221. //!
  8222. //! SUPPORTED OS: Windows XP and higher
  8223. //!
  8224. //!
  8225. //! \since Release: 190
  8226. //!
  8227. //! \param [in] NvVioHandle The caller provides the SDI output device handle as input.
  8228. //! \param [in] bRelease boolean value to either keep or release ownership
  8229. //!
  8230. //! \retval ::NVAPI_OK Success
  8231. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8232. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8233. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8234. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8235. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8236. ///////////////////////////////////////////////////////////////////////////////
  8237. NVAPI_INTERFACE NvAPI_VIO_Close(NvVioHandle hVioHandle,
  8238. NvU32 bRelease);
  8239. ///////////////////////////////////////////////////////////////////////////////
  8240. //! Function: NvAPI_VIO_Status
  8241. //!
  8242. //! Description: This API gets the Video I/O LED status.
  8243. //!
  8244. //! SUPPORTED OS: Windows XP and higher
  8245. //!
  8246. //!
  8247. //! \since Release: 190
  8248. //!
  8249. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8250. //! \param [out] pStatus Return pointer to NVVIOSTATUS
  8251. //!
  8252. //! \retval ::NVAPI_OK Success
  8253. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8254. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8255. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Invalid structure version
  8256. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8257. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8258. ///////////////////////////////////////////////////////////////////////////////
  8259. NVAPI_INTERFACE NvAPI_VIO_Status(NvVioHandle hVioHandle,
  8260. NVVIOSTATUS *pStatus);
  8261. ////////////////////////////////////////////////////////////////////////////////
  8262. //! Function: NvAPI_VIO_SyncFormatDetect
  8263. //!
  8264. //! Description: This API detects the Video I/O incoming sync video format.
  8265. //!
  8266. //! SUPPORTED OS: Windows XP and higher
  8267. //!
  8268. //!
  8269. //! \since Release: 190
  8270. //!
  8271. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8272. //! \param [out] pWait Pointer to receive how many milliseconds will lapse
  8273. //! before VIOStatus returns the detected syncFormat.
  8274. //!
  8275. //! \retval ::NVAPI_OK Success
  8276. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8277. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8278. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8279. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8280. ///////////////////////////////////////////////////////////////////////////////
  8281. NVAPI_INTERFACE NvAPI_VIO_SyncFormatDetect(NvVioHandle hVioHandle,
  8282. NvU32 *pWait);
  8283. ///////////////////////////////////////////////////////////////////////////////
  8284. //! Function: NvAPI_VIO_GetConfig
  8285. //!
  8286. //! Description: This API gets the graphics-to-video configuration.
  8287. //!
  8288. //! SUPPORTED OS: Windows XP and higher
  8289. //!
  8290. //!
  8291. //! \since Release: 190
  8292. //!
  8293. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8294. //! \param [out] pConfig Pointer to the graphics-to-video configuration
  8295. //!
  8296. //! \retval ::NVAPI_OK Success
  8297. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8298. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8299. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Invalid structure version
  8300. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8301. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8302. ///////////////////////////////////////////////////////////////////////////////
  8303. NVAPI_INTERFACE NvAPI_VIO_GetConfig(NvVioHandle hVioHandle,
  8304. NVVIOCONFIG *pConfig);
  8305. ///////////////////////////////////////////////////////////////////////////////
  8306. //! Function: NvAPI_VIO_SetConfig
  8307. //!
  8308. //! Description: This API sets the graphics-to-video configuration.
  8309. //!
  8310. //! SUPPORTED OS: Windows XP and higher
  8311. //!
  8312. //!
  8313. //! \since Release: 190
  8314. //!
  8315. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8316. //! \param [in] pConfig Pointer to Graphics-to-Video configuration
  8317. //!
  8318. //! \retval ::NVAPI_OK Success
  8319. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8320. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8321. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8322. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8323. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8324. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8325. ///////////////////////////////////////////////////////////////////////////////
  8326. NVAPI_INTERFACE NvAPI_VIO_SetConfig(NvVioHandle hVioHandle,
  8327. const NVVIOCONFIG *pConfig);
  8328. ///////////////////////////////////////////////////////////////////////////////
  8329. //! Function: NvAPI_VIO_SetCSC
  8330. //!
  8331. //! Description: This API sets the colorspace conversion parameters.
  8332. //!
  8333. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.
  8334. //! SUPPORTED OS: Windows XP and higher
  8335. //!
  8336. //!
  8337. //! \since Release: 190
  8338. //!
  8339. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8340. //! \param [in] pCSC Pointer to CSC parameters
  8341. //!
  8342. //! \retval ::NVAPI_OK Success
  8343. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8344. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8345. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8346. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8347. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8348. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8349. ////////////////////////////////////////////////////////////////////////////////----
  8350. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.")
  8351. NVAPI_INTERFACE NvAPI_VIO_SetCSC(NvVioHandle hVioHandle,
  8352. NVVIOCOLORCONVERSION *pCSC);
  8353. ////////////////////////////////////////////////////////////////////////////////
  8354. //! Function: NvAPI_VIO_GetCSC
  8355. //!
  8356. //! Description: This API gets the colorspace conversion parameters.
  8357. //!
  8358. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.
  8359. //! SUPPORTED OS: Windows XP and higher
  8360. //!
  8361. //!
  8362. //! \since Release: 190
  8363. //!
  8364. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8365. //! \param [out] pCSC Pointer to CSC parameters
  8366. //!
  8367. //! \retval ::NVAPI_OK Success
  8368. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8369. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8370. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8371. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8372. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8373. ////////////////////////////////////////////////////////////////////////////////
  8374. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.")
  8375. NVAPI_INTERFACE NvAPI_VIO_GetCSC(NvVioHandle hVioHandle,
  8376. NVVIOCOLORCONVERSION *pCSC);
  8377. ///////////////////////////////////////////////////////////////////////////////
  8378. //! Function: NvAPI_VIO_SetGamma
  8379. //!
  8380. //! Description: This API sets the gamma conversion parameters.
  8381. //!
  8382. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.
  8383. //! SUPPORTED OS: Windows XP and higher
  8384. //!
  8385. //!
  8386. //! \since Release: 190
  8387. //!
  8388. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8389. //! \param [in] pGamma Pointer to gamma parameters
  8390. //!
  8391. //! \retval ::NVAPI_OK Success
  8392. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8393. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8394. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8395. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8396. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8397. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8398. ///////////////////////////////////////////////////////////////////////////////
  8399. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.")
  8400. NVAPI_INTERFACE NvAPI_VIO_SetGamma(NvVioHandle hVioHandle,
  8401. NVVIOGAMMACORRECTION *pGamma);
  8402. ///////////////////////////////////////////////////////////////////////////////
  8403. //! Function: NvAPI_VIO_GetGamma
  8404. //!
  8405. //! Description: This API gets the gamma conversion parameters.
  8406. //!
  8407. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.
  8408. //! SUPPORTED OS: Windows XP and higher
  8409. //!
  8410. //!
  8411. //! \since Release: 190
  8412. //!
  8413. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8414. //! \param [out] pGamma Pointer to gamma parameters
  8415. //!
  8416. //! \retval ::NVAPI_OK Success
  8417. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8418. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8419. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8420. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8421. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8422. ///////////////////////////////////////////////////////////////////////////////
  8423. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.")
  8424. NVAPI_INTERFACE NvAPI_VIO_GetGamma(NvVioHandle hVioHandle,
  8425. NVVIOGAMMACORRECTION* pGamma);
  8426. ////////////////////////////////////////////////////////////////////////////////
  8427. //! Function: NvAPI_VIO_SetSyncDelay
  8428. //!
  8429. //! Description: This API sets the sync delay parameters.
  8430. //!
  8431. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.
  8432. //! SUPPORTED OS: Windows XP and higher
  8433. //!
  8434. //!
  8435. //! \since Release: 190
  8436. //!
  8437. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8438. //! \param [in] pSyncDelay Pointer to sync delay parameters
  8439. //!
  8440. //! \retval ::NVAPI_OK Success
  8441. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8442. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8443. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8444. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8445. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8446. ///////////////////////////////////////////////////////////////////////////////
  8447. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_SetConfig.")
  8448. NVAPI_INTERFACE NvAPI_VIO_SetSyncDelay(NvVioHandle hVioHandle,
  8449. const NVVIOSYNCDELAY *pSyncDelay);
  8450. ////////////////////////////////////////////////////////////////////////////////
  8451. //! Function: NvAPI_VIO_GetSyncDelay
  8452. //!
  8453. //! Description: This API gets the sync delay parameters.
  8454. //!
  8455. //! \deprecated Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.
  8456. //! SUPPORTED OS: Windows XP and higher
  8457. //!
  8458. //!
  8459. //! \since Release: 190
  8460. //!
  8461. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8462. //! \param [out] pSyncDelay Pointer to sync delay parameters
  8463. //!
  8464. //! \retval ::NVAPI_OK Success
  8465. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8466. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8467. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Stucture version invalid
  8468. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8469. ///////////////////////////////////////////////////////////////////////////////
  8470. __nvapi_deprecated_function("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_VIO_GetConfig.")
  8471. NVAPI_INTERFACE NvAPI_VIO_GetSyncDelay(NvVioHandle hVioHandle,
  8472. NVVIOSYNCDELAY *pSyncDelay);
  8473. typedef enum _NVVIOPCILINKRATE
  8474. {
  8475. NVVIOPCILINKRATE_UNKNOWN = 0,
  8476. NVVIOPCILINKRATE_GEN1 = 1, //<! 2.5 Gbps.
  8477. NVVIOPCILINKRATE_GEN2 = 2, //<! 5 Gbps.
  8478. NVVIOPCILINKRATE_GEN3 = 3, //<! 8 Gbps.
  8479. }NVVIOPCILINKRATE;
  8480. typedef enum _NVVIOPCILINKWIDTH
  8481. {
  8482. NVVIOPCILINKWIDTH_UNKNOWN = 0,
  8483. NVVIOPCILINKWIDTH_x1 = 1,
  8484. NVVIOPCILINKWIDTH_x2 = 2,
  8485. NVVIOPCILINKWIDTH_x4 = 4,
  8486. NVVIOPCILINKWIDTH_x8 = 8,
  8487. NVVIOPCILINKWIDTH_x16 = 16,
  8488. }NVVIOPCILINKWIDTH;
  8489. typedef struct _NVVIOPCIINFO
  8490. {
  8491. NvU32 version; //!< Structure version
  8492. NvU32 pciDeviceId; //!< specifies the internal PCI device identifier for the GVI.
  8493. NvU32 pciSubSystemId; //!< specifies the internal PCI subsystem identifier for the GVI.
  8494. NvU32 pciRevisionId; //!< specifies the internal PCI device-specific revision identifier for the GVI.
  8495. NvU32 pciDomain; //!< specifies the PCI domain of the GVI device.
  8496. NvU32 pciBus; //!< specifies the PCI bus number of the GVI device.
  8497. NvU32 pciSlot; //!< specifies the PCI slot number of the GVI device.
  8498. NVVIOPCILINKWIDTH pciLinkWidth; //!< specifies the the negotiated PCIE link width.
  8499. NVVIOPCILINKRATE pciLinkRate; //!< specifies the the negotiated PCIE link rate.
  8500. } NVVIOPCIINFO_V1;
  8501. typedef NVVIOPCIINFO_V1 NVVIOPCIINFO;
  8502. #define NVVIOPCIINFO_VER1 MAKE_NVAPI_VERSION(NVVIOPCIINFO_V1,1)
  8503. #define NVVIOPCIINFO_VER NVVIOPCIINFO_VER1
  8504. ///////////////////////////////////////////////////////////////////////////////
  8505. //
  8506. // FUNCTION NAME: NvAPI_VIO_GetPCIInfo()
  8507. //
  8508. // DESCRIPTION: This API gets PCI information of the attached SDI(input) capture card.
  8509. //
  8510. // PARAMETERS: hVioHandle (IN) - Handle to SDI capture card.
  8511. // pVioPCIInfo (OUT) - PCI information of the attached SDI capture card.
  8512. //
  8513. //! SUPPORTED OS: Windows XP and higher
  8514. //!
  8515. //
  8516. // RETURN STATUS: This API can return any of the error codes enumerated in #NvAPI_Status. If there are return error codes with
  8517. // specific meaning for this API, they are listed below.
  8518. //
  8519. ///////////////////////////////////////////////////////////////////////////////
  8520. NVAPI_INTERFACE NvAPI_VIO_GetPCIInfo(__in NvVioHandle hVioHandle,
  8521. __inout NVVIOPCIINFO* pVioPCIInfo);
  8522. ////////////////////////////////////////////////////////////////////////////////
  8523. //! Function: NvAPI_VIO_IsRunning
  8524. //!
  8525. //! Description: This API determines if Video I/O is running.
  8526. //!
  8527. //! SUPPORTED OS: Windows XP and higher
  8528. //!
  8529. //!
  8530. //! \since Release: 190
  8531. //!
  8532. //! \param [in] NvVioHandle[IN] The caller provides the SDI device handle as input.
  8533. //!
  8534. //! \retval ::NVAPI_DRIVER_RUNNING Video I/O running
  8535. //! \retval ::NVAPI_DRIVER_NOTRUNNING Video I/O not running
  8536. ///////////////////////////////////////////////////////////////////////////////
  8537. NVAPI_INTERFACE NvAPI_VIO_IsRunning(NvVioHandle hVioHandle);
  8538. ///////////////////////////////////////////////////////////////////////////////
  8539. //! Function: NvAPI_VIO_Start
  8540. //!
  8541. //! Description: This API starts Video I/O.
  8542. //! This API should be called for NVVIOOWNERTYPE_DESKTOP only and will not work for OGL applications.
  8543. //!
  8544. //! SUPPORTED OS: Windows XP and higher
  8545. //!
  8546. //!
  8547. //! \since Release: 190
  8548. //!
  8549. //! \param [in] NvVioHandle[IN] The caller provides the SDI device handle as input.
  8550. //!
  8551. //! \retval ::NVAPI_OK Success
  8552. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8553. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8554. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8555. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8556. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8557. ///////////////////////////////////////////////////////////////////////////////
  8558. NVAPI_INTERFACE NvAPI_VIO_Start(NvVioHandle hVioHandle);
  8559. ///////////////////////////////////////////////////////////////////////////////
  8560. //! Function: NvAPI_VIO_Stop
  8561. //!
  8562. //! Description: This API stops Video I/O.
  8563. //! This API should be called for NVVIOOWNERTYPE_DESKTOP only and will not work for OGL applications.
  8564. //!
  8565. //! SUPPORTED OS: Windows XP and higher
  8566. //!
  8567. //!
  8568. //! \since Release: 190
  8569. //!
  8570. //! \param [in] NvVioHandle[IN] The caller provides the SDI device handle as input.
  8571. //!
  8572. //! \retval ::NVAPI_OK Success
  8573. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8574. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8575. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8576. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8577. //! \retval ::NVAPI_DEVICE_BUSY Access denied for requested access
  8578. ///////////////////////////////////////////////////////////////////////////////
  8579. NVAPI_INTERFACE NvAPI_VIO_Stop(NvVioHandle hVioHandle);
  8580. ///////////////////////////////////////////////////////////////////////////////
  8581. //! Function: NvAPI_VIO_IsFrameLockModeCompatible
  8582. //!
  8583. //! Description: This API checks whether modes are compatible in frame lock mode.
  8584. //!
  8585. //! SUPPORTED OS: Windows XP and higher
  8586. //!
  8587. //!
  8588. //! \since Release: 190
  8589. //!
  8590. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8591. //! \param [in] srcEnumIndex Source Enumeration index
  8592. //! \param [in] destEnumIndex Destination Enumeration index
  8593. //! \param [out] pbCompatible Pointer to receive compatibility
  8594. //!
  8595. //! \retval ::NVAPI_OK Success
  8596. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8597. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8598. //! \retval ::NVAPI_NOT_SUPPORTED Video I/O not supported
  8599. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8600. ///////////////////////////////////////////////////////////////////////////////
  8601. NVAPI_INTERFACE NvAPI_VIO_IsFrameLockModeCompatible(NvVioHandle hVioHandle,
  8602. NvU32 srcEnumIndex,
  8603. NvU32 destEnumIndex,
  8604. NvU32* pbCompatible);
  8605. ///////////////////////////////////////////////////////////////////////////////
  8606. //! Function: NvAPI_VIO_EnumDevices
  8607. //!
  8608. //! Description: This API enumerate all VIO devices connected to the system.
  8609. //!
  8610. //! SUPPORTED OS: Windows XP and higher
  8611. //!
  8612. //!
  8613. //! \since Release: 190
  8614. //!
  8615. //! \param [out] NvVioHandle User passes the pointer of NvVioHandle[] array to get handles to
  8616. //! all the connected video I/O devices.
  8617. //! \param [out] vioDeviceCount User gets total number of VIO devices connected to the system.
  8618. //!
  8619. //! \retval ::NVAPI_OK Success
  8620. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8621. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8622. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8623. //! \retval ::NVAPI_NVIDIA_DEVICE_NOT_FOUND No SDI Device found
  8624. ///////////////////////////////////////////////////////////////////////////////
  8625. NVAPI_INTERFACE NvAPI_VIO_EnumDevices(NvVioHandle hVioHandle[NVAPI_MAX_VIO_DEVICES],
  8626. NvU32 *vioDeviceCount);
  8627. ///////////////////////////////////////////////////////////////////////////////
  8628. //! Function: NvAPI_VIO_QueryTopology
  8629. //!
  8630. //! Description: This API queries the valid SDI topologies.
  8631. //!
  8632. //! SUPPORTED OS: Windows XP and higher
  8633. //!
  8634. //!
  8635. //! \since Release: 190
  8636. //!
  8637. //! \param [out] pNvVIOTopology User passes the pointer to NVVIOTOPOLOGY to fetch all valid SDI topologies.
  8638. //!
  8639. //! \retval ::NVAPI_OK Success
  8640. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI Not Initialized
  8641. //! \retval ::NVAPI_INVALID_ARGUMENT Arguments passed to API are not valid
  8642. //! \retval ::NVAPI_INCOMPATIBLE_STRUCT_VERSION Invalid structure version
  8643. //! \retval ::NVAPI_ERROR NVAPI Random errors
  8644. ///////////////////////////////////////////////////////////////////////////////
  8645. NVAPI_INTERFACE NvAPI_VIO_QueryTopology(NV_VIO_TOPOLOGY *pNvVIOTopology);
  8646. ///////////////////////////////////////////////////////////////////////////////
  8647. //! Function: NvAPI_VIO_EnumSignalFormats
  8648. //!
  8649. //! Description: This API enumerates signal formats supported by Video I/O.
  8650. //!
  8651. //! SUPPORTED OS: Windows XP and higher
  8652. //!
  8653. //!
  8654. //! \since Release: 190
  8655. //!
  8656. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8657. //! \param [in] enumIndex Enumeration index
  8658. //! \param [out] pSignalFormatDetail Pointer to receive detail or NULL
  8659. //!
  8660. //! \retval ::NVAPI_OK Success
  8661. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized
  8662. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid argument passed
  8663. //! \retval ::NVAPI_END_ENUMERATION No more signal formats to enumerate
  8664. ///////////////////////////////////////////////////////////////////////////////
  8665. NVAPI_INTERFACE NvAPI_VIO_EnumSignalFormats(NvVioHandle hVioHandle,
  8666. NvU32 enumIndex,
  8667. NVVIOSIGNALFORMATDETAIL *pSignalFormatDetail);
  8668. ///////////////////////////////////////////////////////////////////////////////
  8669. //! Function: NvAPI_VIO_EnumDataFormats
  8670. //!
  8671. //! Description: This API enumerates data formats supported by Video I/O.
  8672. //!
  8673. //! SUPPORTED OS: Windows XP and higher
  8674. //!
  8675. //!
  8676. //! \since Release: 190
  8677. //!
  8678. //! \param [in] NvVioHandle The caller provides the SDI device handle as input.
  8679. //! \param [in] enumIndex Enumeration index
  8680. //! \param [out] pDataFormatDetail Pointer to receive detail or NULL
  8681. //!
  8682. //! \retval ::NVAPI_OK Success
  8683. //! \retval ::NVAPI_END_ENUMERATION No more data formats to enumerate
  8684. //! \retval ::NVAPI_NOT_SUPPORTED Unsupported NVVIODATAFORMAT_ enumeration
  8685. ///////////////////////////////////////////////////////////////////////////////
  8686. NVAPI_INTERFACE NvAPI_VIO_EnumDataFormats(NvVioHandle hVioHandle,
  8687. NvU32 enumIndex,
  8688. NVVIODATAFORMATDETAIL *pDataFormatDetail);
  8689. //! @}
  8690. ///////////////////////////////////////////////////////////////////////////////////
  8691. // CAMERA TEST API
  8692. // These APIs allows test apps to perform low level camera tests
  8693. //! \addtogroup vidio
  8694. //! @{
  8695. ///////////////////////////////////////////////////////////////////////////////
  8696. //
  8697. // FUNCTION NAME: NvAPI_Stereo_CreateConfigurationProfileRegistryKey
  8698. //
  8699. //! \fn NvAPI_Stereo_CreateConfigurationProfileRegistryKey(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType)
  8700. //!
  8701. //! DESCRIPTION: Creates new configuration registry key for current application.
  8702. //!
  8703. //! If there is no configuration profile prior to the function call,
  8704. //! this API tries to create a new configuration profile registry key
  8705. //! for a given application and fill it with the default values.
  8706. //! If an application already has a configuration profile registry key, the API does nothing.
  8707. //! The name of the key is automatically set to the name of the executable that calls this function.
  8708. //! Because of this, the executable should have a distinct and unique name.
  8709. //! If the application is using only one version of DirectX, then the default profile type will be appropriate.
  8710. //! If the application is using more than one version of DirectX from the same executable,
  8711. //! it should use the appropriate profile type for each configuration profile.
  8712. //!
  8713. //! HOW TO USE: When there is a need for an application to have default stereo parameter values,
  8714. //! use this function to create a key to store the values.
  8715. //!
  8716. //! SUPPORTED OS: Windows Vista and higher
  8717. //!
  8718. //!
  8719. //! \since Release: 180
  8720. //!
  8721. //! \param [in] registryProfileType Type of profile the application wants to create. It should be one of the symbolic constants defined in
  8722. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return
  8723. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  8724. //!
  8725. //! \retval ::NVAPI_OK Key exists in the registry.
  8726. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  8727. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  8728. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8729. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8730. //! \retval ::NVAPI_ERROR
  8731. //!
  8732. ///////////////////////////////////////////////////////////////////////////////
  8733. //! \ingroup stereoapi
  8734. //! Used in NvAPI_Stereo_CreateConfigurationProfileRegistryKey()
  8735. typedef enum _NV_StereoRegistryProfileType
  8736. {
  8737. NVAPI_STEREO_DEFAULT_REGISTRY_PROFILE, //!< Default registry configuration profile.
  8738. NVAPI_STEREO_DX9_REGISTRY_PROFILE, //!< Separate registry configuration profile for a DirectX 9 executable.
  8739. NVAPI_STEREO_DX10_REGISTRY_PROFILE //!< Separate registry configuration profile for a DirectX 10 executable.
  8740. } NV_STEREO_REGISTRY_PROFILE_TYPE;
  8741. //! \ingroup stereoapi
  8742. NVAPI_INTERFACE NvAPI_Stereo_CreateConfigurationProfileRegistryKey(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType);
  8743. ///////////////////////////////////////////////////////////////////////////////
  8744. //
  8745. // FUNCTION NAME: NvAPI_Stereo_DeleteConfigurationProfileRegistryKey
  8746. //
  8747. //! DESCRIPTION: Removes configuration registry key for current application.
  8748. //!
  8749. //! If an application already has a configuration profile prior to this function call,
  8750. //! the function attempts to remove the application's configuration profile registry key from the registry.
  8751. //! If there is no configuration profile registry key prior to the function call,
  8752. //! the function does nothing and does not report an error.
  8753. //!
  8754. //! SUPPORTED OS: Windows Vista and higher
  8755. //!
  8756. //!
  8757. //! \since Release: 180
  8758. //!
  8759. //! \param [in] registryProfileType Type of profile that the application wants to delete. This should be one of the symbolic
  8760. //! constants defined in ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause the function
  8761. //! to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  8762. //!
  8763. //! \retval ::NVAPI_OK Key does not exist in the registry any more.
  8764. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  8765. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  8766. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI is not initialized.
  8767. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI is not initialized.
  8768. //! \retval ::NVAPI_ERROR
  8769. //!
  8770. //! \ingroup stereoapi
  8771. ///////////////////////////////////////////////////////////////////////////////
  8772. NVAPI_INTERFACE NvAPI_Stereo_DeleteConfigurationProfileRegistryKey(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType);
  8773. ///////////////////////////////////////////////////////////////////////////////
  8774. //
  8775. // FUNCTION NAME: NvAPI_Stereo_SetConfigurationProfileValue
  8776. //
  8777. //! \fn NvAPI_Stereo_SetConfigurationProfileValue(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType, NV_STEREO_REGISTRY_ID valueRegistryID, void *pValue)
  8778. //!
  8779. //! DESCRIPTION: This API sets the given parameter value under the application's registry key.
  8780. //!
  8781. //! If the value does not exist under the application's registry key,
  8782. //! the value will be created under the key.
  8783. //!
  8784. //! SUPPORTED OS: Windows Vista and higher
  8785. //!
  8786. //!
  8787. //! \since Release: 180
  8788. //!
  8789. //! \param [in] registryProfileType The type of profile the application wants to access. It should be one of the
  8790. //! symbolic constants defined in ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value
  8791. //! will cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  8792. //! \param [in] valueRegistryID ID of the value that is being set. It should be one of the symbolic constants defined in
  8793. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing
  8794. //! and return ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED.
  8795. //! \param [in] pValue Address of the value that is being set. It should be either address of a DWORD or of a float,
  8796. //! dependent on the type of the stereo parameter whose value is being set. The API will then cast that
  8797. //! address to DWORD* and write whatever is in those 4 bytes as a DWORD to the registry.
  8798. //!
  8799. //! \retval ::NVAPI_OK Value is written to registry.
  8800. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  8801. //! \retval ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED This value is not supported.
  8802. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  8803. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI is not initialized.
  8804. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI is not initialized.
  8805. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  8806. //
  8807. ///////////////////////////////////////////////////////////////////////////////
  8808. //! \ingroup stereoapi
  8809. //! Used in NvAPI_Stereo_SetConfigurationProfileValue()
  8810. typedef enum _NV_StereoRegistryID
  8811. {
  8812. NVAPI_CONVERGENCE_ID, //!< Symbolic constant for convergence registry ID.
  8813. NVAPI_FRUSTUM_ADJUST_MODE_ID, //!< Symbolic constant for frustum adjust mode registry ID.
  8814. } NV_STEREO_REGISTRY_ID;
  8815. //! \ingroup stereoapi
  8816. NVAPI_INTERFACE NvAPI_Stereo_SetConfigurationProfileValue(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType, NV_STEREO_REGISTRY_ID valueRegistryID, void *pValue);
  8817. ///////////////////////////////////////////////////////////////////////////////
  8818. //
  8819. // FUNCTION NAME: NvAPI_Stereo_DeleteConfigurationProfileValue
  8820. //
  8821. //! DESCRIPTION: This API removes the given value from the application's configuration profile registry key.
  8822. //! If there is no such value, the function does nothing and does not report an error.
  8823. //!
  8824. //! SUPPORTED OS: Windows Vista and higher
  8825. //!
  8826. //!
  8827. //! \since Release: 180
  8828. //!
  8829. //! \param [in] registryProfileType The type of profile the application wants to access. It should be one of the
  8830. //! symbolic constants defined in ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will
  8831. //! cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED.
  8832. //! \param [in] valueRegistryID ID of the value that is being deleted. It should be one of the symbolic constants defined in
  8833. //! ::NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return
  8834. //! ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED.
  8835. //!
  8836. //! \retval ::NVAPI_OK Value does not exist in registry any more.
  8837. //! \retval ::NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED This profile type is not supported.
  8838. //! \retval ::NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED This value is not supported.
  8839. //! \retval ::NVAPI_STEREO_REGISTRY_ACCESS_FAILED Access to registry failed.
  8840. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8841. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8842. //! \retval ::NVAPI_ERROR
  8843. //!
  8844. //! \ingroup stereoapi
  8845. ///////////////////////////////////////////////////////////////////////////////
  8846. NVAPI_INTERFACE NvAPI_Stereo_DeleteConfigurationProfileValue(NV_STEREO_REGISTRY_PROFILE_TYPE registryProfileType, NV_STEREO_REGISTRY_ID valueRegistryID);
  8847. //! \addtogroup stereoapi
  8848. //! @{
  8849. typedef struct _NVAPI_STEREO_CAPS
  8850. {
  8851. NvU32 version;
  8852. NvU32 supportsWindowedModeOff : 1;
  8853. NvU32 supportsWindowedModeAutomatic : 1;
  8854. NvU32 supportsWindowedModePersistent : 1;
  8855. NvU32 reserved : 29; // must be 0
  8856. NvU32 reserved2[3]; // must be 0
  8857. } NVAPI_STEREO_CAPS_V1;
  8858. #define NVAPI_STEREO_CAPS_VER1 MAKE_NVAPI_VERSION(NVAPI_STEREO_CAPS,1)
  8859. #define NVAPI_STEREO_CAPS_VER NVAPI_STEREO_CAPS_VER1
  8860. typedef NVAPI_STEREO_CAPS_V1 NVAPI_STEREO_CAPS;
  8861. //! @}
  8862. ///////////////////////////////////////////////////////////////////////////////
  8863. //
  8864. // FUNCTION NAME: NvAPI_Stereo_GetStereoSupport
  8865. //
  8866. //! DESCRIPTION: This API checks what kind of stereo support is currently supported on a particular display.
  8867. //! If the the display is prohibited from showing stereo (e.g. secondary in a multi-mon setup), we will
  8868. //! return 0 for all stereo modes (full screen exclusive, automatic windowed, persistent windowed).
  8869. //! Otherwise, we will check which stereo mode is supported. On 120Hz display, this will be what
  8870. //! the user chooses in control panel. On HDMI 1.4 display, persistent windowed mode is always assumed to be
  8871. //! supported. Note that this function does not check if the CURRENT RESOLUTION/REFRESH RATE can support
  8872. //! stereo. For HDMI 1.4, it is the app's responsibility to change the resolution/refresh rate to one that is
  8873. //! 3D compatible. For 120Hz, the driver will ALWAYS force 120Hz anyway.
  8874. //!
  8875. //! SUPPORTED OS: Windows Vista and higher
  8876. //!
  8877. //!
  8878. //! \since Release: 304
  8879. //!
  8880. //! \param [in] hMonitor handle to monitor that app is going to run on
  8881. //! \param [out] pCaps Address where the result of the inquiry will be placed.
  8882. //! *pCaps is defined in NVAPI_STEREO_CAPS.
  8883. //! \return This API can return any of the following error codes enumerated in #NvAPI_Status
  8884. //! \retval ::NVAPI_OK
  8885. //!
  8886. //! \ingroup stereoapi
  8887. ///////////////////////////////////////////////////////////////////////////////
  8888. NVAPI_INTERFACE NvAPI_Stereo_GetStereoSupport(__in NvMonitorHandle hMonitor, __out NVAPI_STEREO_CAPS *pCaps);
  8889. ///////////////////////////////////////////////////////////////////////////////
  8890. //
  8891. // FUNCTION NAME: NvAPI_Stereo_DecreaseSeparation
  8892. //
  8893. //! DESCRIPTION: This API decreases separation for the given device interface (just like the Ctrl+F3 hotkey).
  8894. //!
  8895. //! WHEN TO USE: After the stereo handle for device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8896. //!
  8897. //! SUPPORTED OS: Windows Vista and higher
  8898. //!
  8899. //!
  8900. //! \since Release: 180
  8901. //!
  8902. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8903. //!
  8904. //! \retval ::NVAPI_OK - Decrease of separation percentage was successfull.
  8905. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8906. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8907. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8908. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8909. //!
  8910. //! \ingroup stereoapi
  8911. ///////////////////////////////////////////////////////////////////////////////
  8912. NVAPI_INTERFACE NvAPI_Stereo_DecreaseSeparation(StereoHandle stereoHandle);
  8913. ///////////////////////////////////////////////////////////////////////////////
  8914. //
  8915. // FUNCTION NAME: NvAPI_Stereo_IncreaseSeparation
  8916. //
  8917. //! DESCRIPTION: This API increases separation for the given device interface (just like the Ctrl+F4 hotkey).
  8918. //!
  8919. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8920. //!
  8921. //! SUPPORTED OS: Windows Vista and higher
  8922. //!
  8923. //!
  8924. //! \since Release: 180
  8925. //!
  8926. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8927. //!
  8928. //! \retval ::NVAPI_OK Increase of separation percentage was successfull.
  8929. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8930. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  8931. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8932. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  8933. //!
  8934. //! \ingroup stereoapi
  8935. ///////////////////////////////////////////////////////////////////////////////
  8936. NVAPI_INTERFACE NvAPI_Stereo_IncreaseSeparation(StereoHandle stereoHandle);
  8937. ///////////////////////////////////////////////////////////////////////////////
  8938. //
  8939. // FUNCTION NAME: NvAPI_Stereo_DecreaseConvergence
  8940. //
  8941. //! DESCRIPTION: This API decreases convergence for the given device interface (just like the Ctrl+F5 hotkey).
  8942. //!
  8943. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8944. //!
  8945. //! SUPPORTED OS: Windows Vista and higher
  8946. //!
  8947. //!
  8948. //! \since Release: 180
  8949. //!
  8950. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8951. //!
  8952. //! \retval ::NVAPI_OK - Decrease of convergence was successfull.
  8953. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  8954. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  8955. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  8956. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  8957. //!
  8958. //! \ingroup stereoapi
  8959. ///////////////////////////////////////////////////////////////////////////////
  8960. NVAPI_INTERFACE NvAPI_Stereo_DecreaseConvergence(StereoHandle stereoHandle);
  8961. ///////////////////////////////////////////////////////////////////////////////
  8962. //
  8963. // FUNCTION NAME: NvAPI_Stereo_IncreaseConvergence
  8964. //
  8965. //! DESCRIPTION: This API increases convergence for given the device interface (just like the Ctrl+F5 hotkey).
  8966. //!
  8967. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8968. //!
  8969. //! SUPPORTED OS: Windows Vista and higher
  8970. //!
  8971. //!
  8972. //! \since Release: 180
  8973. //!
  8974. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  8975. //!
  8976. //! \retval ::NVAPI_OK Increase of convergence was successfull.
  8977. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  8978. //! \retval ::NVAPI_API_NOT_INTIALIZED
  8979. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  8980. //! \retval ::NVAPI_ERROR
  8981. //!
  8982. //! \ingroup stereoapi
  8983. ///////////////////////////////////////////////////////////////////////////////
  8984. NVAPI_INTERFACE NvAPI_Stereo_IncreaseConvergence(StereoHandle stereoHandle);
  8985. ///////////////////////////////////////////////////////////////////////////////
  8986. //
  8987. // FUNCTION NAME: NvAPI_Stereo_GetFrustumAdjustMode
  8988. //
  8989. //! \fn NvAPI_Stereo_GetFrustumAdjustMode(StereoHandle stereoHandle, NV_FRUSTUM_ADJUST_MODE *pFrustumAdjustMode)
  8990. //! DESCRIPTION: This API gets the current frustum adjust mode value.
  8991. //!
  8992. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  8993. //!
  8994. //! SUPPORTED OS: Windows Vista and higher
  8995. //!
  8996. //!
  8997. //! \since Release: 180
  8998. //!
  8999. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  9000. //! \param [out] pFrustumAdjustMode Address of the NV_FRUSTUM_ADJUST_MODE type variable to store current frustum value in.
  9001. //!
  9002. //! \retval ::NVAPI_OK - Retrieval of frustum adjust mode was successfull.
  9003. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  9004. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  9005. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  9006. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  9007. //!
  9008. ///////////////////////////////////////////////////////////////////////////////
  9009. //! \ingroup stereoapi
  9010. //! Used in NvAPI_Stereo_GetFrustumAdjustMode().
  9011. typedef enum _NV_FrustumAdjustMode
  9012. {
  9013. NVAPI_NO_FRUSTUM_ADJUST, //!< Do not adjust frustum.
  9014. NVAPI_FRUSTUM_STRETCH, //!< Stretch images in X.
  9015. NVAPI_FRUSTUM_CLEAR_EDGES //!< Clear corresponding edges for each eye.
  9016. } NV_FRUSTUM_ADJUST_MODE;
  9017. //! \ingroup stereoapi
  9018. NVAPI_INTERFACE NvAPI_Stereo_GetFrustumAdjustMode(StereoHandle stereoHandle, NV_FRUSTUM_ADJUST_MODE *pFrustumAdjustMode);
  9019. ///////////////////////////////////////////////////////////////////////////////
  9020. //
  9021. // FUNCTION NAME: NvAPI_Stereo_SetFrustumAdjustMode
  9022. //
  9023. //! DESCRIPTION: This API sets the current frustum adjust mode value.
  9024. //!
  9025. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  9026. //!
  9027. //! SUPPORTED OS: Windows Vista and higher
  9028. //!
  9029. //!
  9030. //! \since Release: 180
  9031. //!
  9032. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  9033. //! \param [in] newFrustumAdjustModeValue New value for frustum adjust mode. It should be one of the symbolic constants defined in
  9034. //! ::NV_FRUSTUM_ADJUST_MODE. Any other value will cause function to do nothing and return
  9035. //! ::NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED.
  9036. //!
  9037. //! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull.
  9038. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  9039. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9040. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  9041. //! \retval ::NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED Given frustum adjust mode is not supported.
  9042. //! \retval ::NVAPI_ERROR
  9043. //!
  9044. //! \ingroup stereoapi
  9045. ///////////////////////////////////////////////////////////////////////////////
  9046. NVAPI_INTERFACE NvAPI_Stereo_SetFrustumAdjustMode(StereoHandle stereoHandle, NV_FRUSTUM_ADJUST_MODE newFrustumAdjustModeValue);
  9047. ///////////////////////////////////////////////////////////////////////////////
  9048. //
  9049. // FUNCTION NAME: NvAPI_Stereo_CaptureJpegImage
  9050. //
  9051. //! DESCRIPTION: This API captures the current stereo image in JPEG stereo format with the given quality.
  9052. //! Only the last capture call per flip will be effective.
  9053. //!
  9054. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  9055. //!
  9056. //! SUPPORTED OS: Windows Vista and higher
  9057. //!
  9058. //!
  9059. //! \since Release: 180
  9060. //!
  9061. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  9062. //! \param [in] quality Quality of the JPEG image to be captured. Integer value betweeen 0 and 100.
  9063. //!
  9064. //! \retval ::NVAPI_OK Image captured.
  9065. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  9066. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9067. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED
  9068. //! \retval ::NVAPI_STEREO_PARAMETER_OUT_OF_RANGE Given quality is out of [0..100] range.
  9069. //! \retval ::NVAPI_ERROR
  9070. //!
  9071. //! \ingroup stereoapi
  9072. ///////////////////////////////////////////////////////////////////////////////
  9073. NVAPI_INTERFACE NvAPI_Stereo_CaptureJpegImage(StereoHandle stereoHandle, NvU32 quality);
  9074. ///////////////////////////////////////////////////////////////////////////////
  9075. //
  9076. // FUNCTION NAME: NvAPI_Stereo_InitActivation
  9077. //
  9078. //! DESCRIPTION: This API allows an application to enable stereo viewing, without the need of a GUID/Key pair
  9079. //! This API cannot be used to enable stereo viewing on 3DTV.
  9080. //!
  9081. //! HOW TO USE: Call this function immediately after device creation, then follow with a reset. \n
  9082. //! Very generically:
  9083. //! Create Device->Create Stereo Handle->InitActivation->Reset Device
  9084. //!
  9085. //! SUPPORTED OS: Windows Vista and higher
  9086. //!
  9087. //! \since Release: 302
  9088. //!
  9089. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  9090. //! \param [in] bDelayed Use delayed activation
  9091. //!
  9092. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  9093. //! If there are return error codes with specific meaning for this API,
  9094. //! they are listed below.
  9095. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  9096. //!
  9097. //! \ingroup stereoapi
  9098. ///////////////////////////////////////////////////////////////////////////////
  9099. //! \addtogroup stereoapi
  9100. //! @{
  9101. //! InitActivation Flags
  9102. typedef enum _NVAPI_STEREO_INIT_ACTIVATION_FLAGS
  9103. {
  9104. NVAPI_STEREO_INIT_ACTIVATION_IMMEDIATE = 0X00,
  9105. NVAPI_STEREO_INIT_ACTIVATION_DELAYED = 0x01,
  9106. } NVAPI_STEREO_INIT_ACTIVATION_FLAGS;
  9107. NVAPI_INTERFACE NvAPI_Stereo_InitActivation(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_INIT_ACTIVATION_FLAGS flags);
  9108. //! @}
  9109. ///////////////////////////////////////////////////////////////////////////////
  9110. //
  9111. // FUNCTION NAME: NvAPI_Stereo_Trigger_Activation
  9112. //
  9113. //! DESCRIPTION: This API allows an application to trigger creation of a stereo desktop,
  9114. //! in case the creation was stopped on application launch.
  9115. //!
  9116. //! SUPPORTED OS: Windows Vista and higher
  9117. //!
  9118. //! \since Release: 302
  9119. //!
  9120. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  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_STEREO_INIT_ACTIVATION_NOT_DONE - Stereo InitActivation not called.
  9126. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  9127. //!
  9128. //! \ingroup stereoapi
  9129. ///////////////////////////////////////////////////////////////////////////////
  9130. NVAPI_INTERFACE NvAPI_Stereo_Trigger_Activation(__in StereoHandle hStereoHandle);
  9131. ///////////////////////////////////////////////////////////////////////////////
  9132. //
  9133. // FUNCTION NAME: NvAPI_Stereo_CapturePngImage
  9134. //
  9135. //! DESCRIPTION: This API captures the current stereo image in PNG stereo format.
  9136. //! Only the last capture call per flip will be effective.
  9137. //!
  9138. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  9139. //!
  9140. //! SUPPORTED OS: Windows Vista and higher
  9141. //!
  9142. //!
  9143. //! \since Release: 180
  9144. //!
  9145. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  9146. //!
  9147. //! \retval ::NVAPI_OK Image captured.
  9148. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  9149. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9150. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  9151. //! \retval ::NVAPI_ERROR
  9152. //!
  9153. //! \ingroup stereoapi
  9154. ///////////////////////////////////////////////////////////////////////////////
  9155. NVAPI_INTERFACE NvAPI_Stereo_CapturePngImage(StereoHandle stereoHandle);
  9156. ///////////////////////////////////////////////////////////////////////////////
  9157. //
  9158. // FUNCTION NAME: NvAPI_Stereo_ReverseStereoBlitControl
  9159. //
  9160. //! DESCRIPTION: This API turns on/off reverse stereo blit.
  9161. //!
  9162. //! HOW TO USE: Use after the stereo handle for the device interface is created via successfull call to the appropriate
  9163. //! NvAPI_Stereo_CreateHandleFrom() function.
  9164. //! After reversed stereo blit control is turned on, blits from the stereo surface will
  9165. //! produce the right-eye image in the left side of the destination surface and the left-eye
  9166. //! image in the right side of the destination surface.
  9167. //!
  9168. //! In DirectX 9, the destination surface must be created as the render target, and StretchRect must be used.
  9169. //! Conditions:
  9170. //! - DstWidth == 2*SrcWidth
  9171. //! - DstHeight == SrcHeight
  9172. //! - Src surface is the stereo surface.
  9173. //! - SrcRect must be {0,0,SrcWidth,SrcHeight}
  9174. //! - DstRect must be {0,0,DstWidth,DstHeight}
  9175. //!
  9176. //! In DirectX 10, ResourceCopyRegion must be used.
  9177. //! Conditions:
  9178. //! - DstWidth == 2*SrcWidth
  9179. //! - DstHeight == SrcHeight
  9180. //! - dstX == 0,
  9181. //! - dstY == 0,
  9182. //! - dstZ == 0,
  9183. //! - SrcBox: left=top=front==0; right==SrcWidth; bottom==SrcHeight; back==1;
  9184. //!
  9185. //! SUPPORTED OS: Windows Vista and higher
  9186. //!
  9187. //!
  9188. //! \since Release: 185
  9189. //!
  9190. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  9191. //! \param [in] TurnOn != 0 : Turns on \n
  9192. //! == 0 : Turns off
  9193. //!
  9194. //!
  9195. //! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull.
  9196. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  9197. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9198. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  9199. //! \retval ::NVAPI_ERROR
  9200. //!
  9201. //! \ingroup stereoapi
  9202. ///////////////////////////////////////////////////////////////////////////////
  9203. NVAPI_INTERFACE NvAPI_Stereo_ReverseStereoBlitControl(StereoHandle hStereoHandle, NvU8 TurnOn);
  9204. ///////////////////////////////////////////////////////////////////////////////
  9205. //
  9206. // FUNCTION NAME: NvAPI_Stereo_SetNotificationMessage
  9207. //
  9208. //! DESCRIPTION: This API is a Setup notification message that the stereo driver uses to notify the application
  9209. //! when the user changes the stereo driver state.
  9210. //!
  9211. //! When the user changes the stereo state (Activated or Deactivated, separation or conversion)
  9212. //! the stereo driver posts a defined message with the following parameters:
  9213. //!
  9214. //! lParam is the current conversion. (Actual conversion is *(float*)&lParam )
  9215. //!
  9216. //! wParam == MAKEWPARAM(l, h) where
  9217. //! - l == 0 if stereo is deactivated
  9218. //! - l == 1 if stereo is deactivated
  9219. //! - h is the current separation. (Actual separation is float(h*100.f/0xFFFF)
  9220. //!
  9221. //! Call this API with NULL hWnd to prohibit notification.
  9222. //!
  9223. //! WHEN TO USE: Use after the stereo handle for device interface is created via successful call to appropriate
  9224. //! NvAPI_Stereo_CreateHandleFrom() function.
  9225. //!
  9226. //!
  9227. //! SUPPORTED OS: Windows Vista and higher
  9228. //!
  9229. //!
  9230. //! \since Release: 180
  9231. //!
  9232. //!
  9233. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  9234. //! \param [in] hWnd Window HWND that will be notified when the user changes the stereo driver state.
  9235. //! Actual HWND must be cast to an NvU64.
  9236. //! \param [in] messageID MessageID of the message that will be posted to hWnd
  9237. //!
  9238. //! \retval ::NVAPI_OK Notification set.
  9239. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  9240. //! \retval ::NVAPI_API_NOT_INTIALIZED
  9241. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  9242. //! \retval ::NVAPI_ERROR
  9243. //!
  9244. //! \ingroup stereoapi
  9245. ///////////////////////////////////////////////////////////////////////////////
  9246. NVAPI_INTERFACE NvAPI_Stereo_SetNotificationMessage(StereoHandle hStereoHandle, NvU64 hWnd,NvU64 messageID);
  9247. //! \ingroup stereoapi
  9248. #define NVAPI_STEREO_QUADBUFFERED_API_VERSION 0x2
  9249. //! \ingroup stereoapi
  9250. typedef enum _NV_StereoSwapChainMode
  9251. {
  9252. NVAPI_STEREO_SWAPCHAIN_DEFAULT = 0,
  9253. NVAPI_STEREO_SWAPCHAIN_STEREO = 1,
  9254. NVAPI_STEREO_SWAPCHAIN_MONO = 2,
  9255. } NV_STEREO_SWAPCHAIN_MODE;
  9256. #if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  9257. ///////////////////////////////////////////////////////////////////////////////
  9258. //
  9259. // FUNCTION NAME: NvAPI_D3D1x_CreateSwapChain
  9260. //
  9261. //! DESCRIPTION: This API allows the user to create a mono or a stereo swap chain.
  9262. //!
  9263. //! NOTE: NvAPI_D3D1x_CreateSwapChain is a wrapper of the method IDXGIFactory::CreateSwapChain which
  9264. //! additionally notifies the D3D driver of the mode in which stereo mode the swap chain is to be
  9265. //! created.
  9266. //!
  9267. //! \since Release: 285
  9268. //!
  9269. //! SUPPORTED OS: Windows 7 and higher
  9270. //!
  9271. //!
  9272. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  9273. //! A pointer to the device that will write 2D images to the swap chain.
  9274. //! \param [in] pDesc A pointer to the swap-chain description (DXGI_SWAP_CHAIN_DESC). This parameter cannot be NULL.
  9275. //! \param [out] ppSwapChain A pointer to the swap chain created.
  9276. //! \param [in] mode The stereo mode fot the swap chain.
  9277. //! NVAPI_STEREO_SWAPCHAIN_DEFAULT
  9278. //! NVAPI_STEREO_SWAPCHAIN_STEREO
  9279. //! NVAPI_STEREO_SWAPCHAIN_MONO
  9280. //!
  9281. //! \retval ::NVAPI_OK The swap chain was created successfully.
  9282. //! \retval ::NVAPI_ERROR The operation failed.
  9283. //!
  9284. //! \ingroup stereoapi
  9285. ///////////////////////////////////////////////////////////////////////////////
  9286. NVAPI_INTERFACE NvAPI_D3D1x_CreateSwapChain(StereoHandle hStereoHandle,
  9287. DXGI_SWAP_CHAIN_DESC* pDesc,
  9288. IDXGISwapChain** ppSwapChain,
  9289. NV_STEREO_SWAPCHAIN_MODE mode);
  9290. #endif //if defined(__d3d10_h__) || defined(__d3d10_1_h__) || defined(__d3d11_h__)
  9291. #if defined(_D3D9_H_)
  9292. ///////////////////////////////////////////////////////////////////////////////
  9293. //
  9294. // FUNCTION NAME: NvAPI_D3D9_CreateSwapChain
  9295. //
  9296. //! DESCRIPTION: This API allows the user to create a mono or a stereo swap chain.
  9297. //!
  9298. //! NOTE: NvAPI_D3D9_CreateSwapChain is a wrapper of the method IDirect3DDevice9::CreateAdditionalSwapChain which
  9299. //! additionally notifies the D3D driver if the swap chain creation mode must be stereo or mono.
  9300. //!
  9301. //!
  9302. //! \since Release: 285
  9303. //!
  9304. //! SUPPORTED OS: Windows 7 and higher
  9305. //!
  9306. //!
  9307. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  9308. //! \param [in, out] pPresentationParameters A pointer to the swap-chain description (DXGI). This parameter cannot be NULL.
  9309. //! \param [out] ppSwapChain A pointer to the swap chain created.
  9310. //! \param [in] mode The stereo mode for the swap chain.
  9311. //! NVAPI_STEREO_SWAPCHAIN_DEFAULT
  9312. //! NVAPI_STEREO_SWAPCHAIN_STEREO
  9313. //! NVAPI_STEREO_SWAPCHAIN_MONO
  9314. //!
  9315. //! \retval ::NVAPI_OK The swap chain creation was successful
  9316. //! \retval ::NVAPI_ERROR The operation failed.
  9317. //!
  9318. //!\ingroup stereoapi
  9319. ///////////////////////////////////////////////////////////////////////////////
  9320. NVAPI_INTERFACE NvAPI_D3D9_CreateSwapChain(StereoHandle hStereoHandle,
  9321. D3DPRESENT_PARAMETERS *pPresentationParameters,
  9322. IDirect3DSwapChain9 **ppSwapChain,
  9323. NV_STEREO_SWAPCHAIN_MODE mode);
  9324. #endif //if defined(_D3D9_H_)
  9325. //! \addtogroup drsapi
  9326. //! @{
  9327. // GPU Profile APIs
  9328. NV_DECLARE_HANDLE(NvDRSSessionHandle);
  9329. NV_DECLARE_HANDLE(NvDRSProfileHandle);
  9330. #define NVAPI_DRS_GLOBAL_PROFILE ((NvDRSProfileHandle) -1)
  9331. #define NVAPI_SETTING_MAX_VALUES 100
  9332. typedef enum _NVDRS_SETTING_TYPE
  9333. {
  9334. NVDRS_DWORD_TYPE,
  9335. NVDRS_BINARY_TYPE,
  9336. NVDRS_STRING_TYPE,
  9337. NVDRS_WSTRING_TYPE
  9338. } NVDRS_SETTING_TYPE;
  9339. typedef enum _NVDRS_SETTING_LOCATION
  9340. {
  9341. NVDRS_CURRENT_PROFILE_LOCATION,
  9342. NVDRS_GLOBAL_PROFILE_LOCATION,
  9343. NVDRS_BASE_PROFILE_LOCATION,
  9344. NVDRS_DEFAULT_PROFILE_LOCATION
  9345. } NVDRS_SETTING_LOCATION;
  9346. typedef struct _NVDRS_GPU_SUPPORT
  9347. {
  9348. NvU32 geforce : 1;
  9349. NvU32 quadro : 1;
  9350. NvU32 nvs : 1;
  9351. NvU32 reserved4 : 1;
  9352. NvU32 reserved5 : 1;
  9353. NvU32 reserved6 : 1;
  9354. NvU32 reserved7 : 1;
  9355. NvU32 reserved8 : 1;
  9356. NvU32 reserved9 : 1;
  9357. NvU32 reserved10 : 1;
  9358. NvU32 reserved11 : 1;
  9359. NvU32 reserved12 : 1;
  9360. NvU32 reserved13 : 1;
  9361. NvU32 reserved14 : 1;
  9362. NvU32 reserved15 : 1;
  9363. NvU32 reserved16 : 1;
  9364. NvU32 reserved17 : 1;
  9365. NvU32 reserved18 : 1;
  9366. NvU32 reserved19 : 1;
  9367. NvU32 reserved20 : 1;
  9368. NvU32 reserved21 : 1;
  9369. NvU32 reserved22 : 1;
  9370. NvU32 reserved23 : 1;
  9371. NvU32 reserved24 : 1;
  9372. NvU32 reserved25 : 1;
  9373. NvU32 reserved26 : 1;
  9374. NvU32 reserved27 : 1;
  9375. NvU32 reserved28 : 1;
  9376. NvU32 reserved29 : 1;
  9377. NvU32 reserved30 : 1;
  9378. NvU32 reserved31 : 1;
  9379. NvU32 reserved32 : 1;
  9380. } NVDRS_GPU_SUPPORT;
  9381. //! Enum to decide on the datatype of setting value.
  9382. typedef struct _NVDRS_BINARY_SETTING
  9383. {
  9384. NvU32 valueLength; //!< valueLength should always be in number of bytes.
  9385. NvU8 valueData[NVAPI_BINARY_DATA_MAX];
  9386. } NVDRS_BINARY_SETTING;
  9387. typedef struct _NVDRS_SETTING_VALUES
  9388. {
  9389. NvU32 version; //!< Structure Version
  9390. NvU32 numSettingValues; //!< Total number of values available in a setting.
  9391. NVDRS_SETTING_TYPE settingType; //!< Type of setting value.
  9392. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
  9393. {
  9394. NvU32 u32DefaultValue; //!< Accessing default DWORD value of this setting.
  9395. NVDRS_BINARY_SETTING binaryDefaultValue; //!< Accessing default Binary value of this setting.
  9396. //!< Must be allocated by caller with valueLength specifying buffer size, or only valueLength will be filled in.
  9397. NvAPI_UnicodeString wszDefaultValue; //!< Accessing default unicode string value of this setting.
  9398. };
  9399. union //!< Setting values can be of either DWORD, Binary values or String type,
  9400. { //!< NOT mixed types.
  9401. NvU32 u32Value; //!< All possible DWORD values for a setting
  9402. NVDRS_BINARY_SETTING binaryValue; //!< All possible Binary values for a setting
  9403. NvAPI_UnicodeString wszValue; //!< Accessing current unicode string value of this setting.
  9404. }settingValues[NVAPI_SETTING_MAX_VALUES];
  9405. } NVDRS_SETTING_VALUES;
  9406. //! Macro for constructing the version field of ::_NVDRS_SETTING_VALUES
  9407. #define NVDRS_SETTING_VALUES_VER MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1)
  9408. typedef struct _NVDRS_SETTING_V1
  9409. {
  9410. NvU32 version; //!< Structure Version
  9411. NvAPI_UnicodeString settingName; //!< String name of setting
  9412. NvU32 settingId; //!< 32 bit setting Id
  9413. NVDRS_SETTING_TYPE settingType; //!< Type of setting value.
  9414. NVDRS_SETTING_LOCATION settingLocation; //!< Describes where the value in CurrentValue comes from.
  9415. NvU32 isCurrentPredefined; //!< It is different than 0 if the currentValue is a predefined Value,
  9416. //!< 0 if the currentValue is a user value.
  9417. NvU32 isPredefinedValid; //!< It is different than 0 if the PredefinedValue union contains a valid value.
  9418. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
  9419. {
  9420. NvU32 u32PredefinedValue; //!< Accessing default DWORD value of this setting.
  9421. NVDRS_BINARY_SETTING binaryPredefinedValue; //!< Accessing default Binary value of this setting.
  9422. //!< Must be allocated by caller with valueLength specifying buffer size,
  9423. //!< or only valueLength will be filled in.
  9424. NvAPI_UnicodeString wszPredefinedValue; //!< Accessing default unicode string value of this setting.
  9425. };
  9426. union //!< Setting can hold either DWORD or Binary value or string. Not mixed types.
  9427. {
  9428. NvU32 u32CurrentValue; //!< Accessing current DWORD value of this setting.
  9429. NVDRS_BINARY_SETTING binaryCurrentValue; //!< Accessing current Binary value of this setting.
  9430. //!< Must be allocated by caller with valueLength specifying buffer size,
  9431. //!< or only valueLength will be filled in.
  9432. NvAPI_UnicodeString wszCurrentValue; //!< Accessing current unicode string value of this setting.
  9433. };
  9434. } NVDRS_SETTING_V1;
  9435. //! Macro for constructing the version field of ::_NVDRS_SETTING
  9436. #define NVDRS_SETTING_VER1 MAKE_NVAPI_VERSION(NVDRS_SETTING_V1, 1)
  9437. typedef NVDRS_SETTING_V1 NVDRS_SETTING;
  9438. #define NVDRS_SETTING_VER NVDRS_SETTING_VER1
  9439. typedef struct _NVDRS_APPLICATION_V1
  9440. {
  9441. NvU32 version; //!< Structure Version
  9442. NvU32 isPredefined; //!< Is the application userdefined/predefined
  9443. NvAPI_UnicodeString appName; //!< String name of the Application
  9444. NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application
  9445. NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the application
  9446. } NVDRS_APPLICATION_V1;
  9447. typedef struct _NVDRS_APPLICATION_V2
  9448. {
  9449. NvU32 version; //!< Structure Version
  9450. NvU32 isPredefined; //!< Is the application userdefined/predefined
  9451. NvAPI_UnicodeString appName; //!< String name of the Application
  9452. NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application
  9453. NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application
  9454. NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found.
  9455. //!< When specifying multiple files, separate them using the ':' character.
  9456. } NVDRS_APPLICATION_V2;
  9457. typedef struct _NVDRS_APPLICATION_V3
  9458. {
  9459. NvU32 version; //!< Structure Version
  9460. NvU32 isPredefined; //!< Is the application userdefined/predefined
  9461. NvAPI_UnicodeString appName; //!< String name of the Application
  9462. NvAPI_UnicodeString userFriendlyName; //!< UserFriendly name of the Application
  9463. NvAPI_UnicodeString launcher; //!< Indicates the name (if any) of the launcher that starts the Application
  9464. NvAPI_UnicodeString fileInFolder; //!< Select this application only if this file is found.
  9465. //!< When specifying multiple files, separate them using the ':' character.
  9466. NvU32 isMetro:1; //!< Windows 8 style app
  9467. NvU32 isCommandLine:1; //!< Command line parsing for the application name
  9468. NvU32 reserved:30; //!< Reserved. Should be 0.
  9469. } NVDRS_APPLICATION_V3;
  9470. #define NVDRS_APPLICATION_VER_V1 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V1,1)
  9471. #define NVDRS_APPLICATION_VER_V2 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V2,2)
  9472. #define NVDRS_APPLICATION_VER_V3 MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V3,3)
  9473. typedef NVDRS_APPLICATION_V3 NVDRS_APPLICATION;
  9474. #define NVDRS_APPLICATION_VER NVDRS_APPLICATION_VER_V3
  9475. typedef struct _NVDRS_PROFILE_V1
  9476. {
  9477. NvU32 version; //!< Structure Version
  9478. NvAPI_UnicodeString profileName; //!< String name of the Profile
  9479. NVDRS_GPU_SUPPORT gpuSupport; //!< This read-only flag indicates the profile support on either
  9480. //!< Quadro, or Geforce, or both.
  9481. NvU32 isPredefined; //!< Is the Profile user-defined, or predefined
  9482. NvU32 numOfApps; //!< Total number of applications that belong to this profile. Read-only
  9483. NvU32 numOfSettings; //!< Total number of settings applied for this Profile. Read-only
  9484. } NVDRS_PROFILE_V1;
  9485. typedef NVDRS_PROFILE_V1 NVDRS_PROFILE;
  9486. //! Macro for constructing the version field of ::NVDRS_PROFILE
  9487. #define NVDRS_PROFILE_VER1 MAKE_NVAPI_VERSION(NVDRS_PROFILE_V1,1)
  9488. #define NVDRS_PROFILE_VER NVDRS_PROFILE_VER1
  9489. ///////////////////////////////////////////////////////////////////////////////
  9490. //
  9491. // FUNCTION NAME: NvAPI_DRS_CreateSession
  9492. //
  9493. //! DESCRIPTION: This API allocates memory and initializes the session.
  9494. //!
  9495. //! SUPPORTED OS: Windows XP and higher
  9496. //!
  9497. //!
  9498. //! \param [out] *phSession Return pointer to the session handle.
  9499. //!
  9500. //! \retval ::NVAPI_OK SUCCESS
  9501. //! \retval ::NVAPI_ERROR: For miscellaneous errors.
  9502. //
  9503. ///////////////////////////////////////////////////////////////////////////////
  9504. NVAPI_INTERFACE NvAPI_DRS_CreateSession(NvDRSSessionHandle *phSession);
  9505. ///////////////////////////////////////////////////////////////////////////////
  9506. //
  9507. // FUNCTION NAME: NvAPI_DRS_DestroySession
  9508. //
  9509. //! DESCRIPTION: This API frees the allocation: cleanup of NvDrsSession.
  9510. //!
  9511. //! SUPPORTED OS: Windows XP and higher
  9512. //!
  9513. //!
  9514. //! \param [in] hSession Input to the session handle.
  9515. //!
  9516. //! \retval ::NVAPI_OK SUCCESS
  9517. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9518. //
  9519. ///////////////////////////////////////////////////////////////////////////////
  9520. NVAPI_INTERFACE NvAPI_DRS_DestroySession(NvDRSSessionHandle hSession);
  9521. ///////////////////////////////////////////////////////////////////////////////
  9522. //
  9523. // FUNCTION NAME: NvAPI_DRS_LoadSettings
  9524. //
  9525. //! DESCRIPTION: This API loads and parses the settings data.
  9526. //!
  9527. //! SUPPORTED OS: Windows XP and higher
  9528. //!
  9529. //!
  9530. //! \param [in] hSession Input to the session handle.
  9531. //!
  9532. //! \retval ::NVAPI_OK SUCCESS
  9533. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9534. //
  9535. ///////////////////////////////////////////////////////////////////////////////
  9536. NVAPI_INTERFACE NvAPI_DRS_LoadSettings(NvDRSSessionHandle hSession);
  9537. ///////////////////////////////////////////////////////////////////////////////
  9538. //
  9539. // FUNCTION NAME: NvAPI_DRS_SaveSettings
  9540. //
  9541. //! DESCRIPTION: This API saves the settings data to the system.
  9542. //!
  9543. //! SUPPORTED OS: Windows XP and higher
  9544. //!
  9545. //!
  9546. //! \param [in] hSession Input to the session handle.
  9547. //!
  9548. //! \retval ::NVAPI_OK SUCCESS
  9549. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9550. //
  9551. ///////////////////////////////////////////////////////////////////////////////
  9552. NVAPI_INTERFACE NvAPI_DRS_SaveSettings(NvDRSSessionHandle hSession);
  9553. ///////////////////////////////////////////////////////////////////////////////
  9554. //
  9555. // FUNCTION NAME: NvAPI_DRS_LoadSettingsFromFile
  9556. //
  9557. //! DESCRIPTION: This API loads settings from the given file path.
  9558. //!
  9559. //! SUPPORTED OS: Windows XP and higher
  9560. //!
  9561. //!
  9562. //! \param [in] hSession Input to the session handle
  9563. //! \param [in] fileName Binary File Name/Path
  9564. //!
  9565. //! \retval ::NVAPI_OK SUCCESS
  9566. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9567. //
  9568. ///////////////////////////////////////////////////////////////////////////////
  9569. NVAPI_INTERFACE NvAPI_DRS_LoadSettingsFromFile(NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName);
  9570. ///////////////////////////////////////////////////////////////////////////////
  9571. //
  9572. // FUNCTION NAME: NvAPI_DRS_SaveSettingsToFile
  9573. //
  9574. //! DESCRIPTION: This API saves settings to the given file path.
  9575. //!
  9576. //! SUPPORTED OS: Windows XP and higher
  9577. //!
  9578. //!
  9579. //! \param [in] hSession Input to the session handle.
  9580. //! \param [in] fileName Binary File Name/Path
  9581. //!
  9582. //! \retval ::NVAPI_OK SUCCESS
  9583. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9584. //
  9585. ///////////////////////////////////////////////////////////////////////////////
  9586. NVAPI_INTERFACE NvAPI_DRS_SaveSettingsToFile(NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName);
  9587. //! @}
  9588. ///////////////////////////////////////////////////////////////////////////////
  9589. //
  9590. // FUNCTION NAME: NvAPI_DRS_CreateProfile
  9591. //
  9592. //! DESCRIPTION: This API creates an empty profile.
  9593. //!
  9594. //! SUPPORTED OS: Windows XP and higher
  9595. //!
  9596. //!
  9597. //! \param [in] hSession Input to the session handle.
  9598. //! \param [in] *pProfileInfo Input pointer to NVDRS_PROFILE.
  9599. //! \param [in] *phProfile Returns pointer to profile handle.
  9600. //!
  9601. //! \retval ::NVAPI_OK SUCCESS
  9602. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9603. //!
  9604. //! \ingroup drsapi
  9605. ///////////////////////////////////////////////////////////////////////////////
  9606. NVAPI_INTERFACE NvAPI_DRS_CreateProfile(NvDRSSessionHandle hSession, NVDRS_PROFILE *pProfileInfo, NvDRSProfileHandle *phProfile);
  9607. ///////////////////////////////////////////////////////////////////////////////
  9608. //
  9609. // FUNCTION NAME: NvAPI_DRS_DeleteProfile
  9610. //
  9611. //! DESCRIPTION: This API deletes a profile or sets it back to a predefined value.
  9612. //!
  9613. //! SUPPORTED OS: Windows XP and higher
  9614. //!
  9615. //!
  9616. //! \param [in] hSession Input to the session handle.
  9617. //! \param [in] hProfile Input profile handle.
  9618. //!
  9619. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9620. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9621. //!
  9622. //! \ingroup drsapi
  9623. ///////////////////////////////////////////////////////////////////////////////
  9624. NVAPI_INTERFACE NvAPI_DRS_DeleteProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile);
  9625. ///////////////////////////////////////////////////////////////////////////////
  9626. //
  9627. // FUNCTION NAME: NvAPI_DRS_SetCurrentGlobalProfile
  9628. //
  9629. //! DESCRIPTION: This API sets the current global profile in the driver.
  9630. //!
  9631. //! SUPPORTED OS: Windows XP and higher
  9632. //!
  9633. //!
  9634. //! \param [in] hSession Input to the session handle.
  9635. //! \param [in] wszGlobalProfileName Input current Global profile name.
  9636. //!
  9637. //! \retval ::NVAPI_OK SUCCESS
  9638. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9639. //!
  9640. //! \ingroup drsapi
  9641. ///////////////////////////////////////////////////////////////////////////////
  9642. NVAPI_INTERFACE NvAPI_DRS_SetCurrentGlobalProfile(NvDRSSessionHandle hSession, NvAPI_UnicodeString wszGlobalProfileName);
  9643. ///////////////////////////////////////////////////////////////////////////////
  9644. //
  9645. // FUNCTION NAME: NvAPI_DRS_GetCurrentGlobalProfile
  9646. //
  9647. //! DESCRIPTION: This API returns the handle to the current global profile.
  9648. //!
  9649. //! SUPPORTED OS: Windows XP and higher
  9650. //!
  9651. //!
  9652. //! \param [in] hSession Input to the session handle.
  9653. //! \param [out] *phProfile Returns current Global profile handle.
  9654. //!
  9655. //! \retval ::NVAPI_OK SUCCESS
  9656. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9657. //!
  9658. //! \ingroup drsapi
  9659. ///////////////////////////////////////////////////////////////////////////////
  9660. NVAPI_INTERFACE NvAPI_DRS_GetCurrentGlobalProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile);
  9661. ///////////////////////////////////////////////////////////////////////////////
  9662. //
  9663. // FUNCTION NAME: NvAPI_DRS_GetProfileInfo
  9664. //
  9665. //! DESCRIPTION: This API gets information about the given profile. User needs to specify the name of the Profile.
  9666. //!
  9667. //! SUPPORTED OS: Windows XP and higher
  9668. //!
  9669. //!
  9670. //! \param [in] hSession Input to the session handle.
  9671. //! \param [in] hProfile Input profile handle.
  9672. //! \param [out] *pProfileInfo Return the profile info.
  9673. //!
  9674. //! \retval ::NVAPI_OK SUCCESS
  9675. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9676. //!
  9677. //! \ingroup drsapi
  9678. ///////////////////////////////////////////////////////////////////////////////
  9679. NVAPI_INTERFACE NvAPI_DRS_GetProfileInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo);
  9680. ///////////////////////////////////////////////////////////////////////////////
  9681. //
  9682. // FUNCTION NAME: NvAPI_DRS_SetProfileInfo
  9683. //
  9684. //! DESCRIPTION: Specifies flags for a given profile. Currently only the NVDRS_GPU_SUPPORT is
  9685. //! used to update the profile. Neither the name, number of settings or applications
  9686. //! or other profile information can be changed with this function.
  9687. //!
  9688. //! SUPPORTED OS: Windows XP and higher
  9689. //!
  9690. //!
  9691. //! \param [in] hSession Input to the session handle.
  9692. //! \param [in] hProfile Input profile handle.
  9693. //! \param [in] *pProfileInfo Input the new profile info.
  9694. //!
  9695. //! \retval ::NVAPI_OK SUCCESS
  9696. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9697. //!
  9698. //! \ingroup drsapi
  9699. ///////////////////////////////////////////////////////////////////////////////
  9700. NVAPI_INTERFACE NvAPI_DRS_SetProfileInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo);
  9701. ///////////////////////////////////////////////////////////////////////////////
  9702. //
  9703. // FUNCTION NAME: NvAPI_DRS_FindProfileByName
  9704. //
  9705. //! DESCRIPTION: This API finds a profile in the current session.
  9706. //!
  9707. //! SUPPORTED OS: Windows XP and higher
  9708. //!
  9709. //!
  9710. //! \param [in] hSession Input to the session handle.
  9711. //! \param [in] profileName Input profileName.
  9712. //! \param [out] phProfile Input profile handle.
  9713. //!
  9714. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  9715. //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found
  9716. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9717. //!
  9718. //! \ingroup drsapi
  9719. ///////////////////////////////////////////////////////////////////////////////
  9720. NVAPI_INTERFACE NvAPI_DRS_FindProfileByName(NvDRSSessionHandle hSession, NvAPI_UnicodeString profileName, NvDRSProfileHandle* phProfile);
  9721. ///////////////////////////////////////////////////////////////////////////////
  9722. //
  9723. // FUNCTION NAME: NvAPI_DRS_EnumProfiles
  9724. //
  9725. //! DESCRIPTION: This API enumerates through all the profiles in the session.
  9726. //!
  9727. //! SUPPORTED OS: Windows XP and higher
  9728. //!
  9729. //!
  9730. //! \param [in] hSession Input to the session handle.
  9731. //! \param [in] index Input the index for enumeration.
  9732. //! \param [out] *phProfile Returns profile handle.
  9733. //!
  9734. //! RETURN STATUS: NVAPI_OK: SUCCESS if the profile is found
  9735. //! NVAPI_ERROR: For miscellaneous errors.
  9736. //! NVAPI_END_ENUMERATION: index exceeds the total number of available Profiles in DB.
  9737. //!
  9738. //! \ingroup drsapi
  9739. ///////////////////////////////////////////////////////////////////////////////
  9740. NVAPI_INTERFACE NvAPI_DRS_EnumProfiles(NvDRSSessionHandle hSession, NvU32 index, NvDRSProfileHandle *phProfile);
  9741. ///////////////////////////////////////////////////////////////////////////////
  9742. //
  9743. // FUNCTION NAME: NvAPI_DRS_GetNumProfiles
  9744. //
  9745. //! DESCRIPTION: This API obtains the number of profiles in the current session object.
  9746. //!
  9747. //! SUPPORTED OS: Windows XP and higher
  9748. //!
  9749. //!
  9750. //! \param [in] hSession Input to the session handle.
  9751. //! \param out] *numProfiles Returns count of profiles in the current hSession.
  9752. //!
  9753. //! \retval ::NVAPI_OK SUCCESS
  9754. //! \retval ::NVAPI_API_NOT_INTIALIZED Failed to initialize.
  9755. //! \retval ::NVAPI_INVALID_ARGUMENT Invalid Arguments.
  9756. //!
  9757. //! \ingroup drsapi
  9758. ///////////////////////////////////////////////////////////////////////////////
  9759. NVAPI_INTERFACE NvAPI_DRS_GetNumProfiles(NvDRSSessionHandle hSession, NvU32 *numProfiles);
  9760. ///////////////////////////////////////////////////////////////////////////////
  9761. //
  9762. // FUNCTION NAME: NvAPI_DRS_CreateApplication
  9763. //
  9764. //! DESCRIPTION: This API adds an executable name to a profile.
  9765. //!
  9766. //! SUPPORTED OS: Windows XP and higher
  9767. //!
  9768. //!
  9769. //! \param [in] hSession Input to the session handle.
  9770. //! \param [in] hProfile Input profile handle.
  9771. //! \param [in] *pApplication Input NVDRS_APPLICATION struct with the executable name to be added.
  9772. //!
  9773. //! \retval ::NVAPI_OK SUCCESS
  9774. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9775. //!
  9776. //! \ingroup drsapi
  9777. ///////////////////////////////////////////////////////////////////////////////
  9778. NVAPI_INTERFACE NvAPI_DRS_CreateApplication(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApplication);
  9779. ///////////////////////////////////////////////////////////////////////////////
  9780. //
  9781. // FUNCTION NAME: NvAPI_DRS_DeleteApplicationEx
  9782. //
  9783. //! DESCRIPTION: This API removes an executable from a profile.
  9784. //!
  9785. //! SUPPORTED OS: Windows XP and higher
  9786. //!
  9787. //!
  9788. //! \param [in] hSession - Input to the session handle.
  9789. //! \param [in] hProfile - Input profile handle.
  9790. //! \param [in] *pApp - Input all the information about the application to be removed.
  9791. //!
  9792. //! \retval ::NVAPI_OK SUCCESS
  9793. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9794. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the path provided could refer to two different executables,
  9795. //! this error will be returned.
  9796. //!
  9797. //! \ingroup drsapi
  9798. ///////////////////////////////////////////////////////////////////////////////
  9799. NVAPI_INTERFACE NvAPI_DRS_DeleteApplicationEx(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApp);
  9800. ///////////////////////////////////////////////////////////////////////////////
  9801. //
  9802. // FUNCTION NAME: NvAPI_DRS_DeleteApplication
  9803. //
  9804. //! DESCRIPTION: This API removes an executable name from a profile.
  9805. //!
  9806. //! SUPPORTED OS: Windows XP and higher
  9807. //!
  9808. //!
  9809. //! \param [in] hSessionPARAMETERS Input to the session handle.
  9810. //! \param [in] hProfile Input profile handle.
  9811. //! \param [in] appName Input the executable name to be removed.
  9812. //!
  9813. //! \retval ::NVAPI_OK SUCCESS
  9814. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9815. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the path provided could refer to two different executables,
  9816. //! this error will be returned
  9817. //!
  9818. //! \ingroup drsapi
  9819. ///////////////////////////////////////////////////////////////////////////////
  9820. NVAPI_INTERFACE NvAPI_DRS_DeleteApplication(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName);
  9821. ///////////////////////////////////////////////////////////////////////////////
  9822. //
  9823. // FUNCTION NAME: NvAPI_DRS_GetApplicationInfo
  9824. //
  9825. //! DESCRIPTION: This API gets information about the given application. The input application name
  9826. //! must match exactly what the Profile has stored for the application.
  9827. //! This function is better used to retrieve application information from a previous
  9828. //! enumeration.
  9829. //!
  9830. //! SUPPORTED OS: Windows XP and higher
  9831. //!
  9832. //!
  9833. //! \param [in] hSession Input to the session handle.
  9834. //! \param [in] hProfile Input profile handle.
  9835. //! \param [in] appName Input application name.
  9836. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct with all the attributes.
  9837. //!
  9838. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  9839. //! If there are return error codes with specific meaning for this API,
  9840. //! they are listed below.
  9841. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS The application name could not
  9842. // single out only one executable.
  9843. //! \retval ::NVAPI_EXECUTABLE_NOT_FOUND No application with that name is found on the profile.
  9844. //!
  9845. //! \ingroup drsapi
  9846. ///////////////////////////////////////////////////////////////////////////////
  9847. NVAPI_INTERFACE NvAPI_DRS_GetApplicationInfo(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName, NVDRS_APPLICATION *pApplication);
  9848. ///////////////////////////////////////////////////////////////////////////////
  9849. //
  9850. // FUNCTION NAME: NvAPI_DRS_EnumApplications
  9851. //
  9852. //! DESCRIPTION: This API enumerates all the applications in a given profile from the starting index to the maximum length.
  9853. //!
  9854. //! SUPPORTED OS: Windows XP and higher
  9855. //!
  9856. //!
  9857. //! \param [in] hSession Input to the session handle.
  9858. //! \param [in] hProfile Input profile handle.
  9859. //! \param [in] startIndex Indicates starting index for enumeration.
  9860. //! \param [in,out] *appCount Input maximum length of the passed in arrays. Returns the actual length.
  9861. //! \param [out] *pApplication Returns NVDRS_APPLICATION struct with all the attributes.
  9862. //!
  9863. //! \retval ::NVAPI_OK SUCCESS
  9864. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9865. //! \retval ::NVAPI_END_ENUMERATION startIndex exceeds the total appCount.
  9866. //!
  9867. //! \ingroup drsapi
  9868. ///////////////////////////////////////////////////////////////////////////////
  9869. NVAPI_INTERFACE NvAPI_DRS_EnumApplications(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *appCount, NVDRS_APPLICATION *pApplication);
  9870. ///////////////////////////////////////////////////////////////////////////////
  9871. //
  9872. // FUNCTION NAME: NvAPI_DRS_FindApplicationByName
  9873. //
  9874. //! DESCRIPTION: This API searches the application and the associated profile for the given application name.
  9875. //! If a fully qualified path is provided, this function will always return the profile
  9876. //! the driver will apply upon running the application (on the path provided).
  9877. //!
  9878. //! SUPPORTED OS: Windows XP and higher
  9879. //!
  9880. //!
  9881. //! \param [in] hSession Input to the hSession handle
  9882. //! \param [in] appName Input appName. For best results, provide a fully qualified path of the type
  9883. //! c:/Folder1/Folder2/App.exe
  9884. //! \param [out] *phProfile Returns profile handle.
  9885. //! \param [in,out] *pApplication Returns NVDRS_APPLICATION struct pointer.
  9886. //!
  9887. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  9888. //! If there are return error codes with specific meaning for this API,
  9889. //! they are listed below:
  9890. //! \retval ::NVAPI_APPLICATION_NOT_FOUND If App not found
  9891. //! \retval ::NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS If the input appName was not fully qualified, this error might return in the case of multiple matches
  9892. //!
  9893. //! \ingroup drsapi
  9894. ///////////////////////////////////////////////////////////////////////////////
  9895. NVAPI_INTERFACE NvAPI_DRS_FindApplicationByName(__in NvDRSSessionHandle hSession, __in NvAPI_UnicodeString appName, __out NvDRSProfileHandle *phProfile, __inout NVDRS_APPLICATION *pApplication);
  9896. ///////////////////////////////////////////////////////////////////////////////
  9897. //
  9898. // FUNCTION NAME: NvAPI_DRS_SetSetting
  9899. //
  9900. //! DESCRIPTION: This API adds/modifies a setting to a profile.
  9901. //!
  9902. //! SUPPORTED OS: Windows XP and higher
  9903. //!
  9904. //!
  9905. //! \param [in] hSession Input to the session handle.
  9906. //! \param [in] hProfile Input profile handle.
  9907. //! \param [in] *pSetting Input NVDRS_SETTING struct pointer.
  9908. //!
  9909. //! \retval ::NVAPI_OK SUCCESS
  9910. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9911. //!
  9912. //! \ingroup drsapi
  9913. ///////////////////////////////////////////////////////////////////////////////
  9914. NVAPI_INTERFACE NvAPI_DRS_SetSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_SETTING *pSetting);
  9915. ///////////////////////////////////////////////////////////////////////////////
  9916. //
  9917. // FUNCTION NAME: NvAPI_DRS_GetSetting
  9918. //
  9919. //! DESCRIPTION: This API gets information about the given setting.
  9920. //!
  9921. //! SUPPORTED OS: Windows XP and higher
  9922. //!
  9923. //!
  9924. //! \param [in] hSession Input to the session handle.
  9925. //! \param [in] hProfile Input profile handle.
  9926. //! \param [in] settingId Input settingId.
  9927. //! \param [out] *pSetting Returns all the setting info
  9928. //!
  9929. //! \retval ::NVAPI_OK SUCCESS
  9930. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9931. //!
  9932. //! \ingroup drsapi
  9933. ///////////////////////////////////////////////////////////////////////////////
  9934. NVAPI_INTERFACE NvAPI_DRS_GetSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId, NVDRS_SETTING *pSetting);
  9935. ///////////////////////////////////////////////////////////////////////////////
  9936. //
  9937. // FUNCTION NAME: NvAPI_DRS_EnumSettings
  9938. //
  9939. //! DESCRIPTION: This API enumerates all the settings of a given profile from startIndex to the maximum length.
  9940. //!
  9941. //! SUPPORTED OS: Windows XP and higher
  9942. //!
  9943. //!
  9944. //! \param [in] hSession Input to the session handle.
  9945. //! \param [in] hProfile Input profile handle.
  9946. //! \param [in] startIndex Indicates starting index for enumeration.
  9947. //! \param [in,out] *settingsCount Input max length of the passed in arrays, Returns the actual length.
  9948. //! \param [out] *pSetting Returns all the settings info.
  9949. //!
  9950. //! \retval ::NVAPI_OK SUCCESS
  9951. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9952. //! \retval ::NVAPI_END_ENUMERATION startIndex exceeds the total appCount.
  9953. //!
  9954. //! \ingroup drsapi
  9955. ///////////////////////////////////////////////////////////////////////////////
  9956. NVAPI_INTERFACE NvAPI_DRS_EnumSettings(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *settingsCount, NVDRS_SETTING *pSetting);
  9957. ///////////////////////////////////////////////////////////////////////////////
  9958. //
  9959. // FUNCTION NAME: NvAPI_DRS_EnumAvailableSettingIds
  9960. //
  9961. //! DESCRIPTION: This API enumerates all the Ids of all the settings recognized by NVAPI.
  9962. //!
  9963. //! SUPPORTED OS: Windows XP and higher
  9964. //!
  9965. //!
  9966. //! \param [out] pSettingIds User-provided array of length *pMaxCount that NVAPI will fill with IDs.
  9967. //! \param [in,out] pMaxCount Input max length of the passed in array, Returns the actual length.
  9968. //!
  9969. //! \retval ::NVAPI_OK SUCCESS
  9970. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9971. //! NVAPI_END_ENUMERATION: the provided pMaxCount is not enough to hold all settingIds.
  9972. //!
  9973. //! \ingroup drsapi
  9974. ///////////////////////////////////////////////////////////////////////////////
  9975. NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingIds(NvU32 *pSettingIds, NvU32 *pMaxCount);
  9976. ///////////////////////////////////////////////////////////////////////////////
  9977. //
  9978. // FUNCTION NAME: NvAPI_DRS_EnumAvailableSettingValues
  9979. //
  9980. //! DESCRIPTION: This API enumerates all available setting values for a given setting.
  9981. //!
  9982. //! SUPPORTED OS: Windows XP and higher
  9983. //!
  9984. //!
  9985. //! \param [in] settingId Input settingId.
  9986. //! \param [in,out] maxNumCount Input max length of the passed in arrays, Returns the actual length.
  9987. //! \param [out] *pSettingValues Returns all available setting values and its count.
  9988. //!
  9989. //! \retval ::NVAPI_OK SUCCESS
  9990. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  9991. //!
  9992. //! \ingroup drsapi
  9993. ///////////////////////////////////////////////////////////////////////////////
  9994. NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingValues(NvU32 settingId, NvU32 *pMaxNumValues, NVDRS_SETTING_VALUES *pSettingValues);
  9995. ///////////////////////////////////////////////////////////////////////////////
  9996. //
  9997. // FUNCTION NAME: NvAPI_DRS_GetSettingIdFromName
  9998. //
  9999. //! DESCRIPTION: This API gets the binary ID of a setting given the setting name.
  10000. //!
  10001. //! SUPPORTED OS: Windows XP and higher
  10002. //!
  10003. //!
  10004. //! \param [in] settingName Input Unicode settingName.
  10005. //! \param [out] *pSettingId Returns corresponding settingId.
  10006. //!
  10007. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10008. //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found
  10009. //! \retval ::NVAPI_SETTING_NOT_FOUND if setting is not found
  10010. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10011. //!
  10012. //! \ingroup drsapi
  10013. ///////////////////////////////////////////////////////////////////////////////
  10014. NVAPI_INTERFACE NvAPI_DRS_GetSettingIdFromName(NvAPI_UnicodeString settingName, NvU32 *pSettingId);
  10015. ///////////////////////////////////////////////////////////////////////////////
  10016. //
  10017. // FUNCTION NAME: NvAPI_DRS_GetSettingNameFromId
  10018. //
  10019. //! DESCRIPTION: This API gets the setting name given the binary ID.
  10020. //!
  10021. //! SUPPORTED OS: Windows XP and higher
  10022. //!
  10023. //!
  10024. //! \param [in] settingId Input settingId.
  10025. //! \param [in] *pSettingName Returns corresponding Unicode settingName.
  10026. //!
  10027. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10028. //! \retval ::NVAPI_PROFILE_NOT_FOUND if profile is not found
  10029. //! \retval ::NVAPI_SETTING_NOT_FOUND if setting is not found
  10030. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10031. //!
  10032. //! \ingroup drsapi
  10033. ///////////////////////////////////////////////////////////////////////////////
  10034. NVAPI_INTERFACE NvAPI_DRS_GetSettingNameFromId(NvU32 settingId, NvAPI_UnicodeString *pSettingName);
  10035. ///////////////////////////////////////////////////////////////////////////////
  10036. //
  10037. // FUNCTION NAME: NvAPI_DRS_DeleteProfileSetting
  10038. //
  10039. //! DESCRIPTION: This API deletes a setting or sets it back to predefined value.
  10040. //!
  10041. //! SUPPORTED OS: Windows XP and higher
  10042. //!
  10043. //!
  10044. //! \param [in] hSession Input to the session handle.
  10045. //! \param [in] hProfile Input profile handle.
  10046. //! \param [in] settingId Input settingId to be deleted.
  10047. //!
  10048. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10049. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10050. //!
  10051. //! \ingroup drsapi
  10052. ///////////////////////////////////////////////////////////////////////////////
  10053. NVAPI_INTERFACE NvAPI_DRS_DeleteProfileSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId);
  10054. ///////////////////////////////////////////////////////////////////////////////
  10055. //
  10056. // FUNCTION NAME: NvAPI_DRS_RestoreAllDefaults
  10057. //
  10058. //! DESCRIPTION: This API restores the whole system to predefined(default) values.
  10059. //!
  10060. //! SUPPORTED OS: Windows XP and higher
  10061. //!
  10062. //!
  10063. //! \param [in] hSession Input to the session handle.
  10064. //!
  10065. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10066. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10067. //!
  10068. //! \ingroup drsapi
  10069. ///////////////////////////////////////////////////////////////////////////////
  10070. NVAPI_INTERFACE NvAPI_DRS_RestoreAllDefaults(NvDRSSessionHandle hSession);
  10071. ///////////////////////////////////////////////////////////////////////////////
  10072. //
  10073. // FUNCTION NAME: NvAPI_DRS_RestoreProfileDefault
  10074. //
  10075. //! DESCRIPTION: This API restores the given profile to predefined(default) values.
  10076. //! Any and all user specified modifications will be removed.
  10077. //! If the whole profile was set by the user, the profile will be removed.
  10078. //!
  10079. //! SUPPORTED OS: Windows XP and higher
  10080. //!
  10081. //!
  10082. //! \param [in] hSession Input to the session handle.
  10083. //! \param [in] hProfile Input profile handle.
  10084. //!
  10085. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10086. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10087. //! \retval ::NVAPI_PROFILE_REMOVED SUCCESS, and the hProfile is no longer valid.
  10088. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10089. //!
  10090. //! \ingroup drsapi
  10091. ///////////////////////////////////////////////////////////////////////////////
  10092. NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefault(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile);
  10093. ///////////////////////////////////////////////////////////////////////////////
  10094. //
  10095. // FUNCTION NAME: NvAPI_DRS_RestoreProfileDefaultSetting
  10096. //
  10097. //! DESCRIPTION: This API restores the given profile setting to predefined(default) values.
  10098. //!
  10099. //! SUPPORTED OS: Windows XP and higher
  10100. //!
  10101. //!
  10102. //! \param [in] hSession Input to the session handle.
  10103. //! \param [in] hProfile Input profile handle.
  10104. //! \param [in] settingId Input settingId.
  10105. //!
  10106. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10107. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10108. //!
  10109. //! \ingroup drsapi
  10110. ///////////////////////////////////////////////////////////////////////////////
  10111. NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefaultSetting(NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId);
  10112. ///////////////////////////////////////////////////////////////////////////////
  10113. //
  10114. // FUNCTION NAME: NvAPI_DRS_GetBaseProfile
  10115. //
  10116. //! DESCRIPTION: Returns the handle to the current global profile.
  10117. //!
  10118. //! SUPPORTED OS: Windows XP and higher
  10119. //!
  10120. //!
  10121. //! \param [in] hSession Input to the session handle.
  10122. //! \param [in] *phProfile Returns Base profile handle.
  10123. //!
  10124. //! \retval ::NVAPI_OK SUCCESS if the profile is found
  10125. //! \retval ::NVAPI_ERROR For miscellaneous errors.
  10126. //!
  10127. //! \ingroup drsapi
  10128. ///////////////////////////////////////////////////////////////////////////////
  10129. NVAPI_INTERFACE NvAPI_DRS_GetBaseProfile(NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile);
  10130. //! \addtogroup sysgeneral
  10131. //! @{
  10132. typedef struct
  10133. {
  10134. NvU32 version; //!< structure version
  10135. NvU32 vendorId; //!< Chipset vendor identification
  10136. NvU32 deviceId; //!< Chipset device identification
  10137. NvAPI_ShortString szVendorName; //!< Chipset vendor Name
  10138. NvAPI_ShortString szChipsetName; //!< Chipset device Name
  10139. NvU32 flags; //!< Chipset info flags - obsolete
  10140. NvU32 subSysVendorId; //!< Chipset subsystem vendor identification
  10141. NvU32 subSysDeviceId; //!< Chipset subsystem device identification
  10142. NvAPI_ShortString szSubSysVendorName; //!< subsystem vendor Name
  10143. NvU32 HBvendorId; //!< Host bridge vendor identification
  10144. NvU32 HBdeviceId; //!< Host bridge device identification
  10145. NvU32 HBsubSysVendorId; //!< Host bridge subsystem vendor identification
  10146. NvU32 HBsubSysDeviceId; //!< Host bridge subsystem device identification
  10147. } NV_CHIPSET_INFO_v4;
  10148. typedef struct
  10149. {
  10150. NvU32 version; //!< structure version
  10151. NvU32 vendorId; //!< vendor ID
  10152. NvU32 deviceId; //!< device ID
  10153. NvAPI_ShortString szVendorName; //!< vendor Name
  10154. NvAPI_ShortString szChipsetName; //!< device Name
  10155. NvU32 flags; //!< Chipset info flags - obsolete
  10156. NvU32 subSysVendorId; //!< subsystem vendor ID
  10157. NvU32 subSysDeviceId; //!< subsystem device ID
  10158. NvAPI_ShortString szSubSysVendorName; //!< subsystem vendor Name
  10159. } NV_CHIPSET_INFO_v3;
  10160. typedef enum
  10161. {
  10162. NV_CHIPSET_INFO_HYBRID = 0x00000001,
  10163. } NV_CHIPSET_INFO_FLAGS;
  10164. typedef struct
  10165. {
  10166. NvU32 version; //!< structure version
  10167. NvU32 vendorId; //!< vendor ID
  10168. NvU32 deviceId; //!< device ID
  10169. NvAPI_ShortString szVendorName; //!< vendor Name
  10170. NvAPI_ShortString szChipsetName; //!< device Name
  10171. NvU32 flags; //!< Chipset info flags
  10172. } NV_CHIPSET_INFO_v2;
  10173. typedef struct
  10174. {
  10175. NvU32 version; //structure version
  10176. NvU32 vendorId; //vendor ID
  10177. NvU32 deviceId; //device ID
  10178. NvAPI_ShortString szVendorName; //vendor Name
  10179. NvAPI_ShortString szChipsetName; //device Name
  10180. } NV_CHIPSET_INFO_v1;
  10181. #define NV_CHIPSET_INFO_VER_1 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v1,1)
  10182. #define NV_CHIPSET_INFO_VER_2 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v2,2)
  10183. #define NV_CHIPSET_INFO_VER_3 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v3,3)
  10184. #define NV_CHIPSET_INFO_VER_4 MAKE_NVAPI_VERSION(NV_CHIPSET_INFO_v4,4)
  10185. #define NV_CHIPSET_INFO NV_CHIPSET_INFO_v4
  10186. #define NV_CHIPSET_INFO_VER NV_CHIPSET_INFO_VER_4
  10187. //! @}
  10188. ///////////////////////////////////////////////////////////////////////////////
  10189. //
  10190. // FUNCTION NAME: NvAPI_SYS_GetChipSetInfo
  10191. //
  10192. //! This function returns information about the system's chipset.
  10193. //!
  10194. //! SUPPORTED OS: Windows XP and higher, Mac OS X
  10195. //!
  10196. //!
  10197. //! \since Release: 95
  10198. //!
  10199. //! \retval NVAPI_INVALID_ARGUMENT pChipSetInfo is NULL.
  10200. //! \retval NVAPI_OK *pChipSetInfo is now set.
  10201. //! \retval NVAPI_INCOMPATIBLE_STRUCT_VERSION NV_CHIPSET_INFO version not compatible with driver.
  10202. //! \ingroup sysgeneral
  10203. ///////////////////////////////////////////////////////////////////////////////
  10204. NVAPI_INTERFACE NvAPI_SYS_GetChipSetInfo(NV_CHIPSET_INFO *pChipSetInfo);
  10205. //! \ingroup sysgeneral
  10206. //! Lid and dock information - used in NvAPI_GetLidDockInfo()
  10207. typedef struct
  10208. {
  10209. NvU32 version; //! Structure version, constructed from the macro #NV_LID_DOCK_PARAMS_VER
  10210. NvU32 currentLidState;
  10211. NvU32 currentDockState;
  10212. NvU32 currentLidPolicy;
  10213. NvU32 currentDockPolicy;
  10214. NvU32 forcedLidMechanismPresent;
  10215. NvU32 forcedDockMechanismPresent;
  10216. }NV_LID_DOCK_PARAMS;
  10217. //! ingroup sysgeneral
  10218. #define NV_LID_DOCK_PARAMS_VER MAKE_NVAPI_VERSION(NV_LID_DOCK_PARAMS,1)
  10219. ///////////////////////////////////////////////////////////////////////////////
  10220. //
  10221. // FUNCTION NAME: NvAPI_GetLidDockInfo
  10222. //
  10223. //! DESCRIPTION: This function returns the current lid and dock information.
  10224. //!
  10225. //! SUPPORTED OS: Windows XP and higher
  10226. //!
  10227. //!
  10228. //! \since Release: 177
  10229. //!
  10230. //! \retval ::NVAPI_OK
  10231. //! \retval ::NVAPI_ERROR
  10232. //! \retval ::NVAPI_NOT_SUPPORTED
  10233. //! \retval ::NVAPI_HANDLE_INVALIDATED
  10234. //! \retval ::NVAPI_API_NOT_INTIALIZED
  10235. //!
  10236. //! \ingroup sysgeneral
  10237. ///////////////////////////////////////////////////////////////////////////////
  10238. NVAPI_INTERFACE NvAPI_SYS_GetLidAndDockInfo(NV_LID_DOCK_PARAMS *pLidAndDock);
  10239. ///////////////////////////////////////////////////////////////////////////////
  10240. // FUNCTION NAME: NvAPI_SYS_GetDisplayIdFromGpuAndOutputId
  10241. //
  10242. //! DESCRIPTION: This API converts a Physical GPU handle and output ID to a
  10243. //! display ID.
  10244. //!
  10245. //! SUPPORTED OS: Windows XP and higher
  10246. //!
  10247. //!
  10248. //! \param [in] hPhysicalGpu Handle to the physical GPU
  10249. //! \param [in] outputId Connected display output ID on the
  10250. //! target GPU - must only have one bit set
  10251. //! \param [out] displayId Pointer to an NvU32 which contains
  10252. //! the display ID
  10253. //!
  10254. //! \retval ::NVAPI_OK - completed request
  10255. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
  10256. //! \retval ::NVAPI_ERROR - miscellaneous error occurred
  10257. //! \retval ::NVAPI_INVALID_ARGUMENT - Invalid input parameter.
  10258. //!
  10259. //! \ingroup sysgeneral
  10260. ///////////////////////////////////////////////////////////////////////////////
  10261. NVAPI_INTERFACE NvAPI_SYS_GetDisplayIdFromGpuAndOutputId(NvPhysicalGpuHandle hPhysicalGpu, NvU32 outputId, NvU32* displayId);
  10262. ///////////////////////////////////////////////////////////////////////////////
  10263. // FUNCTION NAME: NvAPI_SYS_GetGpuAndOutputIdFromDisplayId
  10264. //
  10265. //! DESCRIPTION: This API converts a display ID to a Physical GPU handle and output ID.
  10266. //!
  10267. //! SUPPORTED OS: Windows XP and higher
  10268. //!
  10269. //!
  10270. //! \param [in] displayId Display ID of display to retrieve
  10271. //! GPU and outputId for
  10272. //! \param [out] hPhysicalGpu Handle to the physical GPU
  10273. //! \param [out] outputId ) Connected display output ID on the
  10274. //! target GPU will only have one bit set.
  10275. //!
  10276. //! \retval ::NVAPI_OK
  10277. //! \retval ::NVAPI_API_NOT_INTIALIZED
  10278. //! \retval ::NVAPI_ID_OUT_OF_RANGE The DisplayId corresponds to a
  10279. //! display which is not within the
  10280. //! normal outputId range.
  10281. //! \retval ::NVAPI_ERROR
  10282. //! \retval ::NVAPI_INVALID_ARGUMENT
  10283. //!
  10284. //! \ingroup sysgeneral
  10285. ///////////////////////////////////////////////////////////////////////////////
  10286. NVAPI_INTERFACE NvAPI_SYS_GetGpuAndOutputIdFromDisplayId(NvU32 displayId, NvPhysicalGpuHandle *hPhysicalGpu, NvU32 *outputId);
  10287. ///////////////////////////////////////////////////////////////////////////////
  10288. // FUNCTION NAME: NvAPI_SYS_GetPhysicalGpuFromDisplayId
  10289. //
  10290. //! \code
  10291. //! DESCRIPTION: This API retrieves the Physical GPU handle of the connected display
  10292. //!
  10293. //! \since Release: 313
  10294. //!
  10295. //! SUPPORTED OS: Windows Vista and higher
  10296. //!
  10297. //!
  10298. //! PARAMETERS: displayId(IN) - Display ID of display to retrieve
  10299. //! GPU handle
  10300. //! hPhysicalGpu(OUT) - Handle to the physical GPU
  10301. //!
  10302. //! RETURN STATUS:
  10303. //! NVAPI_OK - completed request
  10304. //! NVAPI_API_NOT_INTIALIZED - NVAPI not initialized
  10305. //! NVAPI_ERROR - miscellaneous error occurred
  10306. //! NVAPI_INVALID_ARGUMENT - Invalid input parameter.
  10307. //! \endcode
  10308. //! \ingroup sysgeneral
  10309. ///////////////////////////////////////////////////////////////////////////////
  10310. NVAPI_INTERFACE NvAPI_SYS_GetPhysicalGpuFromDisplayId(NvU32 displayId, NvPhysicalGpuHandle *hPhysicalGpu);
  10311. #ifdef __cplusplus
  10312. }; //extern "C" {
  10313. #endif
  10314. #pragma pack(pop)
  10315. #endif // _NVAPI_H
  10316. #include"nvapi_lite_salend.h"