DXGKDDI_SUBMITCOMMAND callback function
DxgkDdiSubmitCommand 提交一个DMA buffer到硬件command execution单元。
Syntax
DXGKDDI_SUBMITCOMMAND DxgkddiSubmitcommand;
NTSTATUS DxgkddiSubmitcommand(
IN_CONST_HANDLE hAdapter,
IN_CONST_PDXGKARG_SUBMITCOMMAND pSubmitCommand
)
{...}
Parameters
hAdapter
[in] 指向关联显卡context的句柄。KMD之前在DxgkDdiAddDevice的MiniportDeviceContext参数中提供这个句柄给DXGK。
pSubmitCommand
[in] 指向DXGKARG_SUBMITCOMMAND结构的指针,其描述了需要提交到硬件command执行单元的DMA buffer。
Return Value
Returns STATUS_SUCCESS upon successful completion. If the driver instead returns an error code, the operating system causes a system bugcheck to occur. For more information, see the following Remarks section.
Remarks
因为paging操作为系统行为,所以paging操作不会关联到指定的application context或 graphics context。因此,当提交的为paging操作时,DxgkDdiSubmitCommand调用时的参数DXGKARG_SUBMITCOMMAND pSubmitCommand的hDevice成员为NULL。
但是,如果对于特定的硬件和驱动结构中必须要有一个内部设备,驱动必须在显卡初始化的时候内部创建这个设备,必须在内部维护这个设备作为系统用于分页的默认的设备。
驱动能够将由DXGKARG_SUBMITCOMMAND的成员SubmissionFenceId提供的值写入RB的fence command中。更多fence command信息参见Supplying Fence Identifiers。
If the driver returns an error code, the Microsoft DirectX graphics kernel subsystem causes a system bugcheck to occur. In a crash dump file, the error is noted by the message BugCheck 0x119, which has the following four parameters.
如果驱动返回了一个error code,DXGK会触发一个bugcheck。在dump file中可以看到error的信息为BugCheck 0x119,参数如下
- 0x2
- The NTSTATUS error code returned from the failed driver call
- A pointer to the DXGKARG_SUBMITCOMMAND structure
- A pointer to an internal scheduler data structure
DxgkDdiSubmitCommand should be made nonpageable because it runs at IRQL = DISPATCH_LEVEL.
Requirements
Minimum supported client | Available in Windows Vista and later versions of the Windows operating systems. |
Target Platform | Desktop |
Header | d3dkmddi.h |
IRQL | DISPATCH_LEVEL |