Expand Minimize

SoSetTargets routine

The SoSetTargets function sets stream output target resources.

Syntax


PFND3D10DDI_SO_SETTARGETS SoSetTargets;

VOID APIENTRY SoSetTargets(
  _In_  D3D10DDI_HDEVICE hDevice,
  _In_  UINT SOTargets,
  _In_  UINT ClearTargets,
  _In_  const D3D10DDI_HRESOURCE *phResource,
  _In_  const UINT *pOffsets
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

SOTargets [in]

The number of elements in the array that phResource specifies.

ClearTargets [in]

The number of handles to stream output target resources that represents the difference between the previous number of stream output target resources (before the Microsoft Direct3D runtime calls SoSetTargets) and the new number of stream output target resources.

Note that the number that iClearTargets specifies is only an optimization aid because the user-mode display driver could calculate this number.

phResource [in]

An array of handles to the stream output target resources to set. Note that some handle values can be NULL.

pOffsets [in]

An array of offsets, in bytes, into the stream output target resources in the array that phResource specifies.

Return value

None

The driver can use the pfnSetErrorCb callback function to set an error code. For more information about setting error codes, see the following Remarks section.

Remarks

The range of stream output target resources between the number that the SOTargets parameter specifies and the maximum number of stream output target resources that are allowed is required to contain all NULL or unbound values. The number that the ClearTargets parameter specifies informs the driver about how many bind points the driver must clear out for the current operation. If the previous call to SoSetTargets passed a value of 2 in SOTargetsand the current call to SoSetTargets passes a value of 4 in SOTargets, the current call to SoSetTargets also passes a value of 0 in the ClearTargets parameter. If the next successive call to SoSetTargets passes a value of 1 in SOTargets, the successive call also passes a value of 3 (4 - 1) in ClearTargets.

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 Microsoft Direct3D runtime will determine that the error is critical. Even if the device was removed, the driver is not required to return D3DDDIERR_DEVICEREMOVED; however, if device removal interfered with the operation of SOTargets (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3d10umddi.h (include D3d10umddi.h)

See also

D3D10DDI_DEVICEFUNCS
pfnSetErrorCb

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft