[SOLVED] Disabling interpolation of vertex attributes causes error

Started by
1 comment, last by Aqua Costa 11 years, 11 months ago
I'm trying to disable interpolation of some vertex attributes using the nointerpolation modifier but it's causing an error:


D3D11: ERROR: ID3D11DeviceContext::Draw: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. Semantic 'RANGE' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX ]
D3D11: ERROR: ID3D11DeviceContext::Draw: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. Semantic 'RANGE' of the input stage has a hardware register component mask that is not a subset of the output of the previous stage. [ EXECUTION ERROR #345: DEVICE_SHADER_LINKAGE_REGISTERMASK ]
D3D11: ERROR: ID3D11DeviceContext::Draw: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. Semantic 'POSITION' of the input stage has a hardware register component mask that is not a subset of the output of the previous stage. [ EXECUTION ERROR #345: DEVICE_SHADER_LINKAGE_REGISTERMASK ]
D3D11: ERROR: ID3D11DeviceContext::Draw: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. Semantic 'SPOTPOWER' is defined for mismatched hardware registers between the output stage and input stage. [ EXECUTION ERROR #343: DEVICE_SHADER_LINKAGE_REGISTERINDEX ]
D3D11: ERROR: ID3D11DeviceContext::Draw: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. Semantic 'SPOTPOWER' of the input stage has a hardware register component mask that is not a subset of the output of the previous stage. [ EXECUTION ERROR #345: DEVICE_SHADER_LINKAGE_REGISTERMASK ]
D3D11: ERROR: ID3D11DeviceContext::Draw: Geometry Shader - Pixel Shader linkage error: Signatures between stages are incompatible. Semantic 'DIRECTION' of the input stage has a hardware register component mask that is not a subset of the output of the previous stage. [ EXECUTION ERROR #345: DEVICE_SHADER_LINKAGE_REGISTERMASK ]


This are the output/input structures:

struct GS_OUT
{
float4 posH : SV_Position;
float3 viewRay : VIEWRAY;
float lightRange : RANGE;
float3 lightPosVS : POSITION;
float spotPower : SPOTPOWER;
float3 lightDirVS : DIRECTION;
float3 lightColor : COLOR;
};


struct PS_IN
{
float4 posH : SV_Position;
float3 viewRay : VIEWRAY;
nointerpolation float lightRange : RANGE;
nointerpolation float3 lightPosVS : POSITION;
nointerpolation float spotPower : SPOTPOWER;
nointerpolation float3 lightDirVS : DIRECTION;
nointerpolation float3 lightColor : COLOR;
};
Advertisement
You posted the reason yourself, the routine tells you :-)

Do
"float lightRange : RANGE"
and
"nointerpolation float lightRange : RANGE"
look the same to you? They don't. For the linker they don't either :-)

I recommend using the very same struct on both GS output and PS input, you'll save yourself trouble. Otherwise you'll have to add the "nointerpolation" keyword to GS_OUT matching members, too.
Yes, that did the trick... (I was thinking I read somewhere that the interpolation modifiers are only used in the pixel shader input structs, maybe I was dreaming rolleyes.gif )

This topic is closed to new replies.

Advertisement