Arhitecture
  
PipelinePipeline coud be described as production line. Therefore, production of something is devided into phases of production which get united and at the and final product is there. Similiar example of pipeline is production line of cars. At first production of body, then paintjob, then installing parts, and all that on one production line, or pipeline.
Pipeline speed depends upon slowest phase. For example, when producing cars, if installing of parts lasts 3 minutes and all other phases take 2 minutes, then all other phases must wait that one minute before they come to the next phase. Therefore in pipeline example parts installing is bottleneck because this determins speed of whole production.
This pipeline as described in example is located also in computer graphics. Graphics pipeline performed in real-time can be devided into 3 basic phases shown here:

Basic GPU pipeline look
Those phazes are Application, Geometry and Rasterizer. Every each phase is actually pipline for itself because it is consisted of few subphases. Slowest phase of pipeline determines picture drawing speed, fps (frames per second).
Application phase
Like named, application phase is started by software (application). This phase has collision detection, accelerator algorithms, animacion & stuff. Here user can have influence on models (ex. game characters). Also, developer (person that develops some software) has total control about application events because it is after all his developing product.
Geometry phase
Geometry phase can be software or hardware, depending on arhitecture, and it deals with geometric transformation - rotations, translations, scaling, projections, lightning etc. This phase actually calculates what will be drawn, how should it be drawn and where should it be drawn.
Geometry phase is devided to several subphases (those subphases are actually numbers of coordinate systems):

Subphases inside geometric phase
Model coordinates
- every object is modeled in its coordinate system
- It is mostly supposed that objects are presented with triangle, square or polygon
- objects can be modeled with "splines" or with NURBS (Non-Uniformal Rational B Splines, mathematic technique with using polinoms to describe smooth surfaces) but within drawing phase (render time) they are being converted to polygons.
3D world Coordinates
- integration place
- all objects have to be moved to same coordinating system
- at every moment lightning parametars must be specified
Eye/Camera/View coordinate system - coordinated system of camera/viewer
- at this moment scene viewing point is being chosen
- coordinates are being converted so persone watches upstream of specific axis
- Usualy this is z-axis with x-axis on right side, and y-axis upwards. This transformation ease later transformation 3D picture to 2D screen.
Clipping Coordinate System
- this is projection transforming phase
- determins view volume, viewable part of space. Every points must be transformed according to projection. Normalization is necessary, because all coordinates must be between 0 and 1 (DirectX) or -1 and +1 (OpenGL)
Normalized Device Coordinates
- cutting is being done
- it is being projected from 3D to 2D, from already normalised cube, z-axis is remembered for deph determination
2D screen Coordinate system
- vectors are converted to pixels
- at this moment texturing and elimination of hidden surfaces is being done
- anti-aliasing also can be done after this phase
Rasterizer phase
This phase draws, renders (rendering), picture onto screen based on data generated in previous phase.
Pipeline is just like at CPU, basic working method of graphics processors. Pipeline phase can also be paralel so execution speed is higher.
Parallelism
Other way for getting fast graphics is parallelism which can be made in geometry phase and raster phase. Idea of this kind of work is that at the same time, is made more results and then in later phase, to be combined. Parallelism working method of graphics is presented here:

Bsic GPU parallel arhitecture
On picture datas from application phase come into geometry phase where are application phase results shared to minor graphics units (G), and eash geometric unit process graphics part (ex. projection). Then those results are sent to rasterizer units (R) for further processing.
But, as more results is parallel processed, some kind of hierarchy is needed so parallel units together give image that user wanted. This hierarchy can execute anywhere in pipeline which gives 4 different sorts of hierarchy, which are: Sort-First, Sort-Middle, Sort-LastFragmentt, Sort-Last Image.

Parallel graphics arhitecture
Raster phase is consisted with two inner phases: Fragment generation (FG) and Fragment merge (FM). FG does real location within basic elements and pass them to FM that compounds results into one. Texturing is mostly done either at the begining of FG or at the end of FM
Sort-first
- pile basic elements before entering into geometry phase
Sort-middle
- after geometry phase location on every basic screen element is known and can be passed to raster units (FG and FM)
Sort-last image
- after raster phase everything is compounding
Sort-last fragment
- compounds fragments after FG before FM fragment compoundation
Labels: architecture, pipeline
Post a Comment