Você está na página 1de 17

PIPELINING IN GRAPHICS

TABLE OF CONTENTS: 1. Abstract on Pipelining in graphics 2. Introduction on Pipelining in graphics 3. Different stages involved in pipelining in graphics 4. Conclusion 5. Future Scope 6. References

By : JASANTHA KONDURU (9500)

1. Abstract on Pipelining in graphics :

The present day technology plays a vital role and makes anything possible in the day to day life of a human being. It is used in many possible ways. Everything depends on the computers that we use. The performance of the CPUs is very high and it basically depends on the efficiency and the speed. To make this possible, the concept of pipelining has been introduced. Pipelining is an implementation technique where multiple instructions are overlapped in an execution. Pipelining is the key implementation technique used to make CPUs fast. Everyone loves to play video games and the market on it is at peak. There are many companies who invent different kinds of games with different methods, but making a 3D model work is very difficult. Without the speed and efficiency, the 3D modeling would be a difficult task. Pipelining actually helps in speeding up the processor. The generalized concept of pipelining is to complete a task in very less time. In the similar way as CPU, the GPU in the video card also has different stages of pipeline. When a 3D model is created, many things need to happen at a time and the consumption of the time should also be less. The concept of pipelining helps the GPU to improve the speed. By increasing the stages of pipelining, the speed of the processor increases. This paper discusses about how pipelining actually works in the 3D modeling and different stages involved. This paper mainly concentrates on the graphics pipeline that is implemented in DIRECT 3D11.

Introduction on Pipelining in Graphics : 2.INTRODUCTION ON PIPELINING IN GRAPHICS: A Graphic processing unit is a circuit which is used to speed up the building of images. A GPU is used in many devices such as mobile phones, personal computers, workstations, game consoles and embedded systems. In computers a GPU is located on the video card or they are located on the mother board or in certain computers they are located on the CPU die. A new desktop and a notebook have graphic cards and they all use integrated GPUs. But the GPU present on the video card is far more powerful than the integrated GPU present in these desktops and notebooks. For a GPU to get designed there are many stages involved. The processing of staging all the steps for displaying the images and to process the GPU is known as Pipelining. The pipelining in graphics involves many steps. This paper discusses about various stages involved.

A NVIDIA GEFORCE 6600GT Graphic Processing Unit

3.Different Stages Involved in Pipelining in Graphics :

The above mentioned stages are the stages involved in the pipelining of graphics. Below goes the explanation of each stage.

STAGE 1: INPUT ASSEMBLER: The input assembler is stage is responsible for supplying the data to the pipeline for example triangles, lines and points. In this stage the indices will be loaded from the index buffer.

STAGE 2 : VERTEX SHADER The name of this stage itself suggests the work thats being done in this stage. This stage processes vertices. It performs operations such as transformations, skinning and lighting. The vertex shader basically takes only one input vertex and gives out only one output vertex.

STAGE 3: PRIMITIVE ASSEMBLY : The stage three of pipelining in graphics is the primitive assembly stage. The previous stage actually process the vertices and the stage three that is primitive assembly assembles all the vertices that are obtained from the vertex shader. For example if a point is a single vertex that is obtained from the vertex shader than that becomes the single primitive. So, if there is a line than the primitive assembly reads two vertices and if thats a triangle that is obtained than the primitive assembly reads three vertices.

STAGE 4 : HULL SHADER This stage works to implement the tessellation stage. The output of the hull shader drives the tessellation stage and the domain-shader stage. The work that the hull shader stage does is that it actually transforms all the input points that are obtained from the vertex shader in to a set of output points. A hull shader inputs the patch control points and outputs the patch control points depending upon the tess factors.

An example to create a hull shader:

[patchsize(12)] [patchconstantfunc(MyPatchConstantFunc)] MyOutPoint main(uint Id : SV_ControlPointID, InputPatch<MyInPoint, 12> InPts) { MyOutPoint result; ... result = TransformControlPoint( InPts[Id] ); return result; }

HRESULT CreateHullShader( const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage *pClassLinkage, ID3D11HullShader **ppHullShader);

STAGE 5 : TESSELLATOR STAGE : What is tessellation? Tessellation is nothing but forming a pattern with identical shapes. These identical shapes must fit without any gaps and should not overlap on each other. A tessellation can be referred as tiling. The main work of the tessellator stage in computer graphics is to create new vertices and subdivides a domain to even smaller stages.

