Closed Bug 756370 Opened 12 years ago Closed 12 years ago

WebGL on Windows 7/Radeon HD extremely slow c/f FF on OSX or Chromium

Categories

(Core :: Graphics: CanvasWebGL, defect)

12 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 653102

People

(Reporter: callow.mark, Unassigned)

Details

WebGL apps run extremely slowly on Windows 7 on an early 2011 MacBook Pro with Radeon HD 6750M graphics. I have FF12 on W7. I am comparing against Chromium on Windows and FF12 and Chromium on OSX on the *same* MacBook Pro.

Try for example
    http://webglsamples.googlecode.com/hg/aquarium/aquarium.html

Under Windows 7 in FF it starts at 20fps then drops to 17~18fps. In Chromium it runs at 60fps. In FF on OSX on the same hardware, it runs at 62fps while in Chromium on OSX it runs at 60fps.

My own WebGL application shows a similar performance problem.

I am using FF sync so I have the same plug-ins and settings in both the Windows and OS X versions of FF.

Below is the complete output from about:support for Windows 7.

  Application Basics

        Name
        Firefox

        Version
        12.0

        User Agent
        Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0

        Profile Directory

          Show Folder

        Enabled Plugins

          about:plugins

        Build Configuration

          about:buildconfig

        Crash Reports

          about:crashes

        Memory Use

          about:memory

  Extensions

        Name

        Version

        Enabled

        ID

        Add to Search Bar
        2.0
        true
        add-to-searchbox@maltekraus.de

        Awesome screenshot: Capture and Annotate
        2.3.7
        true
        jid0-GXjLLfbCoAx0LcltEdFrEkQdQPI@jetpack

        British English Dictionary
        1.19.1
        true
        en-GB@dictionaries.addons.mozilla.org

        BugMeNot
        2.2
        true
        {987311C6-B504-4aa2-90BF-60CC49808D42}

        Collusion
        0.16.3
        true
        jid1-F9UJ2thwoAm5gQ@jetpack

        ColorfulTabs
        12.2
        true
        {0545b830-f0aa-4d7e-8820-50a4629a56fe}

        Cookie Monster
        1.1.0
        true
        {45d8ff86-d909-11db-9705-005056c00008}

        CookieCuller
        1.4
        true
        {99B98C2C-7274-45a3-A640-D9DF1A1C8460}

        Download Statusbar
        0.9.10
        true
        {D4DD63FA-01E4-46a7-B6B1-EDAB7D6AD389}

        Firebug
        1.9.2
        true
        firebug@software.joehewitt.com

        FlashGot
        1.4.4
        true
        {19503e42-ca3c-4c27-b1e2-9cdb2170ee34}

        ImTranslator
        4.15
        true
        {9AA46F4F-4DC7-4c06-97AF-5035170634FE}

        Microsoft .NET Framework Assistant
        1.3.1
        true
        {20a82645-c095-46ed-80e3-08825760534b}

        NoScript
        2.4.1
        true
        {73a6fe31-595d-460b-a920-fcc0f8843232}

        Rikaichan
        2.04
        true
        {0AA9101C-D3C1-4129-A9B7-D778C6A17F82}

        Rikaichan Japanese Names Dictionary File
        2.01.111113
        true
        rikaichan-jpnames@polarcloud.com

        Rikaichan Japanese-English Dictionary File
        2.01.111113
        true
        rikaichan-jpen@polarcloud.com

        TACO with Abine
        4.45
        true
        optout@dubfire.net

        United States English Spellchecker
        5.0.1
        true
        en-US@dictionaries.addons.mozilla.org

        WebSlingPlayer
        1.5.2.125
        true
        {9EB34849-81D3-4841-939D-666D522B889A}

        Google Web Toolkit Developer Plugin for Firefox
        1.0.10912
        false
        gwt-dev-plugin@google.com

  Important Modified Preferences

      Name

      Value

        accessibility.typeaheadfind.flashBar
        0

        browser.cache.disk.capacity
        1048576

        browser.cache.disk.smart_size.first_run
        false

        browser.cache.disk.smart_size_cached_value
        1048576

        browser.places.smartBookmarksVersion
        2

        browser.startup.homepage_override.buildID
        20120420145725

        browser.startup.homepage_override.mstone
        rv:12.0

        dom.disable_window_move_resize
        true

        extensions.lastAppVersion
        12.0

        general.useragent.extra.microsoftdotnet
        ( .NET CLR 3.5.30729; .NET4.0E)

        gfx.blacklist.direct2d
        4

        gfx.blacklist.layers.direct3d10
        4

        gfx.blacklist.layers.direct3d10-1
        4

        gfx.blacklist.layers.direct3d9
        4

        gfx.blacklist.layers.opengl
        4

        gfx.blacklist.webgl.angle
        4

        gfx.blacklist.webgl.msaa
        4

        gfx.blacklist.webgl.opengl
        4

        network.automatic-ntlm-auth.trusted-uris
        kintai, kintai.ad-net.hicorp.co.jp

        network.cookie.cookieBehavior
        2

        network.cookie.lifetimePolicy
        2

        network.cookie.prefsMigrated
        true

        network.negotiate-auth.delegation-uris
        kintai, kintai.ad-net.hicorp.co.jp

        network.negotiate-auth.trusted-uris
        kintai, kintai.ad-net.hicorp.co.jp

        places.database.lastMaintenance
        1337242529

        places.history.expiration.transient_current_max_pages
        104858

        places.history.expiration.transient_optimal_database_size
        64405830

        print.print_printer
        \\admin2\6F_ミドル側

        print.printer_Microsoft_XPS_Document_Writer.print_bgcolor
        false

        print.printer_Microsoft_XPS_Document_Writer.print_bgimages
        false

        print.printer_Microsoft_XPS_Document_Writer.print_command

        print.printer_Microsoft_XPS_Document_Writer.print_downloadfonts
        false

        print.printer_Microsoft_XPS_Document_Writer.print_edge_bottom
        0

        print.printer_Microsoft_XPS_Document_Writer.print_edge_left
        0

        print.printer_Microsoft_XPS_Document_Writer.print_edge_right
        0

        print.printer_Microsoft_XPS_Document_Writer.print_edge_top
        0

        print.printer_Microsoft_XPS_Document_Writer.print_evenpages
        true

        print.printer_Microsoft_XPS_Document_Writer.print_footercenter

        print.printer_Microsoft_XPS_Document_Writer.print_footerleft
        &PT

        print.printer_Microsoft_XPS_Document_Writer.print_footerright
        &D

        print.printer_Microsoft_XPS_Document_Writer.print_headercenter

        print.printer_Microsoft_XPS_Document_Writer.print_headerleft
        &T

        print.printer_Microsoft_XPS_Document_Writer.print_headerright
        &U

        print.printer_Microsoft_XPS_Document_Writer.print_in_color
        true

        print.printer_Microsoft_XPS_Document_Writer.print_margin_bottom
        0.5

        print.printer_Microsoft_XPS_Document_Writer.print_margin_left
        0.5

        print.printer_Microsoft_XPS_Document_Writer.print_margin_right
        0.5

        print.printer_Microsoft_XPS_Document_Writer.print_margin_top
        0.5

        print.printer_Microsoft_XPS_Document_Writer.print_oddpages
        true

        print.printer_Microsoft_XPS_Document_Writer.print_orientation
        0

        print.printer_Microsoft_XPS_Document_Writer.print_page_delay
        50

        print.printer_Microsoft_XPS_Document_Writer.print_paper_data
        9

        print.printer_Microsoft_XPS_Document_Writer.print_paper_height
        11.00

        print.printer_Microsoft_XPS_Document_Writer.print_paper_size_type
        0

        print.printer_Microsoft_XPS_Document_Writer.print_paper_size_unit
        1

        print.printer_Microsoft_XPS_Document_Writer.print_paper_width
        8.50

        print.printer_Microsoft_XPS_Document_Writer.print_reversed
        false

        print.printer_Microsoft_XPS_Document_Writer.print_scaling
        1.00

        print.printer_Microsoft_XPS_Document_Writer.print_shrink_to_fit
        true

        print.printer_Microsoft_XPS_Document_Writer.print_to_file
        false

        print.printer_Microsoft_XPS_Document_Writer.print_unwriteable_margin_bottom
        0

        print.printer_Microsoft_XPS_Document_Writer.print_unwriteable_margin_left
        0

        print.printer_Microsoft_XPS_Document_Writer.print_unwriteable_margin_right
        0

        print.printer_Microsoft_XPS_Document_Writer.print_unwriteable_margin_top
        0

        print.printer_\\admin2\6F_ããã«å´.print_bgcolor
        false

        print.printer_\\admin2\6F_ããã«å´.print_bgimages
        false

        print.printer_\\admin2\6F_ããã«å´.print_command

        print.printer_\\admin2\6F_ããã«å´.print_downloadfonts
        false

        print.printer_\\admin2\6F_ããã«å´.print_edge_bottom
        0

        print.printer_\\admin2\6F_ããã«å´.print_edge_left
        0

        print.printer_\\admin2\6F_ããã«å´.print_edge_right
        0

        print.printer_\\admin2\6F_ããã«å´.print_edge_top
        0

        print.printer_\\admin2\6F_ããã«å´.print_evenpages
        true

        print.printer_\\admin2\6F_ããã«å´.print_footercenter

        print.printer_\\admin2\6F_ããã«å´.print_footerleft
        &PT

        print.printer_\\admin2\6F_ããã«å´.print_footerright
        &D

        print.printer_\\admin2\6F_ããã«å´.print_headercenter

        print.printer_\\admin2\6F_ããã«å´.print_headerleft
        &T

        print.printer_\\admin2\6F_ããã«å´.print_headerright
        &U

        print.printer_\\admin2\6F_ããã«å´.print_in_color
        true

        print.printer_\\admin2\6F_ããã«å´.print_margin_bottom
        0.5

        print.printer_\\admin2\6F_ããã«å´.print_margin_left
        0.5

        print.printer_\\admin2\6F_ããã«å´.print_margin_right
        0.5

        print.printer_\\admin2\6F_ããã«å´.print_margin_top
        0.5

        print.printer_\\admin2\6F_ããã«å´.print_oddpages
        true

        print.printer_\\admin2\6F_ããã«å´.print_orientation
        0

        print.printer_\\admin2\6F_ããã«å´.print_page_delay
        50

        print.printer_\\admin2\6F_ããã«å´.print_paper_data
        9

        print.printer_\\admin2\6F_ããã«å´.print_paper_height
        11.00

        print.printer_\\admin2\6F_ããã«å´.print_paper_size_type
        0

        print.printer_\\admin2\6F_ããã«å´.print_paper_size_unit
        1

        print.printer_\\admin2\6F_ããã«å´.print_paper_width
        8.50

        print.printer_\\admin2\6F_ããã«å´.print_reversed
        false

        print.printer_\\admin2\6F_ããã«å´.print_scaling
        1.00

        print.printer_\\admin2\6F_ããã«å´.print_shrink_to_fit
        true

        print.printer_\\admin2\6F_ããã«å´.print_to_file
        false

        print.printer_\\admin2\6F_ããã«å´.print_unwriteable_margin_bottom
        0

        print.printer_\\admin2\6F_ããã«å´.print_unwriteable_margin_left
        0

        print.printer_\\admin2\6F_ããã«å´.print_unwriteable_margin_right
        0

        print.printer_\\admin2\6F_ããã«å´.print_unwriteable_margin_top
        0

        privacy.cpd.cookies
        false

        privacy.cpd.downloads
        false

        privacy.cpd.formdata
        false

        privacy.cpd.history
        false

        privacy.cpd.sessions
        false

        privacy.donottrackheader.enabled
        true

        privacy.sanitize.migrateFx3Prefs
        true

        security.warn_viewing_mixed
        false

        webgl.force-enabled
        true

  Graphics

        Adapter Description
        AMD Radeon HD 6750M

        Vendor ID
        0x1002

        Device ID
        0x6741

        Adapter RAM
        1024

        Adapter Drivers
        aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64

        Driver Version
        8.812.0.0

        Driver Date
        1-4-2011

        Direct2D Enabled
        Blocked for your graphics card because of unresolved driver issues.

        DirectWrite Enabled
        false (6.1.7601.17789)

        ClearType Parameters
        Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100

        WebGL Renderer
        Google Inc. -- ANGLE (AMD Radeon HD 6750M) -- OpenGL ES 2.0 (ANGLE 1.0.0.963)

        GPU Accelerated Windows
        0. Blocked for your graphics card because of unresolved driver issues.
