D3DKMT_CREATECONTEXT structure

The D3DKMT_CREATECONTEXT structure describes a kernel-mode device context to create.

Syntax

typedef struct _D3DKMT_CREATECONTEXT {
  D3DKMT_HANDLE             hDevice;
  UINT                      NodeOrdinal;
  UINT                      EngineAffinity;
  D3DDDI_CREATECONTEXTFLAGS Flags;
  VOID                      *pPrivateDriverData;
  UINT                      PrivateDriverDataSize;
  D3DKMT_CLIENTHINT         ClientHint;
  D3DKMT_HANDLE             hContext;
  VOID                      *pCommandBuffer;
  UINT                      CommandBufferSize;
  D3DDDI_ALLOCATIONLIST     *pAllocationList;
  UINT                      AllocationListSize;
  D3DDDI_PATCHLOCATIONLIST  *pPatchLocationList;
  UINT                      PatchLocationListSize;
  D3DGPU_VIRTUAL_ADDRESS    CommandBuffer;
} D3DKMT_CREATECONTEXT;

Members

        `hDevice`

        [in] A handle to the device to create the device context on.
    
    
        `NodeOrdinal`

        [in] The zero-based index of the node that the context is scheduled on.
    
    
        `EngineAffinity`

        [in] The engine affinity for the context.
    
    
        `Flags`

        [in] A <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dukmdt/ns-d3dukmdt-_d3dddi_createcontextflags">D3DDDI_CREATECONTEXTFLAGS</a> structure that indicates, in bit-field flags, how to create the context.
    
    
        `pPrivateDriverData`

        [in] A pointer to private data that is passed to the display miniport driver.
    
    
        `PrivateDriverDataSize`

        [in] The size, in bytes, of the private data that <b>pPrivateDriverData</b> points to.
    
    
        `ClientHint`

        [in] A D3DKMT_CLIENTHINT-typed value that indicates the type of client that creates the context. The following table lists the possible values.
Value Meaning
D3DKMT_CLIENTHINT_UNKNOWN (0) The client is unknown.
D3DKMT_CLIENTHINT_OPENGL (1) The client is the OpenGL runtime.
D3DKMT_CLIENTHINT_CDD (2) This value is for internal use only. Do not use.
D3DKMT_CLIENTHINT_DX7 (7) The client is the Microsoft DirectX 7.0 runtime.
D3DKMT_CLIENTHINT_DX8 (8) The client is the DirectX 8.0 runtime.
D3DKMT_CLIENTHINT_DX9 (9) The client is the DirectX 9.0 runtime.
D3DKMT_CLIENTHINT_DX10 (10) The client is the DirectX 10.0 runtime.
        `hContext`

        [out] A handle to the device context that the DirectX graphics kernel subsystem (<i>Dxgkrnl.sys</i>) supplied and that is returned from the call to the <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dkmthk/nf-d3dkmthk-d3dkmtcreatecontext">D3DKMTCreateContext</a> function.
    
    
        `pCommandBuffer`

        [out] A pointer to command buffer memory that the OpenGL ICD places commands into. The <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dkmthk/nf-d3dkmthk-d3dkmtcreatecontext">D3DKMTCreateContext</a> function returns this memory pointer.
    
    
        `CommandBufferSize`

        [out] The size, in bytes, of the memory block that <b>pCommandBuffer</b> points to. The <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dkmthk/nf-d3dkmthk-d3dkmtcreatecontext">D3DKMTCreateContext</a> function returns this size value.
    
    
        `pAllocationList`

        [out] An array of <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dukmdt/ns-d3dukmdt-_d3dddi_allocationlist">D3DDDI_ALLOCATIONLIST</a> structures that the OpenGL ICD inserts referenced allocations in.

The D3DKMTCreateContext function returns this array.

        `AllocationListSize`

        [out] The number of elements in the array of allocations that <b>pAllocationList</b> points to. This quantity of allocations is available when the DirectX graphics kernel subsystem submits the command buffer that is pointed to by <b>pCommandBuffer</b> to the display miniport driver. 

The D3DKMTCreateContext function returns this number.

        `pPatchLocationList`

        [out] An array of <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dukmdt/ns-d3dukmdt-_d3dddi_patchlocationlist">D3DDDI_PATCHLOCATIONLIST</a> structures that the OpenGL ICD inserts patching information in.

The D3DKMTCreateContext function returns this array.

        `PatchLocationListSize`

        [out] The number of elements in the patch-location list that <b>pPatchLocationList</b> points to. This quantity of patch locations is available when the DirectX graphics kernel subsystem submits the command buffer that is pointed to by <b>pCommandBuffer</b> to the display miniport driver. 

The D3DKMTCreateContext function returns this number.

        `CommandBuffer`

        [out] A pointer to command buffer memory that the OpenGL ICD places commands into. The <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dkmthk/nf-d3dkmthk-d3dkmtcreatecontext">D3DKMTCreateContext</a> function returns this memory pointer.
    

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header d3dkmthk.h (include D3dkmthk.h)
## See Also

    <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/d3dukmdt/ns-d3dukmdt-_d3dddi_allocationlist">D3DDDI_ALLOCATIONLIST</a>

D3DDDI_CREATECONTEXTFLAGS

D3DDDI_PATCHLOCATIONLIST

D3DKMTCreateContext