NVAPI Reference Documentation
Release 520: October 14, 2022

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
nvapi_lite_common.h File Reference
#include "nvapi_lite_salstart.h"
#include "nvapi_lite_salend.h"

Data Structures

struct  _NV_RECT
 
struct  NvSBox
 
struct  NvGUID
 
struct  NV_DISPLAY_DRIVER_MEMORY_INFO_V1
 
struct  NV_DISPLAY_DRIVER_MEMORY_INFO_V2
 
struct  NV_DISPLAY_DRIVER_MEMORY_INFO_V3
 
struct  NV_GPU_MEMORY_INFO_EX_V1
 

Macros

#define __nvapi_deprecated_function(message)
 
#define __nvapi_deprecated_datatype(FirstRelease)
 
#define NvU32TONvF32(_pData)   *(NvF32 *)(_pData)
 
#define NvF32TONvU32(_pData)   *(NvU32 *)(_pData)
 
#define NV_TRUE   ((NvBool)(0 == 0))
 
#define NV_FALSE   ((NvBool)(0 != 0))
 
#define NV_DECLARE_HANDLE(name)   struct name##__ { int unused; }; typedef struct name##__ *name
 
#define NVAPI_GENERIC_STRING_MAX   4096
 
#define NVAPI_LONG_STRING_MAX   256
 
#define NVAPI_SHORT_STRING_MAX   64
 
#define NvGUID_Defined
 
#define NVAPI_MAX_PHYSICAL_GPUS   64
 
#define NVAPI_MAX_PHYSICAL_BRIDGES   100
 
#define NVAPI_PHYSICAL_GPUS   32
 
#define NVAPI_MAX_LOGICAL_GPUS   64
 
#define NVAPI_MAX_AVAILABLE_GPU_TOPOLOGIES   256
 
#define NVAPI_MAX_AVAILABLE_SLI_GROUPS   256
 
#define NVAPI_MAX_GPU_TOPOLOGIES   NVAPI_MAX_PHYSICAL_GPUS
 
#define NVAPI_MAX_GPU_PER_TOPOLOGY   8
 
#define NVAPI_MAX_DISPLAY_HEADS   2
 
#define NVAPI_ADVANCED_DISPLAY_HEADS   4
 
#define NVAPI_MAX_DISPLAYS   NVAPI_PHYSICAL_GPUS * NVAPI_ADVANCED_DISPLAY_HEADS
 
#define NVAPI_MAX_ACPI_IDS   16
 
#define NVAPI_MAX_VIEW_MODES   8
 
#define NVAPI_SYSTEM_MAX_HWBCS   128
 
#define NVAPI_SYSTEM_HWBC_INVALID_ID   0xffffffff
 
#define NVAPI_SYSTEM_MAX_DISPLAYS   NVAPI_MAX_PHYSICAL_GPUS * NV_MAX_HEADS
 
#define NV_MAX_HEADS   4
 
#define NVAPI_MAX_HEADS_PER_GPU   32
 
#define NV_MAX_VID_STREAMS   4
 
#define NV_MAX_VID_STREAMS_EX   20
 
#define NV_MAX_VID_PROFILES   4
 
#define NVAPI_MAX_AUDIO_DEVICES   16
 
#define MAKE_NVAPI_VERSION(typeName, ver)   (NvU32)(sizeof(typeName) | ((ver)<<16))
 
#define GET_NVAPI_VERSION(ver)   (NvU32)((ver)>>16)
 
#define GET_NVAPI_SIZE(ver)   (NvU32)((ver) & 0xffff)
 
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER_1   MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_MEMORY_INFO_V1,1)
 
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER_2   MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_MEMORY_INFO_V2,2)
 
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER_3   MAKE_NVAPI_VERSION(NV_DISPLAY_DRIVER_MEMORY_INFO_V3,3)
 
#define NV_DISPLAY_DRIVER_MEMORY_INFO_VER   NV_DISPLAY_DRIVER_MEMORY_INFO_VER_3
 
#define NV_GPU_MEMORY_INFO_EX_VER_1   MAKE_NVAPI_VERSION(NV_GPU_MEMORY_INFO_EX_V1,1)
 
