Graphics Pipeline 101

Any hardware related topics go here.
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Graphics Pipeline 101

Post by Anakha56 »

Gouhan wrote:Hey, with the impending release of Vista and DX10 cards, all that used to apply to gfx cards of DX9 class and lower will no longer hold true. (At least past the conceptual stage)...

So this would be a great opportunity to see in concept the basic differences between the traditional pipeline (OpenGL/DX9 and lower) and the newer one :)

DX9/OpenGL2.0
==============
Application -> Geometry -> Rasterizer

1. Application requests DX version.
2. DX reports version and all supported hardware caps.
3. Application starts executing with the features that were made available by DX.

Hardware
=======
A) Dx issues instruction to driver
B) Driver issues instruction to hardware
C) Hardware renders

C) Detail
===========
C.1) Data comes from CPU in the form of primitives (triangles, points, lines...)

C.2) Vertex Shaders manipulate the primitives, assigning texture id's to specific points, triangles etc...

C.3) Vertex Data is them broken down into fragments

C.4) Fragment are fed into fragment shader (pixel shader)

C.5) Shaded fragment are then passed unto rasterizer (ROP)

C.6) Data is written into frame buffer

C.7) Frame buffer to Screen
===============================================

* The above only deals with the concept behind graphics rendering on commercial GPU's etc...
* This process is in itself a pipeline.
* It can be further broken down into stages within these stages.
** Even in the dasys of the TNT1, this concept was the same except that there was no fragment shader stage. Data went straight from Vertex -> Rasterizer stage. :wink:

* Pipeline: A pipeline is any process that can be broken down into individual steps, where at the end something new is produced from the various stages. :)

* A pipeline is only as fast as it's slowest part (in practice it'll be slower than it's slowest part) 8)
==============================================
Hope that helps... :D
So I thought lets make a sticky thread where every1 can ask questions about gpu's and how they work. So does anyone have any questions? I will think of some when I get some free time... :oops:
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Texture sampling
=========================
Texture sampling takes place in general the same way on all graphics cards. Each texture is assigned an iD that has a corresponding primitive; this primitive and the id are passed to the next stage of the pipeline (pixel shader etc…) where the texture is actually sampled and applied to the primitive. (It is for this reason the traditional OpenGL pipeline does not allow fragment shader to alter texture id)
So while texturing is done after the vertex stage, the texture assigning is done at the vertex stage. Please note that there doesn’t have to be a unique texture for every single pixel. You can assign textures to geometry by stating that from x to y on this model, texture “A” to “B” is to be used.

General rule is get as many texture samplers as you can into the graphics card, but at the same time make sure they are always used and are never idle. This can be a tricky trade off, over do the texturing abilities and your die size becomes too big and efficiency decreases. Have too few and the rest of the rendering pipeline waits.
{This is one of the places where ATI and nVidia have had different views. One choosing to focus on math abilities the other texturing, neither of them having the perfect match.}

Placement of the texture samplers is also vital to overall performance depending on what you are trying to do. In the case of the GF6/7, the units sit inside the fragment shader, while on the Radeon X series; they are placed outside in a separate area or at least are de-coupled from the fragment units. It seems having the samplers outside the fragment units allows you to decide exactly how many texturing units you need and only put as much as you see as necessary. Pairing the units however has the advantage of distance which in the long run becomes important.

General infor on Textures/texturing
=======================

Texture sampling is done per pixel. Depending on the texture format and component, the graphics card can either sample 4 values in the form of a 4-component texture (RGBA) or 3 values in a 15/16-bit texture. (RGB no Alpha) Texture formats are usually written in their bit values starting from left to right... (i.e. 555 is a 15-bit texture format with a null Alpha value, 4444 is also a 16-bit texture with a 4-bit {16 gradients} Alpha channel and 4 bits for the R, G & B)

Most textures are FOURCC (four component colours) and they take up the same amount of data per pixel irrespective of what the texture data is.

Multi-texturing, which was the highlight of DX5 dealt with applying multiple textures to an object to achieve interesting effects. At the sampling level nothing significant happens other than that component multiplication takes place to determine the final texel colour. (This can be done by multiplying red from base sample with a lighter shade of red from the next sample. This doubles colour depth for the given component of the given sample)
======

Hope it made sense :D
Last edited by Gouhan on 04 Oct 2006, 19:54, edited 1 time in total.
DAE_JA_VOO
Registered User
Posts: 12310
Joined: 28 Nov 2005, 02:00
Location: That other place
Contact:

