зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset a2714880c85e (bug 1726755) for causing wrench bustages.
CLOSED TREE
This commit is contained in:
Родитель
58e0b2946c
Коммит
8b804a5de3
|
@ -20,14 +20,13 @@ flat varying vec4 v_backdrop_uv_sample_bounds;
|
||||||
// brush_image or bug 1630356 for details.
|
// brush_image or bug 1630356 for details.
|
||||||
flat varying vec2 v_perspective_vec;
|
flat varying vec2 v_perspective_vec;
|
||||||
#define v_perspective v_perspective_vec.x
|
#define v_perspective v_perspective_vec.x
|
||||||
flat varying ivec2 v_op_vec;
|
|
||||||
#define v_op v_op_vec.x
|
|
||||||
#else
|
#else
|
||||||
// Flag to allow perspective interpolation of UV.
|
// Flag to allow perspective interpolation of UV.
|
||||||
flat varying float v_perspective;
|
flat varying float v_perspective;
|
||||||
|
#endif
|
||||||
|
|
||||||
// mix-blend op
|
// mix-blend op
|
||||||
flat varying int v_op;
|
flat varying int v_op;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WR_VERTEX_SHADER
|
#ifdef WR_VERTEX_SHADER
|
||||||
|
|
||||||
|
@ -270,13 +269,7 @@ Fragment brush_fs() {
|
||||||
// Return yellow if none of the branches match (shouldn't happen).
|
// Return yellow if none of the branches match (shouldn't happen).
|
||||||
vec4 result = vec4(1.0, 1.0, 0.0, 1.0);
|
vec4 result = vec4(1.0, 1.0, 0.0, 1.0);
|
||||||
|
|
||||||
// On Android v_op has been packed in to a vector to avoid a driver bug
|
switch (v_op) {
|
||||||
// on Adreno 3xx. However, this runs in to another Adreno 3xx driver bug
|
|
||||||
// where the switch doesn't match any cases. Unpacking the value from the
|
|
||||||
// vec in to a local variable prior to the switch works around this, but
|
|
||||||
// gets optimized away by glslopt. Adding a bitwise AND prevents that.
|
|
||||||
// See bug 1726755.
|
|
||||||
switch (v_op & 0xFF) {
|
|
||||||
case MixBlendMode_Multiply:
|
case MixBlendMode_Multiply:
|
||||||
result.rgb = Multiply(Cb.rgb, Cs.rgb);
|
result.rgb = Multiply(Cb.rgb, Cs.rgb);
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче