Questions about Managed DirectX performance

While I like to think that I have a fairly good idea about the time spent executing the code I write, I have to admit that experience has shown me that I am wrong most of the time and profiling is the only way to actually know your program behaviours. Having said that, I still like to have an accurate model, in my mind, of what actually goes on "under the hood" when I write a graphic application.

This is even more true in the case of Managed DirectX since the managed environment add an extra layer of code. The best objective results about this is obtained by looking the managed vs natice C++ versions of many samples in the SDK. For most of them, the difference is small and acceptable in most situations.

Yet I would like to know what goes under the hood. You can use "Reflector" on the Managed DirectX dlls and get a fairly good idea how Managed DirectX has been implemented on top of native COM DirectX. The implementation of native COM DirectX is more mysterious. In the DirectX SDK, you'll find the description of the "graphic pipeline" and explanation of what is supposed to happen at each stage.

If you want to know more you can look at Window Server 2003 DDK and study the implementation of display drivers. The problem, in this situation, is the DDK gives you one sample driver for a 3DLabs card and the technical documentations for this card is pretty hard to find. So we have one device driver that implements the DirectX API but we have little documentation about the card itself (and the driver is around 100K LOC). In the implementation of the drivers, it becomes pretty obvious that the main workhorse of Direct3D is the function D3DDrawPrimites2. Studying it is instructive but of limited value since the documentation for the card itself is missing. I have searched the internet for other display driver samples that support DirectX and didn't find any. I recall one nVidia developper saying that he learned about this stuff on the job.

I find this situation unsatisfactory and it provides the ideal conditions for letting people say all kind of nonsense. I like "cold hard facts" and if someone has suggestions on how to improve this situation, I would be happy to hear about them.




Bookmark it...
Digg!Reddit!Del.icio.us!Google!Facebook!Slashdot!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!
 
< Prev   Next >
Joomla Template by Joomlashack
Joomla Templates by JoomlaShack Joomla Templates by Compass Design