• Advertisement
Sign in to follow this  

[SOLVED] Disabling interpolation of vertex attributes causes error

This topic is 2079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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;
};
Edited by TiagoCosta

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement