Stellen Sie eine FrageStellen Sie eine Frage
 

FrageWPF falls to software mode

  • Samstag, 4. Juli 2009 10:28da Vinci TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    Using Perforator tool I find out that my application from time to time falls to software mode.
    Is there any way (maybe tools or logs) to find out what is the cause?

Alle Antworten

  • Samstag, 4. Juli 2009 18:11Ray M_ TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    Are you using any BitmapEffects by anychance? those are always rendered in software mode. If you have .net 3.5 sp1 replace them with regular effects that are hardware accelarated.
  • Montag, 6. Juli 2009 18:00da Vinci TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    No, I am not using BitmapEffect. Initially all work in hardware mode but suddenly switch to software...
  • Montag, 6. Juli 2009 20:27Jordan Parker - MSFT TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    Do you know how to repro the software fallback or is it pretty random? It might be a driver problem or, if you're on XP, you could be running out of video memory.
  • Mittwoch, 8. Juli 2009 12:30da Vinci TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    I would be said that it  is pretty random. But... There are something worries me.

    1) This app has an Image with WiritableBitmap (1900x1200x32bpp). If I use 800x600x32bpp image it falls back to software rarely. It looks like it folls when I recreate WiritableBitmap. I use the following code to change resolution of bitmap (to prevent momory leak):

    writeableBitmap = new WriteableBitmap(newWidth, newHeight, 96, 96, PixelFormats.Bgra32, null);
    image.Source = writeableBitmap;

    GC.Collect();
    GC.WaitForPendingFinalizers();
    GC.Collect();


    2) My app has unmanaged C++ part where I allocate video memory. I know amount my video memory (~80Mb). I use NVidia GeForce 8800GTS with 512Mb (WDDM drivers, Windows Vista). Does WPF have some video memory limits?