#define NV_GPU_MEMORY_INFO_EX_VER   NV_GPU_MEMORY_INFO_EX_VER_1
 
#define NVAPI_DEFAULT_HANDLE   0
 
#define NV_BIT(x)   (1 << (x))
 

Typedefs

typedef unsigned __int64 NvU64
 
typedef __int64 NvS64
 
typedef signed int NvS32
 
typedef unsigned long NvU32
 
typedef unsigned long temp_NvU32
 
typedef signed short NvS16
 
typedef unsigned short NvU16
 
typedef unsigned char NvU8
 
typedef signed char NvS8
 
typedef float NvF32
 
typedef NvU8 NvBool
 
typedef struct _NV_RECT NV_RECT
 
typedef void * StereoHandle
 
typedef struct NvGUID NvLUID
 
typedef char NvAPI_String[NVAPI_GENERIC_STRING_MAX]
 
typedef char NvAPI_LongString[NVAPI_LONG_STRING_MAX]
 
typedef char NvAPI_ShortString[NVAPI_SHORT_STRING_MAX]
 
typedef NvU16 NvAPI_UnicodeShortString[NVAPI_SHORT_STRING_MAX]
 
typedef enum _NvAPI_Status NvAPI_Status
 
typedef NV_DISPLAY_DRIVER_MEMORY_INFO_V3 NV_DISPLAY_DRIVER_MEMORY_INFO
 
typedef NV_GPU_MEMORY_INFO_EX_V1 NV_GPU_MEMORY_INFO_EX
 

Enumerations

