NVAPI Reference Documentation
NVIDIA
Release 384: June 27
2017

DirectX Interface

Data Structures

struct  NvAPI_D3D11_RASTERIZER_DESC_EX
 
struct  NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1
 
struct  NVAPI_D3D12_PSO_EXTENSION_DESC_V1
 
struct  NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1
 
struct  NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1
 
struct  NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1
 
struct  NVAPI_D3D12_PSO_SET_SHADER_EXTENSION_SLOT_DESC_V1
 
struct  _NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS
 
struct  _NV_QUERY_MODIFIED_W_SUPPORT_PARAMS
 
struct  _NV_QUERY_LATELATCH_SUPPORT_PARAMS
 
struct  NV_GET_CURRENT_SLI_STATE_V1
 

Macros

#define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1   MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1, 1)
 
#define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER   NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1
 
#define NV_PSO_EXTENSION_DESC_VER_1   MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_EXTENSION_DESC_V1, 1)
 
#define NV_PSO_EXTENSION_DESC_VER   NV_PSO_EXTENSION_DESC_VER_1
 
#define NV_RASTERIZER_PSO_EXTENSION_DESC_VER_1   MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1, 1)
 
#define NV_RASTERIZER_PSO_EXTENSION_DESC_VER   NV_RASTERIZER_PSO_EXTENSION_DESC_VER_1
 
#define NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_1   MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1, 1)
 
#define NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER   NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_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_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER   NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_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_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER   NV_ENABLE_DEPTH_BOUND_TEST_PSO_EXTENSION_DESC_VER_1
 
#define NVAPI_COPY_ASYNCHRONOUSLY   1
 
#define NV_GET_CURRENT_SLI_STATE_VER1   MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE_V1,1)
 

Typedefs

typedef enum _NVAPI_D3D11_INSERTWFI_FLAG NVAPI_D3D11_INSERTWFI_FLAG
 
typedef struct NvAPI_D3D11_RASTERIZER_DESC_EX NvAPI_D3D11_RASTERIZER_DESC_EX
 
typedef enum _NV_SWIZZLE_MODE NV_SWIZZLE_MODE
 
typedef enum _NV_SWIZZLE_OFFSET NV_SWIZZLE_OFFSET
 
typedef enum _NV_PSO_EXTENSION NV_PSO_EXTENSION
 
typedef NVAPI_D3D12_PSO_EXTENSION_DESC_V1 NVAPI_D3D12_PSO_EXTENSION_DESC
 
typedef NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC_V1 NVAPI_D3D12_PSO_RASTERIZER_STATE_DESC
 
typedef NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1 NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC
 
typedef NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC_V1 NVAPI_D3D12_PSO_REQUEST_FAST_GEOMETRY_SHADER_DESC
 
typedef NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC_V1 NVAPI_D3D12_PSO_ENABLE_DEPTH_BOUND_TEST_DESC
 
typedef struct _NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS_V1
 
typedef struct _NV_QUERY_MODIFIED_W_SUPPORT_PARAMS NV_QUERY_MODIFIED_W_SUPPORT_PARAMS_V1
 
typedef ID3DLateLatchObject_V1 ID3DLateLatchObject
 
typedef struct _NV_QUERY_LATELATCH_SUPPORT_PARAMS NV_QUERY_LATELATCH_SUPPORT_PARAMS_V1
 
typedef enum _IMPLICIT_SLI_CONTROL IMPLICIT_SLI_CONTROL
 
typedef enum _NVAPI_D3D_SETRESOURCEHINT_CATEGORY NVAPI_D3D_SETRESOURCEHINT_CATEGORY
 
typedef enum _NVAPI_D3D_SETRESOURCEHINT_SLI NVAPI_D3D_SETRESOURCEHINT_SLI
 
typedef enum _NVAPI_D3D_RESOURCERENDERING_FLAG NVAPI_D3D_RESOURCERENDERING_FLAG
 

Enumerations

enum  NVAPI_ALIAS_SURFACE_FLAG { NVAPI_ALIAS_SURFACE_FLAG_NONE = 0x00000000, NVAPI_ALIAS_SURFACE_FLAG_USE_SUPER = 0x00000001, NVAPI_ALIAS_SURFACE_FLAG_MASK = 0x00000001 }
 
enum  _NVAPI_D3D11_INSERTWFI_FLAG { NVAPI_D3D_BEGIN_UAV_OVERLAP_NO_WFI = 0x00000000, NVAPI_D3D_BEGIN_UAV_OVERLAP_GFX_WFI = 0x00000001, NVAPI_D3D_BEGIN_UAV_OVERLAP_COMP_WFI = 0x00000002 }
 
enum  NVAPI_QUAD_FILLMODE { NVAPI_QUAD_FILLMODE_DISABLED = 0, NVAPI_QUAD_FILLMODE_BBOX = 1, NVAPI_QUAD_FILLMODE_FULL_VIEWPORT = 2 }
 
enum  _NV_SWIZZLE_MODE {
  NV_SWIZZLE_POS_X = 0, NV_SWIZZLE_NEG_X = 1, NV_SWIZZLE_POS_Y = 2, NV_SWIZZLE_NEG_Y = 3,
  NV_SWIZZLE_POS_Z = 4, NV_SWIZZLE_NEG_Z = 5, NV_SWIZZLE_POS_W = 6, NV_SWIZZLE_NEG_W = 7
}
 
enum  _NV_SWIZZLE_OFFSET { NV_SWIZZLE_OFFSET_X = 0, NV_SWIZZLE_OFFSET_Y = 4, NV_SWIZZLE_OFFSET_Z = 8, NV_SWIZZLE_OFFSET_W = 12 }
 
enum  _NV_PSO_EXTENSION {
  NV_PSO_RASTER_EXTENSION = 0, NV_PSO_REQUEST_FASTGS_EXTENSION = 1, NV_PSO_GEOMETRY_SHADER_EXTENSION = 2, NV_PSO_ENABLE_DEPTH_BOUND_TEST_EXTENSION = 3,
  NV_PSO_EXPLICIT_FASTGS_EXTENSION = 4, NV_PSO_SET_SHADER_EXTNENSION_SLOT_AND_SPACE = 5, NV_PSO_VERTEX_SHADER_EXTENSION = 6, NV_PSO_DOMAIN_SHADER_EXTENSION = 7,
  NV_PSO_HULL_SHADER_EXTENSION = 9
}
 
enum  _IMPLICIT_SLI_CONTROL { DISABLE_IMPLICIT_SLI = 0, ENABLE_IMPLICIT_SLI = 1 }
 
enum  NVAPI_DEVICE_FEATURE_LEVEL {
  NVAPI_DEVICE_FEATURE_LEVEL_NULL = -1, NVAPI_DEVICE_FEATURE_LEVEL_10_0 = 0, NVAPI_DEVICE_FEATURE_LEVEL_10_0_PLUS = 1, NVAPI_DEVICE_FEATURE_LEVEL_10_1 = 2,
  NVAPI_DEVICE_FEATURE_LEVEL_11_0 = 3
}
 
enum  _NVAPI_D3D_SETRESOURCEHINT_CATEGORY { NVAPI_D3D_SRH_CATEGORY_SLI = 1 }
 
enum  _NVAPI_D3D_SETRESOURCEHINT_SLI { NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC = 1, NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USAGE = 2 }
 
enum  _NVAPI_D3D_RESOURCERENDERING_FLAG { NVAPI_D3D_RR_FLAG_DEFAULTS = 0x00000000, NVAPI_D3D_RR_FLAG_FORCE_DISCARD_CONTENT = 0x00000001, NVAPI_D3D_RR_FLAG_FORCE_KEEP_CONTENT = 0x00000002, NVAPI_D3D_RR_FLAG_MULTI_FRAME = 0x00000004 }
 

Functions

NVAPI_INTERFACE NvAPI_D3D9_RegisterResource (IDirect3DResource9 *pResource)
 
NVAPI_INTERFACE NvAPI_D3D9_UnregisterResource (IDirect3DResource9 *pResource)
 
NVAPI_INTERFACE NvAPI_D3D9_AliasSurfaceAsTexture (IDirect3DDevice9 *pDev, IDirect3DSurface9 *pSurface, IDirect3DTexture9 **ppTexture, DWORD dwFlag)
 
