Original Post
While doing a simple test for blitting with colorfills, I ran across something strange. I created a small application that simply draws 2500 squares onto the primary surface every iteration of the main loop, and then a frame counter keeps track and displays the fps. On my system(AMD Athlon XP 2400+, 512MB DDR, ATI Radeon 8500 128MB AGP), I get roughly 68 FPS. If I take out the blitting call to DirectDraw, I get about 40,000 FPS(doing nothing but count frames, of course). So I know that the blitting command is what slows things down(duh.). That isn''t the issue. I tested this application on another computer(AMD Athlon 1900+, 480MB RAM, S3 Graphics ProSavageDDR 32MB PCI!), and this machine got roughly 190FPS! Since it is a slower processor, less RAM, and inferior video card, using the PCI bus to boot, I would expect it''s performance to be worse than my main machine, but instead it is more than double the speed! I am running DirectX 9.0, and the slower machine is 8.1, could that account for the difference? I also ran a test to see if any of the Blt() calls failed for either machine, and all 2500 calls returned as being successfully drawn, so I know the slower machine wasn''t skipping any of the drawing calls. Both machines have DirectDraw Acceleration set to enabled, using the DXDiag tool. I''m completely baffled as to why this is happening. My (supposedly) superior ATI video card (albeit a bit old) draws roughly 170,000 squares per second, while the no-name brand card with 25% the video memory and using the PCI bus instead of AGP gets roughly 475,000 squares per second!
Also, I experimented with the size of the squares. Whether the Blt() call was used with a 2x2 square or a 32x32, it did not affect the framerate at all. That would imply that the graphics card itself could handle actually processing the blitting commands and drawing them to the primary surface without any problems. It leads me to believe that the slowdown is in actually issuing those commands to the graphics card. And it would seem to me that it would take a hell of a lot longer to submit 2500 commands all the way through the PCI bus than it would through the AGP bus...
Ugh