NVAPI Reference Documentation
NVIDIA
Release 384: June 27
2017

Mosaic APIs

Data Structures

struct  NV_MOSAIC_TOPO_DETAILS
 
struct  NV_MOSAIC_TOPO_BRIEF
 
struct  _NV_MOSAIC_DISPLAY_SETTING_V1
 
struct  NV_MOSAIC_DISPLAY_SETTING_V2
 
struct  _NV_MOSAIC_SUPPORTED_TOPO_INFO_V1
 
struct  _NV_MOSAIC_SUPPORTED_TOPO_INFO_V2
 
struct  NV_MOSAIC_TOPO_GROUP
 
struct  _NV_MOSAIC_GRID_TOPO_DISPLAY_V1
 
struct  NV_MOSAIC_DISPLAY_TOPO_STATUS
 
struct  NV_MOSAIC_TOPOLOGY
 
struct  NV_MOSAIC_SUPPORTED_TOPOLOGIES
 

Macros

#define NVAPI_MAX_MOSAIC_DISPLAY_ROWS   8
 
#define NVAPI_MAX_MOSAIC_DISPLAY_ROWS   8
 
#define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS   8
 
#define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS   8
 
#define NV_MOSAIC_TOPO_VALIDITY_VALID   0x00000000
 
#define NV_MOSAIC_TOPO_VALIDITY_MISSING_GPU   0x00000001
 
#define NV_MOSAIC_TOPO_VALIDITY_MISSING_DISPLAY   0x00000002
 
#define NV_MOSAIC_TOPO_VALIDITY_MIXED_DISPLAY_TYPES   0x00000004
 
#define NVAPI_MOSAIC_TOPO_DETAILS_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_DETAILS,1)
 
#define NVAPI_MOSAIC_TOPO_BRIEF_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_BRIEF,1)
 
#define NVAPI_MOSAIC_DISPLAY_SETTING_VER1   MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V1,1)
 
#define NVAPI_MOSAIC_DISPLAY_SETTING_VER2   MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V2,2)
 
#define NVAPI_MOSAIC_DISPLAY_SETTING_VER   NVAPI_MOSAIC_DISPLAY_SETTING_VER2
 
#define NV_MOSAIC_DISPLAY_SETTINGS_MAX   40
 
#define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER1   MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V1,1)
 
#define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2   MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V2,2)
 
#define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER   NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2
 
#define NV_MOSAIC_TOPO_IDX_DEFAULT   0
 
#define NV_MOSAIC_TOPO_IDX_LEFT_EYE   0
 
#define NV_MOSAIC_TOPO_IDX_RIGHT_EYE   1
 
#define NV_MOSAIC_TOPO_NUM_EYES   2
 
#define NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP   2
 
#define NVAPI_MOSAIC_TOPO_GROUP_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_GROUP,1)
 
#define NV_MOSAIC_SETDISPLAYTOPO_FLAG_CURRENT_GPU_TOPOLOGY   NV_BIT(0)
 
#define NV_MOSAIC_DISPLAYTOPO_WARNING_DISPLAY_POSITION   NV_BIT(0)
 
#define NV_MOSAIC_DISPLAYTOPO_WARNING_DRIVER_RELOAD_REQUIRED   NV_BIT(1)
 
#define NV_MOSAIC_DISPLAY_TOPO_STATUS_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_TOPO_STATUS,1)
 
#define NVAPI_MAX_MOSAIC_TOPOS   16
 
#define NVAPI_MOSAIC_TOPOLOGY_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPOLOGY,1)
 
#define NVAPI_MOSAIC_SUPPORTED_TOPOLOGIES_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPOLOGIES,1)
 

Typedefs

typedef struct _NV_MOSAIC_DISPLAY_SETTING_V1 NV_MOSAIC_DISPLAY_SETTING_V1
 
typedef struct NV_MOSAIC_DISPLAY_SETTING_V2 NV_MOSAIC_DISPLAY_SETTING_V2
 
typedef NV_MOSAIC_DISPLAY_SETTING_V2 NV_MOSAIC_DISPLAY_SETTING
 
typedef struct _NV_MOSAIC_SUPPORTED_TOPO_INFO_V1 NV_MOSAIC_SUPPORTED_TOPO_INFO_V1
 
typedef struct _NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 NV_MOSAIC_SUPPORTED_TOPO_INFO_V2
 
typedef NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 NV_MOSAIC_SUPPORTED_TOPO_INFO
 

Enumerations