enum  _NvAPI_Status {
  NVAPI_OK = 0 , NVAPI_ERROR = -1 , NVAPI_LIBRARY_NOT_FOUND = -2 , NVAPI_NO_IMPLEMENTATION = -3 ,
  NVAPI_API_NOT_INITIALIZED = -4 , NVAPI_INVALID_ARGUMENT = -5 , NVAPI_NVIDIA_DEVICE_NOT_FOUND = -6 , NVAPI_END_ENUMERATION = -7 ,
  NVAPI_INVALID_HANDLE = -8 , NVAPI_INCOMPATIBLE_STRUCT_VERSION = -9 , NVAPI_HANDLE_INVALIDATED = -10 , NVAPI_OPENGL_CONTEXT_NOT_CURRENT = -11 ,
  NVAPI_INVALID_POINTER = -14 , NVAPI_NO_GL_EXPERT = -12 , NVAPI_INSTRUMENTATION_DISABLED = -13 , NVAPI_NO_GL_NSIGHT = -15 ,
  NVAPI_EXPECTED_LOGICAL_GPU_HANDLE = -100 , NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE = -101 , NVAPI_EXPECTED_DISPLAY_HANDLE = -102 , NVAPI_INVALID_COMBINATION = -103 ,
  NVAPI_NOT_SUPPORTED = -104 , NVAPI_PORTID_NOT_FOUND = -105 , NVAPI_EXPECTED_UNATTACHED_DISPLAY_HANDLE = -106 , NVAPI_INVALID_PERF_LEVEL = -107 ,
  NVAPI_DEVICE_BUSY = -108 , NVAPI_NV_PERSIST_FILE_NOT_FOUND = -109 , NVAPI_PERSIST_DATA_NOT_FOUND = -110 , NVAPI_EXPECTED_TV_DISPLAY = -111 ,
  NVAPI_EXPECTED_TV_DISPLAY_ON_DCONNECTOR = -112 , NVAPI_NO_ACTIVE_SLI_TOPOLOGY = -113 , NVAPI_SLI_RENDERING_MODE_NOTALLOWED = -114 , NVAPI_EXPECTED_DIGITAL_FLAT_PANEL = -115 ,
  NVAPI_ARGUMENT_EXCEED_MAX_SIZE = -116 , NVAPI_DEVICE_SWITCHING_NOT_ALLOWED = -117 , NVAPI_TESTING_CLOCKS_NOT_SUPPORTED = -118 , NVAPI_UNKNOWN_UNDERSCAN_CONFIG = -119 ,
  NVAPI_TIMEOUT_RECONFIGURING_GPU_TOPO = -120 , NVAPI_DATA_NOT_FOUND = -121 , NVAPI_EXPECTED_ANALOG_DISPLAY = -122 , NVAPI_NO_VIDLINK = -123 ,
  NVAPI_REQUIRES_REBOOT = -124 , NVAPI_INVALID_HYBRID_MODE = -125 , NVAPI_MIXED_TARGET_TYPES = -126 , NVAPI_SYSWOW64_NOT_SUPPORTED = -127 ,
  NVAPI_IMPLICIT_SET_GPU_TOPOLOGY_CHANGE_NOT_ALLOWED = -128 , NVAPI_REQUEST_USER_TO_CLOSE_NON_MIGRATABLE_APPS = -129 , NVAPI_OUT_OF_MEMORY = -130 , NVAPI_WAS_STILL_DRAWING = -131 ,
  NVAPI_FILE_NOT_FOUND = -132 , NVAPI_TOO_MANY_UNIQUE_STATE_OBJECTS = -133 , NVAPI_INVALID_CALL = -134 , NVAPI_D3D10_1_LIBRARY_NOT_FOUND = -135 ,
  NVAPI_FUNCTION_NOT_FOUND = -136 , NVAPI_INVALID_USER_PRIVILEGE = -137 , NVAPI_EXPECTED_NON_PRIMARY_DISPLAY_HANDLE = -138 , NVAPI_EXPECTED_COMPUTE_GPU_HANDLE = -139 ,
  NVAPI_STEREO_NOT_INITIALIZED = -140 , NVAPI_STEREO_REGISTRY_ACCESS_FAILED = -141 , NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED = -142 , NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED = -143 ,
  NVAPI_STEREO_NOT_ENABLED = -144 , NVAPI_STEREO_NOT_TURNED_ON = -145 , NVAPI_STEREO_INVALID_DEVICE_INTERFACE = -146 , NVAPI_STEREO_PARAMETER_OUT_OF_RANGE = -147 ,
  NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED = -148 , NVAPI_TOPO_NOT_POSSIBLE = -149 , NVAPI_MODE_CHANGE_FAILED = -150 , NVAPI_D3D11_LIBRARY_NOT_FOUND = -151 ,
  NVAPI_INVALID_ADDRESS = -152 , NVAPI_STRING_TOO_SMALL = -153 , NVAPI_MATCHING_DEVICE_NOT_FOUND = -154 , NVAPI_DRIVER_RUNNING = -155 ,
  NVAPI_DRIVER_NOTRUNNING = -156 , NVAPI_ERROR_DRIVER_RELOAD_REQUIRED = -157 , NVAPI_SET_NOT_ALLOWED = -158 , NVAPI_ADVANCED_DISPLAY_TOPOLOGY_REQUIRED = -159 ,
  NVAPI_SETTING_NOT_FOUND = -160 , NVAPI_SETTING_SIZE_TOO_LARGE = -161 , NVAPI_TOO_MANY_SETTINGS_IN_PROFILE = -162 , NVAPI_PROFILE_NOT_FOUND = -163 ,
  NVAPI_PROFILE_NAME_IN_USE = -164 , NVAPI_PROFILE_NAME_EMPTY = -165 , NVAPI_EXECUTABLE_NOT_FOUND = -166 , NVAPI_EXECUTABLE_ALREADY_IN_USE = -167 ,
  NVAPI_DATATYPE_MISMATCH = -168 , NVAPI_PROFILE_REMOVED = -169 , NVAPI_UNREGISTERED_RESOURCE = -170 , NVAPI_ID_OUT_OF_RANGE = -171 ,
  NVAPI_DISPLAYCONFIG_VALIDATION_FAILED = -172 , NVAPI_DPMST_CHANGED = -173 , NVAPI_INSUFFICIENT_BUFFER = -174 , NVAPI_ACCESS_DENIED = -175 ,
  NVAPI_MOSAIC_NOT_ACTIVE = -176 , NVAPI_SHARE_RESOURCE_RELOCATED = -177 , NVAPI_REQUEST_USER_TO_DISABLE_DWM = -178 , NVAPI_D3D_DEVICE_LOST = -179 ,
  NVAPI_INVALID_CONFIGURATION = -180 , NVAPI_STEREO_HANDSHAKE_NOT_DONE = -181 , NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS = -182 , NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED = -183 ,
  NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST = -184 , NVAPI_CLUSTER_ALREADY_EXISTS = -185 , NVAPI_DPMST_DISPLAY_ID_EXPECTED = -186 , NVAPI_INVALID_DISPLAY_ID = -187 ,
  NVAPI_STREAM_IS_OUT_OF_SYNC = -188 , NVAPI_INCOMPATIBLE_AUDIO_DRIVER = -189 , NVAPI_VALUE_ALREADY_SET = -190 , NVAPI_TIMEOUT = -191 ,
  NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE = -192 , NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE = -193 , NVAPI_SYNC_NOT_ACTIVE = -194 , NVAPI_SYNC_MASTER_NOT_FOUND = -195 ,
  NVAPI_INVALID_SYNC_TOPOLOGY = -196 , NVAPI_ECID_SIGN_ALGO_UNSUPPORTED = -197 , NVAPI_ECID_KEY_VERIFICATION_FAILED = -198 , NVAPI_FIRMWARE_OUT_OF_DATE = -199 ,
  NVAPI_FIRMWARE_REVISION_NOT_SUPPORTED = -200 , NVAPI_LICENSE_CALLER_AUTHENTICATION_FAILED = -201 , NVAPI_D3D_DEVICE_NOT_REGISTERED = -202 , NVAPI_RESOURCE_NOT_ACQUIRED = -203 ,
  NVAPI_TIMING_NOT_SUPPORTED = -204 , NVAPI_HDCP_ENCRYPTION_FAILED = -205 , NVAPI_PCLK_LIMITATION_FAILED = -206 , NVAPI_NO_CONNECTOR_FOUND = -207 ,
  NVAPI_HDCP_DISABLED = -208 , NVAPI_API_IN_USE = -209 , NVAPI_NVIDIA_DISPLAY_NOT_FOUND = -210 , NVAPI_PRIV_SEC_VIOLATION = -211 ,
  NVAPI_INCORRECT_VENDOR = -212 , NVAPI_DISPLAY_IN_USE = -213 , NVAPI_UNSUPPORTED_CONFIG_NON_HDCP_HMD = -214 , NVAPI_MAX_DISPLAY_LIMIT_REACHED = -215 ,
  NVAPI_INVALID_DIRECT_MODE_DISPLAY = -216 , NVAPI_GPU_IN_DEBUG_MODE = -217 , NVAPI_D3D_CONTEXT_NOT_FOUND = -218 , NVAPI_STEREO_VERSION_MISMATCH = -219 ,
  NVAPI_GPU_NOT_POWERED = -220 , NVAPI_ERROR_DRIVER_RELOAD_IN_PROGRESS = -221 , NVAPI_WAIT_FOR_HW_RESOURCE = -222 , NVAPI_REQUIRE_FURTHER_HDCP_ACTION = -223 ,
  NVAPI_DISPLAY_MUX_TRANSITION_FAILED = -224 , NVAPI_INVALID_DSC_VERSION = -225 , NVAPI_INVALID_DSC_SLICECOUNT = -226 , NVAPI_INVALID_DSC_OUTPUT_BPP = -227 ,
  NVAPI_FAILED_TO_LOAD_FROM_DRIVER_STORE = -228 , NVAPI_NO_VULKAN = -229 , NVAPI_REQUEST_PENDING = -230 , NVAPI_RESOURCE_IN_USE = -231 ,
  NVAPI_INVALID_IMAGE = -232 , NVAPI_INVALID_PTX = -233 , NVAPI_NVLINK_UNCORRECTABLE = -234 , NVAPI_JIT_COMPILER_NOT_FOUND = -235 ,
  NVAPI_INVALID_SOURCE = -236 , NVAPI_ILLEGAL_INSTRUCTION = -237 , NVAPI_INVALID_PC = -238 , NVAPI_LAUNCH_FAILED = -239 ,
  NVAPI_NOT_PERMITTED = -240
}
 

