Skip to content

Latest commit

 

History

History
188 lines (107 loc) · 12 KB

ns-dxgiddi-dxgi1_1_ddi_base_functions.md

File metadata and controls

188 lines (107 loc) · 12 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NS:dxgiddi.DXGI1_1_DDI_BASE_FUNCTIONS
DXGI1_1_DDI_BASE_FUNCTIONS (dxgiddi.h)
The DXGI1_1_DDI_BASE_FUNCTIONS structure contains pointers to functions that the user-mode display driver can implement to perform low-level tasks like presenting rendered frames to an output, controlling gamma, getting notifications regarding shared and GDI interoperable surfaces, and managing a full-screen transition.
display\dxgi1_1_ddi_base_functions.htm
display
05/10/2018
DXGI1_1_DDI_BASE_FUNCTIONS structure
DXGI1_1_DDI_BASE_FUNCTIONS, DXGI1_1_DDI_BASE_FUNCTIONS structure [Display Devices], UMDisplayDriver_Dx10param_Structs_92bae538-7b48-48d5-a26f-c593ff5875cf.xml, display.dxgi1_1_ddi_base_functions, dxgiddi/DXGI1_1_DDI_BASE_FUNCTIONS
dxgiddi.h
D3d10umddi.h
Windows
DXGI1_1_DDI_BASE_FUNCTIONS is supported beginning with the Windows 7 operating system.
Windows
DXGI1_1_DDI_BASE_FUNCTIONS
DXGI1_1_DDI_BASE_FUNCTIONS
dxgiddi/DXGI1_1_DDI_BASE_FUNCTIONS
APIRef
kbSyntax
HeaderDef
dxgiddi.h
DXGI1_1_DDI_BASE_FUNCTIONS

DXGI1_1_DDI_BASE_FUNCTIONS structure

-description

The DXGI1_1_DDI_BASE_FUNCTIONS structure contains pointers to functions that the user-mode display driver can implement to perform low-level tasks like presenting rendered frames to an output, controlling gamma, getting notifications regarding shared and GDI interoperable surfaces, and managing a full-screen transition.

-struct-fields

-field pfnPresent

A pointer to the driver's PresentDXGI function.

-field pfnGetGammaCaps

A pointer to the driver's GetGammaCapsDXGI function.

-field pfnSetDisplayMode

The SetDisplayModeDXGI function switches to a display mode or primary that the GDI desktop does not support.

The Microsoft Direct3D runtime calls SetDisplayModeDXGI to switch to a display mode or primary that the GDI desktop does not support. The following list describes examples of such primaries:

  • Primaries that are created with 10-bits-per-channel (10:10:10:2) display and render target formats (for example, D3DFMT_A2R10G10B10)
  • Multiple-sampled primaries where the multiple-sampling is performed while scanning-out
  • Persistent primaries that full-screen Microsoft DirectX version 10 applications use
The Direct3D runtime calls the user-mode display driver's CreateResource(D3D10) function to create the primary to be scanned out. However, the driver should program the hardware to scan out only when its SetDisplayModeDXGI function is called. Therefore, the runtime sets the hResource and SubResourceIndex members of the DXGI_DDI_ARG_SETDISPLAYMODE structure that is pointed to by the pDisplayModeData parameter to the primary that was created through the call to the driver's CreateResourceD3D10 function. The driver should then translate the primary that hResource and SubResourceIndex represent to a primary allocation handle. After the driver makes this translation, the driver should pass the resulting handle in a call to the pfnSetDisplayModeCb function, which then initiates a call to the display miniport driver's DxgkDdiCommitVidPn function.

The user-mode display driver can set the hPrimaryAllocation member of the D3DDDICB_SETDISPLAYMODE structure in the call to pfnSetDisplayModeCb to scan out any allocation. However, the allocation must be marked as a primary (that is, the user-mode display driver must have set the Primary bit-field flag in the Flags member of the D3DDDI_ALLOCATIONINFO structure in a call to the pfnAllocateCb function to create the allocation).

pDisplayModeData

A pointer to a DXGI_DDI_ARG_SETDISPLAYMODE structure that specifies parameters for setting the display mode.

-field pfnSetResourcePriority

A pointer to the driver's SetResourcePriorityDXGI function.

-field pfnQueryResourceResidency

A pointer to the driver's QueryResourceResidencyDXGI function.

-field pfnRotateResourceIdentities

A pointer to the driver's RotateResourceIdentitiesDXGI function.

-field pfnBlt

A pointer to the driver's BltDXGI function.

-field pfnResolveSharedResource

The ResolveSharedResourceDXGI function informs a user-mode display driver that the ownership of a shared surface changed or that a surface is being used for GDI interoperation.

The Direct3D runtime calls ResolveSharedResourceDXGI when an application calls one of the following functions:

  • IDXGIKeyedMutex::ReleaseSynch on a synchronized shared surface
  • IDXGISurface1::GetDC for a GDI interoperable surface
The runtime calls the driver's ResolveSharedResourceDXGI function every time a shared surface owner changes or when a surface is used for GDI interoperation.

The driver implements ResolveSharedResourceDXGI to appropriately manage resources for multiple GPU scenarios. Each resource might be divided across memory for multiple GPUs to render on. The driver can implement ResolveSharedResourceDXGI to remerge each resource so that the new resource owner has the merged resource. The driver must flush any partially built command buffers that might modify the resource.

Windows 7 provides the IS_DXGI1_1_BASE_FUNCTIONS macro (which is defined in the D3D10umddi.h header file) to allow the user-mode display driver to determine whether it receives a pointer to a DXGI1_1_DDI_BASE_FUNCTIONS or DXGI_DDI_BASE_FUNCTIONS structure in a call to its CreateDevice(D3D10) function. The DXGI1_1_DDI_BASE_FUNCTIONS structure includes the pfnResolveSharedResource member that the driver can fill with a pointer to its ResolveSharedResourceDXGI function. If IS_DXGI1_1_BASE_FUNCTIONS returns TRUE, the driver expects to receive a pointer to a DXGI1_1_DDI_BASE_FUNCTIONS structure in the pDXGIDDIBaseFunctions member of the DXGI_DDI_BASE_ARGS structure that the DXGIBaseDDI member of the D3D10DDIARG_CREATEDEVICE structure specifies. Otherwise, if IS_DXGI1_1_BASE_FUNCTIONS returns FALSE, the driver expects to receive a pointer to a DXGI_DDI_BASE_FUNCTIONS structure. Windows 7 provides the IS_DXGI1_1_BASE_FUNCTIONS macro to allow newer version drivers to work on older version runtimes. The drivers can then determine whether they will corrupt memory if they attempt to fill the pfnResolveSharedResource member of DXGI1_1_DDI_BASE_FUNCTIONS with a pointer to the ResolveSharedResourceDXGI function.

pResourceData

A pointer to a DXGI_DDI_ARG_RESOLVESHAREDRESOURCE structure that specifies parameters for the display device and the surface that is associated with the display device.

-remarks

Windows 7 provides the IS_DXGI1_1_BASE_FUNCTIONS macro (which is defined in the D3D10umddi.h header file) to allow the user-mode display driver to determine whether it receives a pointer to a DXGI1_1_DDI_BASE_FUNCTIONS or DXGI_DDI_BASE_FUNCTIONS structure in a call to its CreateDevice(D3D10) function. The DXGI1_1_DDI_BASE_FUNCTIONS structure includes the pfnResolveSharedResource member that the driver can fill with a pointer to its ResolveSharedResourceDXGI function. If IS_DXGI1_1_BASE_FUNCTIONS returns TRUE, the driver expects to receive a pointer to a DXGI1_1_DDI_BASE_FUNCTIONS structure in the pDXGIDDIBaseFunctions member of the DXGI_DDI_BASE_ARGS structure that the DXGIBaseDDI member of the D3D10DDIARG_CREATEDEVICE structure specifies. Otherwise, if IS_DXGI1_1_BASE_FUNCTIONS returns FALSE, the driver expects to receive a pointer to a DXGI_DDI_BASE_FUNCTIONS structure. Windows 7 provides the IS_DXGI1_1_BASE_FUNCTIONS macro to allow newer version drivers to work on older version runtimes. The drivers can then determine whether they will corrupt memory if they attempt to fill the pfnResolveSharedResource member of DXGI1_1_DDI_BASE_FUNCTIONS with a pointer to a ResolveSharedResourceDXGI function.

-see-also

BltDXGI

CreateDevice(D3D10)

D3D10DDIARG_CREATEDEVICE

DXGI_DDI_BASE_ARGS

DXGI_DDI_BASE_FUNCTIONS

GetGammaCapsDXGI

PresentDXGI

QueryResourceResidencyDXGI

ResolveSharedResource

ResolveSharedResourceDXGI

RotateResourceIdentitiesDXGI

SetDisplayModeDXGI

SetResourcePriorityDXGI