예제 #1
0
		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();
			}
		}
예제 #2
0
		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();
		}
예제 #3
0
        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());
        }
예제 #4
0
 /// <summary>
 /// Creates a new instance of <see cref="ShaderInput"/>
 /// </summary>
 public ShaderInput(string name, ShaderInputType type)
 {
     Name = name;
     Type = type;
 }