enum  NV_MOSAIC_TOPO_TYPE {
  NV_MOSAIC_TOPO_TYPE_ALL, NV_MOSAIC_TOPO_TYPE_BASIC, NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO, NV_MOSAIC_TOPO_TYPE_SCALED_CLONE,
  NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO_SCALED_CLONE, NV_MOSAIC_TOPO_TYPE_MAX
}
 
enum  NV_MOSAIC_TOPO {
  NV_MOSAIC_TOPO_NONE, NV_MOSAIC_TOPO_BEGIN_BASIC, NV_MOSAIC_TOPO_1x2_BASIC = NV_MOSAIC_TOPO_BEGIN_BASIC, NV_MOSAIC_TOPO_2x1_BASIC,
  NV_MOSAIC_TOPO_1x3_BASIC, NV_MOSAIC_TOPO_3x1_BASIC, NV_MOSAIC_TOPO_1x4_BASIC, NV_MOSAIC_TOPO_4x1_BASIC,
  NV_MOSAIC_TOPO_2x2_BASIC, NV_MOSAIC_TOPO_2x3_BASIC, NV_MOSAIC_TOPO_2x4_BASIC, NV_MOSAIC_TOPO_3x2_BASIC,
  NV_MOSAIC_TOPO_4x2_BASIC, NV_MOSAIC_TOPO_1x5_BASIC, NV_MOSAIC_TOPO_1x6_BASIC, NV_MOSAIC_TOPO_7x1_BASIC,
  NV_MOSAIC_TOPO_END_BASIC = NV_MOSAIC_TOPO_7x1_BASIC + 9, NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO, NV_MOSAIC_TOPO_1x2_PASSIVE_STEREO = NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO, NV_MOSAIC_TOPO_2x1_PASSIVE_STEREO,
  NV_MOSAIC_TOPO_1x3_PASSIVE_STEREO, NV_MOSAIC_TOPO_3x1_PASSIVE_STEREO, NV_MOSAIC_TOPO_1x4_PASSIVE_STEREO, NV_MOSAIC_TOPO_4x1_PASSIVE_STEREO,
  NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO, NV_MOSAIC_TOPO_END_PASSIVE_STEREO = NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO + 4, NV_MOSAIC_TOPO_MAX
}
 

Functions

NVAPI_INTERFACE NvAPI_Mosaic_GetSupportedTopoInfo (NV_MOSAIC_SUPPORTED_TOPO_INFO *pSupportedTopoInfo, NV_MOSAIC_TOPO_TYPE type)
 
NVAPI_INTERFACE NvAPI_Mosaic_GetTopoGroup (NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_TOPO_GROUP *pTopoGroup)
 
NVAPI_INTERFACE NvAPI_Mosaic_GetOverlapLimits (NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pMinOverlapX, NvS32 *pMaxOverlapX, NvS32 *pMinOverlapY, NvS32 *pMaxOverlapY)
 
NVAPI_INTERFACE NvAPI_Mosaic_SetCurrentTopo (NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 overlapX, NvS32 overlapY, NvU32 enable)
 
NVAPI_INTERFACE NvAPI_Mosaic_GetCurrentTopo (NV_MOSAIC_TOPO_BRIEF *pTopoBrief, NV_MOSAIC_DISPLAY_SETTING *pDisplaySetting, NvS32 *pOverlapX, NvS32 *pOverlapY)
 
NVAPI_INTERFACE NvAPI_Mosaic_EnableCurrentTopo (NvU32 enable)
 
