   Huge performance drop under Windows 7
  Hello,I have a big problem! During the last months I developed a software with visual studio 08 under vista. The solution consists of two projects: Project 1 is a c++ static library and its my 3D engine. Project 2 is a C++/CLI windows application. Project 2 is my terrain renderer with GUI and all that stuff and it uses project 1 (it adds the .lib that is created by project 1). Anyway, when I start my terrain renderer under Vista I had like 1000 fps and when I used the mouse brush to edit terrain (raise height points) the frame decreased (cause of buffer locking, recomputing normals, errors for geomipmapping etc.) but it never dropped below 300 fps.Now I just installed Windows 7 and opened my solution in visual studio 2008. I didnt change one line of code. And what I experienced was shocking. When I now use the brush the performance is awful. The fps likely drop below 80fps and the height increase of the terrain is very jerky (it was very smooth on vista).Im really frustrated and lost, since I didnt change any code. How is this possible, that my program runs so terrible in Win7? What can I do to fix it?Thanks!   
  It's hard to know for sure without some sort of performance analysis. Have you used CPU and GPU profiling tools like VTune/NVPerfHUD/GPU PerfStudio/PIX/etc.?   ;  Just a shot in the dark. After you installed Windows 7, did you get the latest drivers for your graphics card?   ;Quote:Original post by MJPIt's hard to know for sure without some sort of performance analysis. Have you used CPU and GPU profiling tools like VTune/NVPerfHUD/GPU PerfStudio/PIX/etc.?No. Since I have no experience with such tools I tried to avoid using them. I hoped someone made similar performance experiences and know what causes this.Quote:Original post by MJPAfter you installed Windows 7, did you get the latest drivers for your graphics card?Yes, that was the first thing I did after the installation: installing the newest nivida driver for my geforce 275 gtx.   ;  Thank you for your post. I'm working for Windows Graphics test team, and very interested in your problem.May I ask some questions?  1) Did you rebuild your apps using the latet DirectX SDK Feb 2010?http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15  2) Is it possible to get dxdiag file for me?Open a cmd window, run dxdiag then click on "Save All Information" button and save it.  3) May I ask you to send the dxdiag file and your source code to me at jianchen@microsoft.com, I promise to help you solve this problem.;Quote:Original post by standby01Thank you for your post. I'm working for Windows Graphics test team, and very interested in your problem.Wow, help from an official source! Now I am getting back some confidence:)Quote:Original post by standby01May I ask some questions?As many as you want!Quote:Original post by standby01 1) Did you rebuild your apps using the latet DirectX SDK Feb 2010?http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2c7da5fb-ffbb-4af6-8c66-651cbd28ca15Yes, I am using the february DX SDK and I rebuild the whole code.Quote:Original post by standby01 2) Is it possible to get dxdiag file for me?Open a cmd window, run dxdiag then click on "Save All Information" button and save it. 3) May I ask you to send the dxdiag file and your source code to me at jianchen@microsoft.comI have sent you the file.Quote:Original post by standby01I promise to help you solve this problem.Sounds great!:);Quote:Original post by schupfSince I have no experience with such tools I tried to avoid using them.Well there's only one way to get experience with  them. [wink];  Thank you so much to schupf for kindly providing us the source code and other assitances. Here are some conclusions which might be interesting to others.I implemented the test for the fre build this way.1.Used “Start Debugging” from VS 20082.Used “Start Without Debugging” from VS 20083.Directly ran herbstEd.exe.4. Used WARPAfter the app ran,  I saw the frame rate is around 245 for HW and 81 for WARP(depending on window size). Clicked on “Brush Modify” from “Terrain” tab, then went back to “Objects” tab. Held down the mouse then moved the green cirlcle, I saw the terrain changed dynamically. During this testing I recorded some data for above 1 to 4 tests1.Frame rate could change to as low as 155.2.Frame rate could change to as low as 186.3.Frame rate could change to as low as 190.4. Frame rate could change to as low as 66. The results of 2 to 4 are normal, 20-25%.  Why is the result 1 larger? The reason is the debugger need to retrieve and record some important information even for a fre build.I ran tests on 3 of my machines, and got consistent results.BTW, in your application, it is highly suggested to add some code, if a hardware device is not supported, create a WARP device.    HRESULT  hrResult  = D3D10CreateDevice(adapter,   D3D10_DRIVER_TYPE_HARDWARE,   NULL,   D3D10_CREATE_DEVICE_SINGLETHREADED | (debugDevice ? D3D10_CREATE_DEVICE_DEBUG : 0),   D3D10_SDK_VERSION,   &device);   if (hrResult == DXGI_ERROR_UNSUPPORTED    ||  hrResult == E_NOINTERFACE   {  hrResult  = D3D10CreateDevice(adapter,   D3D10_DRIVER_TYPE_WARP,  NULL,   D3D10_CREATE_DEVICE_SINGLETHREADED | (debugDevice ? D3D10_CREATE_DEVICE_DEBUG : 0),   D3D10_SDK_VERSION,   &device);  Error Handling;   }By this way your app still can run on machines with D3D9 adapters. Here is a site for WARP.http://msdn.microsoft.com/en-us/library/dd285359.aspx[Edited by - standby01 on April 27, 2010 10:02:14 PM];  Thank you standy01. My error handler for error when creating Direct3D device was very "poor".I'm happy to know that there are people from Microsoft Graphics team around this forums.   ;Quote:Original post by Aqua CostaThank you standy01. My error handler for error when creating Direct3D device was very "poor".I'm happy to know that there are people from Microsoft Graphics team around this forums.I know there are several guys from MS graphic teams are here to help.   