/// <summary> /// Constructs a new ComputePipelineDescription. /// </summary> /// <param name="shaderStage">The compute <see cref="Shader"/> to be used in the Pipeline. This must be a Shader with /// <see cref="ShaderStages.Compute"/>.</param> /// <param name="resourceLayout">The resource layout available to the Pipeline.</param> /// <param name="threadGroupSizeX">The X dimension of the thread group size.</param> /// <param name="threadGroupSizeY">The Y dimension of the thread group size.</param> /// <param name="threadGroupSizeZ">The Z dimension of the thread group size.</param> public ComputePipelineDescription( Shader shaderStage, ResourceLayout resourceLayout, uint threadGroupSizeX, uint threadGroupSizeY, uint threadGroupSizeZ) { ComputeShader = shaderStage; ResourceLayouts = new[] { resourceLayout }; ThreadGroupSizeX = threadGroupSizeX; ThreadGroupSizeY = threadGroupSizeY; ThreadGroupSizeZ = threadGroupSizeZ; }
/// <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="primitiveTopology">The <see cref="PrimitiveTopology"/> to use, which controls how a series of input /// vertices is interpreted by the <see cref="Pipeline"/>.</param> /// <param name="shaderSet">A description of the shader set to be used.</param> /// <param name="resourceLayout">A <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( BlendStateDescription blendState, DepthStencilStateDescription depthStencilStateDescription, RasterizerStateDescription rasterizerState, PrimitiveTopology primitiveTopology, ShaderSetDescription shaderSet, ResourceLayout resourceLayout, OutputDescription outputs) { BlendState = blendState; DepthStencilState = depthStencilStateDescription; RasterizerState = rasterizerState; PrimitiveTopology = primitiveTopology; ShaderSet = shaderSet; ResourceLayouts = new[] { resourceLayout }; Outputs = outputs; }
/// <summary> /// Constructs a new ResourceSetDescription. /// </summary> /// <param name="layout">The <see cref="ResourceLayout"/> describing the number and kind of resources used.</param> /// <param name="boundResources">An array of <see cref="BindableResource"/> objects. /// The number and type of resources must match those specified in the <see cref="ResourceLayout"/>.</param> public ResourceSetDescription(ResourceLayout layout, params BindableResource[] boundResources) { Layout = layout; BoundResources = boundResources; }