wegl.verbose is set to false in my about:config.
I see a similar problem on a Windows XP system with a GeForce 9800GT. The WebGL Aquarium runs at 44 fps while in Chromium it runs at 60fps. With my own app, the difference is even more pronounced: 18fps vs 60fps. HOWEVER, if I set prefer-native-gl true then both the Aquarium and my own app run at 60fps in FF. 

It's either an ANGLE problem or related to the way FF is using ANGLE.

On the XP Chromium reports it has ANGLE revision 950. FF is reporting ANGLE revision 1.0.0.963.

On the MacBook, FF also has ANGLE revision 1.0.0.963 but Chromium is even more up-to-date with ANGLE revision 985.
The Windows XP system is running Firefox 13 not 12.
If I set prefer-native-gl true on the MacBook my app crashes the browser. The WebGL Aquarium still runs at only around 20fps.
Given the different results of prefer-native-gl true across the 2 machines, there may be 2 separate problems here.

I have confirmed that when prefer-native-gl is true on the MacBook about:support reports that it is no longer using ANGLE:

WebGL Renderer: ATI Technologies Inc. -- AMD Radeon HD 6750M -- 4.1.10428 Compatibility Profile Context
D2D is disabled, which is preventing hardware-accelerated compositing, forcing us to read-back to composite.

