static SharpDX.DXGI.Format GetFormat(RegisterComponentType type, RegisterComponentMaskFlags mask) { if (mask.HasFlag(RegisterComponentMaskFlags.All)) { switch (type) { case RegisterComponentType.Float32: return(SharpDX.DXGI.Format.R32G32B32A32_Float); } throw new System.NotImplementedException(); } else if (mask.HasFlag(MASK_XYZ)) { switch (type) { case RegisterComponentType.Float32: return(SharpDX.DXGI.Format.R32G32B32_Float); } throw new System.NotImplementedException(); } else if (mask.HasFlag(MASK_XY)) { switch (type) { case RegisterComponentType.Float32: return(SharpDX.DXGI.Format.R32G32_Float); } throw new System.NotImplementedException(); } else { throw new System.NotImplementedException(); } }
public SignatureParameterDescription(string semanticName, uint semanticIndex, Name systemValueType, RegisterComponentType componentType, uint register, ComponentMask mask, ComponentMask readWriteMask) { SemanticName = semanticName; SemanticIndex = semanticIndex; Register = register; SystemValueType = systemValueType; ComponentType = componentType; Mask = mask; ReadWriteMask = readWriteMask; }
internal static Format DetermineDXGIFormat(RegisterComponentType componentType, RegisterComponentMaskFlags mask) { Format format = Format.Unknown; if (mask == RegisterComponentMaskFlags.ComponentX) { if (componentType == RegisterComponentType.UInt32) { format = Format.R32_UInt; } else if (componentType == RegisterComponentType.SInt32) { format = Format.R32_SInt; } else if (componentType == RegisterComponentType.Float32) { format = Format.R32_Float; } } else if (mask == (RegisterComponentMaskFlags.ComponentX | RegisterComponentMaskFlags.ComponentY)) { if (componentType == RegisterComponentType.UInt32) { format = Format.R32G32_UInt; } else if (componentType == RegisterComponentType.SInt32) { format = Format.R32G32_SInt; } else if (componentType == RegisterComponentType.Float32) { format = Format.R32G32_Float; } } else if (mask == (RegisterComponentMaskFlags.ComponentX | RegisterComponentMaskFlags.ComponentY | RegisterComponentMaskFlags.ComponentZ)) { if (componentType == RegisterComponentType.UInt32) { format = Format.R32G32B32_UInt; } else if (componentType == RegisterComponentType.SInt32) { format = Format.R32G32B32_SInt; } else if (componentType == RegisterComponentType.Float32) { format = Format.R32G32B32_Float; } } else if (mask == RegisterComponentMaskFlags.All) { if (componentType == RegisterComponentType.UInt32) { format = Format.R32G32B32A32_UInt; } else if (componentType == RegisterComponentType.SInt32) { format = Format.R32G32B32A32_SInt; } else if (componentType == RegisterComponentType.Float32) { format = Format.R32G32B32A32_Float; } } return(format); }