Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Graphics APIs like Direct3D translate their API-level calls into device-agnostic commands and queue them up in a buffer. Flushing that buffer, to perform actual work, is expensive -- both because it implies the actual work is now being performed, and because it can incur a switch from user to kernel mode on the chip (and back again), which is not that cheap.</p> <p>Until the buffer is flushed, the GPU is able to do some prep work in parallel with the CPU, so long as the CPU doesn't make a blocking request (such as mapping data back to the CPU). But the GPU won't -- and can't -- prepare everything until it needs to actually draw. Just because some vertex or texture data is on the card doesn't mean it's arranged appropriately yet, and may not be arrangeable until vertex layouts are set or shaders are bound, et cetera. The bulk of the real work happens during the command flush and draw call.</p> <p>The DirectX SDK has a <a href="http://msdn.microsoft.com/en-us/library/bb172234%28v=vs.85%29.aspx">section on accurately profiling D3D performance</a> which, while not directly related to your question, can supply some hints as to what is and is not expensive and (in some cases) why.</p> <p>More relevant is <a href="http://c0de517e.blogspot.com/2008/04/gpu-part-1.html">this blog post</a> (and the follow-up posts <a href="http://c0de517e.blogspot.com/2008/04/how-gpu-works-part-2.html">here</a> and <a href="http://c0de517e.blogspot.com/2008/04/how-gpu-works-part-3.html">here</a>), which provide a good overview of the logical, low-level operational process of the GPU.</p> <p>But, essentially (to try and directly answer your questions), the reason the calls are expensive isn't that there is <em>necessarily</em> a lot of data to transfer, but rather that there is a large body of work <em>beyond</em> just shipping data across the bus that gets deferred until the command buffer is flushed.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload