public static string GetDescription(this ShaderResourceViewDimension value, ShaderInputType shaderInputType, ResourceReturnType format) { switch (shaderInputType) { case ShaderInputType.ByteAddress : case ShaderInputType.Structured: return "r/o"; case ShaderInputType.UavRwByteAddress : case ShaderInputType.UavRwStructured : case ShaderInputType.UavRwStructuredWithCounter : case ShaderInputType.UavRwTyped : return "r/w"; default : return value.GetDescription(); } }
public static string GetDescription(this ResourceReturnType value, ShaderInputType shaderInputType) { if (value == ResourceReturnType.Mixed) { switch (shaderInputType) { case ShaderInputType.Structured: case ShaderInputType.UavRwStructured: return "struct"; case ShaderInputType.ByteAddress: case ShaderInputType.UavRwByteAddress: return "byte"; default: throw new ArgumentOutOfRangeException("shaderInputType", string.Format("Shader input type '{0}' is not supported.", shaderInputType)); } } return value.GetDescription(); }
public static string GetDescription(this ResourceReturnType value, ShaderInputType shaderInputType) { if (value == ResourceReturnType.Mixed) { switch (shaderInputType) { case ShaderInputType.Structured: case ShaderInputType.UavRwStructured: return("struct"); case ShaderInputType.ByteAddress: case ShaderInputType.UavRwByteAddress: return("byte"); default: throw new ArgumentOutOfRangeException("shaderInputType", string.Format("Shader input type '{0}' is not supported.", shaderInputType)); } } return(value.GetDescription()); }
/// <summary> /// Creates a new instance of <see cref="ShaderInput"/> /// </summary> public ShaderInput(string name, ShaderInputType type) { Name = name; Type = type; }