Closed Bug 1705433 Opened 3 years ago Closed 3 years ago

Box shadows are rendered as triangles on Adreno 3xx

Categories

(Core :: Graphics: WebRender, defect, P3)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image screenshot.png

Box shadows are rendered as triangles on my Nexus 5, similar to images were in bug 1630356.

This is due to the flat varying float vClipMode that is used to calculate the result in the cs_clip_box_shadow fragment shader.

In bug 1630356 we optimistically assumed the bug only affected UV coordinate calculations, but that appears to not be the case. The fix from bug 1630356 applies here too though, packing the varying in a vec2 avoids the bug.

See Also: → 1630356
Severity: -- → S3
OS: Unspecified → Android
Priority: -- → P3

Did a quick wrench run to see if other shaders are affected, and it seems to affect gradients and svg filters too.

Specifically v_gradient_repeat in gradient.glsl (shared between the various gradient shaders), and vFloat0 in cs_svg_filter.glsl

In bug 1630356 we found a driver bug on some Adreno 3xx devices where
flat scalar varyings in shaders incorrectly caused the output of every
fragment in the triangle to be calculated as if flat. To work around
the bug, we pack the scalar varyings in a vector. At the time we
believed it may be limited to varyings used to calculate UV
coordinates, however, we have now seen more cases of this bug (in box
shadows, gradients, and svg filters).

Unfortunately it is not yet clear what precise conditions are required
to trigger this bug, so for now we just apply the workaround to the
varyings we know are affected due to failing wrench tests on the device.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4589bb0b7c23
Pack more varyings in vectors to work around Adreno 3xx bug. r=kvark
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
See Also: → 1728064
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: