ID3D11Device::CreateGeometryShaderWithStreamOutput Method

Create a geometry shader that can write to streaming output buffers.

Syntax

HRESULT CreateGeometryShaderWithStreamOutput(
  [in]   const void *pShaderBytecode,
  [in]   SIZE_T BytecodeLength,
  [in]   const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
  [in]   UINT NumEntries,
  [in]   const UINT *pBufferStrides,
  [in]   UINT NumStrides,
  [in]   UINT RasterizedStream,
  [in]   ID3D11ClassLinkage *pClassLinkage,
  [out]  ID3D11GeometryShader **ppGeometryShader
);

Parameter

  • pShaderBytecode [in]
    Typ: const void*

    A pointer to the compiled shader.

  • BytecodeLength [in]
    Typ: SIZE_T

    Size of the compiled geometry shader.

  • pSODeclaration [in]
    Typ: const D3D11_SO_DECLARATION_ENTRY*

    Pointer to a D3D11_SO_DECLARATION_ENTRY array. Cannot be NULL if NumEntries > 0.

  • NumEntries [in]
    Typ: UINT

    The number of entries in the stream output declaration ( ranges from 0 to D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT ).

  • pBufferStrides [in]
    Typ: const UINT*

    An array of buffer strides; each stride is the size of an element for that buffer.

  • NumStrides [in]
    Typ: UINT

    The number of strides (or buffers) in pBufferStrides (ranges from 0 to D3D11_SO_BUFFER_SLOT_COUNT).

  • RasterizedStream [in]
    Typ: UINT

    The index number of the stream to be sent to the rasterizer stage (ranges from 0 to D3D11_SO_STREAM_COUNT - 1). Set to D3D11_SO_NO_RASTERIZED_STREAM if no stream is to be rasterized.

  • pClassLinkage [in]
    Typ: ID3D11ClassLinkage*

    A pointer to a class linkage interface (see ID3D11ClassLinkage); the value can be NULL.

  • ppGeometryShader [out]
    Typ: ID3D11GeometryShader**

    Address of a pointer to an ID3D11GeometryShader interface, representing the geometry shader that was created. Set this to NULL to validate the other parameters; if validation passes, the method will return S_FALSE instead of S_OK.

Rückgabewert

Typ: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

Anforderungen

Header

D3D11.h

Bibliothek

D3D11.lib

Siehe auch

ID3D11Device