public string ToString(bool includeStreams) { // For example: // Name Index Mask Register SysValue Format Used // TEXCOORD 0 xyzw 0 NONE float xyzw // SV_DepthGreaterEqual 0 N/A oDepthGE DEPTHGE float YES string name = SemanticName; if (includeStreams) { name = string.Format("m{0}:{1}", Stream, SemanticName); } if (Register != uint.MaxValue) { return(string.Format("{0,-20} {1,5} {2,-4} {3,8} {4,8} {5,7} {6,-4}", name, SemanticIndex, Mask.GetDescription(), Register, SystemValueType.GetDescription(), GetTypeFormat(), ReadWriteMask.GetDescription())); } else { var registerName = GetSVRegisterName(); if (registerName.Length > 8) { registerName = " " + registerName; } return(string.Format("{0,-20} {1,5} {2,4}{3,9} {4,8} {5,7} {6,4}", name, SemanticIndex, "N/A", registerName, SystemValueType.GetDescription(), GetTypeFormat(), ReadWriteMask == 0 ? "NO" : "YES")); } }
/// <summary>Returns a hash code for this instance.</summary> /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> public override int GetHashCode() { unchecked { int hashCode = Name.GetHashCode(); hashCode = (hashCode * 397) ^ Index.GetHashCode(); hashCode = (hashCode * 397) ^ Register.GetHashCode(); hashCode = (hashCode * 397) ^ SystemValueType.GetHashCode(); hashCode = (hashCode * 397) ^ ComponentType.GetHashCode(); hashCode = (hashCode * 397) ^ UsageMask.GetHashCode(); hashCode = (hashCode * 397) ^ ReadWriteMask.GetHashCode(); hashCode = (hashCode * 397) ^ Stream.GetHashCode(); return(hashCode); } }
public override string ToString() { // For example: // Name Index Mask Register SysValue Format Used // TEXCOORD 0 xyzw 0 NONE float xyzw // SV_DepthGreaterEqual 0 N/A oDepthGE DEPTHGE float YES if (SystemValueType.RequiresMask()) { return(string.Format("{0,-20} {1,5} {2,-4} {3,8} {4,8} {5,7} {6,-4}", SemanticName, SemanticIndex, Mask.GetDescription(), Register, SystemValueType.GetDescription(), GetTypeFormat(), ReadWriteMask.GetDescription())); } return(string.Format("{0,-20} {1,5} {2,4} {3,4} {4,8} {5,7} {6,4}", SemanticName, SemanticIndex, "N/A", SystemValueType.GetRegisterName(), SystemValueType.GetDescription(), GetTypeFormat(), "YES")); }