Post by DAE_JA_VOO »

Gouhan wrote:Hpoe it made sense :D
Everything except THAT made sense ;)
That guy that used to mod cases. Now I take photos. True story.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Ha Ha DJV :D I don't know what happened there. I fixed it now. Thanks.
Next to follow Fill-rate: This one is gonna be a little too long :o
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Post by Anakha56 »

An interview with Microsoft's DX10 Guru

Anything new there for you Gouhan? :)
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

He He. One can always learn something new:)
glad to see that they have carried HLSL into DX10. Come to think of it, it never got it's chance in DX9 because by the time it arrived under the DX9.0c guise it was pretty much useless as any games were not issuing via HLSL but addressing the Vertex and fragment units as separate programs.

I also saw on the nVidia developer page that the new Cg+ 1.3 had come out featuring support for DX10, so that made me wonder about how viable it is if HLSL will not be making it's way into DX10. But from your link it clearly is and that means there's a future for Cg+.

nV have been pushing GP-GPU since GeForceFX, but this never materialized because of the late entry of HLSL and lac of powerful enough hardware. With DX10, we will once again see GP-GPU and ATI's/Stanford's Stream technology making serious inroads into general processing :)
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Post by Anakha56 »

explain above post plz? :? :wink:

Cg+ 1.3,HLSL, GP-GPU threw me :lol:
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Cg+ Make that 1.5 beta2
=====================
C+ for Graphics: A high level shader language, much like GLslang in OpenGL 1.5 and HLSL in DirectX9

C for graphics, as the name suggests allows developers and anybody for that matter to write code at a very high level, using a similar class structure to C+ without getting down to the nitty gritty of the GPU and having to write shaders in assembler and the like.

After you've written your graphics program (or any other shader program that can run on the GPU) Cg+ compiles your program and makes it ready to run either under OpenGL or DirectX. much like the other Shader languages, the purpose is to bring more power to the developer while delivering a higher level of abstraction between the engineer and the artists hopefully allowing more creative CGI etc...

Cg+ compiles natively for nVidia hardware, but ATI, SGI, S3, Intel, Nokia or whomever can write their own back end and make it so it compiles natively to their hardware. This is a royalty free program, however it is not open source.
...allows developers to create advanced visual effects for today's programmable GPUs from NVIDIA and other vendors.

Cg also comes with a suite of complementary tools, including plug-ins for artists (supporting Maya, 3ds max, and Softimage|XSI), runtime libraries, comprehensive documentation, and hundreds of shader examples.

The latest NVIDIA Cg Toolkit is designed to be your one-stop solution for shader development.
===================

HLSL: High Level Shader Language
======================
Initially it was supposed to have come out with DX9.0, but it never did and only made it's way into the API with rev C, years after DX9 was available.
Microsoft worked closely with nVidia in developing HLSL (that is why in many ways it is the same as Cg+ right down to syntax etc...). Interestingly enough while MS worked with NV on the language, DX9.0 spec was finished off with ATI who obviously have no interest in Cg+ directly, but are fully compliant with HLSL :D SO indirectly they do support Cg+ but they have yet to make s back end for Cg+ and probably never will.

GP-GPU
===============
General Purpose- GPU:
General purpose computing on the Graphics card.
At present this is primarily concerned with Physics but any other type of programming (esp parallel computing/ number crunching) can be performed with the right driver/ SDK etc...

Definitely still in its infancy...
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Memory Performance on Modern Graphics Cards
http://www.systemshock.co.za/forums/ind ... topic=9888
Mrburger
Permanently Banned
Posts: 151
Joined: 09 Feb 2007, 02:00
Location: SA RULES

Post by Mrburger »

Half-life 2 for ever, until HL3 comes, but by then there will be DX 12 with windows 2010.
WiK1d
Registered User
Posts: 20732
Joined: 13 Sep 2004, 02:00
Location: Cruising the streets of Pretoria
Contact:

Post by WiK1d »

Mrburger wrote:Half-life 2 for ever, until HL3 comes, but by then there will be DX 12 with windows 2010.
Riiiiiight. Do you even know anything?
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Mrburger stay out of this thread unless you have something valuable to add.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

http://www.systemshock.co.za/forums/ind ... opic=11169

