Пример #1
0
        public bool Equals(PipelineStateDescription other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            if (!(RootSignature == other.RootSignature &&
                  EffectBytecode == other.EffectBytecode &&
                  BlendState.Equals(other.BlendState) &&
                  SampleMask == other.SampleMask &&
                  RasterizerState.Equals(other.RasterizerState) &&
                  DepthStencilState.Equals(other.DepthStencilState) &&
                  PrimitiveType == other.PrimitiveType &&
                  Output == other.Output))
            {
                return(false);
            }

            if ((InputElements != null) != (other.InputElements != null))
            {
                return(false);
            }
            if (InputElements != null)
            {
                for (int i = 0; i < InputElements.Length; ++i)
                {
                    if (!InputElements[i].Equals(other.InputElements[i]))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }