From 8b804a5de373f5bd23230b39c8752167d0e6fb0a Mon Sep 17 00:00:00 2001 From: Brindusan Cristian Date: Thu, 26 Aug 2021 21:50:39 +0300 Subject: [PATCH] Backed out changeset a2714880c85e (bug 1726755) for causing wrench bustages. CLOSED TREE --- gfx/wr/webrender/res/brush_mix_blend.glsl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/gfx/wr/webrender/res/brush_mix_blend.glsl b/gfx/wr/webrender/res/brush_mix_blend.glsl index b5e653f548cb..91d8850e042b 100644 --- a/gfx/wr/webrender/res/brush_mix_blend.glsl +++ b/gfx/wr/webrender/res/brush_mix_blend.glsl @@ -20,14 +20,13 @@ flat varying vec4 v_backdrop_uv_sample_bounds; // brush_image or bug 1630356 for details. flat varying vec2 v_perspective_vec; #define v_perspective v_perspective_vec.x -flat varying ivec2 v_op_vec; -#define v_op v_op_vec.x #else // Flag to allow perspective interpolation of UV. flat varying float v_perspective; +#endif + // mix-blend op flat varying int v_op; -#endif #ifdef WR_VERTEX_SHADER @@ -270,13 +269,7 @@ Fragment brush_fs() { // Return yellow if none of the branches match (shouldn't happen). 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 - // 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) { + switch (v_op) { case MixBlendMode_Multiply: result.rgb = Multiply(Cb.rgb, Cs.rgb); break;