NVAPI_INTERFACE NvAPI_D3D9_StretchRectEx (IDirect3DDevice9 *pDevice, IDirect3DResource9 *pSourceResource, CONST RECT *pSourceRect, IDirect3DResource9 *pDestResource, CONST RECT *pDestRect, D3DTEXTUREFILTERTYPE Filter)
 
NVAPI_INTERFACE NvAPI_D3D9_ClearRT (IDirect3DDevice9 *pDevice, NvU32 dwNumRects, CONST RECT *pRects, float r, float g, float b, float a)
 
NVAPI_INTERFACE NvAPI_D3D9_GetSurfaceHandle (IDirect3DSurface9 *pSurface, NVDX_ObjectHandle *pHandle)
 
NVAPI_INTERFACE NvAPI_D3D10_SetDepthBoundsTest (ID3D10Device *pDev, NvU32 bEnable, float fMinDepth, float fMaxDepth)
 
NVAPI_INTERFACE NvAPI_D3D11_IsNvShaderExtnOpCodeSupported (__in IUnknown *pDev, __in NvU32 opCode, __out bool *pSupported)
 
NVAPI_INTERFACE NvAPI_D3D11_SetNvShaderExtnSlot (__in IUnknown *pDev, __in NvU32 uavSlot)
 
NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlapEx (__in IUnknown *pDeviceOrContext, __in NvU32 insertWFIFlags)
 
NVAPI_INTERFACE NvAPI_D3D11_BeginUAVOverlap (__in IUnknown *pDeviceOrContext)
 
NVAPI_INTERFACE NvAPI_D3D11_EndUAVOverlap (__in IUnknown *pDeviceOrContext)
 
NVAPI_INTERFACE NvAPI_D3D_SetFPSIndicatorState (IUnknown *pDev, NvU8 doEnable)
 
NVAPI_INTERFACE NvAPI_D3D11_CreateRasterizerState (__in ID3D11Device *pDevice, __in const NvAPI_D3D11_RASTERIZER_DESC_EX *pRasterizerDesc, __out ID3D11RasterizerState **ppRasterizerState)
 
NVAPI_INTERFACE NvAPI_D3D_ConfigureAnsel (__in IUnknown *pDevice, __in NVAPI_ANSEL_CONFIGURATION_STRUCT *pNLSConfig)
 
NVAPI_INTERFACE NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA (__in ID3D11Device *pDevice, __in ID3D11Texture2D *pInputTex, __out ID3D11Texture2D **ppOutTex)
 
NVAPI_INTERFACE NvAPI_D3D11_CreateGeometryShaderEx_2 (__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX *pCreateGeometryShaderExArgs, __out ID3D11GeometryShader **ppGeometryShader)
 
NVAPI_INTERFACE NvAPI_D3D11_CreateHullShaderEx (__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __in const NvAPI_D3D11_CREATE_HULL_SHADER_EX *pCreateHullShaderExArgs, __out ID3D11HullShader **ppHullShader)
 
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)
 
NVAPI_INTERFACE NvAPI_D3D11_CreateFastGeometryShader (__in ID3D11Device *pDevice, __in const void *pShaderBytecode, __in SIZE_T BytecodeLength, __in_opt ID3D11ClassLinkage *pClassLinkage, __out ID3D11GeometryShader **ppGeometryShader)
 
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)
 
NVAPI_INTERFACE NvAPI_D3D12_CreateComputePipelineState (__in ID3D12Device *pDevice, __in const D3D12_COMPUTE_PIPELINE_STATE_DESC *pPSODesc, NvU32 numExtensions, __in const NVAPI_D3D12_PSO_EXTENSION_DESC **ppExtensions, __out ID3D12PipelineState **ppPSO)
 
NVAPI_INTERFACE NvAPI_D3D12_SetDepthBoundsTestValues (__in ID3D12GraphicsCommandList *pCommandList, __in const float minDepth, __in const float maxDepth)
 
NVAPI_INTERFACE NvAPI_D3D12_CreateReservedResource (__in ID3D12Device *pDevice, __in const D3D12_RESOURCE_DESC *pDesc, __in D3D12_RESOURCE_STATES InitialState, __in const D3D12_CLEAR_VALUE *pOptimizedClearValue, __in REFIID riid, __out void **ppvResource, __in bool bTexture2DArrayMipPack, __in ID3D12Heap *pHeap)
 
NVAPI_INTERFACE NvAPI_D3D12_CreateHeap (__in ID3D12Device *pDevice, __in const D3D12_HEAP_DESC *pDesc, __in REFIID riid, __out void **ppvHeap)
 
NVAPI_INTERFACE NvAPI_D3D12_ReservedResourceGetDesc (__in ID3D12Resource *pReservedResource, __out D3D12_RESOURCE_DESC *pDesc)
 
NVAPI_INTERFACE NvAPI_D3D12_UpdateTileMappings (__in ID3D12CommandQueue *pCommandQueue, __in ID3D12Resource *pResource, __in UINT NumResourceRegions, __in const D3D12_TILED_RESOURCE_COORDINATE *pResourceRegionStartCoordinates, __in const D3D12_TILE_REGION_SIZE *pResourceRegionSizes, __in ID3D12Heap *pHeap, __in UINT NumRanges, __in const D3D12_TILE_RANGE_FLAGS *pRangeFlags, __in const UINT *pHeapRangeStartOffsets, __in const UINT *pRangeTileCounts, __in D3D12_TILE_MAPPING_FLAGS Flags)
 
NVAPI_INTERFACE NvAPI_D3D12_CopyTileMappings (__in ID3D12CommandQueue *pCommandQueue, __in ID3D12Resource *pDstResource, __in const D3D12_TILED_RESOURCE_COORDINATE *pDstRegionStartCoordinate, __in ID3D12Resource *pSrcResource, __in const D3D12_TILED_RESOURCE_COORDINATE *pSrcRegionStartCoordinate, __in const D3D12_TILE_REGION_SIZE *pRegionSize, __in D3D12_TILE_MAPPING_FLAGS Flags)
 
NVAPI_INTERFACE NvAPI_D3D12_ResourceAliasingBarrier (__in ID3D12GraphicsCommandList *pCommandList, __in UINT NumBarriers, __in const D3D12_RESOURCE_BARRIER *pBarriers)
 
NVAPI_INTERFACE NvAPI_D3D12_IsNvShaderExtnOpCodeSupported (__in ID3D12Device *pDevice, __in NvU32 opCode, __out bool *pSupported)
 
NVAPI_INTERFACE NvAPI_D3D_IsGSyncCapable (__in IUnknown *pDeviceOrContext, __in NVDX_ObjectHandle primarySurface, __out BOOL *pIsGsyncCapable)
 
NVAPI_INTERFACE NvAPI_D3D_IsGSyncActive (__in IUnknown *pDeviceOrContext, __in NVDX_ObjectHandle primarySurface, __out BOOL *pIsGsyncActive)
 
NVAPI_INTERFACE NvAPI_D3D1x_DisableShaderDiskCache (IUnknown *pDevice)
 
NVAPI_INTERFACE NvAPI_D3D11_MultiGPU_GetCaps (__out PNV_MULTIGPU_CAPS pMultiGPUCaps)
 
NVAPI_INTERFACE NvAPI_D3D11_MultiGPU_Init (__in bool bEnable)
 
NVAPI_INTERFACE NvAPI_D3D11_CreateMultiGPUDevice (__in ID3D11Device *pDevice, __in ULONG version, __out ULONG *currentVersion, __out ID3D11MultiGPUDevice **ppD3D11MultiGPUDevice, __in UINT maxGpus=ALL_GPUS)
 
NVAPI_INTERFACE NvAPI_D3D_QuerySinglePassStereoSupport (__in IUnknown *pDevice, __inout NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS *pQuerySinglePassStereoSupportedParams)
 
NVAPI_INTERFACE NvAPI_D3D_SetSinglePassStereoMode (__in IUnknown *pDevOrContext, __in NvU32 numViews, __in NvU32 renderTargetIndexOffset, __in NvU8 independentViewportMaskEnable)
 
NVAPI_INTERFACE NvAPI_D3D12_QuerySinglePassStereoSupport (__in ID3D12Device *pDevice, __inout NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS *pQuerySinglePassStereoSupportedParams)
 
NVAPI_INTERFACE NvAPI_D3D12_SetSinglePassStereoMode (__in ID3D12GraphicsCommandList *pCommandList, __in NvU32 numViews, __in NvU32 renderTargetIndexOffset, __in NvU8 independentViewportMaskEnable)
 
NVAPI_INTERFACE NvAPI_D3D_QueryModifiedWSupport (__in IUnknown *pDev, __inout NV_QUERY_MODIFIED_W_SUPPORT_PARAMS *pQueryModifiedWSupportedParams)
 
NVAPI_INTERFACE NvAPI_D3D_SetModifiedWMode (__in IUnknown *pDevOrContext, __in NV_MODIFIED_W_PARAMS *psModifiedWParams)
 
NVAPI_INTERFACE NvAPI_D3D12_QueryModifiedWSupport (__in ID3D12Device *pDevice, __inout NV_QUERY_MODIFIED_W_SUPPORT_PARAMS *pQueryModifiedWSupportedParams)
 
NVAPI_INTERFACE NvAPI_D3D12_SetModifiedWMode (__in ID3D12GraphicsCommandList *pCommandList, __in NV_MODIFIED_W_PARAMS *pModifiedWParams)
 
 DECLARE_INTERFACE (ID3DLateLatchObject_V1)
 
NVAPI_INTERFACE NvAPI_D3D_CreateLateLatchObject (__in IUnknown *pDevice, __inout NV_D3D_LATELATCH_OBJECT_DESC *pLateLatchObjectDesc)
 
NVAPI_INTERFACE NvAPI_D3D_QueryLateLatchSupport (__in IUnknown *pDevice, __inout NV_QUERY_LATELATCH_SUPPORT_PARAMS *pQueryLateLatchSupportParams)
 
NVAPI_INTERFACE NvAPI_D3D_RegisterDevice (__in IUnknown *pDev)
 
NVAPI_INTERFACE NvAPI_D3D11_MultiDrawInstancedIndirect (__in ID3D11DeviceContext *pDevContext11, __in NvU32 drawCount, __in ID3D11Buffer *pBuffer, __in NvU32 alignedByteOffsetForArgs, __in NvU32 alignedByteStrideForArgs)
 
NVAPI_INTERFACE NvAPI_D3D11_MultiDrawIndexedInstancedIndirect (__in ID3D11DeviceContext *pDevContext11, __in NvU32 drawCount, __in ID3D11Buffer *pBuffer, __in NvU32 alignedByteOffsetForArgs, __in NvU32 alignedByteStrideForArgs)
 
NVAPI_INTERFACE NvAPI_D3D_ImplicitSLIControl (__in IMPLICIT_SLI_CONTROL implicitSLIControl)
 
NVAPI_INTERFACE NvAPI_D3D12_UseDriverHeapPriorities (__in ID3D12Device *pDevice)
 
NVAPI_INTERFACE NvAPI_D3D12_Mosaic_GetCompanionAllocations (__inout NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS *params)
 
NVAPI_INTERFACE NvAPI_D3D12_Mosaic_GetViewportAndGpuPartitions (__inout NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS *params)
 
NVAPI_INTERFACE NvAPI_D3D_GetObjectHandleForResource (IUnknown *pDevice, IUnknown *pResource, NVDX_ObjectHandle *pHandle)
 
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)
 
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)
 
NVAPI_INTERFACE NvAPI_D3D11_SetDepthBoundsTest (IUnknown *pDeviceOrContext, NvU32 bEnable, float fMinDepth, float fMaxDepth)
 
NVAPI_INTERFACE NvAPI_D3D_GetCurrentSLIState (IUnknown *pDevice, NV_GET_CURRENT_SLI_STATE *pSliState)
 
NVAPI_INTERFACE NvAPI_D3D_SetResourceHint (IUnknown *pDev, NVDX_ObjectHandle obj, NVAPI_D3D_SETRESOURCEHINT_CATEGORY dwHintCategory, NvU32 dwHintName, NvU32 *pdwHintValue)
 
NVAPI_INTERFACE NvAPI_D3D_BeginResourceRendering (IUnknown *pDeviceOrContext, NVDX_ObjectHandle obj, NvU32 Flags)
 
NVAPI_INTERFACE NvAPI_D3D_EndResourceRendering (IUnknown *pDeviceOrContext, NVDX_ObjectHandle obj, NvU32 Flags)
 
enum  _NVAPI_ANSEL_FEATURE { NVAPI_ANSEL_FEATURE_UNKNOWN = 0, NVAPI_ANSEL_FEATURE_BLACK_AND_WHITE = 1, NVAPI_ANSEL_FEATURE_HUDLESS = 2 }
 
typedef enum _NVAPI_ANSEL_FEATURE NVAPI_ANSEL_FEATURE
 
typedef struct NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1 NvAPI_D3D11_CREATE_HULL_SHADER_EX_V1
 

Detailed Description

Macro Definition Documentation

#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   NV_FAST_GEOMETRY_SHADER_PSO_EXTENSION_VER_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   NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_1
#define NV_FASTGS_EXPLICIT_PSO_EXTENSION_VER_1   MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_CREATE_FASTGS_EXPLICIT_DESC_V1, 1)
#define NV_GET_CURRENT_SLI_STATE_VER1   MAKE_NVAPI_VERSION(NV_GET_CURRENT_SLI_STATE_V1,1)
#define NV_PSO_EXTENSION_DESC_VER   NV_PSO_EXTENSION_DESC_VER_1
#define NV_PSO_EXTENSION_DESC_VER_1   MAKE_NVAPI_VERSION(NVAPI_D3D12_PSO_EXTENSION_DESC_V1, 1)
#define NV_RASTERIZER_PSO_EXTENSION_DESC_VER   NV_RASTERIZER_PSO_EXTENSION_DESC_VER_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_VER   NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1
#define NVAPI_D3D11_CREATEFASTGSEXPLICIT_VER1   MAKE_NVAPI_VERSION(NvAPI_D3D11_CREATE_FASTGS_EXPLICIT_DESC_V1, 1)

Typedef Documentation

typedef ID3DLateLatchObject_V1 ID3DLateLatchObject

See NvAPI_D3D_CreateLateLatchObject

Enum for CreatePSO extensions.

See NvAPI_D3D_QueryLateLatchSupport

SUPPORTED OS: Windows 7 and higher

Used to query the support of Lens Matched Shading HW feature

SUPPORTED OS: Windows 7 and higher

Used to query the support of Single Pass Stereo HW feature

SUPPORTED OS: Windows Vista and higher

SUPPORTED OS: Windows Vista and higher

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.

Enumeration Type Documentation

Enumerator
DISABLE_IMPLICIT_SLI 
ENABLE_IMPLICIT_SLI 

Enum for CreatePSO extensions.

Enumerator
NV_PSO_RASTER_EXTENSION 
NV_PSO_REQUEST_FASTGS_EXTENSION 
NV_PSO_GEOMETRY_SHADER_EXTENSION 
NV_PSO_ENABLE_DEPTH_BOUND_TEST_EXTENSION 
NV_PSO_EXPLICIT_FASTGS_EXTENSION 
NV_PSO_SET_SHADER_EXTNENSION_SLOT_AND_SPACE 
NV_PSO_VERTEX_SHADER_EXTENSION 
NV_PSO_DOMAIN_SHADER_EXTENSION 
NV_PSO_HULL_SHADER_EXTENSION 
Enumerator
NV_SWIZZLE_POS_X 
NV_SWIZZLE_NEG_X 
NV_SWIZZLE_POS_Y 
NV_SWIZZLE_NEG_Y 
NV_SWIZZLE_POS_Z 
NV_SWIZZLE_NEG_Z 
NV_SWIZZLE_POS_W 
NV_SWIZZLE_NEG_W 
Enumerator
NV_SWIZZLE_OFFSET_X 
NV_SWIZZLE_OFFSET_Y 
NV_SWIZZLE_OFFSET_Z 
NV_SWIZZLE_OFFSET_W 
Enumerator
NVAPI_ANSEL_FEATURE_UNKNOWN 
NVAPI_ANSEL_FEATURE_BLACK_AND_WHITE 
NVAPI_ANSEL_FEATURE_HUDLESS 
Enumerator
NVAPI_D3D_BEGIN_UAV_OVERLAP_NO_WFI 

