DXGKDDI_CREATECONTEXT callback function
该DDI创建了GPU的context。
Syntax
DXGKDDI_CREATECONTEXT DxgkddiCreatecontext;
NTSTATUS DxgkddiCreatecontext(
IN_CONST_HANDLE hDevice,
INOUT_PDXGKARG_CREATECONTEXT pCreateContext
)
{...}
Parameters
hDevice
[in] 创建的新的context所在graphics context device句柄。由之前调用的KMD的DxgkDdiCreateDevice提供该句柄给DXGK,通过参数DXGKARG_CREATEDEVICE成员hDevice 传递。
pCreateContext
[in/out] 指向DXGKARG_CREATECONTEXT的指针,其包含了创建的context的信息。
Return Value
DxgkDdiCreateContext returns one of the following values:
Return code | Description |
---|---|
STATUS_SUCCESS | DxgkDdiCreateContext successfully created the context. |
STATUS_NO_MEMORY | DxgkDdiCreateContext could not allocate memory that was required for it to complete. |
STATUS_GRAPHICS_DRIVER_MISMATCH | The display miniport driver is not compatible with the user-mode display driver that initiated the call to DxgkDdiCreateContext. |
Remarks
驱动使用GPU context来保存渲染的一系列状态。
单个进程能够在一个deivce上创建多个context。
驱动必须支持任意数量的context,只有在system memory 被耗尽的情况下才不能成功的创建context。
通常,每个context能够引用拥有整个context的device创建的任何资源。
DxgkDdiCreateContext should be made pageable.
Requirements
Minimum supported client | Available in Windows Vista and later versions of the Windows operating systems. |
Target Platform | Desktop |
Header | d3dkmddi.h |
IRQL | PASSIVE_LEVEL |