Bug 1705433 - Pack more varyings in vectors to work around Adreno 3xx bug. r=kvark
commit56f9b83c085c04b841d06c83ffde4fea455c2bbc
authorJamie Nicol <jnicol@mozilla.com>
Tue, 20 Apr 2021 07:08:40 +0000 (20 07:08 +0000)
committerJamie Nicol <jnicol@mozilla.com>
Tue, 20 Apr 2021 07:08:40 +0000 (20 07:08 +0000)
tree62dbbca592b8a8821789c2da150f10b4dad8ad49
parent1082170c92c3da21964cd685644fad3deee8bdb9
Bug 1705433 - Pack more varyings in vectors to work around Adreno 3xx bug. r=kvark

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.

Differential Revision: https://phabricator.services.mozilla.com/D112334
gfx/wr/webrender/res/brush_image.glsl
gfx/wr/webrender/res/cs_clip_box_shadow.glsl
gfx/wr/webrender/res/cs_svg_filter.glsl
gfx/wr/webrender/res/gradient.glsl