GPU Acceleration In Firefox 4 beta 9: Direct3D for Windows, OpenGL for MacOSX and Nothing for Linux


Firefox 4 beta


Firefox 4 beta 9 is now available with WebGL enabled by default. But Firefox WebGL implementation exploits the OpenGL API only on Mac OS X because Apple offers an excellent OpenGL support. On Windows, WebGL and GPU acceleration are implemented via Direct3D:

Firefox 4 supports full hardware acceleration on Windows 7 and Windows Vista via a combination of D2D, DX9 and DX10. This allows us to accelerate everything from Canvas drawing to video rendering. Windows XP users will also enjoy hardware acceleration for many operations because we’re using our new Layers infrastructure along with DX9. And, of course, OSX users have excellent OpenGL support, so we’ve got that covered as well.



On Linux, there is currently no hardware acceleration due to buggy graphics drivers:

Comment by Boris Zbarsky (Mozilla developer):

We tried enabling OpenGL on Linux, and discovered that most Linux drivers are so disastrously buggy (think “crash the X server at the drop of a hat, and paint incorrectly the rest of the time” buggy) that we had to disable it for now. Heck, we’re even disabling WebGL for most Linux drivers, last I checked…

If your drivers are decent (some of the closed-source ones can be, nouveau can be sometimes), you do get something akin to Direct2D on Linux through XRender, though. So while you don’t get compositing acceleration, you do get faster canvas drawing and the like. drawImage, for example, can be much faster on Linux than on Mac. But only if you manage to find a driver and X version that happens to not suck…

We do plan to put more work into the Linux end of this, look for workarounds for the various bugs, etc. But we could really use some help from Xorg and distros and the like here…



Comment by Boris Zbarsky (Mozilla developer):

Sadly enough, GL drivers on Windows aren’t that great either. This is why WebGL is done via Direct3D on Windows now…. but that mostly a matter of performance issues.



You can download Firefox 4 Beta 9 HERE.

[via]


17 thoughts on “GPU Acceleration In Firefox 4 beta 9: Direct3D for Windows, OpenGL for MacOSX and Nothing for Linux”

  1. Groovounet

    “Firefox 4 supports full hardware acceleration on Windows 7 and Windows Vista via a combination of D2D, DX9 and DX10″

    That’s sounds stupid… why not D3D11 as it support D3D9 hardware?

  2. Reavenk

    I remember 8 months ago when Mac drivers looked poor because Steam came out for Mac and it finally had to match up to PC (and Linux) standards. It’s curious to see them make so much head way in graphics in so little a time over PC and Linux.

  3. EllisMarkov

    On OS X, OpenGL drivers are a shame. We have only compliance with 2.1. OpenGL 3.0 is 95%, 3.1 12%, 3.2 33% and 3.3 0%. To simulate OGLES 2.x, OpenGL 2.1 is sufficient.
    On Windows, OpenGL is very bad because of Intel GPUs… Most of integrated Intel GPU are only 1.4 compatible. The lastest (Sandy Bridge is only 2.1).
    On Linux, Nvidia drivers are great. AMD not so bad… intel no comment…

  4. fmoreira

    @Groovounet
    probably due to the development cycle. the features-lock date probably happened before there was a decent Direct3D 11 support from Microsoft so Mozilla’s team could support d3d9, d3d10 and d3d11 in only one API.
    otherwise I can see no reason…

    @EllisMarkov
    I totally subscribe your comment!

  5. Taylor

    Mozilla developers think Linux users are stupid or what?

    Totally agree with EllisMarkov.

  6. Squall Leonhart

    default layers is d3d10 on windows vista and 7 for devices supporting it.

  7. Mars_999

    Ah I hope you can select the renderer you want to use… e.g. I am on windows I want to use a GL driver vs. a DX driver? And no I don’t agree with them, GL drivers on Windows are the best of all platforms, and don’t even bring up Intel as they are absent until Sandy Bridge is fully integrated into the market.

  8. John

    What sickens me about Intel’s OpenGL support is that it always lags behind their DirectX support on the same hardware. For instance, OpenGL 3 support should be available on their current Direct3D 10 GPUs (dating back to 2+ yrs ago), but they apparently leave OpenGL 3 support exclusively with Sandy Bridge. Given that Sandy Bridge has been given OpenGL 3.0 support on DirectX 10.1 hardware, maybe OpenGL 3.1/2/3 support will arrive on their DirectX 11 hardware (Ivy Bridge).

  9. Leith Bade

    I think it would have not been much effort to support DX9 and DX10 as the APIs are similar and I doubt they are using that many of the DX10/11 exclusive features

  10. ..............

    Mars_999 says:
    January 16, 2011 at 11:09 pm

    Ah I hope you can select the renderer you want to use… e.g. I am on windows I want to use a GL driver vs. a DX driver? And no I don’t agree with them, GL drivers on Windows are the best of all platforms, and don’t even bring up Intel as they are absent until Sandy Bridge is fully integrated into the market.
    _______________

    About:config

    Create a boolean preference “webgl.prefer_gl”, value “true”.

  11. DrBalthar

    *LOL* so even Firefox dev community thinks that Linux has no relevance

  12. Korvin77

    ^ Linux sucks IMO. I have installed Kubuntu on my second HDD and I wanted to bench my first Win HDD under Kubuntu. I only wanna Everest\Sandra like software that can “MB\s”. But I havent. Why? Because there is no bench software unless that shitty console bonnie++ that cant “MB\s”

Comments are closed.