Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID3D11DeviceContext::SOSetTargets method

Set the target output buffers for the stream-output stage of the pipeline.


void SOSetTargets(
  [in]                 UINT                NumBuffers,
  [in, optional]       ID3D11Buffer *const *ppSOTargets,
  [in, optional] const UINT                *pOffsets


NumBuffers [in]

Type: UINT

The number of buffer to bind to the device. A maximum of four output buffers can be set. If less than four are defined by the call, the remaining buffer slots are set to NULL. See Remarks.

ppSOTargets [in, optional]

Type: ID3D11Buffer*

The array of output buffers (see ID3D11Buffer) to bind to the device. The buffers must have been created with the D3D11_BIND_STREAM_OUTPUT flag.

pOffsets [in, optional]

Type: const UINT*

Array of offsets to the output buffers from ppSOTargets, one offset for each buffer. The offset values must be in bytes.

Return value

This method does not return a value.


An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.

Calling this method using a buffer that is currently bound for writing will effectively bind NULL instead because a buffer cannot be bound as both an input and an output at the same time.

The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.

The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.

Windows Phone 8: This API is supported.






See also




© 2017 Microsoft