PDA

View Full Version : WebGL stopped working in Firefox beta?



shoosh
02-02-2011, 01:30 AM
Starting from the daily build of 2 days ago WebGL stopped working for me.
The call
canvas.getContext("experimental-webgl")
throws an exception:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLCanvasElement.getContext]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"

This happens both for my code and for any example and tutorial out there (for instance the ones in learningwebgl.com.
The only change that occurred was that firefox restarted to apply the update and then it stopped working.
webgl.disabled in about:config is false

Chrome 9 still works perfectly.
I restarted firefox a number of times and even restarted the machine.
Any idea what's going on?

SteveBaker
02-02-2011, 04:57 AM
both 4.0b10pre and 4.0b11pre (last night's build) is working great for me - under both Linux and Windows. I've only tested it on nVidia GPU hardware though.

There was some talk about not "whitelisting" some OS/GPU combo's due to difficulties with OpenGL compliance...I wonder if that's what's killing you?

You might try opening "about:config" in the browser and scrolling down to the WebGL settings at the bottom of that page, then forcing it to enable WebGL on your machine.

On the off-chance it's your own code that broke it - you might check using:

http://get.webgl.org/

zed
02-02-2011, 01:53 PM
Yes theres a lot of teething troubles atm
chrome hasnt worked for me in over a month

http://groups.google.com/a/chromium.org ... c?lnk=raot (http://groups.google.com/a/chromium.org/group/chromium-bugs/browse_thread/thread/5ab12ffe125de629/5c8e68f5a305265c?lnk=raot)

zed
02-02-2011, 06:27 PM
Update. Wow, I downloaded chrome canary build (which is a version Ive never heard about before, only avail on windows though ) + its working (though pretty unstable)
FPS about 2.2x better than minefield 4.0b9pre

zed
02-02-2011, 06:38 PM
BTW - I see

Float32Array X.slice(0) has been dropped

http://www.khronos.org/registry/typedar ... cs/latest/ (http://www.khronos.org/registry/typedarray/specs/latest/)

though

8 Resolved Issues
Should there be a way to copy or subset an ArrayBuffer?
Not at this time. A future version of this spec may introduce such functionality.
Aye? it had it before!
check the google cached version of the above doc


Sorry, I would edit my posts, but I dont see the option

SteveBaker
02-02-2011, 08:07 PM
Update. Wow, I downloaded chrome canary build (which is a version Ive never heard about before, only avail on windows though ) + its working (though pretty unstable)
FPS about 2.2x better than minefield 4.0b9pre

The reason Firefox runs faster than Chrome under Windows is that Chrome supports anti-aliasing and Firefox doesn't. Since anti-aliasing is enabled by default, that means that Chrome is doing just fine. If you don't care about the poorer quality that Firefox produces, just turn off the anti-aliasing when you create the WebGL context and you'll find that the performance of the two browsers is neck-and-neck.

Under Linux, neither browser implements anti-aliassing and Chrome and Firefox run neck-and-neck at about the same speed as Firefox under Windows.

Firefox will get anti-aliasing soon enough (they were talking about this exact thing on the mailing list today) - and when they do, they'll be 2.2x slower when it's turned on.

zed
02-02-2011, 11:40 PM
Youve misread,
ATM chrome is ~2.5x quicker than firefox (minefield)
and like you say chrome does AA (looks to be 4xAA) vs firefoxs no AA, so the difference is even larger.

SteveBaker
02-03-2011, 07:28 PM
You're right! I did misread.

Well, then I don't have an explanation. I don't see those kinds of performance differences in any of my code.

zed
02-03-2011, 10:59 PM
Of course this is dependent hugely on hardware (your cpu might be a lot better than mine or your update speed is less say 30hz, Im using 60hz)

Are you running in a decent resolution?

Doing nothing, just displaying a blank screen @ 1280x1024
firefox ~20fps with 0xAA
chrome ~60fps (i.e. maximum possible) with 4xAA
both versions are new (within 2 days old)

dropping down to 1024x768, firefox jumps up to ~30fps

Though chrome has the nasty surprise of crashing every minute (or so) :? so Im using firefox primary for testing.

Q/ Does firefox for you get slower + slower each time u test your app? eg press F5
Im finding
fresh start ------- FPS = 30, mem usage ~100mb
after ~20x pressing F5 ----- FPS = 15, mem usage 1GB (normally I just close firefox + reopen it again about now :lol:)

SteveBaker
02-04-2011, 01:22 PM
At larger pixel sizes, it's down to how fast the compositor system can work. Your image may render super-fast - but compositing the resulting canvas into the browser's window takes a lot of time.

There are definite differences in how Chrome and Firefox do that - and if Firefox has fallen back on software compositing for some reason - that would explain what you're seeing.

shoosh
02-04-2011, 05:50 PM
Back to the original topic if you don't mind,

I set webgl.force-enable to true and everything works ok again
without it get.webgl.org tells me my browser does not support webgl, with it, its ok.
I have an nVidia 8600m GT on a Windows Vista 32 bit laptop.
what could be the problem? is it blacklisted?

zed
02-05-2011, 02:06 PM
Well I do mind, I dont think its blacklisted (does such a list even exist)
You have pretty standard hardware,
Like Ive said its very early days ATM no released browser supports webGL, at this stage teething troubles are gonna be common place; I wouldnt worry too much about it now
I had the same thing with chrome, calling
canvas.getContext("experimental-webgl")
didnt work for a month, it now does.

@steve what CPU do u have,
I have a Intel Pentium Dual E2200 @ 2.20GHz
http://www.cpubenchmark.net/cpu_lookup. ... 40+2.20GHz (http://www.cpubenchmark.net/cpu_lookup.php?cpu=Intel+Pentium+Dual+E2200+%40+2. 20GHz)
1249 points

If its on this page
http://www.cpubenchmark.net/high_end_cpus.html
theres a good chance you wont see a difference between chrome+firefox I assume firefox is cpu limited

shoosh
02-06-2011, 12:47 AM
After a quick correspondence with Benoit Jacob from Mozilla it turned out that they blacklisted all driver versions prior to and including 257.21, a version I had from Windows update.
Upgrading to the current version solved the issue.
This does actually raise my concern that my potential users, who are not fortunate enough to have direct access to someone from FF dev team, will just resolve this as "well this WebGL thing doesn't really work"

SteveBaker
02-06-2011, 10:10 AM
Well, that's why this is a "Beta" release. It's not done yet.