Closed Bug 1764589 Opened 2 years ago Closed 2 years ago

WebGL not working with Mali-400 MP graphics card

Categories

(Core :: Graphics, defect, P3)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: kbrosnan, Assigned: jnicol)

References

Details

Attachments

(2 files)

From github: https://github.com/mozilla-mobile/fenix/issues/24769.

Steps to reproduce

Go to https://get.webgl.org/
or
https://webglsamples.org/

Expected behaviour

I should see graphics content which I am able to see on all chromium browsers: Chrome, Opera, Kiwi, Vivaldi ets (on all the listed browsers, WebGL and WebGL 2 work as it should, because Mali-400 MP graphics card supports OpenGL ES 2.0 and it is able to support WebGL)

Actual behaviour

I see a notification that my browser does not support WebGL. I don't see any graphic content. Moreover, this bug has always existed from the very beginning of the development of this browser. For some reason the browser does not support Mali-400 MP graphics card.

Device name

Asus Zenfone Go

Android version

Android 5.1

Firefox release type

Firefox

Firefox version

99.2.0

Device logs

No response

Additional information

No response

Change performed by the Move to Bugzilla add-on.

Severity: -- → S3
Flags: needinfo?(jgilbert)

Uhh, acknowledged I guess? I'm surprised we v99 at all on such an old OS.

Severity: S3 → S4
Flags: needinfo?(jgilbert)
Priority: -- → P3

Jeff, can you reproduce this on your Mali-400 device? Webgl works fine for me on the Ulefone (Mali-400, Android 10), and Nexus 5 (Adreno, Android 5). So perhaps it needs to be both Mali-400 and Android 5 version to be broken.

Flags: needinfo?(jmuizelaar)
Severity: S4 → S3

After discussing with Jamie, I upgraded the severity.

Attached file about:support

WebGL 2 is of course not supported because it requires GLES 3 and the Mali 400 only supports GLES 2. But WebGL 1 seems to be failing because the device does not support the vertex_array_object extension.

From a quick glance of the code, it seems like we do have a WebGLVertexArrayFake class that should be able to work around this limitation. On my Mali-400 device (which does support vertex_array_object), if I add a MarkUnsupported(GLFeature::vertex_array_object) call, then I can see that webgl initialization also fails on this device. If I then comment out this block then I can see that we use the WebGLVertexArrayFake fallback, and the spinning cube on get.webgl.org works just fine.

Kelsey, can you think of any current reason why vertex_array_object is a hard requirement? I can see it was added in bug 1322746, along with some GLBLitHelper changes which required VAOs. But it looks like bug 1396704 allowed GLBlitHelper to work without VAOs? So are we safe to remove this check from WebGLContext::InitAndValidateGL()?

Flags: needinfo?(jmuizelaar) → needinfo?(jgilbert)

There are some Android devices which support GLES 2 but do not support
the vertex_array_object extension, and we therefore do not give them
WebGL 1.

This requirement was added in 1322746. as part of some changes to
GLBlitHelper which required VAOs. However, in bug 1396704 a fallback
path was added to GLBlitHelper which does not require VAOs. The WebGL
implementation can make use of the WebGLVertexArrayFake fallback path
on devices without VAO support, meaning this requirement can be
dropped.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED

Reporter has confirmed on github that the above patch makes webgl 1 work for them.

Depends on: 1770235

I did a quick audit of where we call fBindVertexArray, and fortunately it's only in a couple places.
Unfortunately though, I found bug 1770235 which is required before we re-enable on no-vao devices.

Flags: needinfo?(jgilbert)

Thanks for doing the audit and fixing the bug, Kelsey! I'll land this now :)

Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc785d7906b2
Remove vertex_array_object extension requirement for WebGL. r=gfx-reviewers,jgilbert
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: