Graphics Pipeline

来源:互联网 发布:mumu模拟器网络异常 编辑:程序博客网 时间:2024/05/21 15:40

The Direct3D 11programmable pipeline is designed for generating graphics for realtime gamingapplications. This section describes the Direct3D 11 programmablepipeline. The following diagram shows the data flow from input to outputthrough each of the programmable stages.

The graphics pipelinefor Microsoft Direct3D 11 supports the same stages as the Direct3D 10 graphicspipeline, with additionalstages to support advanced features.

You can use theDirect3D 11API to configure all of the stages. Stages that feature commonshader cores (the rounded rectangular blocks) are programmable by usingthe HLSL programming language. As you will see,this makes the pipeline extremely flexible and adaptable. The following listspecifies the purpose of each of the stages.

·        Input-Assembler Stage - The input-assembler stage suppliesdata (triangles, lines and points) to the pipeline.

·        Vertex-Shader Stage - The vertex-shader stage processesvertices, typically performing operations such as transformations, skinning,and lighting. A vertex shader always takes a single input vertex and produces asingle output vertex.

·        Geometry-Shader Stage - The geometry-shader stage processesentire primitives. Its input is a full primitive (which is three vertices for atriangle, two vertices for a line, or a single vertex for a point). Inaddition, each primitive can also include the vertex data for any edge-adjacentprimitives. This could include at most an additional three vertices for atriangle or an additional two vertices for a line. The geometry shader alsosupports limited geometry amplification and de-amplification. Given an inputprimitive, the geometry shader can discard the primitive, or emit one or morenew primitives.

·        Stream-Output Stage - The stream-output stage streamsprimitive data from the pipeline to memory on its way to the rasterizer. Datacan be streamed out and/or passed into the rasterizer. Data streamed out tomemory can be recirculated back into the pipeline as input data or read-back fromthe CPU.

·        Rasterizer Stage - The rasterizer clips primitives,prepares primitives for the pixel shader, and determines how to invoke pixelshaders.

·        Pixel-Shader Stage - The pixel-shader stage receivesinterpolated data for a primitive and generates per-pixel data such as color.

·        Output-Merger Stage - The output-merger stage combinesvarious types of output data (pixel shader values, depth and stencilinformation) with the contents of the render target and depth/stencil buffersto generate the final pipeline result.

·        Hull-shader,tessellator, and domain-shader stages, which comprise the tessellation stages - The tessellation stages converthigher-order surfaces to triangles for rendering within the Direct3D 11pipeline.

The Direct3D 11programmable pipeline is also designed for providing high-speed computingtasks. A compute shaderexpands Direct3D 11 beyond graphics tosupport general purpose GPU computing.