Vista Vs Xp performance:
Will get updated as new drivers become available and more games are added.
Image
Lithe_Joint
Registered User
Posts: 802
Joined: 06 Sep 2006, 02:00
Location: WTF?
Contact:

Post by Lithe_Joint »

So may I assume that the "driver creators" are starting to concentrate more on DX 10 and Vista, and by doing so, shoving any plans for new drivers for Xp under the proverbial carpet?
the pen is mighter than the sword, but the word is always final
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Not really, but if you think about it. You can only tweak a driver so much until you run into issues with the APi itself. As it stands after years of tweaking on XP there isn't' much more that can be done. you can't revolutionize performance the way the Detonator drivers and force ware did when they were announced.

At this point its hand tweaking which is always unfavorable as there are so many games that you would need to do this for instead of making general improvements.

With Vista we will continue to see DX9 title advancements until such time that DX10 aware titles start to show up.Once they have then you can be sure that performance improvements in those games will be noticeable with every driver release.
Image
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Post by Anakha56 »

to resurrect a dead thread (seems to be my theme for tonight :P )

3D Pipeline I

3D Pipeline II

3D Pipeline III

How GPU's work

I thought if people get a better understanding of what goes into a GPU we could actually debate ATI's design (since ATI designed and not AMD:P ) VS Nvidia's a little better and not have fan boy arguments...

Also if you have your own links please feel free to post! www.beyond3d.com is also a good place to read about GPU's...
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

Great finds there Anakha, will make sure to read...
did you get the PM replying to you at the other place?
Image
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Post by Anakha56 »

yep Gouhan have pm and searching away for articles... :)

am going to go through these first and then I will start going through the older ones, on Sunday I was reading up on how hardware t&l works, very interesting and very complex am going to have to give it another go later on :)
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

yeah it actually isn't easy at all despite it being much easier than figuring out how you would do the same transformations in a vertex shader. Just worth mentioning that always keep the point/primitive (not yet pixel) in mind.

HOS are going to kick some serious ***, true test of patience and dedication :P
Image
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Post by Anakha56 »

Gouhan wrote:yeah it actually isn't easy at all despite it being much easier than figuring out how you would do the same transformations in a vertex shader. Just worth mentioning that always keep the point/primitive (not yet pixel) in mind.

HOS are going to kick some serious ***, true test of patience and dedication :P
what do be "HOS"? I haven't read that part yet :P
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
Gouhan
Registered User
Posts: 516
Joined: 17 Dec 2002, 02:00
Contact:

Post by Gouhan »

ha ha not "Hos" in that sense... LOL
I mean High Order Surfaces, that's B-splines, Bezier curves etc...
You'll know when you're there... :P
Image
DwayneZ
Registered User
Posts: 20
Joined: 25 May 2008, 02:00
Contact:

Post by DwayneZ »

Gouhan wrote:Memory Performance on Modern Graphics Cards
http://www.systemshock.co.za/forums/ind ... topic=9888
Its good info.
Graphic Cards Reviews
http://www.mygpu.info/
StarBound
Registered Pervert
Posts: 6879
Joined: 30 Jul 2004, 02:00
Processor: Intel i7 4790k
Motherboard: MSI Z97 Gaming 7
Graphics card: MSI GTX780Ti Gaming
Memory: G.Skill Sniper 1866mhz 16GB
Location: The Greater Unknown
Contact:

Post by StarBound »

Looking back at some of hte older posts its amazing how much hasnt changed.
My Steam Screenshots

I lived the dream ...then my PC died.
PsyCLown
Registered User
Posts: 6159
Joined: 16 Feb 2006, 02:00
Location: Johannesburg - Bryanston

Post by PsyCLown »

StarBound wrote:Looking back at some of hte older posts its amazing how much hasnt changed.
Yipp, exactly!!! :? :-/
Not that great IMO
“The true bare of any man is his willingness to accept the consequences of his actions.” - iser0073

Image
Spoiler (show)
APPARENTLY 92% Of Teens Have Moved On To Rap Music.
If You Are Part Of The 8% That Still Listen to real music then put this in your signature.
D3PART3D
Starbound's Dear
Posts: 16295
Joined: 01 Dec 2004, 02:00
Contact:

Post by D3PART3D »

Wow! Awesome thread guys :D
Ceterum autem censeo Samsung Mobile esse delendam.

When something is important enough, you do it even if the odds are not in your favor.
- Elon Musk
Post Reply