Allow excess VS sig system value elements versus IA bytecode. Refs #167

* The VS can consume system value semantics at the end of the signature
  that weren't present in the IA layout's bytecode. Note that if the
  order changes (ie. the system value element is first) then that's not
  OK. Only trailing elements are allowed.
This commit is contained in:
baldurk
2015-10-26 19:13:08 +01:00
parent 910e261133
commit ad805e8117
@@ -632,7 +632,25 @@ namespace renderdocui.Windows.PipelineState
// VS wants more elements
if (state.m_IA.Bytecode.InputSig.Length < state.m_VS.ShaderDetails.InputSig.Length)
mismatchDetails += "IA bytecode provides fewer elements than VS wants.\n";
{
int excess = state.m_VS.ShaderDetails.InputSig.Length - state.m_IA.Bytecode.InputSig.Length;
bool allSystem = true;
// The VS signature can consume more elements as long as they are all system value types
// (ie. SV_VertexID or SV_InstanceID)
for (int e = 0; e < excess; e++)
{
if(state.m_VS.ShaderDetails.InputSig[state.m_VS.ShaderDetails.InputSig.Length - 1 - e].systemValue == SystemAttribute.None)
{
allSystem = false;
break;
}
}
if (!allSystem)
mismatchDetails += "IA bytecode provides fewer elements than VS wants.\n";
}
{
var IA = state.m_IA.Bytecode.InputSig;