no WFI

NVAPI_D3D_BEGIN_UAV_OVERLAP_GFX_WFI 

(bit 0) force graphics WFI

NVAPI_D3D_BEGIN_UAV_OVERLAP_COMP_WFI 

(bit 1) force compute WFI

Used in NvAPI_D3D_BeginResourceRendering().

Enumerator
NVAPI_D3D_RR_FLAG_DEFAULTS 

All bits set to 0 are defaults.

NVAPI_D3D_RR_FLAG_FORCE_DISCARD_CONTENT 

(bit 0) The flag forces to discard previous content of the resource regardless of the NvApiHints_Sli_Disable_InterframeSync hint

NVAPI_D3D_RR_FLAG_FORCE_KEEP_CONTENT 

(bit 1) The flag forces to respect previous content of the resource regardless of the NvApiHints_Sli_Disable_InterframeSync hint

NVAPI_D3D_RR_FLAG_MULTI_FRAME 

(bit 2) The flag hints the driver that content will be used for many frames. If not specified then the driver assumes that content is used only on the next frame

Valid categories for NvAPI_D3D_SetResourceHint()

Enumerator
NVAPI_D3D_SRH_CATEGORY_SLI 

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.

Enumerator
NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC 
NVAPI_D3D_SRH_SLI_ASK_FOR_BROADCAST_USAGE 

See NvAPI_D3D9_AliasSurfaceAsTexture().

Enumerator
NVAPI_ALIAS_SURFACE_FLAG_NONE 
NVAPI_ALIAS_SURFACE_FLAG_USE_SUPER 

Use the surface's msaa buffer directly as a texture, rather than resolving. (This is much slower, but potentially has higher quality.)

NVAPI_ALIAS_SURFACE_FLAG_MASK 

D3D_FEATURE_LEVEL supported - used in NvAPI_D3D11_CreateDevice() and NvAPI_D3D11_CreateDeviceAndSwapChain()

Enumerator
NVAPI_DEVICE_FEATURE_LEVEL_NULL 
NVAPI_DEVICE_FEATURE_LEVEL_10_0 
NVAPI_DEVICE_FEATURE_LEVEL_10_0_PLUS 
NVAPI_DEVICE_FEATURE_LEVEL_10_1 
NVAPI_DEVICE_FEATURE_LEVEL_11_0 

SUPPORTED OS: Windows Vista and higher

Enumerator
NVAPI_QUAD_FILLMODE_DISABLED 
NVAPI_QUAD_FILLMODE_BBOX 
NVAPI_QUAD_FILLMODE_FULL_VIEWPORT 

Function Documentation

DECLARE_INTERFACE ( ID3DLateLatchObject_V1  )

See NvAPI_D3D_CreateLateLatchObject

Release the created LateLatch object and associated buffers.

Request to queue the latch operation to the GPU.

Get ID3D11Buffer* available at the given 'index'

Returns the number of late latch buffers created for this LateLatchObject.

Fully update all LateLatch buffers with new data.

Partially update one of the LateLatch buffers with new data.

References __in.

NVAPI_INTERFACE NvAPI_D3D10_SetDepthBoundsTest ( ID3D10Device *  pDev,
NvU32  bEnable,
float  fMinDepth,
float  fMaxDepth 
)

DESCRIPTION: This function enables/disables the depth bounds test.

SUPPORTED OS: Windows Vista and higher

Parameters
[in]pDevThe device to set the depth bounds test
[in]bEnableEnable(non-zero)/disable(zero) the depth bounds test
[in]fMinDepthThe minimum depth for the depth bounds test
[in]fMaxDepthThe maximum depth for the depth bounds test
The valid values for fMinDepth and fMaxDepth are such that 0 <= fMinDepth <= fMaxDepth <= 1
Returns
NVAPI_OK if the depth bounds test was correctly enabled or disabled
NVAPI_INTERFACE NvAPI_D3D11_AliasMSAATexture2DAsNonMSAA ( __in ID3D11Device *  pDevice,
__in ID3D11Texture2D *  pInputTex,
__out ID3D11Texture2D **  ppOutTex 
)

SUPPORTED OS: Windows 8 and higherSUPPORTED OS: Windows 8 and higherSUPPORTED OS: Windows 8 and higherSUPPORTED OS: Windows 8 and higherSUPPORTED OS: Windows 8 and higherSUPPORTED 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.

This function is free-threaded create compatible i.e. it can be called from a different thread than the one calling immediate device setstate functions.

Parameters
[in]pDevicecurrent d3d device
[in]pInputTexThe MultiSampled Texture2D resource that is being aliased
[out]ppOutTexThe aliased non AA copy MultiSampled Texture2D resource
Returns
:: NVAPI_OK if the call succeeds.
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

Parameters
[in]*pDeviceOrContextpointer to D3D11 device, or D3D11 device context
Returns
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_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

Parameters
[in]*pDeviceOrContextpointer to D3D11 device, or D3D11 device context
[in]insertWFIFlagsbit 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

Since
Release: 185
Parameters
[in]pAdapter
[in]DriverType
[in]Software
[in]Flags
[in]*pFeatureLevels
[in]FeatureLevels
[in]SDKVersion
[in]**ppDevice
[in]*pFeatureLevel
[in]**ppImmediateContext
[in]*pSupportedLevelD3D_FEATURE_LEVEL supported
Returns
NVAPI_OK if the createDevice call succeeded.
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

Since
Release: 185
Parameters
[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]*pSupportedLevelD3D_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.

This function is free-threaded create compatible i.e. it can be called from a different thread than the one calling immediate device setstate functions.

Since
Release:
Parameters
[in]pDeviceThe device pointer
[in]pShaderBytecodeA pointer to the compiled shader.
[in]BytecodeLengthSize of the compiled geometry shader.
[in]pClassLinkageA pointer to a class linkage interface. Can be NULL.
[out]ppGeometryShaderAddress of a pointer to a ID3D11GeometryShader interface.
Returns
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_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.

This function is free-threaded create compatible i.e. it can be called from a different thread than the one calling immediate device setstate functions.

Since
Release:
Parameters
[in]pDeviceThe device pointer
[in]pShaderBytecodeA pointer to the compiled shader.
[in]BytecodeLengthSize of the compiled geometry shader.
[in]pClassLinkageA pointer to a class linkage interface. Can be NULL.
[in]pCreateFastGSArgsA pointer to a NvAPI_D3D11_CREATE_FASTGS_EXPLICIT struct.
[out]ppGeometryShaderAddress of a pointer to a ID3D11GeometryShader interface.
Returns
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_CreateGeometryShaderEx_2 ( __in ID3D11Device *  pDevice,
__in const void *  pShaderBytecode,
__in SIZE_T  BytecodeLength,
__in_opt ID3D11ClassLinkage *  pClassLinkage,
__in const NvAPI_D3D11_CREATE_GEOMETRY_SHADER_EX pCreateGeometryShaderExArgs,
__out ID3D11GeometryShader **  ppGeometryShader 
)

DESCRIPTION: This function allows us to extend the creation of geometry shaders with extra bits of functionality.

The first parameters are identical to ID3D11Device::CreateGeometryShader() so please refer to its documentation for their usage.

The new parameter is UseViewportMask which is to tell the driver to create a shader that outputs a viewport mask instead when a viewport index is indicated. Outputting a viewport mask allows a single primitive to land on many different viewports as specified by the bits set in the mask, rather than to rely on a single number that tells it which unique viewport it would be drawn on. This can be used for example in conjunction with the setting of coordinates swizzling (see XXX_NVAPI function) to generates multiple adjacent views of the same primitive in a more efficient fashion (outputting the primitive only once).

This function is free-threaded create compatible i.e. it can be called from a different thread than the one calling immediate device setstate functions.

