Closed Bug 1728064 Opened 3 years ago Closed 3 years ago

Opacity renders with triangle artifact [Adreno 3xx]

Categories

(Core :: Graphics: WebRender, defect)

Firefox 93
defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox91 --- wontfix
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- fixed

People

(Reporter: ke5trel, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 2 obsolete files)

Samsung Galaxy Tab 4 (SM-T530)
Android 5.0.2
Qualcomm Adreno (TM) 305
OpenGL ES 3.0 V@84.0

opacity renders as solid color with triangle artifact.

https://www.w3schools.com/css/css_image_transparency.asp

box-shadow with blur also doesn't render which may be related.

https://www.w3schools.com/CSSref/tryit.asp?filename=trycss3_box-shadow2

This is yet another two cases of bug 1630356 and related bugs - this time affecting the brush_opacity and cs_blur shaders. I will go through every shader and ensure that there are no more flat scalar varyings and they are all packed in to vectors instead.

See Also: → 1630356
Assignee: nobody → jnicol
Severity: -- → S3

There is a driver bug on Adreno 3xx devices causing incorrect
rendering when flat scalar varyings are used in fragment shaders. This
has been reported on several occasions for various shaders, which have
been fixed one at a time. This patch removes the remaining flat scalar
varyings from all of our shaders so that we do not encounter this
issue again.

There is a driver bug on Adreno 3xx devices causing incorrect
rendering when flat scalar varyings are used in fragment shaders. This
has occured several times in different shaders, so this patch finally
adds a test to ensure it does not occur again.

We have used the glsl crate to parse and validate the shaders rather
than angle, as exposing the required bindings to mozangle is messy. We
must therefore use the pre-optimized shaders as the glsl crate does
not handle preprocessor directives correctly.

This has been implemented as a wrench test rather than a unit test as
running unit tests on android is difficult. Additionally we want to
use the shaders specific to the platform the tests are ran on, as we
only apply the workaround for this driver bug on android.

Depends on D124204

There is a driver bug on Adreno 3xx devices causing incorrect
rendering when flat scalar varyings are used in fragment shaders. The
original report was in bug 1630356, but it has been reported since on
several occasions for various shaders, which have been fixed one at a
time. This patch removes the remaining flat scalar varyings from all
of our shaders so that we do not encounter this issue again.

Additionally, it removes the usage of #ifdefs surrounding these
workarounds so that it applies to all platforms rather than just
android. This has been done to keep the code more readable - now that
we have a test to ensure this is not regressed it no longer needs to
be loud and ugly.

There is a driver bug on Adreno 3xx devices causing incorrect
rendering when flat scalar varyings are used in fragment shaders. This
has occured several times in different shaders, so this patch finally
adds a test to ensure it does not occur again.

We have used the glsl crate to parse and validate the shaders rather
than angle, as exposing the required bindings to mozangle is messy. We
must therefore use the pre-optimized shaders as the glsl crate does
not handle preprocessor directives correctly.

This has been implemented as a wrench test rather than a unit test as
running unit tests on android is difficult. Additionally we want to
use the shaders specific to the platform the tests are ran on, the bug
only affects (some) android devices, and shaders on other platforms
may differ.

Depends on D124346

Attachment #9239153 - Attachment is obsolete: true
Attachment #9239152 - Attachment is obsolete: true
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4daf6a7a42f7
Remove all remaining flat scalar varyings from shaders on android. r=gfx-reviewers,kvark
https://hg.mozilla.org/integration/autoland/rev/9c7077da42f2
Add test to ensure shaders don't contain flat scalar varyings on android. r=gfx-reviewers,kvark

Backed out 2 changesets (Bug 1728064) for causing webrender bustages.
Backout link
Push with failures, WR
Failure Log

Flags: needinfo?(jnicol)

The new test just needed a bigger timeout

Flags: needinfo?(jnicol)
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9630c061787f
Remove all remaining flat scalar varyings from shaders on android. r=gfx-reviewers,kvark
https://hg.mozilla.org/integration/autoland/rev/1fca87b15375
Add test to ensure shaders don't contain flat scalar varyings on android. r=gfx-reviewers,kvark
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

The patch landed in nightly and beta is affected.
:jnicol, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(jnicol)

Apologies, I was on PTO. Yes, we can uplift this to beta

Flags: needinfo?(jnicol)

Comment on attachment 9238944 [details]
Bug 1728064 - Remove all remaining flat scalar varyings from shaders on android. r?#gfx-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: Incorrect rendering on adreno 3xx devices (opacity elements, and others too)
  • Is this code covered by automated tests?: Yes
  • 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): Shader changes always carry a slight risk of running in to driver bugs, but this fix has been on nightly for a while without issues
  • String changes made/needed:
Attachment #9238944 - Flags: approval-mozilla-beta?
Attachment #9238945 - Flags: approval-mozilla-beta?

Jamie, do you know what % of our users are affected by this bug?

Flags: needinfo?(jnicol)

I think it's around 5% on Adreno 3xx.

When I made the request yesterday I thought that bug 1730458 had the same cause, meaning this would fix not just opacity items but complex borders too. But that turns out to be unrelated. While in theory this might fix other elements, opacity is the only type of element we know was still affected by this driver bug. Which makes it less important, so perhaps not worth the risk.

Flags: needinfo?(jnicol)

Comment on attachment 9238944 [details]
Bug 1728064 - Remove all remaining flat scalar varyings from shaders on android. r?#gfx-reviewers

Uplifting a large webrender patch that late in the beta cycle It feels a bit risky to me, especially since this affect a small % of our Android population and this is not a new regression. Let's have it ride the 94 train, thanks!

Attachment #9238944 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #9238945 - 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

Creator:
Created:
Updated:
Size: