Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Graphics Pipeline Stages


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 jujumbura   Members   -  Reputation: 188

Like
0Likes
Like

Posted 18 October 2012 - 01:00 PM

Hello all,

I have recently been wondering about the rendering pipeline, and I am hoping somebody could help clarify some things to me.

My understanding is that in general, vertices are procssed by the vetex shader, then are rasterized into fragments, which are then processed by the fragment shader, and finally all fragments are converted into pixels in the frame buffer. I know I am skipping some steps here ( geometry shaders, clipping, etc. ), but if I have gotten anything completely wrong there, please let me know.

My question though, is at what point does the GPU stop working on one stage and then move on to the next? For example, does the GPU immediately begin rasterizing a triangle the moment it has three vertices fully processed, or does it finish processing the entire mesh and THEN begin rasterizing? Similarly, does the GPU start running the fragment shader on each fragment as soon as it is generated by rasterization, or does it create a batch of fragments and then shade the whole set?

Thanks much for any advice!

Sponsor:

#2 phil_t   Members   -  Reputation: 1191

Like
0Likes
Like

Posted 18 October 2012 - 01:04 PM

This might be able to answer some of your questions:

http://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/

#3 Crowley99   Members   -  Reputation: 151

Like
0Likes
Like

Posted 19 October 2012 - 07:38 AM

The above link will certainly answer your question, but the short form is:
  • My question though, is at what point does the GPU stop working on one stage and then move on to the next?
As long as there is data available for a particular stage, the GPU will work on it. In general, all these stages are active at once (some warps are running vertex shaders, some warps are running pixel shaders (and obviously geometry, hull/domain shaders, etc.), and the fixed function hardware doing raster, clipping raster ops, etc are also running simultaneously), and working on different triangles.
  • For example, does the GPU immediately begin rasterizing a triangle the moment it has three vertices fully processed, or does it finish processing the entire mesh and THEN begin rasterizing?
Like most things in the GPU, workloads are batched. The GPU will finish work on a batch of vertices (in the order of ~32), and then pass them down to the set up and rasterization stages along with their connectivity information.
  • Similarly, does the GPU start running the fragment shader on each fragment as soon as it is generated by rasterization, or does it create a batch of fragments and then shade the whole set?
The rasterizer will try to create a batch of fragments that are available "simultaneously". This gets processed in chunks by the pixel shader.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS