Jump to content

  • Log In with Google      Sign In   
  • Create Account

DrawPrimitive


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
3 replies to this topic

#1 XGT08   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 July 2014 - 08:47 AM

Hello,

 

I would like to know whether the DrawPrimitive (and its siblings) function from Direct3D9 returns control back to the caller before completing the draw operation. I always thought that the function is responsible for sending rendering commands to the driver and not perform the actual rendering itself. Is this correct?



Sponsor:

#2 Samith   Members   -  Reputation: 2327

Like
2Likes
Like

Posted 27 July 2014 - 09:04 AM

Yeah, that's correct. Draw commands will never wait on the GPU. Direct3D will only block and wait on the GPU if it has to (for example, if you're trying to map a resource that's being written by the GPU, it'll wait for the GPU to finish writing before giving the CPU access).



#3 Jason Z   Crossbones+   -  Reputation: 5432

Like
0Likes
Like

Posted 27 July 2014 - 09:24 AM

The only nuance to Samith's answer is when you are using a reference device or one of the software rasterizers.  I think the runtime behavior is still the same (i.e. the function returns immediately) but the CPU resources are being used to execute the rendering command instead of the GPU.  But in general, Samith is completely right.  You can try using some of the profiling tools available (both in the newest Visual Studio versions or vendor specific tools) to see how this effects the overall timing of a frame.



#4 XGT08   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 July 2014 - 09:25 AM

Thanks guys!






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