Jump to content

  • Log In with Google      Sign In   
  • Create Account


[SOLVED] Disabling interpolation of vertex attributes causes error


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 TiagoCosta   Crossbones+   -  Reputation: 1880

Like
0Likes
Like

Posted 15 May 2012 - 08:13 AM

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, 15 May 2012 - 10:02 AM.

Tiago Costa
Aqua Engine - my DirectX 11 game "engine" - In development

Sponsor:

#2 pcmaster   Members   -  Reputation: 647

Like
1Likes
Like

Posted 15 May 2012 - 09:06 AM

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.

#3 TiagoCosta   Crossbones+   -  Reputation: 1880

Like
0Likes
Like

Posted 15 May 2012 - 10:02 AM

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 Posted Image )
Tiago Costa
Aqua Engine - my DirectX 11 game "engine" - In development




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS