The user-mode display driver can use the Direct3D Runtime Version 10 State-Refresh Callback Functions to achieve a stateless driver or to build up command buffer preamble data.
The Direct3D runtime supplies pointers to its state-refresh callback functions in the D3D10DDI_CORELAYER_DEVICECALLBACKS structure that the pUMCallbacks member of the D3D10DDIARG_CREATEDEVICE structure points to in a call to the CreateDevice(D3D10) function.
The user-mode display driver might call, for example, the pfnStateIaIndexBufCb state-refresh callback function, while the driver is within a call to the driver's IaSetIndexBuffer function. This call is quite possible, especially because the user-mode display driver might use the pfnStateIaIndexBufCb callback function to build a preamble, and the call to IaSetIndexBuffer might exhaust the size of the command buffer and cause a flush. For such a situation, the call to pfnStateIaIndexBufCb passes the same "new" binding information as the original call to IaSetIndexBuffer. This situation results in a more optimal preamble.