NVAPI_INTERFACE NvAPI_Mosaic_ValidateDisplayGrids (__in NvU32 setTopoFlags, __in_ecount(gridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __inout_ecount_full(gridCount) NV_MOSAIC_DISPLAY_TOPO_STATUS *pTopoStatus, __in NvU32 gridCount)
 
NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayGrids (__inout_ecount_part_opt(*pGridCount,*pGridCount) NV_MOSAIC_GRID_TOPO *pGridTopologies, __inout NvU32 *pGridCount)
 
NVAPI_INTERFACE NvAPI_GetSupportedMosaicTopologies (NV_MOSAIC_SUPPORTED_TOPOLOGIES *pMosaicTopos)
 
NVAPI_INTERFACE NvAPI_GetCurrentMosaicTopology (NV_MOSAIC_TOPOLOGY *pMosaicTopo, NvU32 *pEnabled)
 
NVAPI_INTERFACE NvAPI_SetCurrentMosaicTopology (NV_MOSAIC_TOPOLOGY *pMosaicTopo)
 
NVAPI_INTERFACE NvAPI_EnableCurrentMosaicTopology (NvU32 enable)
 
NVAPI_INTERFACE NvAPI_Mosaic_GetDisplayViewportsByResolution (NvU32 displayId, NvU32 srcWidth, NvU32 srcHeight, NV_RECT viewports[NV_MOSAIC_MAX_DISPLAYS], NvU8 *bezelCorrected)
 
typedef struct _NV_MOSAIC_GRID_TOPO_DISPLAY_V1 NV_MOSAIC_GRID_TOPO_DISPLAY_V1
 

Detailed Description

MOSAIC mode allows multi-display target scan out from a single source.

The following is an example of a MOSAIC 1x4 topology with 8-pixel horizontal overlap:

//!+----------------------++----------------------++----------------------++----------------------+ 
//!|                    ->||<- 8 pixels           ||                      ||                      | 
//!|                      ||                      ||                      ||                      | 
//!|                      ||                      ||                      ||                      |
//!|       DVI1           ||          DVI2        ||         DVI3         ||        DVI4          | 
//!|                      ||                      ||                      ||                      | 
//!|                      ||                      ||                      ||                      |
//!|                      ||                      ||                      ||                      |
//!|                      ||                      ||                      ||                      | 
//!+----------------------++----------------------++----------------------++----------------------+
//! 

Macro Definition Documentation

#define NV_MOSAIC_DISPLAY_SETTINGS_MAX   40

Set a reasonable maximum number of display settings to support

#define NV_MOSAIC_DISPLAY_TOPO_STATUS_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_TOPO_STATUS,1)
#define NV_MOSAIC_DISPLAYTOPO_WARNING_DISPLAY_POSITION   NV_BIT(0)

Indicates that a display's position in the grid is sub-optimal.

#define NV_MOSAIC_DISPLAYTOPO_WARNING_DRIVER_RELOAD_REQUIRED   NV_BIT(1)

Indicates that SetDisplaySettings would need to perform a driver reload.

#define NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP   2

This defines the maximum number of topos that can be in a topo group. At this time, it is set to 2 because our largest topo group (passive stereo) only needs 2 topos (left eye and right eye).

If a new topo group with more than 2 topos is added above, then this number will also have to be incremented.

#define NV_MOSAIC_SETDISPLAYTOPO_FLAG_CURRENT_GPU_TOPOLOGY   NV_BIT(0)

DESCRIPTION: Sets a new display topology, replacing any existing topologies that use the same displays.

This function will look for an SLI configuration that will allow the display topology to work.

To revert to a single display, specify that display as a 1x1 grid.

SUPPORTED OS: Windows 7 and higher

Parameters
[in]pGridTopologiesThe topology details to set.
[in]gridCountThe number of elements in the pGridTopologies array.
[in]setTopoFlagsZero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_* flags.
Return values
NVAPI_OKCapabilities have been returned.
NVAPI_INVALID_ARGUMENTOne or more args passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available
NVAPI_NO_ACTIVE_SLI_TOPOLOGYNo matching GPU topologies could be found.
NVAPI_TOPO_NOT_POSSIBLEOne or more of the display grids are not valid.
NVAPI_ERRORMiscellaneous error occurredDo not change the current GPU topology. If the NO_DRIVER_RELOAD bit is not specified, then it may still require a driver reload.
#define NV_MOSAIC_TOPO_IDX_DEFAULT   0
#define NV_MOSAIC_TOPO_IDX_LEFT_EYE   0
#define NV_MOSAIC_TOPO_IDX_RIGHT_EYE   1
#define NV_MOSAIC_TOPO_NUM_EYES   2
#define NV_MOSAIC_TOPO_VALIDITY_MISSING_DISPLAY   0x00000002

topology. hPhysicalGPU will be 0 for these.

Not enough displays were found to fill the entire

#define NV_MOSAIC_TOPO_VALIDITY_MISSING_GPU   0x00000001

Not enough SLI GPUs were found to fill the entire

#define NV_MOSAIC_TOPO_VALIDITY_MIXED_DISPLAY_TYPES   0x00000004

topology. displayOutputId will be 0 for these.

The topoogy is only possible with displays of the same

#define NV_MOSAIC_TOPO_VALIDITY_VALID   0x00000000

The topology is valid.

#define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS   8
#define NVAPI_MAX_MOSAIC_DISPLAY_COLUMNS   8
#define NVAPI_MAX_MOSAIC_DISPLAY_ROWS   8
#define NVAPI_MAX_MOSAIC_DISPLAY_ROWS   8
#define NVAPI_MAX_MOSAIC_TOPOS   16
#define NVAPI_MOSAIC_DISPLAY_SETTING_VER   NVAPI_MOSAIC_DISPLAY_SETTING_VER2
#define NVAPI_MOSAIC_DISPLAY_SETTING_VER1   MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V1,1)

Macro for constructing the version field of NV_MOSAIC_DISPLAY_SETTING.

#define NVAPI_MOSAIC_DISPLAY_SETTING_VER2   MAKE_NVAPI_VERSION(NV_MOSAIC_DISPLAY_SETTING_V2,2)
#define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER   NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2
#define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER1   MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V1,1)

Macro forconstructing the version field of NV_MOSAIC_SUPPORTED_TOPO_INFO.

#define NVAPI_MOSAIC_SUPPORTED_TOPO_INFO_VER2   MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPO_INFO_V2,2)
#define NVAPI_MOSAIC_SUPPORTED_TOPOLOGIES_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_SUPPORTED_TOPOLOGIES,1)
#define NVAPI_MOSAIC_TOPO_BRIEF_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_BRIEF,1)

Macro for constructing the version field of NV_MOSAIC_TOPO_BRIEF.

#define NVAPI_MOSAIC_TOPO_DETAILS_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_DETAILS,1)

Macro for constructing te vesion field of NV_MOSAIC_TOPO_DETAILS.

#define NVAPI_MOSAIC_TOPO_GROUP_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPO_GROUP,1)

Macro for constructing the version field of NV_MOSAIC_TOPO_GROUP.

#define NVAPI_MOSAIC_TOPOLOGY_VER   MAKE_NVAPI_VERSION(NV_MOSAIC_TOPOLOGY,1)

Typedef Documentation

Basic per-display settings that are used in setting/getting the Mosaic mode.

Macro for constructing the version field of NV_MOSAIC_GRID_TOPO.

so arrays are bound.

This structure is used to contain a list of supported Mosaic topologies along with the display settings that can be used.

Enumeration Type Documentation

This is a complete list of supported Mosaic topologies.

Using a "Basic" topology combines multiple monitors to create a single desktop.

Using a "Passive" topology combines multiples monitors to create a passive stereo desktop. In passive stereo, two identical topologies combine - one topology is used for the right eye and the other identical //! topology (targeting different displays) is used for the left eye.
NOTE: common\inc\nvEscDef.h shadows a couple PASSIVE_STEREO enums. If this enum list changes and effects the value of NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO please update the corresponding value in nvEscDef.h

Enumerator
NV_MOSAIC_TOPO_NONE 
NV_MOSAIC_TOPO_BEGIN_BASIC 
NV_MOSAIC_TOPO_1x2_BASIC 
NV_MOSAIC_TOPO_2x1_BASIC 
NV_MOSAIC_TOPO_1x3_BASIC 
NV_MOSAIC_TOPO_3x1_BASIC 
NV_MOSAIC_TOPO_1x4_BASIC 
NV_MOSAIC_TOPO_4x1_BASIC 
NV_MOSAIC_TOPO_2x2_BASIC 
NV_MOSAIC_TOPO_2x3_BASIC 
NV_MOSAIC_TOPO_2x4_BASIC 
NV_MOSAIC_TOPO_3x2_BASIC 
NV_MOSAIC_TOPO_4x2_BASIC 
NV_MOSAIC_TOPO_1x5_BASIC 
NV_MOSAIC_TOPO_1x6_BASIC 
NV_MOSAIC_TOPO_7x1_BASIC 
NV_MOSAIC_TOPO_END_BASIC 
NV_MOSAIC_TOPO_BEGIN_PASSIVE_STEREO 
NV_MOSAIC_TOPO_1x2_PASSIVE_STEREO 
NV_MOSAIC_TOPO_2x1_PASSIVE_STEREO 
NV_MOSAIC_TOPO_1x3_PASSIVE_STEREO 
NV_MOSAIC_TOPO_3x1_PASSIVE_STEREO 
NV_MOSAIC_TOPO_1x4_PASSIVE_STEREO 
NV_MOSAIC_TOPO_4x1_PASSIVE_STEREO 
NV_MOSAIC_TOPO_2x2_PASSIVE_STEREO 
NV_MOSAIC_TOPO_END_PASSIVE_STEREO 
NV_MOSAIC_TOPO_MAX 

Total number of topologies.

These values refer to the different types of Mosaic topologies that are possible. When getting the supported Mosaic topologies, you can specify one of these types to narrow down the returned list to only those that match the given type.

Enumerator
NV_MOSAIC_TOPO_TYPE_ALL 

All mosaic topologies.

NV_MOSAIC_TOPO_TYPE_BASIC 

Basic Mosaic topologies.

NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO 

Passive Stereo topologies.

NV_MOSAIC_TOPO_TYPE_SCALED_CLONE 

Not supported at this time.

NV_MOSAIC_TOPO_TYPE_PASSIVE_STEREO_SCALED_CLONE 

Not supported at this time.

NV_MOSAIC_TOPO_TYPE_MAX 

Always leave this at end of the enum.

Function Documentation

NVAPI_INTERFACE NvAPI_EnableCurrentMosaicTopology ( NvU32  enable)

DESCRIPTION: This API enables or disables the current Mosaic topology. When enabling, the last Mosaic topology will be set.

  • If enabled, enumeration of display settings will include valid Mosaic resolutions.
  • If disabled, enumeration of display settings will not include Mosaic resolutions.

SUPPORTED OS: Windows XP

Since
Release: 177
Parameters
[in]enableTRUE to enable the Mosaic Topology, FALSE to disable it.
Return values
NVAPI_OKCall succeeded
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA GPU driving a display was found
NVAPI_NOT_SUPPORTEDMosaic is not supported with GPUs on this system.
NVAPI_NO_ACTIVE_SLI_TOPOLOGYSLI is not enabled, yet needs to be, in order for this function to succeed.
NVAPI_INTERFACE NvAPI_GetCurrentMosaicTopology ( NV_MOSAIC_TOPOLOGY pMosaicTopo,
NvU32 pEnabled 
)

DESCRIPTION: This API gets the current Mosaic topology.

SUPPORTED OS: Windows XP

Since
Release: 177
Parameters
[out]pMosaicTopoThe current Mosaic topology
[out]pEnabledTRUE if returned topology is currently enabled, else FALSE
Return values
NVAPI_OKCall succeeded
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA GPU driving a display was found
NVAPI_NOT_SUPPORTEDMosaic is not supported with GPUs on this system.
NVAPI_NO_ACTIVE_SLI_TOPOLOGYSLI is not enabled, yet needs to be, in order for this function to succeed.
NVAPI_INTERFACE NvAPI_GetSupportedMosaicTopologies ( NV_MOSAIC_SUPPORTED_TOPOLOGIES pMosaicTopos)

DESCRIPTION: This API returns all valid Mosaic topologies.

SUPPORTED OS: Windows XP

Since
Release: 177
Parameters
[out]pMosaicToposAn array of valid Mosaic topologies.
Return values
NVAPI_OKCall succeeded; 1 or more topologies were returned
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid
NVAPI_MIXED_TARGET_TYPESMosaic topology is only possible with all targets of the same NV_GPU_OUTPUT_TYPE.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA GPU driving a display was found
NVAPI_NOT_SUPPORTEDMosaic is not supported with GPUs on this system.
NVAPI_NO_ACTIVE_SLI_TOPOLOGYSLI is not enabled, yet needs to be, in order for this function to succeed.
NVAPI_INTERFACE NvAPI_Mosaic_EnableCurrentTopo ( NvU32  enable)

DESCRIPTION: This API enables or disables the current Mosaic topology based on the setting of the incoming 'enable' parameter.

An "enable" setting enables the current (previously set) Mosaic topology. Note that when the current Mosaic topology is retrieved, it must have an isPossible value of 1 or an error will occur.

A "disable" setting disables the current Mosaic topology. The topology information will persist, even across reboots. To re-enable the Mosaic topology, call this function again with the enable parameter set to 1.

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[in]enable1 to enable the current Mosaic topo, 0 to disable it.
Return values
NVAPI_OKThe Mosaic topo was enabled/disabled.
NVAPI_NOT_SUPPORTEDMosaic is not supported with the existing hardware.
NVAPI_INVALID_ARGUMENTOne or more arguments passed in are invalid.
NVAPI_TOPO_NOT_POSSIBLEThe current topology is not currently possible.
NVAPI_MODE_CHANGE_FAILEDThere was an error changing the display mode.
NVAPI_ERRORMiscellaneous error occurred.
NVAPI_INTERFACE NvAPI_Mosaic_EnumDisplayGrids ( __inout_ecount_part_opt *,*pGridCount NV_MOSAIC_GRID_TOPO pGridTopologies,
__inout NvU32 pGridCount 
)

SUPPORTED OS: Windows 7 and higherDESCRIPTION: Enumerates the current active grid topologies. This includes Mosaic, IG, and Panoramic topologies, as well as single displays.

If pGridTopologies is NULL, then pGridCount will be set to the number of active grid topologies.

If pGridTopologies is not NULL, then pGridCount contains the maximum number of grid topologies to return. On return, pGridCount will be set to the number of grid topologies that were returned.

Parameters
[out]pGridTopologiesThe list of active grid topologies.
[in,out]pGridCountA pointer to the number of grid topologies returned.
Return values
NVAPI_OKCapabilties have been returned.
NVAPI_END_ENUMERATIONThere are no more topologies to return.
NVAPI_INVALID_ARGUMENTOne or more args passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available
NVAPI_ERRORMiscellaneous error occurred
NVAPI_INTERFACE NvAPI_Mosaic_GetCurrentTopo ( NV_MOSAIC_TOPO_BRIEF pTopoBrief,
NV_MOSAIC_DISPLAY_SETTING pDisplaySetting,
NvS32 pOverlapX,
NvS32 pOverlapY 
)

DESCRIPTION: This API returns information for the current Mosaic topology. This includes topology, display settings, and overlap values.

You can call NvAPI_Mosaic_GetTopoGroup() with the topology if you require more information.

If there isn't a current topology, then pTopoBrief->topo will be NV_MOSAIC_TOPO_NONE.

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[out]pTopoBriefThe current Mosaic topology
[out]pDisplaySettingThe current per-display settings
[out]pOverlapXThe pixel overlap between horizontal displays
[out]pOverlapYThe pixel overlap between vertical displays
Return values
NVAPI_OKSuccess getting current info.
NVAPI_NOT_SUPPORTEDMosaic is not supported with the existing hardware.
NVAPI_INVALID_ARGUMENTOne or more argumentss passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first.
NVAPI_NO_IMPLEMENTATIONThis entry point not available.
NVAPI_ERRORMiscellaneous error occurred.
NVAPI_INTERFACE NvAPI_Mosaic_GetDisplayViewportsByResolution ( NvU32  displayId,
NvU32  srcWidth,
NvU32  srcHeight,
NV_RECT  viewports[NV_MOSAIC_MAX_DISPLAYS],
NvU8 bezelCorrected 
)

SUPPORTED OS: Windows Vista and higherDESCRIPTION: This API returns the viewports that would be applied on the requested display.

Parameters
[in]displayIdDisplay ID of a single display in the active mosaic topology to query.
[in]srcWidthWidth of full display topology. If both width and height are 0, the current resolution is used.
[in]srcHeightHeight of full display topology. If both width and height are 0, the current resolution is used.
[out]viewportsArray of NV_RECT viewports which represent the displays as identified in NvAPI_Mosaic_EnumGridTopologies. If the requested resolution is a single-wide resolution, only viewports[0] will contain the viewport details, regardless of which display is driving the display.
[out]bezelCorrectedReturns 1 if the requested resolution is bezel corrected. May be NULL.
Return values
NVAPI_OKCapabilties have been returned.
NVAPI_INVALID_ARGUMENTOne or more args passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first
NVAPI_MOSAIC_NOT_ACTIVEThe display does not belong to an active Mosaic Topology
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available
NVAPI_ERRORMiscellaneous error occurred
NVAPI_INTERFACE NvAPI_Mosaic_GetOverlapLimits ( NV_MOSAIC_TOPO_BRIEF pTopoBrief,
NV_MOSAIC_DISPLAY_SETTING pDisplaySetting,
NvS32 pMinOverlapX,
NvS32 pMaxOverlapX,
NvS32 pMinOverlapY,
NvS32 pMaxOverlapY 
)

DESCRIPTION: This API returns the X and Y overlap limits required if the given Mosaic topology and display settings are to be used.

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[in]pTopoBriefThe topology for getting limits This must be one of the topo briefs returned from NvAPI_Mosaic_GetSupportedTopoInfo().
[in]pDisplaySettingThe display settings for getting the limits. This must be one of the settings returned from NvAPI_Mosaic_GetSupportedTopoInfo().
[out]pMinOverlapXX overlap minimum
[out]pMaxOverlapXX overlap maximum
[out]pMinOverlapYY overlap minimum
[out]pMaxOverlapYY overlap maximum
Return values
NVAPI_OKDetails were retrieved successfully.
NVAPI_NOT_SUPPORTEDMosaic is not supported with the existing hardware.
NVAPI_INVALID_ARGUMENTOne or more argumentss passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first.
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available.
NVAPI_INCOMPATIBLE_STRUCT_VERSIONThe version of the structure passed in is not compatible with this entry point.
NVAPI_ERRORMiscellaneous error occurred.
NVAPI_INTERFACE NvAPI_Mosaic_GetSupportedTopoInfo ( NV_MOSAIC_SUPPORTED_TOPO_INFO pSupportedTopoInfo,
NV_MOSAIC_TOPO_TYPE  type 
)

DESCRIPTION: This API returns information on the topologies and display resolutions supported by Mosaic mode.

NOTE: Not all topologies returned can be set immediately. See 'OUT' Notes below.

Once you get the list of supported topologies, you can call NvAPI_Mosaic_GetTopoGroup() with one of the Mosaic topologies if you need more information about it.

'IN' Notes: pSupportedTopoInfo->version must be set before calling this function. If the specified version is not supported by this implementation, an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION).

