Closed Bug 738164 Opened 12 years ago Closed 12 years ago

WebGL is broken on Nexus S (Gingerbread)

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cjones, Unassigned)

References

Details

Attachments

(1 file)

We get a similar effect as video in bug 737071: frames extremely rarely show up, and flicker out quickly when they do.  The underlying problem in bug 737071 was something broken with GL context switching, which has been fixed in the ICS driver for PowerVR.  And indeed, WebGL also has been reported to work fine in ICS on the Nexus S.

Filing this in case there's something we can do to relatively easily work around this for GB.  I'm not optimistic.  We might hit this in the field with fennec.
This patch makes us not use shared contexts, to the best of my ability.  (Which requires reading back from the webgl context, which this does too.)  This should be the safest of the safe modes in theory.

But, same result.  Interestingly, the incredibly expensive context switches disappear.  But we still see the same broken rendering.
eglBindTexImage from inside mozilla::gl::GLContextEGL::BindTex2DOffscreen is throwing an error, EGL_BAD_ACCESS:

            EGL_BAD_ACCESS is generated if buffer is already bound to a texture.
I worry very, very much that this is due to us binding the back buffer to a texture using gralloc. I don't understand that code at all, unfortunately :(
Bug 738025 might help here? No clue really.
Depends on: 738025, 738833
Gralloc is never used on B2G at all. Will be used in the future.
widget/gonk/nsWindow.cpp, in nsWindow's constructor:

        gNativeWindow = new android::FramebufferNativeWindow();

FramebufferNativeWindow.cpp: https://github.com/cgjones/android-frameworks-base/blob/gingerbread-b2g/libs/ui/FramebufferNativeWindow.cpp

       err = gralloc_open(module, &grDev);

I must be missing something - is this code not used? Is there a different implementation somewhere else?
A different implementation of FramebufferNativeWindow, I mean.
If this doesn't affect fennec (and I don't see how it wouldn't, based on available evidence, but someone needs to test), then this is wfm.  B2G rebased on ICS over the weekend.
This doesn't affect fennec.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Wait, how can this work with fennec? We use the same native window code. Joe, can you clarify?
All I can report is that WebGL does work on Fennec on a Nexus S (modulo other bugs - see bug 739648 comment 1), and it doesn't work on B2G. I suspect it has to do with the code I mentioned in comment 6, but I have no other information.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: