0

I had a similar issue someone kindly solved here, but that led me to this one. The error is:

"Input Assembler - Vertex Shader linkage error: Signatures between stages are incompatible. The input stage requires Semantic/Index (SV_POSITION,0) as input, but it is not provided by the output stage."

Here is my declaration and the vertex shader input. Can anyone tell me why they wouldn't match? I'm stumped.

static const D3D11_INPUT_ELEMENT_DESC vertexLayout[] =
{
    { "SV_POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0,  0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
    { "COLOR",       0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0 },
};

...and the shader input:

struct VertexShaderInput
{
    float4 Position             : SV_POSITION;
    float4 Color                : COLOR;
};
Dave
  • 1,521
  • 17
  • 31
  • Does it work if you use "POSITION" rather than "SV_POSITION"? – Adam Miles Jul 06 '15 at 22:41
  • ``SV_POSITION`` works fine as long as it's consistent with the shader and the semantic... – Chuck Walbourn Jul 06 '15 at 23:20
  • Make sure you're binding the correct input-layout object to the input-assembler stage. – Ross Ridge Jul 07 '15 at 02:06
  • I think what Ross was suggesting was making sure that the input layout you are binding with ``IASetInputLayout`` is indeed exactly the same as the one you passed to ``CreateVertexShader``. If your shader isn't compatible with the layout, it should have failed at that point. In fact, make sure you are checking all ``HRESULT`` return values with ``if (FAILED(hr))`` or ``DX::ThrowIfFailed(hr)`` in case you are missing an error result somewhere. – Chuck Walbourn Jul 07 '15 at 07:25

0 Answers0