'OUT' Notes: Some of the topologies returned might not be valid for one reason or another. It could be due to mismatched or missing displays. It could also be because the required number of GPUs is not found. At a high level, you can see if the topology is valid and can be enabled by looking at the pSupportedTopoInfo->topoBriefs[xxx].isPossible flag. If this is true, the topology can be enabled. If it is false, you can find out why it cannot be enabled by getting the details of the topology via NvAPI_Mosaic_GetTopoGroup(). From there, look at the validityMask of the individual topologies. The bits can be tested against the NV_MOSAIC_TOPO_VALIDITY_* bits.

It is possible for this function to return NVAPI_OK with no topologies listed in the return structure. If this is the case, it means that the current hardware DOES support Mosaic, but with the given configuration no valid topologies were found. This most likely means that SLI was not enabled for the hardware. Once enabled, you should see valid topologies returned from this function.

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[in,out]pSupportedTopoInfoInformation about what topologies and display resolutions are supported for Mosaic.
[in]typeThe type of topologies the caller is interested in getting. See NV_MOSAIC_TOPO_TYPE for possible values.
Return values
NVAPI_OKNo errors in returning supported topologies.
NVAPI_NOT_SUPPORTEDMosaic is not supported with the existing hardware.
NVAPI_INVALID_ARGUMENTOne or more arguments passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first.
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available.
NVAPI_INCOMPATIBLE_STRUCT_VERSIONThe version of the structure passed in is not
NVAPI_ERRORMiscellaneous error occurred.
NVAPI_INTERFACE NvAPI_Mosaic_GetTopoGroup ( NV_MOSAIC_TOPO_BRIEF pTopoBrief,
NV_MOSAIC_TOPO_GROUP pTopoGroup 
)

