Ask a questionAsk a question
 

AnswerAppaling GUI performance on Vista RC2

  • Thursday, October 12, 2006 12:36 PMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hey guys,

    I don't know if this already been reported, but I've discovered that the GUI performance drops drastically on Vista RC2 when setting the AllowsTransparency="true" on a Window. On Win XP with September CTP bits it runs fine. It is a pretty clean test from a hardware point of view since I have a dual boot laptop.  Here's my system info:

    OS Name Microsoft® Windows Vista™ Ultimate
    Version 6.0.5744 Build 5744
    Processor Genuine Intel(R) CPU           T2500  @ 2.00GHz, 2000 Mhz, 2 Core(s), 2 Logical Processor(s)
    Hardware Abstraction Layer Version = "6.0.5744.16384"
    Total Physical Memory 2,045.88 MB
    Available Physical Memory 883.25 MB
    Total Virtual Memory 4.22 GB
    Available Virtual Memory 2.64 GB

Answers

  • Thursday, October 12, 2006 10:31 PMSeema Ramchandani MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Alex,

    Windows with AllowsTransparency=true are generically known as layered windows. I describe how WPF renders layered windows on Vista in a recent blogpost here:

    "The Windows Vista D3D 9.0 graphics API provides support for rendering to surfaces with an alpha channel, but does not directly support a mechanism to present that surface to the desktop and retain alpha information. On Windows Vista, WPF renders via hardware accelerated DX, acquires the surface via IDirect3DSurface9::GetDC, and presents to the screen via GDI."
    http://blogs.msdn.com/seema/archive/2006/09/18/761314.aspx

    Grabbing the surface from DX and presenting via GDI is slower than using DX Present, but it is the only way that we can preserve the alpha information. 

    -SeemaR
    blogs.msdn.com/seema

