This project has moved and is read-only. For the latest updates, please go here.
1

Closed

ConstructGSWithSO on Feature Level 10.0

description

There is a bug in ConstructGSWithSO when feature level 10. When code is outputting into multiple slots, ID3D10Device::CreateGeometryShaderWithStreamOutput required OutputStreamStride = 0. It can be fixed in EffectNonRuntime.cpp:1251
            UINT strides[4];
            UINT * pStrides = strides;
            UINT strideCount = 4;
            soParser.GetStrides( strides );
            if(!featureLevelGE11)
            {
              if(strides[1]  || strides[2] || strides[3])
              {
                pStrides = NULL;
                strideCount = 0;
              }
              else
              {
                strideCount = 1;
              }
            }
            hr = m_pDevice->CreateGeometryShaderWithStreamOutput((UINT*) pShader->pReflectionData->pBytecode,
                                                                pShader->pReflectionData->BytecodeLength,
                                                                soParser.GetDeclArray(),
                                                                soParser.GetDeclCount(),
                                                                pStrides,
                                                                strideCount,
                                                                pShader->pReflectionData->RasterizedStream,
                                                                neededClassLinkage,
                                                                (ID3D11GeometryShader**) &pShader->pD3DObject);
Closed Jul 8, 2014 at 11:36 PM by walbourn
This was actually already fixed in Effects 11 February 2010
hr = m_pDevice->CreateGeometryShaderWithStreamOutput(pShader->pReflectionData->pBytecode,
   pShader->pReflectionData->BytecodeLength,
   soParser.GetDeclArray(),
   soParser.GetDeclCount(),
   strides,
   featureLevelGE11 ? 4 : 1,
   pShader->pReflectionData->RasterizedStream,
   neededClassLinkage,
   reinterpret_cast<ID3D11GeometryShader**>(&pShader->pD3DObject) );

comments

walbourn wrote Jul 16, 2013 at 4:27 AM

Originally posted on MSDN