DESCRIPTION: This API returns a structure filled with the details of the specified Mosaic topology.

If the pTopoBrief passed in matches the current topology, then information in the brief and group structures will reflect what is current. Thus the brief would have the current 'enable' status, and the group would have the current overlap values. If there is no match, then the returned brief has an 'enable' status of FALSE (since it is obviously not enabled), and the overlap values will be 0.

'IN' Notes: pTopoGroup->version must be set before calling this function. If the specified version is not supported by this implementation, an error will be returned (NVAPI_INCOMPATIBLE_STRUCT_VERSION).

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[in]pTopoBriefThe topology for getting the details This must be one of the topology briefs returned from NvAPI_Mosaic_GetSupportedTopoInfo().
[in,out]pTopoGroupThe topology details matching the brief
Return values
NVAPI_OKDetails were retrieved successfully.
NVAPI_NOT_SUPPORTEDMosaic is not supported with the existing hardware.
NVAPI_INVALID_ARGUMENTOne or more argumentss passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first.
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available.
NVAPI_INCOMPATIBLE_STRUCT_VERSIONThe version of the structure passed in is not
NVAPI_ERRORMiscellaneous error occurred.
NVAPI_INTERFACE NvAPI_Mosaic_SetCurrentTopo ( NV_MOSAIC_TOPO_BRIEF pTopoBrief,
NV_MOSAIC_DISPLAY_SETTING pDisplaySetting,
NvS32  overlapX,
NvS32  overlapY,
NvU32  enable 
)