All Replies

  • Thursday, October 12, 2006 5:58 PMPaul Czywczynski Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I posted in this thread (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=678247&SiteID=1) a few days ago with no response yet.  I hope they have an answer soon. It's pretty dismal that WPF seems to be an afterthought on Vista.

  • Thursday, October 12, 2006 8:22 PMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Right, it looks like it's the same problem I am describing. What's happening on Vista when the AllowsTransparency is set to true?
  • Thursday, October 12, 2006 10:31 PMSeema Ramchandani MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Alex,

    Windows with AllowsTransparency=true are generically known as layered windows. I describe how WPF renders layered windows on Vista in a recent blogpost here:

    "The Windows Vista D3D 9.0 graphics API provides support for rendering to surfaces with an alpha channel, but does not directly support a mechanism to present that surface to the desktop and retain alpha information. On Windows Vista, WPF renders via hardware accelerated DX, acquires the surface via IDirect3DSurface9::GetDC, and presents to the screen via GDI."
    http://blogs.msdn.com/seema/archive/2006/09/18/761314.aspx

    Grabbing the surface from DX and presenting via GDI is slower than using DX Present, but it is the only way that we can preserve the alpha information. 

    -SeemaR
    blogs.msdn.com/seema

  • Friday, October 13, 2006 12:49 AMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    So, let me get this straight. Are you saying that hardware accellerated surface presentation with alpha information on Vista is slower than the software emulated on Win XP?

     

     

     

  • Friday, October 13, 2006 4:03 AMSeema Ramchandani MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    not quite.

    [from above] the GUI performance drops drastically on Vista RC2 when setting the AllowsTransparency="true" on a Window. On Win XP with September CTP bits it runs fine.

    You are comparing layered windows rendering September CTP on XP with Vista RC2.* In the September CTP, we made various efforts to get hardware accelerated layered windows on XP -- after much distress, that work has been pulled.

    To see the difference between the software emulation and hardware accelerated rendering, compare layered windows on RC2/XP (software) and RC2/Vista (hardware with GDI present). If you do see that hardware accelerated rendering is slower than software, that is a video driver bug which you should file and voice to Microsoft via ladybug and the hardware vendor.

    -Seema

    * Vista's GDI Present is a bit slower: GDI is hardware accelerated on XP and is not hardware accelerated on Vista+WDDM for various reasons (schedule, IHV development, etc).

  • Friday, October 13, 2006 1:04 PMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    > If you do see that hardware accelerated rendering is slower than software, that is a video driver bug which you should file and voice to Microsoft via ladybug and the hardware vendor.

    It's not "slower", it is crawling on Vista, becoming almost unusable. And since quite a few people've already reported this, I have doubts it is a video driver bug. Anyway I'll try to file it via ladybug.

    Thx... Alex

  • Friday, October 13, 2006 2:32 PMPaul Czywczynski Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Alex, can you post the link to your ladybug case so I can follow up on it. Thanks.

    -Paul

  • Friday, October 13, 2006 5:36 PMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
  • Friday, October 13, 2006 7:01 PMSeema Ramchandani MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    looking for it in our bug database right now... If you have time to help me debug, can you please send me (email/post) the following:

    • Your driver information: Run “dxdiag /t” in a cmd window. Save the outputted file “dxdiag.txt” to the bug; this file has the information of your video card manufacturer, the name of your card, the driver date, and the driver version number.
    • Simple application that repros the behavior (xaml-only is preferred) -- I'd like to be able to reproduce the issue on a similar hardware setup

    Also, can you also please try manually disabling WPF hardware acceleration with the below registry key and confirming whether the performance issue goes away?

    [HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics] "DisableHWAcceleration"=dword:00000001

    (to re-enable, set the dword to 0 or delete the registry key altogether)

    Thanks!

    SeemaR@microsoft

  • Friday, October 13, 2006 7:33 PMPaul Czywczynski Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Dxdiag information
    =============
    ------------------
    System Information
    ------------------
    Time of this report: 10/13/2006, 14:24:49
           Machine name: PBHOST00
       Operating System: Windows Vista™ Ultimate (6.0, Build 5744) (5744.vista_rtm_edw.061003-1945)
               Language: English (Regional Setting: English)
    System Manufacturer: Shuttle Inc
           System Model: SN25V10
                   BIOS: )Phoenix - Award WorkstationBIOS v6.00PG
              Processor: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ (2 CPUs), ~2.2GHz
                 Memory: 2046MB RAM
              Page File: 683MB used, 3635MB available
            Windows Dir: C:\Windows
        DirectX Version: DirectX 10
    DX Setup Parameters: Not found
         DxDiag Version: 6.00.5744.16384 32bit Unicode

    ------------
    DxDiag Notes
    ------------
          Display Tab 1: No problems found.
            Sound Tab 1: No sound card was found.  If one is expected, you should install a sound driver provided by the hardware manufacturer.
              Input Tab: No problems found.

    ---------------
    Display Devices
    ---------------
            Card name: Radeon X1600 Series (Microsoft Corporation - WDDM)
         Manufacturer: ATI Technologies Inc.
            Chip type: Radeon X1600 Series (0x71C2)
             DAC type: Internal DAC(400MHz)
           Device Key: Enum\PCI\VEN_1002&DEV_71C2&SUBSYS_23421002&REV_00
       Display Memory: 1278 MB
     Dedicated Memory: 510 MB
        Shared Memory: 767 MB
         Current Mode: 1600 x 1200 (32 bit) (60Hz)
              Monitor: Generic PnP Monitor
          Driver Name: atiumdag.dll,atiumdva.dll,atitmmxx.dll
       Driver Version: 7.14.0010.0443 (English)
          DDI Version: 9Ex
    Driver Attributes: Final Retail
     Driver Date/Size: 10/4/2006 01:46:48, 2413568 bytes
          WHQL Logo'd: Yes
      WHQL Date Stamp:
    Device Identifier: {D7B71EE2-3282-11CF-0972-4803A1C2CA35}
            Vendor ID: 0x1002
            Device ID: 0x71C2
            SubSys ID: 0x23421002
          Revision ID: 0x0000
          Revision ID: 0x0000
          Video Accel: ModeMPEG2_A ModeMPEG2_C
     Deinterlace Caps: {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
                       {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY
                       {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
                       {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY
                       {3C5323C1-6FB7-44F5-9081-056BF2EE449D}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,2) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {552C0DAD-CCBC-420B-83C8-74943CF9F1A6}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,2) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
                       {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY
         DDraw Status: Enabled
           D3D Status: Enabled
           AGP Status: Enabled


    XAML sample
    ==========
    I am using a simple program posted to a blog a few days ago. Resizing, minimizing and maximizing the application shows the issue we're experiencing in Vista RC2

    [Blog]
    http://forums.microsoft.com/MSDN/AddPost.aspx?PostID=820866&SiteID=1

    [Program]
    http://blog.opennetcf.org/ayakhnin/content/binary/OfficeStyleWindow.zip


    Enabling "DisableHWAccerleration" in the register does fix the problem in the sample application and our in-house application. Performance seems to be near XP speed when enabled. Flipping "DisableHWAccerleration" back to 0 and relaunching the apps brings them back to the slowness as explained before.

    -Paul



  • Saturday, October 14, 2006 1:17 AMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Here's my info:

    ------------------
    System Information
    ------------------
    Time of this report: 10/13/2006, 21:10:05
           Machine name: VISTA-PC
       Operating System: Windows Vista™ Ultimate (6.0, Build 5744) (5744.vista_rtm_edw.061003-1945)
               Language: English (Regional Setting: English)
    System Manufacturer: LENOVO
           System Model: 200762U
                   BIOS: Phoenix FirstBIOS(tm) Notebook Pro Version 2.0 for ThinkPad
              Processor: Genuine Intel(R) CPU           T2500  @ 2.00GHz (2 CPUs), ~2.0GHz
                 Memory: 2046MB RAM
              Page File: 2040MB used, 2273MB available
            Windows Dir: F:\Windows
        DirectX Version: DirectX 10
    DX Setup Parameters: Not found
         DxDiag Version: 6.00.5744.16384 32bit Unicode

    ---------------
    Display Devices
    ---------------
            Card name: ATI Mobility Radeon X1400 (Microsoft Corporation - WDDM)
         Manufacturer: ATI Technologies Inc.
            Chip type:
             DAC type: Internal DAC(400MHz)
           Device Key: Enum\PCI\VEN_1002&DEV_7145&SUBSYS_200617AA&REV_00
       Display Memory: 891 MB
     Dedicated Memory: 127 MB
        Shared Memory: 763 MB
         Current Mode: 1400 x 1050 (32 bit) (60Hz)
              Monitor: Generic PnP Monitor
          Driver Name: atiumdag.dll,atiumdva.dll,atitmmxx.dll
       Driver Version: 7.14.0010.0443 (English)
          DDI Version: 9Ex
    Driver Attributes: Final Retail
     Driver Date/Size: 10/4/2006 02:46:48, 2413568 bytes
          WHQL Logo'd: n/a
      WHQL Date Stamp: n/a
    Device Identifier: {D7B71EE2-3205-11CF-A175-0C00A1C2CA35}
            Vendor ID: 0x1002
            Device ID: 0x7145
            SubSys ID: 0x200617AA
          Revision ID: 0x0000
          Revision ID: 0x0000
          Video Accel: ModeMPEG2_A ModeMPEG2_C
     Deinterlace Caps: {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
                       {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY
                       {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
                       {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY
                       {3C5323C1-6FB7-44F5-9081-056BF2EE449D}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,2) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {552C0DAD-CCBC-420B-83C8-74943CF9F1A6}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,2) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
                       {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
                       {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY
         DDraw Status: Enabled
           D3D Status: Enabled
           AGP Status: Enabled

    WDM Streaming Tee/Splitter Devices:
    Tee/Sink-to-Sink Converter,0x00200000,1,1,,6.00.5744.16384

    WDM Streaming Data Transforms:
    Microsoft Kernel DRM Audio Descrambler,0x00200000,1,1,,6.00.5744.16384

    Video Compressors:
    WMVideo8 Encoder DMO,0x00600800,1,1,,
    WMVideo9 Encoder DMO,0x00600800,1,1,,
    MSScreen 9 encoder DMO,0x00600800,1,1,,
    DV Video Encoder,0x00200000,0,0,,6.06.5744.16384
    MJPEG Compressor,0x00200000,0,0,,6.06.5744.16384
    Cinepak Codec by Radius,0x00200000,1,1,,6.06.5744.16384
    Intel IYUV codec,0x00200000,1,1,,6.06.5744.16384
    Intel IYUV codec,0x00200000,1,1,,6.06.5744.16384
    Microsoft RLE,0x00200000,1,1,,6.06.5744.16384
    Microsoft Video 1,0x00200000,1,1,,6.06.5744.16384

    =============================================================================

    Setting the registry key, fixes the problem.

  • Saturday, October 14, 2006 5:01 AMSeema Ramchandani MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    thanks! I'll attempt to reproduce your configs in our labs on Monday.

    SeemaR

  • Saturday, October 14, 2006 10:09 PMAlex Yakhnin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Seema,

    Please, do keep us in the loop of your findings.

    Thanks...Alex

  • Thursday, October 26, 2006 12:56 AMSeema Ramchandani MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Hello all,

    I did a bit of testing with Paul's app on both an ATI x800 pro and an NVIDIA geforce 6800 and I did see performance issues...after a bit of investigation, it turns out that this is due to the chain of bit-blits that we force.  

    Explanation is in the below post:
    http://blogs.msdn.com/seema/archive/2006/10/25/layered-windows-sw-is-sometimes-faster-than-hw.aspx

    The mileage will vary depending on the architecture of the card, and that is not an optimal story. I'm looking into fixing layered windows performance for a wider variety of cards in vNext.

    -SeemaR@MS

  • Monday, December 04, 2006 5:26 AMJimbocrusher Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I changed from an older Geforce 128mb card to a geForce 256 mb 7300 with DDR2 ram and everything seems quicker including the refresh settings that would not go over 60Hz before. the new nvidia 'Vista' driver I downloaded from Nvidia, flat out did not work correctly. Now my video encoder doesn't work properly so I can't play DVD movies. I have Ultimate build 5600.