Functions

 NV_DECLARE_HANDLE (NvLogicalGpuHandle)
 
 NV_DECLARE_HANDLE (NvPhysicalGpuHandle)
 
 NV_DECLARE_HANDLE (NvDisplayHandle)
 
 NV_DECLARE_HANDLE (NvMonitorHandle)
 
 NV_DECLARE_HANDLE (NvUnAttachedDisplayHandle)
 
 NV_DECLARE_HANDLE (NvVisualComputingDeviceHandle)
 
 NV_DECLARE_HANDLE (NvEventHandle)
 
 NV_DECLARE_HANDLE (NvHICHandle)
 
 NV_DECLARE_HANDLE (NvGSyncDeviceHandle)
 
 NV_DECLARE_HANDLE (NvVioHandle)
 
 NV_DECLARE_HANDLE (NvTransitionHandle)
 
 NV_DECLARE_HANDLE (NvAudioHandle)
 
 NV_DECLARE_HANDLE (Nv3DVPContextHandle)
 
 NV_DECLARE_HANDLE (Nv3DVPTransceiverHandle)
 
 NV_DECLARE_HANDLE (Nv3DVPGlassesHandle)
 
 NV_DECLARE_HANDLE (NvSourceHandle)
 
 NV_DECLARE_HANDLE (NvTargetHandle)
 
 NV_DECLARE_HANDLE (NVDX_SwapChainHandle)
 
 NV_DECLARE_HANDLE (NvPresentBarrierClientHandle)
 