DESCRIPTION: This API sets the Mosaic topology and performs a mode switch using the given display settings.

If NVAPI_OK is returned, the current Mosaic topology was set correctly. Any other status returned means the topology was not set, and remains what it was before this function was called.

SUPPORTED OS: Windows XP and higher

Since
Release: 185
Parameters
[in]pTopoBriefThe topology to set. This must be one of the topologies returned from NvAPI_Mosaic_GetSupportedTopoInfo(), and it must have an isPossible value of 1.
[in]pDisplaySettingThe per display settings to be used in the Mosaic mode. This must be one of the settings returned from NvAPI_Mosaic_GetSupportedTopoInfo().
[in]overlapXThe pixel overlap to use between horizontal displays (use positive a number for overlap, or a negative number to create a gap.) If the overlap is out of bounds for what is possible given the topo and display setting, the overlap will be clamped.
[in]overlapYThe pixel overlap to use between vertical displays (use positive a number for overlap, or a negative number to create a gap.) If the overlap is out of bounds for what is possible given the topo and display setting, the overlap will be clamped.
[in]enableIf 1, the topology being set will also be enabled, meaning that the mode set will occur.
If 0, you don't want to be in Mosaic mode right now, but want to set the current Mosaic topology so you can enable it later with NvAPI_Mosaic_EnableCurrentTopo().
Return values
NVAPI_OKThe Mosaic topology was set.
NVAPI_NOT_SUPPORTEDMosaic is not supported with the existing hardware.
NVAPI_INVALID_ARGUMENTOne or more argumentss passed in are invalid.
NVAPI_TOPO_NOT_POSSIBLEThe topology passed in is not currently possible.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first.
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available.
NVAPI_INCOMPATIBLE_STRUCT_VERSIONThe version of the structure passed in is not compatible with this entrypoint.
NVAPI_MODE_CHANGE_FAILEDThere was an error changing the display mode.
NVAPI_ERRORMiscellaneous error occurred.
NVAPI_INTERFACE NvAPI_Mosaic_ValidateDisplayGrids ( __in NvU32  setTopoFlags,
__in_ecount(gridCount) NV_MOSAIC_GRID_TOPO pGridTopologies,
__inout_ecount_full(gridCount) NV_MOSAIC_DISPLAY_TOPO_STATUS pTopoStatus,
__in NvU32  gridCount 
)

