![]() |
NVAPI Reference Documentation
|
Release 361: January 27
|
| #define NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER_1 |
| #define NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC_V1, 1) |
| #define NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1, 1) |
| #define NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1, 1) |
| #define NV_RASTERIZER_PSO_EXTENSION_DESC_VER_1 MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1, 1) |
| #define NVAPI_COPY_ASYNCHRONOUSLY 1 |
| #define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1 MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1, 1) |
| typedef enum _IMPLICIT_SLI_CONTROL IMPLICIT_SLI_CONTROL |
| typedef enum _NV_FASTGS_FLAGS NV_FASTGS_FLAGS |
SUPPORTED OS: Windows Vista and higher
| typedef enum _NV_PSO_EXTENSION NV_PSO_EXTENSION |
Enum for CreatePSO extensions.
| typedef enum _NV_SWIZZLE_MODE NV_SWIZZLE_MODE |
| typedef enum _NV_SWIZZLE_OFFSET NV_SWIZZLE_OFFSET |
| typedef struct NvAPI_D3D11_RASTERIZER_DESC_EX NvAPI_D3D11_RASTERIZER_DESC_EX |
SUPPORTED OS: Windows Vista and higher
| typedef NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC_V1 NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC |
| typedef NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1 NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC |
Used in NvAPI_D3D_BeginResourceRendering().
Valid categories for NvAPI_D3D_SetResourceHint()
Types of SLI hints;
NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC: Valid values : 0 or 1
Default value: 0
Explanation: If the value is 1, the driver will not track any rendering operations that would mark this resource as dirty, avoiding any form of synchronization across frames rendered in parallel in multiple GPUs in AFR mode.
NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USAGE: Valid values : 0 or 1
Default value: 0
Explanation: If the value is 1, the driver will try to perform operations which involved target resource in broadcast, where its possible. Hint is static and must be set before resource starts using.
| enum _NV_FASTGS_FLAGS |
SUPPORTED OS: Windows Vista and higher
| enum _NV_PSO_EXTENSION |
| enum _NV_SWIZZLE_MODE |
| enum _NV_SWIZZLE_OFFSET |
Used in NvAPI_D3D_BeginResourceRendering().
Valid categories for NvAPI_D3D_SetResourceHint()
Types of SLI hints;
NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC: Valid values : 0 or 1
Default value: 0
Explanation: If the value is 1, the driver will not track any rendering operations that would mark this resource as dirty, avoiding any form of synchronization across frames rendered in parallel in multiple GPUs in AFR mode.
NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USAGE: Valid values : 0 or 1
Default value: 0
Explanation: If the value is 1, the driver will try to perform operations which involved target resource in broadcast, where its possible. Hint is static and must be set before resource starts using.
D3D_FEATURE_LEVEL supported - used in NvAPI_D3D11_CreateDevice() and NvAPI_D3D11_CreateDeviceAndSwapChain()
| enum NVAPI_QUAD_FILLMODE |
| NVAPI_INTERFACE NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA | ( | __in ID3D11Device * | pDevice, |
| __in ID3D11Texture2D * | pInputTex, | ||
| __out ID3D11Texture2D ** | ppOutTex | ||
| ) |
SUPPORTED OS: Windows Vista and higher DESCRIPTION: This function allows creating (aliasing) a non-MSAA Texture2D object using the same memory as the given multi-sampled texture (pInputTex). The surface created would be bloated in width and height but it will have SampleCount = 1 For 2X MSAA: OutTex.Width = InputTex.Width * 2, outTex.Height = InputTex.Height For 4X MSAA: OutTex.Width = InputTex.Width * 2, outTex.Height = InputTex.Height * 2 For 8X MSAA: OutTex.Width = InputTex.Width * 4, outTex.Height = InputTex.Height * 2 Only textures SampleQuality = 0 can be aliased as Non MSAA The app should ensure that original texture is released only after the aliased copy is released.
| [in] | pDevice | current d3d device |
| [in] | pInputTex | The MultiSampled Texture2D resource that is being aliased |
| [out] | ppOutTex | The aliased non AA copy MultiSampled Texture2D resource |
| NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlap | ( | __in IUnknown * | pDeviceOrContext | ) |
DESCRIPTION: Causes the driver to skip synchronization that is normally needed when accessing UAVs. Applications must use this with caution otherwise this might cause data hazards when multiple draw calls/compute shader launches are accessing same memory locations
SUPPORTED OS: Windows Vista and higher
| [in] | *pDeviceOrContext | pointer to D3D11 device, or D3D11 device context |
| NvAPI_D3D11_BeginUAVOverlapEx | ( | __in IUnknown * | pDeviceOrContext, |
| __in NvU32 | insertWFIFlags | ||
| ) |
DESCRIPTION: Causes the driver to skip synchronization that is normally needed when accessing UAVs. Applications must use this with caution otherwise this might cause data hazards when multiple draw calls/compute shader launches are accessing same memory locations
SUPPORTED OS: Windows Vista and higher
| [in] | *pDeviceOrContext | pointer to D3D11 device, or D3D11 device context |
| [in] | insertWFIFlags | bit fields to indicate which WFI would be inserted (gfx / compute / both). |
RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
| NVAPI_INTERFACE NvAPI_D3D11_CreateDevice | ( | IDXGIAdapter * | pAdapter, |
| D3D_DRIVER_TYPE | DriverType, | ||
| HMODULE | Software, | ||
| UINT | Flags, | ||
| CONST D3D_FEATURE_LEVEL * | pFeatureLevels, | ||
| UINT | FeatureLevels, | ||
| UINT | SDKVersion, | ||
| ID3D11Device ** | ppDevice, | ||
| D3D_FEATURE_LEVEL * | pFeatureLevel, | ||
| ID3D11DeviceContext ** | ppImmediateContext, | ||
| NVAPI_DEVICE_FEATURE_LEVEL * | pSupportedLevel | ||
| ) |
DESCRIPTION: This function tries to create a DirectX 11 device. If the call fails (if we are running on pre-DirectX 11 hardware), depending on the type of hardware it will try to create a DirectX 10.1 OR DirectX 10.0+ OR DirectX 10.0 device. The function call is the same as D3D11CreateDevice(), but with an extra argument (D3D_FEATURE_LEVEL supported by the device) that the function fills in. This argument can contain -1 (NVAPI_DEVICE_FEATURE_LEVEL_NULL), if the requested featureLevel is less than DirecX 10.0.
NOTE: When NvAPI_D3D11_CreateDevice is called with 10+ feature level we have an issue on few set of tesla hardware (G80/G84/G86/G92/G94/G96) which does not support all feature level 10+ functionality e.g. calling driver with mismatch between RenderTarget and Depth Buffer. App developers should take into consideration such limitation when using NVAPI on such tesla hardwares. SUPPORTED OS: Windows Vista and higher
| [in] | pAdapter | |
| [in] | DriverType | |
| [in] | Software | |
| [in] | Flags | |
| [in] | *pFeatureLevels | |
| [in] | FeatureLevels | |
| [in] | SDKVersion | |
| [in] | **ppDevice | |
| [in] | *pFeatureLevel | |
| [in] | **ppImmediateContext | |
| [in] | *pSupportedLevel | D3D_FEATURE_LEVEL supported |
| NVAPI_INTERFACE NvAPI_D3D11_CreateDeviceAndSwapChain | ( | IDXGIAdapter * | pAdapter, |
| D3D_DRIVER_TYPE | DriverType, | ||
| HMODULE | Software, | ||
| UINT | Flags, | ||
| CONST D3D_FEATURE_LEVEL * | pFeatureLevels, | ||
| UINT | FeatureLevels, | ||
| UINT | SDKVersion, | ||
| CONST DXGI_SWAP_CHAIN_DESC * | pSwapChainDesc, | ||
| IDXGISwapChain ** | ppSwapChain, | ||
| ID3D11Device ** | ppDevice, | ||
| D3D_FEATURE_LEVEL * | pFeatureLevel, | ||
| ID3D11DeviceContext ** | ppImmediateContext, | ||
| NVAPI_DEVICE_FEATURE_LEVEL * | pSupportedLevel | ||
| ) |
DESCRIPTION: This function tries to create a DirectX 11 device and swap chain. If the call fails (if we are running on pre=DirectX 11 hardware), depending on the type of hardware it will try to create a DirectX 10.1 OR DirectX 10.0+ OR DirectX 10.0 device. The function call is the same as D3D11CreateDeviceAndSwapChain, but with an extra argument (D3D_FEATURE_LEVEL supported by the device) that the function fills in. This argument can contain -1 (NVAPI_DEVICE_FEATURE_LEVEL_NULL), if the requested featureLevel is less than DirectX 10.0.
SUPPORTED OS: Windows Vista and higher
| [in] | pAdapter | |
| [in] | DriverType | |
| [in] | Software | |
| [in] | Flags | |
| [in] | *pFeatureLevels | |
| [in] | FeatureLevels | |
| [in] | SDKVersion | |
| [in] | *pSwapChainDesc | |
| [in] | **ppSwapChain | |
| [in] | **ppDevice | |
| [in] | *pFeatureLevel | |
| [in] | **ppImmediateContext | |
| [in] | *pSupportedLevel | D3D_FEATURE_LEVEL supported |
return NVAPI_OK if the createDevice with swap chain call succeeded.
| NvAPI_D3D11_CreateFastGeometryShader | ( | __in ID3D11Device * | pDevice, |
| __in const void * | pShaderBytecode, | ||
| __in SIZE_T | BytecodeLength, | ||
| __in_opt ID3D11ClassLinkage * | pClassLinkage, | ||
| __out ID3D11GeometryShader ** | ppGeometryShader | ||
| ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: This function will convert a regular geometry shader into a fast GS variant if possible. It will not do any validation regarding the compatibility of the resulting fast GS with any Pixel shader. The validation has to be done by the application manually.
The parameters are identical to ID3D11Device::CreateGeometryShader() so please refer to its documentation for their usage.
If the shader is too complex or is not in adequate form to be converted to fast GS this function will simply fail. You should then call ID3D11Device::CreateGeometryShader() to create the regular geometry shader.
| [in] | pDevice | The device pointer |
| [in] | pShaderBytecode | A pointer to the compiled shader. |
| [in] | BytecodeLength | Size of the compiled geometry shader. |
| [in] | pClassLinkage | A pointer to a class linkage interface. Can be NULL. |
| [out] | ppGeometryShader | Address of a pointer to a ID3D11GeometryShader interface. |
| NVAPI_INTERFACE NvAPI_D3D11_CreateFastGeometryShaderExplicit | ( | __in ID3D11Device * | pDevice, |
| __in const void * | pShaderBytecode, | ||
| __in SIZE_T | BytecodeLength, | ||
| __in_opt ID3D11ClassLinkage * | pClassLinkage, | ||
| __in const NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC * | pCreateFastGSArgs, | ||
| __out ID3D11GeometryShader ** | ppGeometryShader | ||
| ) |
DESCRIPTION: This function will create a fast geometry shader written using an "explicit" coding style, rather than converting a standard GS. For the explicit coding style, the GS must be written with maxvertexcount(1), and must pass-through input vertex 0 to the output without modification.
Additional per-primitive outputs may also be computed and written to the single output vertex. If these outputs are read by the pixel shader, they must be declared with the "nointerpolation" attribute in the PS input signature; otherwise, visual corruption may occur. Also, unlike D3D API, there is no guarantee that pixel shader will get the default value of an attribute if that attribute is not written by the earlier shader stage in the pipeline.
The first four parameters are identical to ID3D11Device::CreateGeometryShader(), so please refer to its documentation for their usage.
| [in] | pDevice | The device pointer |
| [in] | pShaderBytecode | A pointer to the compiled shader. |
| [in] | BytecodeLength | Size of the compiled geometry shader. |
| [in] | pClassLinkage | A pointer to a class linkage interface. Can be NULL. |
| [in] | pCreateFastGSArgs | A pointer to a NvAPI_D3D11_CREATE_FASTGS_EXPLICIT struct. |
| [out] | ppGeometryShader | Address of a pointer to a ID3D11GeometryShader interface. |
| NvAPI_D3D11_CreateMultiGPUDevice | ( | __in ID3D11Device * | pDevice, |
| __in ULONG | version, | ||
| __out ULONG * | currentVersion, | ||
| __out ID3D11MultiGPUDevice ** | ppD3D11MultiGPUDevice, | ||
| __in UINT | maxGpus = ALL_GPUS |
||
| ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: This function returns ID3D11MultiGPUDevice used for multi GPU VR support
| [in] | pDevice | current d3d device |
| [in] | version | version of requested ID3D11MultiGPUDevice. |
| [out] | currentVersion | pointer to returned current version of ID3D11MultiGPUDevice. |
| [out] | ppD3D11MultiGPUDevice | pointer to returned ID3D11MultiGPUDevice. |
| [in] | maxGpus | max number of gpus this ID3D11MultiGPUDevice is allowed to use |
| NVAPI_INTERFACE NvAPI_D3D11_CreateRasterizerState | ( | __in ID3D11Device * | pDevice, |
| __in const NvAPI_D3D11_RASTERIZER_DESC_EX * | pRasterizerDesc, | ||
| __out ID3D11RasterizerState ** | ppRasterizerState | ||
| ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: This function is an extension of ID3D11Device::CreateRasterizerState with additional raster states
| [in] | pDevice | current d3d device |
| [in] | pRasterizerDesc | Rasterizer state description of type NVAPI_D3D11_RASTERIZER_DESC_EX |
| [out] | ppRasterizerState | ID3D11RasterizerState |
| NVAPI_INTERFACE NvAPI_D3D11_EndUAVOverlap | ( | __in IUnknown * | pDeviceOrContext | ) |
DESCRIPTION: Re-enables driver synchronization between calls that access same UAVs See NvAPI_D3D_BeginUAVOverlap for more details.
SUPPORTED OS: Windows Vista and higher
| [in] | *pDeviceOrContext | pointer to D3D11 device, or D3D11 device context |
| NVAPI_INTERFACE NvAPI_D3D11_IsNvShaderExtnOpCodeSupported | ( | __in IUnknown * | pDev, |
| __in NvU32 | opCode, | ||
| __out bool * | pSupported | ||
| ) |
DESCRIPTION: This function checks if a nv HLSL shader extension opcode is supported on current hardware. List of opcodes is in nvShaderExtnEnums.h To use Nvidia HLSL extensions the application must include nvHLSLExtns.h in the hlsl shader code. See nvHLSLExtns.h for more details on supported opcodes. SUPPORTED OS: Windows Vista and higher
| [in] | pDev | The device on which to query for support, should be a ID3D11Device+ device |
| [in] | opCode | the opcode to check |
| [out] | pSupported | true if supported, false otherwise |
| NVAPI_OK | if the call succeeded |
| NVAPI_INTERFACE NvAPI_D3D11_MultiDrawIndexedInstancedIndirect | ( | __in ID3D11DeviceContext * | pDevContext11, |
| __in NvU32 | drawCount, | ||
| __in ID3D11Buffer * | pBuffer, | ||
| __in NvU32 | alignedByteOffsetForArgs, | ||
| __in NvU32 | alignedByteStrideForArgs | ||
| ) |
DESCRIPTION: Extension of DrawIndexedInstancedIndirect that takes a draw count in. The effect of this function is to loop over that draw count and perform the DrawIndexedInstancedIndirect operation each time, incrementing the buffer offset by the supplied stride each time.
SUPPORTED OS: Windows Vista and higher
| [in] | *pDevContext11 | Pointer to D3D11 device context (IC or DC) |
| [in] | drawCount | Do DrawIndexedInstancedIndirect operation this many times |
| [in] | *pBuffer | ID3D11Buffer that contains the command parameters |
| [in] | alignedByteOffsetForArgs | Start in pBuffer of the command parameters |
| [in] | alignedByteStrideForArgs | Stride of the command parameters - must be >= 5 * sizeof(NvU32) |
RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
| NVAPI_D3D_DEVICE_NOT_REGISTERED | When MultiDraw is called on a deferred context, and the device has not yet been registered (NvAPI_D3D_RegisterDevice), this error is returned. |
| NVAPI_INTERFACE NvAPI_D3D11_MultiDrawInstancedIndirect | ( | __in ID3D11DeviceContext * | pDevContext11, |
| __in NvU32 | drawCount, | ||
| __in ID3D11Buffer * | pBuffer, | ||
| __in NvU32 | alignedByteOffsetForArgs, | ||
| __in NvU32 | alignedByteStrideForArgs | ||
| ) |
DESCRIPTION: Extension of DrawInstancedIndirect that takes a draw count in. The effect of this function is to loop over that draw count and perform the DrawInstancedIndirect operation each time, incrementing the buffer offset by the supplied stride each time.
SUPPORTED OS: Windows Vista and higher
| [in] | *pDevContext11 | Pointer to D3D11 device context (IC or DC) |
| [in] | drawCount | Do DrawInstancedIndirect operation this many times |
| [in] | *pBuffer | ID3D11Buffer that contains the command parameters |
| [in] | alignedByteOffsetForArgs | Start in pBuffer of the command parameters |
| [in] | alignedByteStrideForArgs | Stride of the command parameters - must be >= 4 * sizeof(NvU32) |
RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
| NVAPI_D3D_DEVICE_NOT_REGISTERED | When MultiDraw is called on a deferred context, and the device has not yet been registered (NvAPI_D3D_RegisterDevice), this error is returned. |
| NvAPI_D3D11_MultiGPU_GetCaps | ( | __out PNV_MULTIGPU_CAPS | pMultiGPUCaps | ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: Request to get multi GPU extension caps.
| [out] | pMultiGPUCaps | Pointer to a structure returning multi GPU caps |
| NVAPI_OK | Call succeeded. |
| NVAPI_ERROR | Call failed. |
| NVAPI_INTERFACE NvAPI_D3D11_MultiGPU_Init | ( | __in bool | bEnable | ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: Request to enable/disable multi GPU extension. Also if enabled automatically disables auto stereo.
| [in] | bEnable | if true enables the extension for all subsequently created devices. Otherwise disables it |
| NVAPI_OK | Call succeeded. |
| NVAPI_ERROR | Call failed. |
| NVAPI_INTERFACE NvAPI_D3D11_SetDepthBoundsTest | ( | IUnknown * | pDeviceOrContext, |
| NvU32 | bEnable, | ||
| float | fMinDepth, | ||
| float | fMaxDepth | ||
| ) |
DESCRIPTION: This function enables/disables the depth bounds test
SUPPORTED OS: Windows Vista and higher
| [in] | pDeviceOrContext | The device or device context to set depth bounds test |
| [in] | bEnable | Enable(non-zero)/disable(zero) the depth bounds test |
| [in] | fMinDepth | The minimum depth for depth bounds test |
| [in] | fMaxDepth | The maximum depth for depth bounds test The valid values for fMinDepth and fMaxDepth are such that 0 <= fMinDepth <= fMaxDepth <= 1 |
| NVAPI_INTERFACE NvAPI_D3D11_SetNvShaderExtnSlot | ( | __in IUnknown * | pDev, |
| __in NvU32 | uavSlot | ||
| ) |
DESCRIPTION: This function sets the fake UAV slot that is used by Nvidia HLSL shader extensions. All createShader calls made to the driver after setting this slot would treat writes/reads to this UAV in a different way. Applications are expected to bind null UAV to this slot. The same slot is used for all shader stages. To disable shader extensions the app may set this uav slot to some value that is bigger than the max allowed slot index e.g, 128 or 0xFFFFFFFF. To use Nvidia HLSL extensions the application must include nvHLSLExtns.h in the hlsl shader code. See nvHLSLExtns.h for more details.
SUPPORTED OS: Windows Vista and higher
| [in] | pDev | The device for which to set the extension slot should be a ID3D11Device+ device |
| [in] | uavSlot | the uav slot to use |
| NVAPI_OK | success, the uavSlot was set sucessfully |
| NVAPI_INTERFACE NvAPI_D3D12_CreateGraphicsPipelineState | ( | __in ID3D12Device * | pDevice, |
| __in const D3D12_GRAPHICS_PIPELINE_STATE_DESC * | pPSODesc, | ||
| NvU32 | numExtensions, | ||
| __in const NVAPI_D3D12_PSO_EXTENSION_DESC ** | ppExtensions, | ||
| __out ID3D12PipelineState ** | ppPSO | ||
| ) |
DESCRIPTION: This function will create PSO with provided extensions
| [in] | pDevice | Current d3d device |
| [in] | pPSODesc | PSO description of type D3D12_GRAPHICS_PIPELINE_STATE_DESC |
| [in] | numExtensions | Number of extensions |
| [in] | ppExtensions | Array of PSO extensions (see NV_PSO_EXTENSION for possible extensions) |
| [out] | ppPSO | Output PSO object of type ID3D12PipelineState |
SUPPORTED OS: Windows 10
| NVAPI_OK | if the call succeeds. |
| NVAPI_INTERFACE NvAPI_D3D12_SetDepthBoundsTestValues | ( | __in ID3D12GraphicsCommandList * | pCommandList, |
| __in const float | minDepth, | ||
| __in const float | maxDepth | ||
| ) |
DESCRIPTION: This function will set the minDepth and maxDepth values for depth bounds test To enable/ disable depth bounds test use PSO extension NV_PSO_ENABLE_DEPTH_BOUND_TEST_EXTENSION in the nvapi NvAPI_D3D12_CreateGraphicsPipelineState
| [in] | pCommandList | Command List to set depth bounds test |
| [in] | minDepth | min value for depth bound test |
| [in] | maxDepth | max value for depth bound test |
The valid values for minDepth and maxDepth are such that 0 <= minDepth <= maxDepth <= 1
SUPPORTED OS: Windows 10
| NVAPI_OK | if the call succeeds. |
| NVAPI_INTERFACE NvAPI_D3D1x_DisableShaderDiskCache | ( | IUnknown * | pDevice | ) |
SUPPORTED OS: Windows Vista and higher DESCRIPTION: Disables driver managed caching of shader compilations to disk
| [in] | pDevice | Device to disabled the shader disk cache on |
| NVAPI_OK | Shader disk cache was disabled |
| NVAPI_ERROR | The operation failed. |
| NVAPI_INVALID_ARGUMENT | Argument passed in is invalid. |
| NVAPI_INTERFACE NvAPI_D3D1x_GetLowLatencySupport | ( | __in LUID | pAdapterId, |
| __out BOOL * | pIsLowLatencySupported | ||
| ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: Query support for low latency nodes
| [in] | adapterId | The adapter ID that specifies the GPU to query. |
| [out] | *pIsLowLatencySupported | Returns true if and only if low latency nodes are supported. |
| NVAPI_OK | Call succeeded. |
| NVAPI_ERROR | Call failed. |
| NVAPI_INVALID_ARGUMENT | One or more arguments are invalid. |
| NVAPI_INVALID_POINTER | A NULL pointer was passed |
| NVAPI_INTERFACE NvAPI_D3D1x_HintCreateLowLatencyDevice | ( | bool | bCreateLowLatencyDevice | ) |
SUPPORTED OS: Windows Vista and higher
DESCRIPTION: Hint driver what type of D3D1x device has to be created
| [in] | bool | true - Next CreateDevice call has to create low latency device. false - Next CreateDevice call has to create normal device. Caller has explicitely change state of the hint from true to false after low latency device is created. Default hint state is false. |
| NVAPI_OK | Hint is set. |
| NVAPI_ERROR | Hint was not set. |
| NvAPI_D3D9_AliasSurfaceAsTexture | ( | IDirect3DDevice9 * | pDev, |
| IDirect3DSurface9 * | pSurface, | ||
| IDirect3DTexture9 ** | ppTexture, | ||
| DWORD | dwFlag | ||
| ) |
DESCRIPTION: Create a texture that is an alias of a surface registered with NvAPI. The new texture can be bound with IDirect3DDevice9::SetTexture(). Note that the texture must be unbound before drawing to the surface again. Unless the USE_SUPER flag is passed, MSAA surfaces will be resolved before being used as a texture. MSAA depth buffers are resolved with a point filter, and non-depth MSAA surfaces are resolved with a linear filter.
SUPPORTED OS: Windows XP and higher
| [in] | pDev | The D3D device that owns the objects |
| [in] | pSurface | Pointer to a surface that has been registered with NvAPI to which a texture alias is to be provided |
| [out] | ppTexture | Fill with the texture created |
| [in] | dwFlag | NVAPI_ALIAS_SURFACE_FLAG to describe how to handle the texture |
| NVAPI_OK | completed request |
| NVAPI_INVALID_POINTER | A null pointer was passed as an argument |
| NVAPI_INVALID_ARGUMENT | One of the arguments was invalid, probably dwFlag. |
| NVAPI_UNREGISTERED_RESOURCE | pSurface has not been registered with NvAPI |
| NVAPI_ERROR | error occurred |
| NVAPI_INTERFACE NvAPI_D3D9_ClearRT | ( | IDirect3DDevice9 * | pDevice, |
| NvU32 | dwNumRects, | ||
| CONST RECT * | pRects, | ||
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
DESCRIPTION: This API Clears the currently bound render target(s) with the given color
SUPPORTED OS: Windows XP and higher
| [in] | pDevice | The D3D device that owns the objects. |
| [in] | dwNumRects | The no of rectangles to clear. If 0, clear the entire surface (clipped to viewport) |
| [in] | pRects | Defines the rectangles to clear. Should be NULL if dwNumRects == 0 |
| [in] | r | red component of the clear color |
| [in] | g | green component of the clear color |
| [in] | b | blue component of the clear color |
| [in] | a | alpha component of the clear color |
| NVAPI_INTERFACE NvAPI_D3D9_GetSurfaceHandle | ( | IDirect3DSurface9 * | pSurface, |
| NVDX_ObjectHandle * | pHandle | ||
| ) |
SUPPORTED OS: Windows XP and higher This function gets the handle of a given surface. This handle uniquely identifies the surface through all NvAPI entries.
| [in] | pSurface | Surface to be identified |
| [out] | pHandle | Will be filled by the return handle |
| NVAPI_INTERFACE NvAPI_D3D9_RegisterResource | ( | IDirect3DResource9 * | pResource | ) |
DESCRIPTION: This API binds a resource (surface/texture) so that it can be retrieved internally by NVAPI.
SUPPORTED OS: Windows XP and higher
| [in] | pResource | surface/texture |
| NVAPI_INTERFACE NvAPI_D3D9_StretchRectEx | ( | IDirect3DDevice9 * | pDevice, |
| IDirect3DResource9 * | pSourceResource, | ||
| CONST RECT * | pSourceRect, | ||
| IDirect3DResource9 * | pDestResource, | ||
| CONST RECT * | pDestRect, | ||
| D3DTEXTUREFILTERTYPE | Filter | ||
| ) |
DESCRIPTION: This API copies the contents of the source resource to the destination resource. This function can convert between a wider range of surfaces than IDirect3DDevice9::StretchRect. For example, it can copy from a depth/stencil surface to a texture.
The source and destination resources *must* be registered with NvAPI before being used with NvAPI_D3D9_StretchRectEx().
SUPPORTED OS: Windows XP and higher
| [in] | pDevice | The D3D device that owns the objects. |
| [in] | pSourceResource | Pointer to the source resource. |
| [in] | pSrcRect | Defines the rectangle on the source to copy from. If NULL, copy from the entire resource. |
| [in] | pDestResource | Pointer to the destination resource. |
| [in] | pDstRect | Defines the rectangle on the destination to copy to. If NULL, copy to the entire resource. |
| [in] | Filter | Choose a filtering method: D3DTEXF_NONE, D3DTEXF_POINT, D3DTEXF_LINEAR. |
| NVAPI_OK | completed request |
| NVAPI_INVALID_POINTER | An invalid pointer was passed as an argument (probably NULL) |
| NVAPI_INVALID_ARGUMENT | One of the arguments was invalid |
| NVAPI_UNREGISTERED_RESOURCE | a resource was passed in without being registered |
| NVAPI_ERROR | error occurred |
| NVAPI_INTERFACE NvAPI_D3D9_UnregisterResource | ( | IDirect3DResource9 * | pResource | ) |
DESCRIPTION: This API unbinds a resource (surface/texture) after use.
SUPPORTED OS: Windows XP and higher
| [in] | pResource | surface/texture |
| NvAPI_D3D_BeginResourceRendering | ( | IUnknown * | pDev, |
| NVDX_ObjectHandle | obj, | ||
| NvU32 | Flags | ||
| ) |
DESCRIPTION: This function tells the driver that the resource will begin to receive updates. It must be used in combination with NvAPI_D3D_EndResourceRendering(). The primary use of this function is allow the driver to initiate early inter-frame synchronization of resources while running in AFR SLI mode.
SUPPORTED OS: Windows XP and higher
| [in] | pDev | The ID3D10Device or IDirect3DDevice9 that is a using the resource |
| [in] | obj | Previously obtained HV resource handle |
| [in] | Flags | The flags for functionality applied to resource while being used. |
| NVAPI_OK | Function succeeded, if used properly and driver can initiate proper sync'ing of the resources. |
| NVAPI_INVALID_ARGUMENT | Bad argument(s) or invalid flag values |
| NVAPI_INVALID_CALL | Mismatched begin/end calls |
| NVAPI_INTERFACE NvAPI_D3D_EndResourceRendering | ( | IUnknown * | pDev, |
| NVDX_ObjectHandle | obj, | ||
| NvU32 | Flags | ||
| ) |
DESCRIPTION: This function tells the driver that the resource is done receiving updates. It must be used in combination with NvAPI_D3D_BeginResourceRendering(). The primary use of this function is allow the driver to initiate early inter-frame syncs of resources while running in AFR SLI mode.
SUPPORTED OS: Windows XP and higher
| [in] | pDev | The ID3D10Device or IDirect3DDevice9 thatis a using the resource |
| [in] | obj | Previously obtained HV resource handle |
| [in] | Flags | Reserved, must be zero |
| NVAPI_OK | Function succeeded, if used properly and driver can initiate proper sync'ing of the resources. |
| NVAPI_INVALID_ARGUMENT | Bad argument(s) or invalid flag values |
| NVAPI_INVALID_CALL | Mismatched begin/end calls |
| NVAPI_INTERFACE NvAPI_D3D_GetCurrentSLIState | ( | IUnknown * | pDevice, |
| NV_GET_CURRENT_SLI_STATE * | pSliState | ||
| ) |
DESCRIPTION: This function returns the current SLI state for the specified device. The structure contains the number of AFR groups, the current AFR group index, and what the AFR group index will be for the next frame. pDevice can be either a IDirect3DDevice9 or ID3D10Device pointer.
SUPPORTED OS: Windows XP and higher
| NVAPI_OK | Completed request |
| NVAPI_ERROR | Error occurred |
| NVAPI_INTERFACE NvAPI_D3D_GetObjectHandleForResource | ( | IUnknown * | pDevice, |
| IUnknown * | pResource, | ||
| NVDX_ObjectHandle * | pHandle | ||
| ) |
DESCRIPTION: This API gets a handle to a resource.
| [in] | pDev | The ID3D11Device, ID3D10Device or IDirect3DDevice9 to use |
| [in] | pResource | The ID3D10Resource, ID3D10Resource or IDirect3DResource9 from which we want the NvAPI handle |
| [out] | pHandle | A handle to the resource |
SUPPORTED OS: Windows XP and higher
| NvAPI_D3D_ImplicitSLIControl | ( | __in IMPLICIT_SLI_CONTROL | implicitSLIControl | ) |
SUPPORTED OS: Windows 7 and higher
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 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 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. This NvAPI call is supported in all DX10+ versions of the driver. It is supported on all Windows versions.
| NVAPI_OK | Completed request |
| NVAPI_ERROR | Error occurred |
| NVAPI_INTERFACE NvAPI_D3D_IsGSyncActive | ( | __in IUnknown * | pDeviceOrContext, |
| __in NVDX_ObjectHandle | primarySurface, | ||
| __out BOOL * | pIsGsyncActive | ||
| ) |
FUNCTION NAME: NvAPI_D3D_IsGSyncActive
DESCRIPTION: This API get the G-Sync state for the given device context. This is only reliable after the first present call has completed. As it is a bit time consuming, It should not be called per frame.
| [in] | pDeviceOrContext | The D3D9, D3D10, D3D11 device, or D3D11 device context |
| [in] | NVDX_ObjectHandle | The handle of primary surface |
| [out] | pIsGsyncActive | if G-Sync is active, *pisGsyncActive is true. |
SUPPORTED OS: Windows Vista and higher
RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
| NVAPI_INTERFACE NvAPI_D3D_IsGSyncCapable | ( | __in IUnknown * | pDeviceOrContext, |
| __in NVDX_ObjectHandle | primarySurface, | ||
| __out BOOL * | pIsGsyncCapable | ||
| ) |
FUNCTION NAME: NvAPI_D3D_IsGSyncCapable
DESCRIPTION: This API gets G-Sync capability for the given device context. This is only reliable after the first present call has completed.
| [in] | pDeviceOrContext | The D3D9, D3D10, D3D11 device, or D3D11 device context |
| [in] | NVDX_ObjectHandle | The handle of primary surface |
| [out] | pIsGsyncCapable | if G-Sync can be enabled, *pIsGsyncCapable is true. |
SUPPORTED OS: Windows Vista and higher
RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
| NVAPI_INTERFACE NvAPI_D3D_RegisterDevice | ( | __in IUnknown * | pDev | ) |
DESCRIPTION: Tells NvAPI about a D3D device. This must be called prior to using any DX1x deferred-context calls.
SUPPORTED OS: Windows Vista and higher
| [in] | pDev | The ID3D10Device or ID3D11Device to use. |
RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
| NVAPI_INTERFACE NvAPI_D3D_SetFPSIndicatorState | ( | IUnknown * | pDev, |
| NvU8 | doEnable | ||
| ) |
DESCRIPTION: Display an overlay that tracks the number of times the app presents per second, or, the number of frames-per-second (FPS)
SUPPORTED OS: Windows XP and higher
| [in] | bool | Whether or not to enable the fps indicator. |
| NVAPI_OK | |
| NVAPI_ERROR |
| NvAPI_D3D_SetResourceHint | ( | IUnknown * | pDev, |
| NVDX_ObjectHandle | obj, | ||
| NVAPI_D3D_SETRESOURCEHINT_CATEGORY | dwHintCategory, | ||
| NvU32 | dwHintName, | ||
| NvU32 * | pdwHintValue | ||
| ) |
DESCRIPTION: This is a general purpose function for passing down various resource related hints to the driver. Hints are divided into categories and types within each category.
SUPPORTED OS: Windows XP and higher
| [in] | pDev | The ID3D10Device or IDirect3DDevice9 that is a using the resource |
| [in] | obj | Previously obtained HV resource handle |
| [in] | dwHintCategory | Category of the hints |
| [in] | dwHintName | A hint within this category |
| [in] | *pdwHintValue | Pointer to location containing hint value |
| NVAPI_OK | |
| NVAPI_INVALID_ARGUMENT | |
| NVAPI_INVALID_CALL | It is illegal to change a hint dynamically when the resource is already bound. |
