/// <summary> /// Constructs a new <see cref="GraphicsPipelineDescription"/>. /// </summary> /// <param name="blendState">A description of the blend state, which controls how color values are blended into each /// color target.</param> /// <param name="depthStencilStateDescription">A description of the depth stencil state, which controls depth tests, /// writing, and comparisons.</param> /// <param name="rasterizerState">A description of the rasterizer state, which controls culling, clipping, scissor, and /// polygon-fill behavior.</param> /// <param name="shaders">An array of <see cref="Shader"/> objects, one for each shader stage which is to be active /// in the <see cref="Pipeline"/>. At a minimum, every graphics Pipeline must include a Vertex and Fragment shader. All /// other stages are optional, but if either Tessellation stage is present, then the other must also be.</param> /// <param name="specializations">An array of <see cref="SpecializationConstant"/> used to override specialization /// constants in the created <see cref="Pipeline"/>. Each element in this array describes a single ID-value pair, which /// will be matched with the constants specified in each <see cref="Shader"/>.</param> /// <param name="resourceLayouts">An array of <see cref="ResourceLayout"/>, which controls the layout of shader resoruces /// in the <see cref="Pipeline"/>.</param> /// <param name="outputs">A description of the output attachments used by the <see cref="Pipeline"/>.</param> public GraphicsPipelineDescription CreateGraphicsPipelineDescription( ref VeldridPrimitive primitive, BlendStateDescription blendState, DepthStencilStateDescription depthStencilStateDescription, RasterizerStateDescription rasterizerState, Shader[] shaders, SpecializationConstant[] specializations, ResourceLayout[] resourceLayouts, OutputDescription outputs) { var shaderSetDescription = new ShaderSetDescription(new VertexLayoutDescription[] { primitive.VertexLayout }, shaders, specializations); return(new GraphicsPipelineDescription(blendState, depthStencilStateDescription, rasterizerState, primitive.PrimitiveTopology, shaderSetDescription, resourceLayouts, outputs)); }