DESCRIPTION: Determines if a list of grid topologies is valid. It will choose an SLI configuration in the same way that NvAPI_Mosaic_SetDisplayGrids() does.

On return, each element in the pTopoStatus array will contain any errors or warnings about each grid topology. If any error flags are set, then the topology is not valid. If any warning flags are set, then the topology is valid, but sub-optimal.

If the ALLOW_INVALID flag is set, then it will continue to validate the grids even if no SLI configuration will allow all of the grids. In this case, a grid grid with no matching GPU topology will have the error flags NO_GPU_TOPOLOGY or NOT_SUPPORTED set.

If the ALLOW_INVALID flag is not set and no matching SLI configuration is found, then it will skip the rest of the validation and return NVAPI_NO_ACTIVE_SLI_TOPOLOGY.

SUPPORTED OS: Windows 7 and higher

Parameters
[in]setTopoFlagsZero or more of the NVAPI_MOSAIC_SETDISPLAYTOPO_FLAG_* flags.
[in]pGridTopologiesThe array of grid topologies to verify.
[in,out]pTopoStatusThe array of problems and warnings with each grid topology.
[in]gridCountThe number of elements in the pGridTopologies and pTopoStatus arrays.
Return values
NVAPI_OKCapabilities have been returned.
NVAPI_INVALID_ARGUMENTOne or more args passed in are invalid.
NVAPI_API_NOT_INTIALIZEDThe NvAPI API needs to be initialized first
NVAPI_NO_IMPLEMENTATIONThis entrypoint not available
NVAPI_NO_ACTIVE_SLI_TOPOLOGYNo matching GPU topologies could be found.
NVAPI_ERRORMiscellaneous error occurred
NVAPI_INTERFACE NvAPI_SetCurrentMosaicTopology ( NV_MOSAIC_TOPOLOGY pMosaicTopo)

DESCRIPTION: This API sets the Mosaic topology, and enables it so that the Mosaic display settings are enumerated upon request.

SUPPORTED OS: Windows XP

Since
Release: 177
Parameters
[in]pMosaicTopoA valid Mosaic topology
Return values
NVAPI_OKCall succeeded
NVAPI_INVALID_ARGUMENTOne or more arguments are invalid
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA GPU driving a display was found
NVAPI_NOT_SUPPORTEDMosaic is not supported with GPUs on this system.
NVAPI_NO_ACTIVE_SLI_TOPOLOGYSLI is not enabled, yet needs to be, in order for this function to succeed.


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

NVIDIA