Closed Bug 636870 Opened 14 years ago Closed 14 years ago

Using webgl on optimus hardware causes instant crash

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: ehsan.akhgari, Assigned: joe)

References

Details

(Whiteboard: [hardblocker][eta: march 1][has patch][needs testing joe])

Attachments

(2 files, 1 obsolete file)

Presumably this is because dx9 and dx10 are getting different gpus.
Note I actually filed this bug, not ehsan. We probably should've caught this sooner :( https://crash-stats.mozilla.com/report/index/c9d1fadb-d1a8-4bfd-9216-40a442110225
Assignee: nobody → joe
Bas, what do you think we should do here?
Assignee: joe → bas.schouten
We should probably just disable interop on Optimus.
Attached patch Don't use interop on Optimus (obsolete) — Splinter Review
I think this should work, but it's utterly untested since I don't have Optimus at home here. Bas does, though!
Assignee: bas.schouten → joe
Attachment #515279 - Flags: review?(jmuizelaar)
Attachment #515279 - Flags: feedback?(bas.schouten)
Whiteboard: [hardblocker] → [hardblocker][has patch][needs feedback Bas][needs review vlad][needs review jeff]
Comment on attachment 515279 [details] [diff] [review] Don't use interop on Optimus Vlad, we don't currently use the readback path that'll be exercised in this case, right? Does it still work? Is it safe?
Attachment #515279 - Flags: superreview?(vladimir)
The alternative is just disabling WebGL on Optimus, which will be equally easy.
Comment on attachment 515279 [details] [diff] [review] Don't use interop on Optimus I don't think we should add another IsOptimus(). Please add a static function near GfxInfo.
Attachment #515279 - Flags: review?(jmuizelaar) → review-
(In reply to comment #7) > Comment on attachment 515279 [details] [diff] [review] > Don't use interop on Optimus > > I don't think we should add another IsOptimus(). Please add a static function > near GfxInfo. It might also be better to check if the D3D9/D3D10 devices are for the physical device instead of checking Optimus.
Attachment #515279 - Flags: superreview?(vladimir) → review?(bjacob)
Whiteboard: [hardblocker][has patch][needs feedback Bas][needs review vlad][needs review jeff] → [hardblocker][has patch][needs feedback Bas][needs review bjacob][needs review jeff]
Comment on attachment 515279 [details] [diff] [review] Don't use interop on Optimus >+static bool >+IsOptimus() >+{ >+ return GetModuleHandleA("nvumdshim.dll"); >+} There already is the same IsOptimus() function here: http://mxr.mozilla.org/mozilla-central/source/gfx/layers/d3d10/LayerManagerD3D10.cpp#122 r=me if you either factor these together, or have a good reason not to.
Attachment #515279 - Flags: review?(bjacob) → review+
Comment on attachment 515279 [details] [diff] [review] Don't use interop on Optimus Oops, Jeff had already r-'d.
Attachment #515279 - Flags: review-
Comment on attachment 515279 [details] [diff] [review] Don't use interop on Optimus ****! sorry Jeff, I accidentally deleted your r- flag.
Attachment #515279 - Flags: review+ → review-
(In reply to comment #5) > Comment on attachment 515279 [details] [diff] [review] > Don't use interop on Optimus > > Vlad, we don't currently use the readback path that'll be exercised in this > case, right? Does it still work? Is it safe? It didn't seem to work when I tested on my development machine by forcing true for IsOptimus, I couldn't easily figure out why though. It seemed to just display empty blue on WebGL Aquarium.
Whiteboard: [hardblocker][has patch][needs feedback Bas][needs review bjacob][needs review jeff] → [hardblocker][needs new patch]
Comment on attachment 515279 [details] [diff] [review] Don't use interop on Optimus That counts as feedback- I think. I'm just going to block WebGL on Optimus.
Attachment #515279 - Flags: feedback?(bas.schouten) → feedback-
Whiteboard: [hardblocker][needs new patch] → [hardblocker][needs new patch][eta: march 1]
Because we're going to need to use IsOptimus from a different place than LayerManagerD3D10, I'm moving it to gfxWindowsPlatform.
Attachment #515279 - Attachment is obsolete: true
Attachment #516024 - Flags: review?(jmuizelaar)
Attachment #516025 - Flags: review?(jmuizelaar)
Whiteboard: [hardblocker][needs new patch][eta: march 1] → [hardblocker][needs review jrmuizel][eta: march 1]
Comment on attachment 516024 [details] [diff] [review] part 1: move IsOptimus to gfxWindowsPlatform I like very much.
Attachment #516024 - Flags: review?(jmuizelaar) → review+
Comment on attachment 516025 [details] [diff] [review] part 2: block WEBGL_ANGLE on Optimus Please file a bug about reenabling webgl on optimus and include a reference to it here.
Attachment #516025 - Flags: review?(jmuizelaar) → review+
I'm currently in the middle of getting a build of this up and running on our Optimus computer. Once that's done, I'll be able to test this patch.
Whiteboard: [hardblocker][needs review jrmuizel][eta: march 1] → [hardblocker][eta: march 1][has patch][needs testing joe]
Any luck getting that build up and running, Joe?
It took too long, and I had to leave it running as I went home. I'll land the patches tomorrow.
what's a URL that crashes without the patch? so far I haven't found one on my optimus machine.
mind you, I can't get acceleration enabled at all on this optimus machine, with latest intel drivers (8.15.10.2291), so that's probably it. I will continue my driver search.
Every creation of a WebGL context crashed; there wasn't any particular URL.
Ah, yes, you have to be using Direct3D 10-accelerated layers.
(In reply to comment #17) > Comment on attachment 516025 [details] [diff] [review] > part 2: block WEBGL_ANGLE on Optimus > > Please file a bug about reenabling webgl on optimus and include a reference to > it here. It looks like this didn't happen. Unless someone says otherwise, I could file...
Depends on: 650479
fyi 8.17.12.7061 is my nVidea driver version, and I don't get crashes with my Optimus laptop with WebGL force-enabled. I was informed that the information 'we' need for the driver isn't easily accessible at this point, so blocklist can't act on it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: