/// <summary>
        /// Creates a new <see cref="Shader"/>.
        /// </summary>
        /// <param name="description">The desired properties of the created object.</param>
        /// <returns>A new <see cref="Shader"/>.</returns>
        public Shader CreateShader(ref ShaderDescription description)
        {
#if VALIDATE_USAGE
            if (!Features.ComputeShader && description.Stage == ShaderStages.Compute)
            {
                throw new VeldridException("GraphicsDevice does not support Compute Shaders.");
            }
            if (!Features.GeometryShader && description.Stage == ShaderStages.Geometry)
            {
                throw new VeldridException("GraphicsDevice does not support Compute Shaders.");
            }
            if (!Features.TessellationShaders &&
                (description.Stage == ShaderStages.TessellationControl ||
                 description.Stage == ShaderStages.TessellationEvaluation))
            {
                throw new VeldridException("GraphicsDevice does not support Tessellation Shaders.");
            }
#endif
            return(CreateShaderCore(ref description));
        }
 protected abstract Shader CreateShaderCore(ref ShaderDescription description);
 /// <summary>
 /// Creates a new <see cref="Shader"/>.
 /// </summary>
 /// <param name="description">The desired properties of the created object.</param>
 /// <returns>A new <see cref="Shader"/>.</returns>
 public Shader CreateShader(ShaderDescription description) => CreateShader(ref description);