Bug 1721795 - Pack cs_border_solid's vMixColors in to vector to work around driver bug. r=gfx-reviewers,lsalzman

We have in the past encountered a driver bug on Adreno 3xx devices
where using a flat scalar varying causes the fragment shader output to
be incorrect. See bugs 1630356 and 1705433.

We have now encountered this in cs_border_solid too, due to
vMixColors. As before, packing the varying in to a vector works around
the bug.

Differential Revision: https://phabricator.services.mozilla.com/D121211
This commit is contained in:
Jamie Nicol 2021-07-29 18:31:36 +00:00
Родитель 29ea6ee7cc
Коммит 0efd692f47
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -17,8 +17,15 @@ flat varying vec4 vColor1;
// transition occurs. Used for corners only.
flat varying vec4 vColorLine;
#if defined(PLATFORM_ANDROID) && !defined(SWGL)
// Work around Adreno 3xx driver bug. See the v_perspective comment in
// brush_image or bug 1630356 for details.
flat varying ivec2 vMixColorsVec;
#define vMixColors vMixColorsVec.x
#else
// A boolean indicating that we should be mixing between edge colors.
flat varying int vMixColors;
#endif
// xy = Local space position of the clip center.
// zw = Scale the rect origin by this to get the outer