The implementation of tessellation can be done both in hardware and even in software. The hardware implementation of tessellation can help the graphics pipeline to evaluate a lower detail model and can give the output in to a higher detail. There are many benefits using the tessellation in the graphics pipelining. It can actually save lots of memory and bandwidth.

One thing that has to be noted in the tessellation stage is that the tessellation stage is functional fixed stage. If the hull shader is initialized then the tessellation is automatically initialized. This stage receives all the inputs from the hull shader stage. The below given program is used to initialize the hull-shader for tessellation stage: void HSSetShader( ID3D11HullShader *pHullShader, ID3D11ClassInstance *const *ppClassInstances, UINT NumClassInstances );

STAGE 6: DOMAIN SHADER : The work of the domain shader is to calculate the vertex point by taking the shaded points from the tessellator stage and some extra data from the hull shader and also takes the tessellated points from the TS and then calculates the vertex point to create the vertices again.

Program to create a domain shader: HRESULT CreateDomainShader( const void *pShaderBytecode, // SIZE_T BytecodeLength, // ID3D11ClassLinkage *pClassLinkage, // ID3D11DomainShader **ppDomainShader );

STAGE 7 : GEOMETRY SHADER The geometry shader is actually used to create new graphics. It takes the input primitives that are obtained from the beginning of the graphics pipeline. A geometry shader can create graphics such a points, lines, triangles and even more. The geometry shader takes the input as a whole primitive, optionally with adjacency information. For example, while working on lines the two vertices which makes a line are geometry shaders input and the rest of the vertices that are obtained can be emitted to zero and gives the output i.e. a line and the emitted fragments are rasterized and their fragments are sent to pixel shader.

STAGE 8: STREAM OUT : The stream out stage actually helps the programmer to write the output of the geometry stage and the vertex shader in to a video memory. It continuously streams out the output from the geometry shader to one or more memory buffers.

STAGE 9: RASTERIZATION The word RASTERIZATION means to convert an image in to pixles. This stage plays a vital role in computer graphics. 1. ENUMERATE all the pixels covered by a primitive. 2. INTERPOLATE all the values across the primitive. This stage helps in rasterizing all the primitives. For example if we want to rasterize a line here it goes : first thing to do is to define a line as a reactangle and then specify two end points and the representation of the ideal image is black line inside and white line outside.

STAGE 10 : PIXEL SHADER : A pixel shader is a shader program that is often executed on the graphic processing unit. The pixel shader can interpolate the vertex data and can output the pixel colors.

STAGE 11 :OUT PUT MERGER : The output merger is the step that actually decides which pixels are visible after obtaining the pixels from the pixel shader.

STAGE 12 : COMPUTE SHADER : The computer shader stage is a programmable stage and this technology is also known as directcompute stage. This stage provides high-speed general purpose computing and it takes advantage of the huge numbers of parallel processors on the GPU.

Conclusion:
In this project the main focus was on the pipelining of graphics. The paper discusses on the number of stages involved and the work done by each stage. Graphics is playing a very vital role in the present day life. The number of video games is increasing day by day and even the craze for that is more. So, to know how it works we have to learn what exactly happens in the GPU.

FUTURESCOPE: Future scope of the graphics depends on the technology. The technology keeps on improving from one stage to another stage. So, today we have one version of the graphics and the programming of graphics is available. When the technology keeps on improving even the graphical programming also improves. One thing we have to note about the technology is that, when we have problem we engineers try to find a solution for that problem. So, when the user has a problem with any of the graphical technologies that he/she is using the solution will be invented.

REFERENCES: PDF DOCUMENTS:


1. Innovating in a software graphics pipeline by Paul Lalonde-Intel Corporation 2. Optimizing the Graphics Pipeline by Koji Ashida- NVIDIA 3. Graphics Pipeline Rendering Operations : by Alan Watt, 3 rd edition, Pearson Education Limited 2000 4. Understanding the Graphics Pipeline by Suresh Venkatasubramanian. 5. A brief overview of the Graphics Pipeline by Cedric Lee 6. Introduction to the DIRECT3D 11 Graphics Pipeline by Kevin Lee- XNA Developer Connection Microsoft Corporation, NVIDIA. 7. Distributed Graphics Pipeline on the Grid by Ade J.Fewings, Nigel W.John (IEEE)

URLs :
1. 2.
http://fgiesen.wordpress.com/2011/07/01/a-trip-through-the-graphics-pipeline-2011 http://msdn.microsoft.com/en-us/library/ff476340(v=vs.85).aspx

Você também pode gostar