mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user