PFND3D11DDI_DRAWINDEXEDINSTANCEDINDIRECT callback function (d3d10umddi.h)

The DrawIndexedInstancedIndirect function draws particular instances of indexed primitives.

Syntax

PFND3D11DDI_DRAWINDEXEDINSTANCEDINDIRECT Pfnd3d11ddiDrawindexedinstancedindirect;

void Pfnd3d11ddiDrawindexedinstancedindirect(
  D3D10DDI_HDEVICE unnamedParam1,
  D3D10DDI_HRESOURCE unnamedParam2,
  UINT unnamedParam3
)
{...}

Parameters

unnamedParam1

hDevice [in]

A handle to the display device (graphics context).

unnamedParam2

hBufferForArgs

A handle to a buffer that contains the arguments for DrawIndexedInstancedIndirect to process. The buffer contains the following tightly packed structure:

struct DrawIndexedInstancedIndirectArgs {
  UINT IndexCountPerInstance; 
  UINT InstanceCount;
  UINT StartIndexLocation;
  INT BaseVertexLocation;
  UINT StartInstanceLocation;
}

For more information about these arguments, see the DrawIndexedInstanced reference page.

unnamedParam3

AlignedByteOffsetForArgs

The offset, in bytes, into the buffer that hBufferForArgs specifies. AlignedByteOffsetForArgs must be a multiple of 4.

Return value

None

Remarks

The driver can use the pfnSetErrorCb callback function to set an error code.

The DrawIndexedInstancedIndirect function performs the same task as the call to the driver's DrawIndexedInstanced function. However, DrawIndexedInstancedIndirect obtains information about the index primitives from the contents of the buffer that the hBufferForArgs parameter specifies. DrawIndexedInstancedIndirect reads the contents of the buffer, starting at the byte offset that the AlignedByteOffsetForArgs parameter specifies.

When the Direct3D runtime calls the driver's CreateResource(D3D11) function to create the buffer resource that the hBufferForArgs parameter specifies, the runtime must set the D3D11_DDI_RESOURCE_MISC_DRAWINDIRECT_ARGS flag in the MiscFlags member of the D3D11DDIARG_CREATERESOURCE structure.

The driver should not encounter any error, except for D3DDDIERR_DEVICEREMOVED. Therefore, if the driver passes any error, except for D3DDDIERR_DEVICEREMOVED, in a call to the pfnSetErrorCb function, the Direct3D runtime determines that the error is critical. Even if the device is removed, the driver is not required to return D3DDDIERR_DEVICEREMOVED; however, if device removal interferes with the operation of DrawIndexedInstancedIndirect (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

Requirements

Requirement Value
Minimum supported client DrawIndexedInstancedIndirect is supported beginning with the Windows 7 operating system.
Target Platform Desktop
Header d3d10umddi.h (include D3d10umddi.h)

See also

CreateResource(D3D11)

D3D11DDIARG_CREATERESOURCE

D3D11DDI_DEVICEFUNCS

DrawIndexedInstanced

pfnSetErrorCb