Try using layers.acceleration.enabled=true, and see if that improves performance with ANGLE.
(In reply to Mark Callow from comment #4)
> If I set prefer-native-gl true on the MacBook my app crashes the browser.
> The WebGL Aquarium still runs at only around 20fps.

This sounds like a separate bug. Would you mind filing it?
(In reply to Jeff Gilbert [:jgilbert] from comment #6)
> 
> Try using layers.acceleration.enabled=true, and see if that improves
> performance with ANGLE.

Yes that worked on the MacBook. Windows and OS X now get the same performance.

However on the XP system, D2D is not disabled and setting layers.acceleration.force-enables true does not improve the performance.

Should I close this bug and open another one for problem on the XP/GeForce 9800GT system.
(In reply to Jeff Gilbert [:jgilbert] from comment #7)
> (In reply to Mark Callow from comment #4)
> > If I set prefer-native-gl true on the MacBook my app crashes the browser.
> > The WebGL Aquarium still runs at only around 20fps.
> 
> This sounds like a separate bug. Would you mind filing it?

Which bug, the crash?
(In reply to Mark Callow from comment #9)
> (In reply to Jeff Gilbert [:jgilbert] from comment #7)
> > (In reply to Mark Callow from comment #4)
> > > If I set prefer-native-gl true on the MacBook my app crashes the browser.
> > > The WebGL Aquarium still runs at only around 20fps.
> > 
> > This sounds like a separate bug. Would you mind filing it?
> 
> Which bug, the crash?

Yes, sorry for the confusing quote.
(In reply to Mark Callow from comment #8)
> (In reply to Jeff Gilbert [:jgilbert] from comment #6)
> > 
> > Try using layers.acceleration.enabled=true, and see if that improves
> > performance with ANGLE.
> 
> Yes that worked on the MacBook. Windows and OS X now get the same
> performance.
> 
> However on the XP system, D2D is not disabled and setting
> layers.acceleration.force-enables true does not improve the performance.
> 
> Should I close this bug and open another one for problem on the XP/GeForce
> 9800GT system.

XP uses d3d9 for layers acceleration, and since we need d3d10 layers to do accelerated webgl compositing, we're stuck with readback on winxp.

Before marking WorksForMe, are you force-enabling in both FF and Chrome, or just FF? If we're blacklisting something that's not blacklisted in Chrome, that might be an accident, since generally our blacklists are similar.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Jeff Gilbert [:jgilbert] from comment #11)
> 
> XP uses d3d9 for layers acceleration, and since we need d3d10 layers to do
> accelerated webgl compositing, we're stuck with readback on winxp.
Hmm. Chromium on XP doesn't seem to have any problem.

> 
> Before marking WorksForMe, are you force-enabling in both FF and Chrome, or
> just FF? If we're blacklisting something that's not blacklisted in Chrome,
> that might be an accident, since generally our blacklists are similar.
No. I'm running Chromium on Win7/Radeon without any command line options. Nothing is force-enabled.
(In reply to Jeff Gilbert [:jgilbert] from comment #10) 
> Yes, sorry for the confusing quote.

I'll do it after the weekend. I'm not sure I can provide any useful information though. I can only provide the app. that triggers the crash under a non-disclosure. When FF crashes I get a dialog box asking me whether to end the app or debug it. I don't get the FF dialog asking me if I want to send a crash report.
(In reply to Jeff Gilbert [:jgilbert] from comment #6)
> D2D is disabled, which is preventing hardware-accelerated compositing,
> forcing us to read-back to composite.

Did you mean D3D10 Layers instead of D2D? D2D shouldn't have anything to do with compositing, right?

(In reply to Jeff Gilbert [:jgilbert] from comment #11)
> XP uses d3d9 for layers acceleration, and since we need d3d10 layers to do
> accelerated webgl compositing, we're stuck with readback on winxp.

I didn't realize that we would be stuck with readback on D3D9 Layers. Isn't that something we need to fix, given that many of our Windows users who get layers acceleration, get it with D3D9 layers?

> Before marking WorksForMe

I wouldn't mark WFM, instead I would rename that bug into "we are stuck with readback on D3D9 layers and we should try to fix it".

(In reply to Mark Callow from comment #12)
> Hmm. Chromium on XP doesn't seem to have any problem.

Chromium certainly is able to do fast WebGL compositing with D3D9, since that's the only thing they use on Windows.
(In reply to Benoit Jacob [:bjacob] from comment #14)
> (In reply to Jeff Gilbert [:jgilbert] from comment #6)
> > D2D is disabled, which is preventing hardware-accelerated compositing,
> > forcing us to read-back to composite.
> 
> Did you mean D3D10 Layers instead of D2D? D2D shouldn't have anything to do
> with compositing, right?
> 
> (In reply to Jeff Gilbert [:jgilbert] from comment #11)
> > XP uses d3d9 for layers acceleration, and since we need d3d10 layers to do
> > accelerated webgl compositing, we're stuck with readback on winxp.
> 
> I didn't realize that we would be stuck with readback on D3D9 Layers. Isn't
> that something we need to fix, given that many of our Windows users who get
> layers acceleration, get it with D3D9 layers?

The ability to share a surface from one d3d context to another is new in Vista and is not supported in XP; that's what we do to get ANGLE's surface in a fast way.  For XP, there's a couple of options, including nvidia's sharing extension and having ANGLE use the same d3d9 device that we use.  The latter is tricky though, I think we investigated it and ran into some problems (especially around device lost stuff).  I *think* Chrome just uses ANGLE for everything, including browser rendering; that way everything is inside ANGLE and they can share resources without problems.
This bug is about FF on Windows 7/Radeon HD 6750M/MacBook Pro early 2011. The action for this is to check why (D2D?) layers acceleration is disabled. Is your blacklist different from Chromium's? If so why? If not, why is Chromium so much faster? Possibly the same reason Vlad suggests at the end of comment #15.

I'll open another bug on the XP issue along the lines suggested by Benoit in comment #14.
We do have a somewhat different blacklist, but the real reason here is (almost certainly) what Vlad says in Comment 15.
Comment 17 is about the WinXP issue, btw.

The Win7 issue was already sorted out in comments 0, 6, 7, 8: no layers acceleration. I don't know why you're not getting blacklisted, as your driver version is recent enough. We'd have to run Firefox in a debugger on your machine, to tell.
I have filed bug #756930 about the XP issue.

I don't think I should file a bug about the crash on the Radeon. It only happens  with webgl.prefer-native-gl: true AND webgl.force-enabled: true. In other words this Win7 OpenGL driver is already blacklisted. If you want me to file a bug about the crash, let me know.

I have yet to see any issue since setting layers.acceleration.force-enabled but I have not run any Canvas2D content.

BTW, Benoit, do you mean "I don't know why you're getting blacklisted"? The point is I am getting blacklisted hence the slow composition.
Hmm??

I've set layers.acceleration.force-enabled back to the default false and restarted the browser. GPU Accelerated Windows is no longer blacklisted. I've no idea why it was before.

I guess you can mark this WFM. Sorry for the noise.
(In reply to Mark Callow from comment #19)
> BTW, Benoit, do you mean "I don't know why you're getting blacklisted"? The
> point is I am getting blacklisted hence the slow composition.

Yes, that's what I meant, I don't know why you were blacklisted. We have some downloaded-blacklist rules that could have explained why you didn't get D3D10 acceleration, but none of that explains why you didn't get at least D3D9 acceleration.

(In reply to Mark Callow from comment #20)
> Hmm??
> 
> I've set layers.acceleration.force-enabled back to the default false and
> restarted the browser. GPU Accelerated Windows is no longer blacklisted.
> I've no idea why it was before.
> 
> I guess you can mark this WFM. Sorry for the noise.

No need to be sorry. I don't know why you were temporarily blacklisted. But your about support had gfx.blacklist.* prefs that showed that Firefox had cached an earlier blacklist decision, so probably all what caused you to not be blacklisted anymore, was a subsequent re-evaluation of the blacklisting decision. We already know that we should not cache these decisions, marking as duplicate of the bug about that.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.