NVAPI_INTERFACE NvAPI_SYS_GetDriverAndBranchVersion (NvU32 *pDriverVersion, NvAPI_ShortString szBuildBranchString)
 
 __nvapi_deprecated_function ("Do not use this function - it is deprecated in release 520. Instead, use NvAPI_GPU_GetMemoryInfoEx.") NVAPI_INTERFACE NvAPI_GPU_GetMemoryInfo(NvPhysicalGpuHandle hPhysicalGpu
 
NVAPI_INTERFACE NvAPI_GPU_GetMemoryInfoEx (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_MEMORY_INFO_EX *pMemoryInfo)
 
NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs (NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount)
 
 NV_DECLARE_HANDLE (NVDX_ObjectHandle)
 
NVAPI_INTERFACE NvAPI_D3D_GetObjectHandleForResource (IUnknown *pDevice, IUnknown *pResource, NVDX_ObjectHandle *pHandle)
 

Variables

NV_DISPLAY_DRIVER_MEMORY_INFOpMemoryInfo
 

Macro Definition Documentation

◆ __nvapi_deprecated_datatype

#define __nvapi_deprecated_datatype (   FirstRelease)

◆ __nvapi_deprecated_function

#define __nvapi_deprecated_function (   message)

◆ NV_DECLARE_HANDLE

#define NV_DECLARE_HANDLE (   name)    struct name##__ { int unused; }; typedef struct name##__ *name

◆ NV_FALSE

#define NV_FALSE   ((NvBool)(0 != 0))

◆ NV_TRUE

#define NV_TRUE   ((NvBool)(0 == 0))

◆ NvF32TONvU32

#define NvF32TONvU32 (   _pData)    *(NvU32 *)(_pData)

Macro to convert NvF32 to NvU32.

◆ NvU32TONvF32

#define NvU32TONvF32 (   _pData)    *(NvF32 *)(_pData)

Macro to convert NvU32 to NvF32.

Typedef Documentation

◆ NV_RECT

typedef struct _NV_RECT NV_RECT

◆ NvBool

typedef NvU8 NvBool

◆ NvF32

typedef float NvF32

◆ NvS16

typedef signed short NvS16

◆ NvS32

typedef signed int NvS32

◆ NvS64

typedef __int64 NvS64

◆ NvS8

typedef signed char NvS8

◆ NvU16

typedef unsigned short NvU16

◆ NvU32

typedef unsigned long NvU32

◆ NvU64

typedef unsigned __int64 NvU64

◆ NvU8

typedef unsigned char NvU8

◆ temp_NvU32

typedef unsigned long temp_NvU32

Function Documentation

◆ NV_DECLARE_HANDLE()

NV_DECLARE_HANDLE ( NVDX_ObjectHandle  )

Variable Documentation

◆ pMemoryInfo



Copyright (c) 2007-2022 NVIDIA Corporation. All rights reserved.

NVIDIA