   Multisample and Antialias performance
  I'm using SlimDx (feb 2010), and use PresentParameters flag and RenderState to turn on antialias like this (after necessary caps checks):presentParams.Multisample = MultisampleType.FourSamples;device.SetRenderState(RenderState.MultisampleAntialias, true/false);The first line is done at setup, the second line is executed when anti-alias is turned on/off (within a device.BeginScene/device.EndScene block).The interesting thing is that when run on two computers, I get a performance hit in the device.Present() method on one of them. These are the two test machines (other hardware equal): - Windows 7 with ATI Radeon HD 3870 card - Windows Xp with Nvidia GeForce 8600 GTS cardThe first setup takes about 600ms to Present() the first time, the other 45ms. This is repeatable every time. My question is: how can the difference be so huge? I know that they are running on different OSes, and different hardware, but since both graphics cards are relatively modern I didn't expect that. I will keep investigating, of course, just wanted to see if anyone else has seen this before.   
  7 has a virtualized GPU resource model, so the allocation of the resources needed to present the first frame may well follow a different pattern than on XP.In addition, the drivers themselves are free to do allocations at any point before Present, but it is not required that they do it before that.The following frames should render at much more comparable times, since the two cards are roughly equivalent in performance for basic rendering (3870 is actually theoretically a little faster).   ;  do you have vsync enabled? maybe the one that takes 600ms is taking that long to wait for the refresh?   ;  Thanks for your swift replies.Nope, Vsync is turned off (and verified using device caps). I didn't know about the virtualized driver model, will have to look into that. I have tweaked a little more, and the only difference on Win 7 when it loads fast/slow is the PresentParameters.Multisample property. If set to None, it is fast, if set to FourSamples (or some other value) it is slow, regardless of whether the RenderState flag MultisampleAntialias is on or off.;  Please confirm my assumption that this only affects the first call to Present?In Windows 7 with Aero enabled, the DWM system already allocates enough room for a full-screen backbuffer (and then some). Therefore, the driver doesn't necessarily have to allocate any physical GPU memory for your app's backbuffer if you ask for a non-MSAA one. On the other hand, a MSAA backbuffer request means that the physical allocation must be made.You should not assume anything about performance of rendering individual frames. If your game's/app's timing logic relies on steady performance, use an algorithm that smooths the peaks out of frame timings.   ;  I also remember seeing a performance issue report on ATI drivers about perceived slow loading performance on some games. It might be due to the allocation pattern (lazy vs. proactive). Note that "lazy" isn't necessarily a bad thing; it just means that stuff is done just when it is actually needed (saving intermediate resources and need for synchronization), instead of up front. Unfortunately, the user sees that the "loading" bar is way slower than in other configurations, whereas the other configurations take their time before the user sees the loading screen to begin with. Therefore, while the actual time from desktop to game might be extremely similar, the user perceives the lazy approach as the slower one.   ;  I can confirm that it is only the first Present() that takes time.However, after investigating driver details, an upgrade (minor version) of the driver brought incredible performance improvements (5 times better), so now it is no longer an issue.Thanks for all help.   