The Graphics "Pipeline" (continued)

The incredibly long graphics pipeline can be summarized into six general stages, which we'll further dive into later in this article.

1) Instruction Fetch/Decode, DMA, etc…

This stage is one that receives instructions and commands from the driver and decodes them into operations for all other parts of the graphics pipeline to perform. This is the stage that tells all of the other countless stages what to do.

2) Vertex Processing

Now that the GPU knows what data it needs to begin processing and what it needs to actually do to this set of data, it starts working. The data sent to the GPU is sent in the form of the vertices of the polygons that will eventually be displayed on your screen. The first actual execution stage in the graphics pipeline is what has been referred to as T&L for the longest time. This is the transformation of the vertex data that was just sent to the GPU into a 3D scene. The transformation stage requires a lot of highly repetitive floating-point matrix math. Next comes the actual lighting calculations for each of these vertices. In a programmable GPU these initial vertex processing stages are very flexible in that short vertex shader programs can be written to control a number of the characteristics of the vertices to change the shape, look or behavior of a model among other things (e.g. matrix palette skinning, realistic fur, etc..). This stage is actually a pipeline of its own, split into a number of smaller stages.

3) Triangle Setup

After we have beautifully transformed and lit vertices it's time to actually generate some pixels so they can be displayed on your screen. But before that there's a bit of house keeping to be done. There are the culling and clipping stages that basically remove all the vertices that extend beyond the bounds of the scene. Then we have some of the nifty visibility calculations that go on in most of today's GPUs to help throw out vertices that won't be visible to the user. This is where technologies such as HyperZ and NVIDIA's Visibility Subsystem come into play to throw out data before we actually start rendering pixels and waste fill-rate and memory bandwidth. Here the vertices are transformed into primitives (e.g. triangles).

4) Rasterization

Now that we've had our spring cleaning it's time to generate some pixels. The triangles we just generated are now converted into pixels in the viewport space which is the 2D space of your monitor; remember that although this is 3D rendering, you're still looking at a flat (2D) monitor. The z-buffer data (how far away/deep the pixels are in reference to the viewer) is calculated and stored as well in order to turn this otherwise 2D image into a 3D world.

5) Shading & Texturing

Although shading and texturing are two separate stages, they are tightly coupled and occur in parallel. These stages are also pipelines of their own, but as we just mentioned they occur in parallel. Texture coordinates are calculated which will be used to map textures onto these polygons that have been created using the vertex data. The textures are then loaded and then we have the pixel shading stage where today's programmable GPUs can allow small programs to run and create neat looking effects on the pixels (e.g. shadow mapping, z-correct bump mapping, etc…). There is a bypass/feedback network that exists between these pipelines so that data from one pipe may be fed back into a different pipe in order to perform additional rendering passes, shading calculations, etc…

6) Raster Operations

This stage is where all pixel level operations occur, such as z/color/stencil rendering, as well as anti-aliasing and texture filtering.

7) DRAM accesses/Put it on the Screen

At the end of the pipeline we have all final DRAM accesses that must take place so we can write these pixels we've worked so hard at generating to memory before sending the data off to the RAMDACs or TMDS transmitter(s) for display on your monitor.

Now that you've got a general idea of the overall 3D pipeline, let's further dive into each stage and see how the NV35 (GeForceFX 5900 Ultra) and the R350 (Radeon 9800 Pro) are similar and different, architecturally.

The Graphics Pipeline Stage 1: The Front End
Comments Locked

19 Comments

View All Comments

Log in

Don't have an account? Sign up now