DXGKDDI_VIDPNSOURCEMODESET_ADDMODE callback function (d3dkmddi.h)
The pfnAddMode function adds a VidPN source mode to a specified VidPN source mode set object.
Syntax
DXGKDDI_VIDPNSOURCEMODESET_ADDMODE DxgkddiVidpnsourcemodesetAddmode;
NTSTATUS DxgkddiVidpnsourcemodesetAddmode(
[in] IN_D3DKMDT_HVIDPNSOURCEMODESET hVidPnSourceModeSet,
[in] IN_PD3DKMDT_VIDPN_SOURCE_MODE_CONST pVidPnSourceModeInfo
)
{...}
Parameters
[in] hVidPnSourceModeSet
A handle to a VidPN source mode set object. The display miniport driver previously obtained this handle by calling the pfnAcquireSourceModeSet function of the DXGK_VIDPN_INTERFACE interface.
[in] pVidPnSourceModeInfo
A pointer to a D3DKMDT_VIDPN_SOURCE_MODE structure that describes the source mode. The display miniport driver previously obtained this structure by calling pfnCreateNewModeInfo.
Return value
The pfnAddMode function returns one of the following values:
Return code | Description |
---|---|
STATUS_SUCCESS | The function succeeded. |
STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET | The handle supplied in hVidPnSourceModeSet was invalid. |
Remarks
To add a mode to a source mode set, the display miniport driver performs the following steps.
Call pfnCreateNewModeInfo to obtain a pointer to a D3DKMDT_VIDPN_SOURCE_MODE structure. The pnfCreateNewModeInfo function allocates the structure, fills in the Id member with a newly generated source mode identifier, and sets the Type member to D3DKMDT_RMT_UNINITIALIZED.
Populate the D3DKMDT_VIDPN_SOURCE_MODE structure (except for the Id member) with information about the mode, including the mode's type and format.
Call pfnAddMode to add the mode to a source mode set.
The VidPN manager allocates a D3DKMDT_VIDPN_SOURCE_MODE structure when you call pfnCreateNewModeInfo. If you add the mode described by that structure to a source mode set, you do not need to explicitly release the structure; pfnAddMode releases it.
If you obtain a D3DKMDT_VIDPN_SOURCE_MODE structure by calling pfnCreateNewModeInfo and then decide not to add that mode to a source mode set, you must explicitly release the structure by calling pfnReleaseModeInfo.
The D3DKMDT_HVIDPNSOURCEMODESET data type is defined in D3dkmdt.h.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Target Platform | Desktop |
Header | d3dkmddi.h (include D3dkmddi.h) |
IRQL | PASSIVE_LEVEL |