Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

DrawPrimitive

4: Adsense

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   

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?



#2 Samith   Members   

2460
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   Members   

6430
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   

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.