Since
Release:
Parameters
[in]pDeviceThe device pointer
[in]pShaderBytecodeA pointer to the compiled shader.
[in]BytecodeLengthSize of the compiled geometry shader.
[in]pClassLinkageA pointer to a class linkage interface. Can be NULL.
[in]UseViewportMaskSet to FALSE for custom semantic shaders. Tell the driver to create a shader that outputs the viewport mask in lieu of the viewport index. See above description.
[in]OffsetRtIndexByVpIndexSet to FALSE for custom semantic shaders. The Rendertarget index is offset by the viewport index
[in]ForceFastGSIf TRUE, GS must be written with maxvertexcount(1) and must pass-through input vertex 0 to the output without modification
[in]DontUseViewportOrderDefault FALSE for Primitives batched per viewport to improve performance. Set TRUE for API order (slow).
[in]UseAttributeSkipMaskreserved
[in]UseCoordinateSwizzlereserved
[in]pCoordinateSwizzlingreserved
[in]NumCustomSemanticsNumber of custom semantics elements (upto NV_CUSTOM_SEMANTIC_MAX) provided in array pointer pCustomSemantics
[in]pCustomSemanticspointer to array of NV_CUSTOM_SEMANTIC
[in]ConvertToFastGSreserved
[in]UseSpecificShaderExtTRUE if creating minimal specific shaders with nvapi shader extensions
[out]ppGeometryShaderAddress of a pointer to a ID3D11GeometryShader interface.
Returns
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_CreateHullShaderEx ( __in ID3D11Device *  pDevice,
__in const void *  pShaderBytecode,
__in SIZE_T  BytecodeLength,
__in_opt ID3D11ClassLinkage *  pClassLinkage,
__in const NvAPI_D3D11_CREATE_HULL_SHADER_EX pCreateHullShaderExArgs,
__out ID3D11HullShader **  ppHullShader 
)
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

  \param [in]        pDevice                  current d3d device
  \param [in]        version                  version of requested ID3D11MultiGPUDevice. 
  \param [out]       currentVersion           pointer to returned current version of ID3D11MultiGPUDevice. 
  \param [out]       ppD3D11MultiGPUDevice    pointer to returned ID3D11MultiGPUDevice. 
  \param [in]        maxGpus                  max number of gpus this ID3D11MultiGPUDevice is allowed to use
Return values
NVAPI_OKif the call succeeds.
NVAPI_INVALID_ARGUMENTif NvAPI_D3D11_MultiGPU_Init() was not enabled prior to the creation of the D3D11 device, or if maxGpus is greater than the number of GPUs in the SLI group.
NVAPI_NO_ACTIVE_SLI_TOPOLOGYon single-GPU systems, or if SLI has not been enabled in the NVIDIA control panel.
NVAPI_INVALID_CALLif there is already an ID3D11MultiGPUDevice created for the specified ID3D11Device.
NVAPI_INCOMPATIBLE_STRUCT_VERSIONif requested interface version is greater than the one that is supported by installed. driver. In this case currentVersion will contain version supported by installed driver.
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

         This function is  free-threaded create compatible i.e. it can be called from a different thread 
         than the one calling immediate device setstate functions.   

  \param [in]        pDevice             current d3d device
  \param [in]        pRasterizerDesc     Rasterizer state description of type NVAPI_D3D11_RASTERIZER_DESC_EX
  \param [out]       ppRasterizerState   ID3D11RasterizerState 
Return values
NVAPI_OKif the call succeeds.
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

Parameters
[in]*pDeviceOrContextpointer to D3D11 device, or D3D11 device context
Returns
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_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.

This function can be called from a different thread than the one calling immediate device setstate functions.

SUPPORTED OS: Windows Vista and higher

Parameters
[in]pDevThe device on which to query for support, should be a ID3D11Device+ device
[in]opCodethe opcode to check
[out]pSupportedtrue if supported, false otherwise
Returns
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.
Return values
NVAPI_OKif 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

Parameters
[in]*pDevContext11Pointer to D3D11 device context (IC or DC)
[in]drawCountDo DrawIndexedInstancedIndirect operation this many times
[in]*pBufferID3D11Buffer that contains the command parameters
[in]alignedByteOffsetForArgsStart in pBuffer of the command parameters
[in]alignedByteStrideForArgsStride 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.

Return values
NVAPI_D3D_DEVICE_NOT_REGISTEREDWhen 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

Parameters
[in]*pDevContext11Pointer to D3D11 device context (IC or DC)
[in]drawCountDo DrawInstancedIndirect operation this many times
[in]*pBufferID3D11Buffer that contains the command parameters
[in]alignedByteOffsetForArgsStart in pBuffer of the command parameters
[in]alignedByteStrideForArgsStride 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.

Return values
NVAPI_D3D_DEVICE_NOT_REGISTEREDWhen 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.

Parameters
[out]pMultiGPUCapsPointer to a structure returning multi GPU caps
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INTERFACE NvAPI_D3D11_MultiGPU_Init ( __in bool  bEnable)

SUPPORTED OS: Windows Vista and higher : Request to enable/disable multi GPU extension. Also if enabled automatically disables auto stereo.

Parameters
[in]bEnableif true enables the extension for all subsequently created devices. Otherwise disables it
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall 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

Parameters
[in]pDeviceOrContextThe device or device context to set depth bounds test
[in]bEnableEnable(non-zero)/disable(zero) the depth bounds test
[in]fMinDepthThe minimum depth for depth bounds test
[in]fMaxDepthThe maximum depth for depth bounds test The valid values for fMinDepth and fMaxDepth are such that 0 <= fMinDepth <= fMaxDepth <= 1
Returns
NVAPI_OK if the depth bounds test was correcly enabled or disabled
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.

This function can be called from a different thread than the one calling immediate device setstate functions.

SUPPORTED OS: Windows Vista and higher

Parameters
[in]pDevThe device for which to set the extension slot should be a ID3D11Device+ device
[in]uavSlotthe uav slot to use
Returns
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.
Return values
NVAPI_OKsuccess, the uavSlot was set sucessfully
NVAPI_INTERFACE NvAPI_D3D12_CopyTileMappings ( __in ID3D12CommandQueue *  pCommandQueue,
__in ID3D12Resource *  pDstResource,
__in const D3D12_TILED_RESOURCE_COORDINATE *  pDstRegionStartCoordinate,
__in ID3D12Resource *  pSrcResource,
__in const D3D12_TILED_RESOURCE_COORDINATE *  pSrcRegionStartCoordinate,
__in const D3D12_TILE_REGION_SIZE *  pRegionSize,
__in D3D12_TILE_MAPPING_FLAGS  Flags 
)
Since
Release: 375

DESCRIPTION: NvAPI_D3D12_CopyTileMappings is an extension of ID3D12CommandQueue::CopyTileMappings pDstResource and pSrcResource must be created by NvAPI_D3D12_CreateReservedResource.

Parameters
[in]pCommandQueueA pointer to ID3D12CommandQueue.
[in]pDstResourceTiled resource created by NvAPI_D3D12_CreateReservedResource to copy tile mappings into.
[in]pDstRegionStartCoordinateA pointer to a D3D12_TILED_RESOURCE_COORDINATE structure that describes the starting coordinates of the destination reserved resource.
[in]pSrcResourceTiled resource created by NvAPI_D3D12_CreateReservedResource to copy tile mappings from.
[in]pSourceRegionStartCoordinateA pointer to a D3D12_TILED_RESOURCE_COORDINATE structure that describes the starting coordinates of the source reserved resource.
[in]pTileRegionSizeA pointer to a D3D12_TILE_REGION_SIZE structure that describes the size of the reserved region.
[in]FlagsOne member of D3D12_TILE_MAPPING_FLAGS. SUPPORTED OS: Windows 10
Returns
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_D3D12_CreateComputePipelineState ( __in ID3D12Device *  pDevice,
__in const D3D12_COMPUTE_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

Parameters
[in]pDeviceCurrent d3d device
[in]pPSODescPSO description of type D3D12_COMPUTE_PIPELINE_STATE_DESC
[in]numExtensionsNumber of extensions
[in]ppExtensionsArray of PSO extensions (see NV_PSO_EXTENSION for possible extensions)
[out]ppPSOOutput PSO object of type ID3D12PipelineState
Since
Release: 364

SUPPORTED OS: Windows 10

Returns
NVAPI_OK if the call succeeds.
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

Note
Note that "Cached PSO" functionality is not supported with the Pipeline State Object created using this NvAPI. GetCachedBlob() should not be called with such a PSO.
Parameters
[in]pDeviceCurrent d3d device
[in]pPSODescPSO description of type D3D12_GRAPHICS_PIPELINE_STATE_DESC
[in]numExtensionsNumber of extensions
[in]ppExtensionsArray of PSO extensions (see NV_PSO_EXTENSION for possible extensions)
[out]ppPSOOutput PSO object of type ID3D12PipelineState

SUPPORTED OS: Windows 10

Return values
NVAPI_OKif the call succeeds.
NVAPI_INTERFACE NvAPI_D3D12_CreateHeap ( __in ID3D12Device *  pDevice,
__in const D3D12_HEAP_DESC *  pDesc,
__in REFIID  riid,
__out void **  ppvHeap 
)
Since
Release: 375

DESCRIPTION: NvAPI_D3D12_CreateHeap is a safe replacement of ID3D12Device::CreateHeap with no functionality change and overhead. In NvAPI_D3D12_UpdateTileMappings, pTilePool must be created with NvAPI_D3D12_CreateHeap and otherwise NvAPI_D3D12_UpdateTileMappings will fail. In other word, any tile pool used in NvAPI_D3D12_UpdateTileMappings must be created by NvAPI_D3D12_CreateHeap.

Parameters
[in]pDeviceA pointer to D3D12 device.
[in]pDescA pointer to a D3D12_HEAP_DESC structure that describes the heap.
[in]riidThe globally unique identifier (GUID) for the resource interface.
[out]ppvHeapA pointer to a memory block that receives a pointer to the heap. Cannot be NULL.

SUPPORTED OS: Windows 10

Returns
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_D3D12_CreateReservedResource ( __in ID3D12Device *  pDevice,
__in const D3D12_RESOURCE_DESC *  pDesc,
__in D3D12_RESOURCE_STATES  InitialState,
__in const D3D12_CLEAR_VALUE *  pOptimizedClearValue,
__in REFIID  riid,
__out void **  ppvResource,
__in bool  bTexture2DArrayMipPack,
__in ID3D12Heap *  pHeap 
)
Since
Release: 375

DESCRIPTION: Tiled resource is supported for Texture2D Array, however, but only when mip packing is not triggered. So any mip level cannot be smaller than a single tile size(64KB). This set of API is an extension of D3D12 support for tiled resource to allow a tiled texture2D array with mip packing. If any of API from this set is used, using all of them is highly recommended. It includes NvAPI_D3D12_CreateReservedResource, NvAPI_D3D12_CreateHeap, NvAPI_D3D12_ReservedResourceGetDesc, NvAPI_D3D12_UpdateTileMappings, NvAPI_D3D12_CopyTileMappings, NvAPI_D3D12_ResourceAliasingBarrier. Reminder: all API in this set other than NvAPI_D3D12_CreateReservedResource won't has D3D Debug Layer information.

NvAPI_D3D12_CreateReservedResource is an extension of ID3D12Device::CreateReservedResource. Use this function to create a tiled Texture2D array with mip packing. Runtime doesn't know the created resource is actually a tiled resource. Any other D3D12 API where runtime will check whether resource is tiled or not, has a corresponding NVAPI version and they should be used. Different from DX11 implementation, we highly recommend replace all ID3D12Device::CreateReservedResource with NvAPI_D3D12_CreateReservedResource, and use bTexture2DArrayMipPack to control which creation to use. Otherwise, NvAPI_D3D12_ResourceAliasingBarrier will fail if any resource is not created by NvAPI_D3D12_CreateReservedResource. DX11 implementation doesn't have this restriction and resource created by NVAPI and D3D API can be used together. pHeap is necessary when bTexture2DArrayMipPack is true. pHeap can be any heap and this API doens't change anything to it.

Parameters
[in]pDeviceA pointer to D3D12 device.
[in]pDescA pointer to a D3D12_RESOURCE_DESC structure that describes the resource.
[in]InitialStateThe initial state of the resource, as a bitwise-OR'd combination of D3D12_RESOURCE_STATES enumeration constants.
[in]pOptimizedClearValueSpecifies a D3D12_CLEAR_VALUE that describes the default value for a clear color.
[in]riidThe globally unique identifier (GUID) for the resource interface.
[out]ppvResourceA pointer to a memory block that receives a pointer to the resource. Cannot be NULL.
[in]bTexture2DArrayMipPackWhether pDesc indicates it's a texture2D array resource with mip packing. TRUE: Use NVAPI to create. Will check pHeap to be not NULL. FALSE: Standard D3D12 API will be used, use DebugDevice to check any runtime ERROR. Won't check pHeap
[in]pHeapA pointer to ID3D12Heap. Cannot be NULL when bTexture2DArrayMipPack is true.

SUPPORTED OS: Windows 10

Returns
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_D3D12_IsNvShaderExtnOpCodeSupported ( __in ID3D12Device *  pDevice,
__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.

Since
Release: 364

SUPPORTED OS: Windows 10

Parameters
[in]pDevThe device on which to query for support
[in]opCodethe opcode to check
[out]pSupportedtrue if supported, false otherwise

RETURN STATUS: This API can return any of the error codes enumerated in NvAPI_Status.

Return values
NVAPI_OKif the call succeeded
NVAPI_INTERFACE NvAPI_D3D12_Mosaic_GetCompanionAllocations ( __inout NV_D3D12_MOSAIC_GETCOMPANIONALLOCATIONS params)

DESCRIPTION: Queries the driver for internally created allocations that accompany a swap chain buffer for present-related operations. Surfaces returned by this interface must be destroied at the same time that the original swap chain buffer is destroyed. In general this occurs prior to a ResizeBuffers call, or when the swap chain is released.

Parameters
[in,out]companionBufferCountThe parameters for this function.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D12_Mosaic_GetViewportAndGpuPartitions ( __inout NV_D3D12_MOSAIC_GETVIEWPORTANDGPUPARTITIONS params)

DESCRIPTION: Queries the driver for how a swap chain display surface is subdivided across devices in relation to display connectivity. Call this interface with NULL pPartitions in order to know how many subdivisions exist and allocate a proper size to hold all data. Call it a second time with a properly sized partitions array to receive all subdivisions along with GPU node masks of each rectangle.

Parameters
[in,out]paramsThe parameters for this function.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D12_QueryModifiedWSupport ( __in ID3D12Device *  pDevice,
__inout NV_QUERY_MODIFIED_W_SUPPORT_PARAMS pQueryModifiedWSupportedParams 
)

DESCRIPTION: Queries the support of Modified-W feature on current setup and returns appropriate boolean value.

SUPPORTED OS: Windows 10

Parameters
[in]pDeviceThe ID3D12Device Device created by application
[in,out]pQueryModifiedWSupportedParamsStores value of whether Modified-W is supported on current setup or not.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D12_QuerySinglePassStereoSupport ( __in ID3D12Device *  pDevice,
__inout NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS pQuerySinglePassStereoSupportedParams 
)

DESCRIPTION: Queries the support of Single Pass Stereo feature on current setup and returns appropriate boolean value.

SUPPORTED OS: Windows 10

Parameters
[in]pDeviceThe IDirect3DDevice12 to use.
[in,out]pQuerySinglePassStereoSupportedParamsStores value of whether Single Pass Stereo is supported on current setup or not.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D12_ReservedResourceGetDesc ( __in ID3D12Resource *  pReservedResource,
__out D3D12_RESOURCE_DESC *  pDesc 
)
Since
Release: 375

DESCRIPTION: NvAPI_D3D12_ReservedResourceGetDesc is an simple wrapper of ID3D12Resource::GetDesc when pReservedResource is created by NvAPI_D3D12_CreateReservedResource. Runtime doesn't know the created resource is actually a tiled resource if bTexture2DArrayMipPack = true in NvAPI_D3D12_CreateReservedResource. So calling ID3D12Resource::GetDesc on such resource will get a desc with D3D12_TEXTURE_LAYOUT_UNKNOWN in Layout instead of D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE. This wrapper API just set Layout to D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE if Layout is D3D12_TEXTURE_LAYOUT_UNKNOWN.

Parameters
[in]pReservedResourcePointer of reserved resource to get resource desc from.
[out]pDescPointer to a resource description. SUPPORTED OS: Windows 10
Returns
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_D3D12_ResourceAliasingBarrier ( __in ID3D12GraphicsCommandList *  pCommandList,
__in UINT  NumBarriers,
__in const D3D12_RESOURCE_BARRIER *  pBarriers 
)
Since
Release: 375

DESCRIPTION: NvAPI_D3D12_ResourceAliasingBarrier is an extension of ID3D12GraphicsCommandList::ResourceBarrier, but only for D3D12_RESOURCE_ALIASING_BARRIER. Both resource in pBarriers must be created by NvAPI_D3D12_CreateReservedTexture2DArray.

Parameters
[in]pCommandListA pointer to ID3D12GraphicsCommandList.
[in]NumBarriersThe number of submitted barrier descriptions.
[in]pBarriersPointer to an array of barrier descriptions with D3D12_RESOURCE_ALIASING_BARRIER type only. SUPPORTED OS: Windows 10
Returns
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_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

Parameters
[in]pCommandListCommand List to set depth bounds test
[in]minDepthmin value for depth bound test
[in]maxDepthmax value for depth bound test

The valid values for minDepth and maxDepth are such that 0 <= minDepth <= maxDepth <= 1

SUPPORTED OS: Windows 10

Return values
NVAPI_OKif the call succeeds.
NVAPI_INTERFACE NvAPI_D3D12_SetModifiedWMode ( __in ID3D12GraphicsCommandList *  pCommandList,
__in NV_MODIFIED_W_PARAMS pModifiedWParams 
)

DESCRIPTION: Set the Modified-W state and A, B coefficients for HW support

Note
Note that Modified-W state persists on a particular CommandList till it is closed. The state is reset to default (disabled) for every newly created CommandList. One must call NvAPI_D3D12_QueryModifiedWSupport() to confirm that the current setup supports Modified-W before calling this set-function.

SUPPORTED OS: Windows 10

Parameters
[in]pCommandListThe command list in which we will add push buffer commmands for enabling Modified-W feature Note: Command list of type D3D12_COMMAND_LIST_TYPE_BUNDLE is not allowed for setting the state of this feature.
[in]pModifiedWParamsModified-W parameters.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D12_SetSinglePassStereoMode ( __in ID3D12GraphicsCommandList *  pCommandList,
__in NvU32  numViews,
__in NvU32  renderTargetIndexOffset,
__in NvU8  independentViewportMaskEnable 
)

DESCRIPTION: Set the Single Pass Stereo state.

Note
Note that Single Pass Stereo state persists on a particular CommandList till it is closed. The state is reset to default (disabled) for every newly created CommandList. One must call NvAPI_D3D12_QuerySinglePassStereoSupport() to confirm that the current setup supports Single Pass Stereo before calling this set-function.

SUPPORTED OS: Windows 10

Parameters
[in]pCommandListThe command list in which we will add push buffer commmands for enabling Single Pass Stereo feature Note: Command list of type D3D12_COMMAND_LIST_TYPE_BUNDLE is not allowed for setting the state of this feature.
[in]numViewsNumber of views to render.
[in]RenderTargetIndexOffsetOffset between render targets of the different views.
[in]IndependentViewportMaskEnableIs the independent viewport mask enabled.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D12_UpdateTileMappings ( __in ID3D12CommandQueue *  pCommandQueue,
__in ID3D12Resource *  pResource,
__in UINT  NumResourceRegions,
__in const D3D12_TILED_RESOURCE_COORDINATE *  pResourceRegionStartCoordinates,
__in const D3D12_TILE_REGION_SIZE *  pResourceRegionSizes,
__in ID3D12Heap *  pHeap,
__in UINT  NumRanges,
__in const D3D12_TILE_RANGE_FLAGS *  pRangeFlags,
__in const UINT *  pHeapRangeStartOffsets,
__in const UINT *  pRangeTileCounts,
__in D3D12_TILE_MAPPING_FLAGS  Flags 
)
Since
Release: 375

DESCRIPTION: NvAPI_D3D12_UpdateTileMappings is an extension of ID3D12CommandQueue::UpdateTileMappings. pTiledResource must be created by NvAPI_D3D12_CreateReservedResource. pTilePool must be created by NvAPI_D3D12_CreateHeap.

Parameters
[in]pCommandQueueA pointer to ID3D12CommandQueue.
[in]pTiledResourceA pointer to the tiled resource created by NvAPI_D3D12_CreateReservedResource.
[in]NumTiledResourceRegionsThe number of tiled resource regions.
[in]pTiledResourceRegionStartCoordinatesAn array of D3D12_TILED_RESOURCE_COORDINATE structures that describe the starting coordinates of the tiled resource regions. Cannot be NULL.
[in]pTiledResourceRegionSizesAn array of D3D12_TILE_REGION_SIZE structures that describe the sizes of the tiled resource regions. Cannot be NULL.
[in]pTilePoolA pointer to the resource heap created by NvAPI_D3D12_CreateHeap.
[in]NumRangesThe number of tile-pool ranges.
[in]pRangeFlagsA pointer to an array of D3D12_TILE_RANGE_FLAGS values that describes each tile range.
[in]pTilePoolStartOffsetsAn array of offsets into the tile pool. These are 0-based tile offsets, counting in tiles (not bytes).
[in]pRangeTileCountsAn array of values that specify the number of tiles in each tile-pool range.
[in]FlagsA combination of D3D12_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation. SUPPORTED OS: Windows 10
Returns
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_D3D12_UseDriverHeapPriorities ( __in ID3D12Device *  pDevice)

SUPPORTED OS: Windows 10 NAME: NvAPI_D3D12_UseDriverHeapPriorities

DESCRIPTION: Sets the driver to override Microsoft's heap allocation priority values with Nvidia driver priority values. Use this once per process before allocating resources.

Parameters
[in]pDeviceThe IDirect3DDevice12 to use.
Returns
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.
Since
Release: 381
NVAPI_INTERFACE NvAPI_D3D1x_DisableShaderDiskCache ( IUnknown *  pDevice)

SUPPORTED OS: Windows Vista and higherDESCRIPTION: Disables driver managed caching of shader compilations to disk

Parameters
[in]pDeviceDevice to disabled the shader disk cache on
Return values
NVAPI_OKShader disk cache was disabled
NVAPI_ERRORThe operation failed.
NVAPI_INVALID_ARGUMENTArgument passed in is invalid.
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

Parameters
[in]pDevThe D3D device that owns the objects
[in]pSurfacePointer to a surface that has been registered with NvAPI to which a texture alias is to be provided
[out]ppTextureFill with the texture created
[in]dwFlagNVAPI_ALIAS_SURFACE_FLAG to describe how to handle the texture
Return values
NVAPI_OKcompleted request
NVAPI_INVALID_POINTERA null pointer was passed as an argument
NVAPI_INVALID_ARGUMENTOne of the arguments was invalid, probably dwFlag.
NVAPI_UNREGISTERED_RESOURCEpSurface has not been registered with NvAPI
NVAPI_ERRORerror 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

Parameters
[in]pDeviceThe D3D device that owns the objects.
[in]dwNumRectsThe no of rectangles to clear. If 0, clear the entire surface (clipped to viewport)
[in]pRectsDefines the rectangles to clear. Should be NULL if dwNumRects == 0
[in]rred component of the clear color
[in]ggreen component of the clear color
[in]bblue component of the clear color
[in]aalpha component of the clear color
Returns
This API can return any of the error codes enumerated in NvAPI_Status.
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.

Since
Release: 313
Parameters
[in]pSurfaceSurface to be identified
[out]pHandleWill be filled by the return handle
Returns
An int which could be an NvAPI status or DX HRESULT code
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

Parameters
[in]pResourcesurface/texture
Returns
NVAPI_OK, NVAPI_ERROR
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

Parameters
[in]pDeviceThe D3D device that owns the objects.
[in]pSourceResourcePointer to the source resource.
[in]pSrcRectDefines the rectangle on the source to copy from. If NULL, copy from the entire resource.
[in]pDestResourcePointer to the destination resource.
[in]pDstRectDefines the rectangle on the destination to copy to. If NULL, copy to the entire resource.
[in]FilterChoose a filtering method: D3DTEXF_NONE, D3DTEXF_POINT, D3DTEXF_LINEAR.
Return values
NVAPI_OKcompleted request
NVAPI_INVALID_POINTERAn invalid pointer was passed as an argument (probably NULL)
NVAPI_INVALID_ARGUMENTOne of the arguments was invalid
NVAPI_UNREGISTERED_RESOURCEa resource was passed in without being registered
NVAPI_ERRORerror occurred
NVAPI_INTERFACE NvAPI_D3D9_UnregisterResource ( IDirect3DResource9 *  pResource)

DESCRIPTION: This API unbinds a resource (surface/texture) after use.

SUPPORTED OS: Windows XP and higher

Parameters
[in]pResourcesurface/texture
Returns
NVAPI_OK, NVAPI_ERROR
NvAPI_D3D_BeginResourceRendering ( IUnknown *  pDeviceOrContext,
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

Since
Release: 185
Parameters
[in]pDevIDirect3DDevice9, ID3D10Device, ID3D11Device or ID3D11DeviceContext that is using the resource
[in]objPreviously obtained HV resource handle
[in]FlagsThe flags for functionality applied to resource while being used.
Return values
NVAPI_OKFunction succeeded, if used properly and driver can initiate proper sync'ing of the resources.
NVAPI_INVALID_ARGUMENTBad argument(s) or invalid flag values
NVAPI_INVALID_CALLMismatched begin/end calls
NVAPI_INTERFACE NvAPI_D3D_ConfigureAnsel ( __in IUnknown *  pDevice,
__in NVAPI_ANSEL_CONFIGURATION_STRUCT pNLSConfig 
)

SUPPORTED OS: Windows Vista and higher

DESCRIPTION: This function configure the setting of AnselShim, including hotkey.

  \param [in]        pDevice             current d3d device (should be either ID3D11Device or ID3D10Device)
  \param [in]        pAnselConfig        configuration of Ansel to be set, including hotkey setting
Returns
NVAPI_OK if the call succeeds.
NVAPI_INTERFACE NvAPI_D3D_CreateLateLatchObject ( __in IUnknown *  pDevice,
__inout NV_D3D_LATELATCH_OBJECT_DESC pLateLatchObjectDesc 
)

DESCRIPTION: Creates a Late Latch Object interface

SUPPORTED OS: Windows 7 and higher

Since
Release: 384
Parameters
[in]pDeviceCurrent ID3D11Device.
[in,out]pLateLatchObjectDescPointer to in/out structure for late latch object creation

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_EndResourceRendering ( IUnknown *  pDeviceOrContext,
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

Since
Release: 185
Parameters
[in]pDevIDirect3DDevice9, ID3D10Device, ID3D11Device or ID3D11DeviceContext that is using the resource
[in]objPreviously obtained HV resource handle
[in]FlagsReserved, must be zero
Return values
NVAPI_OKFunction succeeded, if used properly and driver can initiate proper sync'ing of the resources.
NVAPI_INVALID_ARGUMENTBad argument(s) or invalid flag values
NVAPI_INVALID_CALLMismatched 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

Since
Release: 173
Return values
NVAPI_OKCompleted request
NVAPI_ERRORError occurred
NVAPI_INTERFACE NvAPI_D3D_GetObjectHandleForResource ( IUnknown *  pDevice,
IUnknown *  pResource,
NVDX_ObjectHandle *  pHandle 
)

DESCRIPTION: This API gets a handle to a resource.

Parameters
[in]pDevThe ID3D11Device, ID3D10Device or IDirect3DDevice9 or ID3D11DeviceContext to use
[in]pResourceThe ID3D11Resource, ID3D10Resource or IDirect3DResource9 from which we want the NvAPI handle
[out]pHandleA handle to the resource

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Returns
NVAPI_OK if the handle was populated.
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.

Return values
NVAPI_OKCompleted request
NVAPI_ERRORError 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.

Parameters
[in]pDeviceOrContextThe D3D9, D3D10, D3D11 device, or D3D11 device context
[in]NVDX_ObjectHandleThe handle of primary surface
[out]pIsGsyncActiveif 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.

Parameters
[in]pDeviceOrContextThe D3D9, D3D10, D3D11 device, or D3D11 device context
[in]NVDX_ObjectHandleThe handle of primary surface
[out]pIsGsyncCapableif 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_QueryLateLatchSupport ( __in IUnknown *  pDevice,
__inout NV_QUERY_LATELATCH_SUPPORT_PARAMS pQueryLateLatchSupportParams 
)

DESCRIPTION: Queries the support of DX11 Late Latch feature on current setup.

SUPPORTED OS: Windows 7 and higher

Since
Release: 384
Parameters
[in]pDeviceCurrent ID3D11Device.
[in,out]pQueryLateLatchSupportParamsStores value of whether Late Latch is supported on current setup or not.

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_QueryModifiedWSupport ( __in IUnknown *  pDev,
__inout NV_QUERY_MODIFIED_W_SUPPORT_PARAMS pQueryModifiedWSupportedParams 
)

DESCRIPTION: Queries the support of Modified W feature on current setup and returns appropriate boolean value.

SUPPORTED OS: Windows 7 and higher

Parameters
[in]pDeviceThe ID3D11Device to use.
[in,out]pQueryModifiedWSupportedParamsStores value of whether Modified W is supported on current setup or not.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
NVAPI_INTERFACE NvAPI_D3D_QuerySinglePassStereoSupport ( __in IUnknown *  pDevice,
__inout NV_QUERY_SINGLE_PASS_STEREO_SUPPORT_PARAMS pQuerySinglePassStereoSupportedParams 
)

DESCRIPTION: Queries the support of Single Pass Stereo feature on current setup and returns appropriate boolean value.

SUPPORTED OS: Windows 7 and higher

Parameters
[in]pDeviceThe ID3D11Device to use.
[in,out]pSinglePassStereoSupportedParamsStores value of whether Single Pass Stereo is supported on current setup or not.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
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

Parameters
[in]pDevThe 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

Parameters
[in]boolWhether or not to enable the fps indicator.
Return values
NVAPI_OK
NVAPI_ERROR
NVAPI_INTERFACE NvAPI_D3D_SetModifiedWMode ( __in IUnknown *  pDevOrContext,
__in NV_MODIFIED_W_PARAMS psModifiedWParams 
)

DESCRIPTION: Set the Modified W state and A,B coefficients for HW support

Note
Note that this is an asynchronous function and returns NVAPI_OK if all arguments are valid. Returned value NVAPI_OK does not reflect that Modified-W is supported or is set in hardware. One must call NvAPI_D3D_QueryModifiedWSupport() to confirm that the current setup supports Modified-W before calling this set-function.

SUPPORTED OS: Windows 7 and higher

Parameters
[in]pDevOrContextThe ID3D11Device or ID3D11DeviceContext to use.
[in]psModifiedWParamsModified W parameters.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.
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. For DX11 devices this function is free-threaded. An application is responsible to complete this call before making use of the resource in a rendering context (therefore applying inter-thread synchronization as appropriate). As a debug help to an application the driver enforces that a resource in this call was never bound.

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[in]pDevThe ID3D10Device or IDirect3DDevice9 that is a using the resource
[in]objPreviously obtained HV resource handle
[in]dwHintCategoryCategory of the hints
[in]dwHintNameA hint within this category
[in/out]*pdwHintValue Pointer to location containing hint value, function returns previous hint value in this slot
Returns
an int which could be an NvAPI status or DX HRESULT code
Return values
NVAPI_OK
NVAPI_INVALID_ARGUMENT
NVAPI_INVALID_CALLIt is illegal to change a hint dynamically when the resource is already bound.
NVAPI_INTERFACE NvAPI_D3D_SetSinglePassStereoMode ( __in IUnknown *  pDevOrContext,
__in NvU32  numViews,
__in NvU32  renderTargetIndexOffset,
__in NvU8  independentViewportMaskEnable 
)

DESCRIPTION: Set the Single Pass Stereo state

Note
Note that this is an asynchronous function and returns NVAPI_OK if all arguments are valid. Returned value NVAPI_OK does not reflect that Single Pass Stereo is supported or is set in hardware. One must call NvAPI_D3D_QuerySinglePassStereoSupport() to confirm that the current setup supports Single Pass Stereo before calling this set-function.

SUPPORTED OS: Windows 7 and higher

Parameters
[in]pDevOrContextThe ID3D11Device or ID3D11DeviceContext to use.
[in]numViewsNumber of views to render.
[in]renderTargetIndexOffsetOffset between render targets of the different views.
[in]independentViewportMaskEnableIs the independent viewport mask enabled.
Return values
NVAPI_OKCall succeeded.
NVAPI_ERRORCall failed.
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid.


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

NVIDIA