DXGKDDI_SUBMITCOMMAND callback function (d3dkmddi.h)

The DxgkDdiSubmitCommand function submits a direct memory access (DMA) buffer to the hardware command execution unit.

Syntax

DXGKDDI_SUBMITCOMMAND DxgkddiSubmitcommand;

NTSTATUS DxgkddiSubmitcommand(
  [in] IN_CONST_HANDLE hAdapter,
  [in] IN_CONST_PDXGKARG_SUBMITCOMMAND pSubmitCommand
)
{...}

Parameters

[in] hAdapter

A handle to a context block that is associated with a display adapter. The display miniport driver previously provided this handle to the Microsoft DirectX graphics kernel subsystem in the MiniportDeviceContext output parameter of the DxgkDdiAddDevice function.

[in] pSubmitCommand

A pointer to a DXGKARG_SUBMITCOMMAND structure that describes the DMA buffer that the display miniport driver submits to the hardware command execution unit.

Return value

DxgkDdiSubmitCommand returns STATUS_SUCCESS upon successful completion. If the driver instead returns an error code, the operating system causes a system bugcheck to occur. See Remarks.

Remarks

Because paging operations are considered system operations, they are not associated with a specific application context or graphics context. Therefore, when the submission is for a paging operation, the DxgkDdiSubmitCommand function is called with NULL specified in the hDevice member of the DXGKARG_SUBMITCOMMAND structure that the pSubmitCommand parameter points to.

However, if the architecture of a particular hardware and driver must have a device internally, the driver must internally create the device during adapter initialization and must keep the device internally as the system default device for use in paging operations.

The driver can write the value that is supplied in the SubmissionFenceId member of DXGKARG_SUBMITCOMMAND into the fence command in the ring buffer. For more information about fence commands, see Supplying Fence Identifiers.

If the driver returns an error code, the 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 will have the following four parameters.

  • 0x2 (identifies the cause of the error)
  • 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

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header d3dkmddi.h
IRQL DISPATCH_LEVEL

See also

DXGKARG_SUBMITCOMMAND

DxgkDdiAddDevice