Bewerken

Delen via


Specifying GDI Hardware-Accelerated Rendering Operations

When the DxgkDdiRenderKm function is called, the operating system specifies the type of GDI hardware-accelerated rendering operation to perform through the pRenderKmArgs parameter. The display port driver of the DirectX graphics kernel subsystem (Dxgkrnl.sys) sets the pRenderKmArgs->pCommand member to point to a command buffer that contains an array of variable-size DXGK_RENDERKM_COMMAND structures. It also sets the pRenderKmArgs->pCommandLength member to the size of the command buffer, in bytes.

The driver must translate the input DXGK_RENDERKM_COMMAND command buffer into DMA buffer commands and build the patch location list.

DXGK_RENDERKM_COMMAND contains members that specify characteristics of GDI hardware-accelerated rendering operations, as described in the following table.

Rendering Operation DXGK_RENDERKM_COMMAND Member Corresponding DXGK_GDIARG_XXX Structure Corresponding DXGK_RENDERKM_OPERATION Value

alpha blend

AlphaBlend

DXGK_GDIARG_ALPHABLEND

DXGK_GDIOP_ALPHABLEND = 3

bit-block transfer with no stretching

BitBlt

DXGK_GDIARG_BITBLT

DXGK_GDIOP_BITBLT = 1

ClearType and antialiased text pixel blend

ClearTypeBlend

DXGK_GDIARG_CLEARTYPEBLEND

DXGK_GDIOP_CLEARTYPEBLEND = 7

color fill

ColorFill

DXGK_GDIARG_COLORFILL

DXGK_GDIOP_COLORFILL = 2

stretched bit-block transfer

StretchBlt

DXGK_GDIARG_STRETCHBLT

DXGK_GDIOP_STRETCHBLT = 4

bit-block transfer with transparency

TransparentBlt

DXGK_GDIARG_TRANSPARENTBLT

DXGK_GDIOP_TRANSPARENTBLT = 6

The operating system uses the OpCode member of DXGK_RENDERKM_COMMAND to indicate the specific GDI hardware-accelerated rendering operation that the display miniport driver must process. The OpCode member is of type DXGK_RENDERKM_OPERATION, with values shown in the table.

The operating system will also supply the appropriate value of the DXGK_RENDERKM_COMMAND CommandSize member, which specifies the size of the current rendering command, in bytes, including the value of OpCode and the number of sub-rectangles in the command.

Further information about the capability of the display adapter to perform a bit-block transfer with transparency is provided in the D3DKM_TRANSPARENTBLTFLAGS structure contained in the DXGK_GDIARG_TRANSPARENTBLT->Flags member.