I'm trying to create a geometry shader which uses the stream output stage following the outline provided on MSDN: Link
However when trying to do this I get the following error:
ID3D11Device::CreateGeometryShaderWithStreamOutput: Stream (=3435973836) must be less than or equal to 3.
As far as I'm aware, the only point at which I can define the stream is in the stream output declaration entry, but I've already done this (code below).
// Reads compiled shader into a buffer
HRESULT result = D3DReadFileToBlob(filename, &geometryShaderBuffer);
D3D11_SO_DECLARATION_ENTRY SODeclarationEntry[3] =
{
{ 0, "POSITION", 0, 0, 3, 0 },
{ 0, "NORMAL", 0, 0, 3, 0 },
{ 0, "TEXCOORD", 0, 0, 3, 0 }
};
// Create the geometry shader from the buffer & SO declaration
result = renderer->CreateGeometryShaderWithStreamOutput(geometryShaderBuffer->GetBufferPointer(), geometryShaderBuffer->GetBufferSize(), SODeclarationEntry, sizeof(SODeclarationEntry),
NULL, 0, 0, NULL, &streamOutputGeometryShader);
Is there somewhere else where I'm supposed to be defining an output stream?