DXGKDDI_CREATEDEVICE callback function

DXGKDDI_CREATEDEVICE callback function

 

该DDI创建了gfx context device, 该对象会在之后调用KMD方法时使用。

Syntax

DXGKDDI_CREATEDEVICE DxgkddiCreatedevice;

NTSTATUS DxgkddiCreatedevice(
  IN_CONST_HANDLE hAdapter,
  INOUT_PDXGKARG_CREATEDEVICE pCreateDevice
)
{...}

Parameters

hAdapter

[in] 该参数为关联着一个显卡context的句柄。KMD之前在DXGK调用 DxgkDdiAddDevice时通过MiniportDeviceContext参数提供。

pCreateDevice

[in/out] 指向 DXGKARG_CREATEDEVICE 的指针, 该结构描述了gfx context device。

Return Value

DxgkDdiCreateDevice returns one of the following values:

Return codeDescription
STATUS_SUCCESSDxgkDdiCreateDevice successfully created the graphics context device.
STATUS_NO_MEMORYDxgkDdiCreateDevice could not allocate memory that was required for it to complete.

Remarks

DXGK调用KMD的DxgkDdiCreateDevice创建gfx context device。KMD使用这个context device维护了一系列渲染状态。DXGK能够在一个进程内针对一个GPU创建多个gfx context device.

Note  gfx context deivce的数量之受限于可用系统内存的数量,因此KMD不能通过硬编码限制能够创建的gfx context device的数量上限。

通常gfx context device互相独立,换句话说,在一个context device中创建的一个资源不能被其他context device引用或访问。但是夸进程资源例外。

DxgkDdiCreateDevice should be made pageable.

Requirements

  
Minimum supported clientAvailable in Windows Vista and later versions of the Windows operating systems.
Target PlatformDesktop
Headerd3dkmddi.h
IRQLPASSIVE_LEVEL
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值