问题
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;
};
来源:https://stackoverflow.com/questions/31256255/mismatch-between-input-assembler-and-vertex-shader-but-it-looks-right