Closed Bug 1733919 Opened 3 years ago Closed 3 years ago

Rendering video in android firefox results in shader compilation error on intel chromebooks

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox94 --- fixed
firefox95 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When attempting to render a video in firefox for android on an intel chromebook we get the following error when compiling TEXTURE_EXTERNAL shader variants:

Failed to compile vertex shader: composite_TEXTURE_EXTERNAL 0:40(13): error: no matching function for call to `textureSize(samplerExternalOES, int)'; candidates are: int textureSize(sampler1D, int) ...

We then fall back to SWGL due to the error, which sometimes crashes like in bug 1726792. We'll deal with the crash in that bug, and the shader compilation error in this one.

These devices are running mesa drivers, version 19 or below. textureSize(samplerExternalOES) should be declared when using the OES_EGL_image_external_essl3 extension. However, there was a mesa bug, which was only fixed in version 20.

Fortunately, we already support rendering video using the OES_EGL_image_external (non-essl3) extension, by using ESSL 1.0 shaders and passing the texture size as a uniform. We just need to detect when we're running on Mesa <= 19 and use that path instead.

Webrender encounters a shader compilation error when rendering video
in firefox for android on intel based chromebooks. The error is due to
a missing definition of textureSize(samplerExternalOES), which should
be defined when using the OES_EGL_image_external_essl3
extension. However, these devices are running Mesa drivers, and due to
a Mesa bug affecting versions 19 and earlier this was not defined.

We already have a fallback path for devices which do not support
OES_EGL_image_external_essl3: we use the ESSL 1.0
OES_EGL_image_external extension instead. This patch detects when we
are running on Mesa 19 or earlier, and forces us to use the fallback
path.

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0c8983f9c20e Block OES_EGL_image_external_essl3 on Mesa versions prior to 20.0 r=gfx-reviewers,jrmuizel
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

Comment on attachment 9244167 [details]
Bug 1733919 - Block OES_EGL_image_external_essl3 on Mesa versions prior to 20.0 r?#gfx-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: Webrender hits a driver bug whenever it attempts to render video on chromebooks, and falls back to swgl. This additionally leads to crashes (bug 1734030 and 1726792)
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Uses an existing alternative code path to render video which is well tested on other devices
  • String changes made/needed:
Attachment #9244167 - Flags: approval-mozilla-beta?

Comment on attachment 9244167 [details]
Bug 1733919 - Block OES_EGL_image_external_essl3 on Mesa versions prior to 20.0 r?#gfx-reviewers

Approved for Fenix 94.0.0-beta.1.

Attachment #9244167 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: