d3d12: Check IALayout equality in pipeline state

This commit is contained in:
vlj 2015-06-05 21:36:56 +02:00 committed by Vincent Lejeune
parent e4435a9308
commit 381260a493
1 changed files with 17 additions and 1 deletions

View File

@ -21,7 +21,23 @@ struct D3D12PipelineProperties
bool operator==(const D3D12PipelineProperties &in) const
{
// TODO: blend and IASet equality
if (IASet.size() != in.IASet.size())
return false;
for (unsigned i = 0; i < IASet.size(); i++)
{
const D3D12_INPUT_ELEMENT_DESC &a = IASet[i], &b = in.IASet[i];
if (a.AlignedByteOffset != b.AlignedByteOffset)
return false;
if (a.Format != b.Format)
return false;
if (a.InputSlot != b.InputSlot)
return false;
if (a.InstanceDataStepRate != b.InstanceDataStepRate)
return false;
if (a.SemanticIndex != b.SemanticIndex)
return false;
}
// TODO: blend
return Topology == in.Topology && DepthStencilFormat == in.DepthStencilFormat && numMRT == in.numMRT && depthEnabled == in.depthEnabled;
}
};