mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1823411 - Give all webrender's shader varyings an explicit precision. r=gfx-reviewers,lsalzman
Mali profiling tools have shown we are frequently fragment bound, in particular due to varying interpolation. To help mitigate this, we should use mediump where possible. Currently most of our varyings are implicitly highp by default. This patch reduces their precision to mediump where possible. When varyings must remain highp for correctness reasons, this is now stated explicitly. As expected, this does cause a fair bit of reftest fuzziness on Android devices. This patch also updates reftest expectations to reflect this. Differential Revision: https://phabricator.services.mozilla.com/D173028
This commit is contained in:
parent
bd217ea8bc
commit
b4da4c2fb4
@ -14,7 +14,7 @@ fuzzy-if(winWidget,0-1,0-4) == 1435143.html 1435143-ref.html
|
||||
== 1444904.html 1444904-ref.html
|
||||
fuzzy-if(winWidget,46-95,1000-1100) fuzzy-if(cocoaWidget&&swgl,1-1,1-1) == 1451168.html 1451168-ref.html
|
||||
== 1461313.html 1461313-ref.html
|
||||
fuzzy(5-32,21908-26621) fuzzy-if(!useDrawSnapshot,0-5,0-1060) fuzzy-if(useDrawSnapshot,32-32,26350-26350) == 1463802.html 1463802-ref.html
|
||||
fuzzy-if(!useDrawSnapshot,0-5,0-1060) fuzzy-if(useDrawSnapshot,32-32,26350-26350) fuzzy-if(Android&&device&&!swgl,31-31,2028-2028) == 1463802.html 1463802-ref.html
|
||||
fuzzy(0-11,0-4) fails-if(useDrawSnapshot) == 1474722.html 1474722-ref.html
|
||||
fails-if(useDrawSnapshot) == 1501195.html 1501195-ref.html
|
||||
== 1519754.html 1519754-ref.html
|
||||
|
@ -47,7 +47,7 @@
|
||||
///
|
||||
|
||||
#if (defined(WR_FEATURE_ALPHA_PASS) || defined(WR_FEATURE_ANTIALIASING)) && !defined(SWGL_ANTIALIAS)
|
||||
varying vec2 v_local_pos;
|
||||
varying highp vec2 v_local_pos;
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
@ -8,16 +8,16 @@
|
||||
#include shared,prim_shared,brush,blend
|
||||
|
||||
// Interpolated UV coordinates to sample.
|
||||
varying vec2 v_uv;
|
||||
varying highp vec2 v_uv;
|
||||
|
||||
// Normalized bounds of the source image in the texture, adjusted to avoid
|
||||
// sampling artifacts.
|
||||
flat varying vec4 v_uv_sample_bounds;
|
||||
flat varying highp vec4 v_uv_sample_bounds;
|
||||
|
||||
// x: Flag to allow perspective interpolation of UV.
|
||||
// y: Filter-dependent "amount" parameter.
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 v_perspective_amount;
|
||||
flat varying mediump vec2 v_perspective_amount;
|
||||
#define v_perspective v_perspective_amount.x
|
||||
#define v_amount v_perspective_amount.y
|
||||
|
||||
@ -30,12 +30,12 @@ flat varying highp ivec2 v_op_table_address_vec;
|
||||
#define v_op v_op_table_address_vec.x
|
||||
#define v_table_address v_op_table_address_vec.y
|
||||
|
||||
flat varying mat4 v_color_mat;
|
||||
flat varying mediump mat4 v_color_mat;
|
||||
// The function to use for each component of a component transfer filter. Using a int[4]
|
||||
// or ivec4 (with each element or component containing the function for each component) has
|
||||
// ran in to bugs 1695912 and 1731758, so instead use a vec4 and cast the values to/from floats.
|
||||
flat varying vec4 v_funcs;
|
||||
flat varying vec4 v_color_offset;
|
||||
flat varying mediump vec4 v_funcs;
|
||||
flat varying mediump vec4 v_color_offset;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
void brush_vs(
|
||||
|
@ -7,23 +7,23 @@
|
||||
#include shared,prim_shared,brush
|
||||
|
||||
// Interpolated UV coordinates to sample.
|
||||
varying vec2 v_uv;
|
||||
varying highp vec2 v_uv;
|
||||
|
||||
#ifdef WR_FEATURE_ALPHA_PASS
|
||||
flat varying vec4 v_color;
|
||||
flat varying vec2 v_mask_swizzle;
|
||||
flat varying vec2 v_tile_repeat;
|
||||
flat varying mediump vec4 v_color;
|
||||
flat varying mediump vec2 v_mask_swizzle;
|
||||
flat varying mediump vec2 v_tile_repeat;
|
||||
#endif
|
||||
|
||||
// Normalized bounds of the source image in the texture.
|
||||
flat varying vec4 v_uv_bounds;
|
||||
flat varying highp vec4 v_uv_bounds;
|
||||
// Normalized bounds of the source image in the texture, adjusted to avoid
|
||||
// sampling artifacts.
|
||||
flat varying vec4 v_uv_sample_bounds;
|
||||
flat varying highp vec4 v_uv_sample_bounds;
|
||||
|
||||
// Flag to allow perspective interpolation of UV.
|
||||
// Packed in to vector to work around bug 1630356.
|
||||
flat varying vec2 v_perspective;
|
||||
flat varying mediump vec2 v_perspective;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
#include shared,prim_shared,brush,gpu_buffer,gradient_shared
|
||||
|
||||
// Start offset. Packed in to vector to work around bug 1630356.
|
||||
flat varying vec2 v_start_offset;
|
||||
flat varying mediump vec2 v_start_offset;
|
||||
|
||||
flat varying vec2 v_scale_dir;
|
||||
flat varying mediump vec2 v_scale_dir;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -8,18 +8,18 @@
|
||||
#include shared,prim_shared,brush
|
||||
|
||||
// UV and bounds for the source image
|
||||
varying vec2 v_src_uv;
|
||||
flat varying vec4 v_src_uv_sample_bounds;
|
||||
varying highp vec2 v_src_uv;
|
||||
flat varying highp vec4 v_src_uv_sample_bounds;
|
||||
|
||||
// UV and bounds for the backdrop image
|
||||
varying vec2 v_backdrop_uv;
|
||||
flat varying vec4 v_backdrop_uv_sample_bounds;
|
||||
varying highp vec2 v_backdrop_uv;
|
||||
flat varying highp vec4 v_backdrop_uv_sample_bounds;
|
||||
|
||||
// Flag to allow perspective interpolation of UV.
|
||||
// Packed in to vector to work around bug 1630356.
|
||||
flat varying vec2 v_perspective;
|
||||
flat varying mediump vec2 v_perspective;
|
||||
// mix-blend op. Packed in to vector to work around bug 1630356.
|
||||
flat varying ivec2 v_op;
|
||||
flat varying mediump ivec2 v_op;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -8,13 +8,13 @@
|
||||
#include shared,prim_shared,brush
|
||||
|
||||
// Interpolated UV coordinates to sample.
|
||||
varying vec2 v_uv;
|
||||
varying highp vec2 v_uv;
|
||||
|
||||
// Normalized bounds of the source image in the texture, adjusted to avoid
|
||||
// sampling artifacts.
|
||||
flat varying vec4 v_uv_sample_bounds;
|
||||
flat varying highp vec4 v_uv_sample_bounds;
|
||||
|
||||
flat varying vec2 v_opacity_perspective_vec;
|
||||
flat varying mediump vec2 v_opacity_perspective_vec;
|
||||
#define v_opacity v_opacity_perspective_vec.x
|
||||
// Flag to allow perspective interpolation of UV.
|
||||
#define v_perspective v_opacity_perspective_vec.y
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include shared,prim_shared,brush
|
||||
|
||||
flat varying vec4 v_color;
|
||||
flat varying mediump vec4 v_color;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -6,23 +6,23 @@
|
||||
|
||||
#include shared,prim_shared,brush,yuv
|
||||
|
||||
varying vec2 vUv_Y;
|
||||
flat varying vec4 vUvBounds_Y;
|
||||
varying highp vec2 vUv_Y;
|
||||
flat varying highp vec4 vUvBounds_Y;
|
||||
|
||||
varying vec2 vUv_U;
|
||||
flat varying vec4 vUvBounds_U;
|
||||
varying highp vec2 vUv_U;
|
||||
flat varying highp vec4 vUvBounds_U;
|
||||
|
||||
varying vec2 vUv_V;
|
||||
flat varying vec4 vUvBounds_V;
|
||||
varying highp vec2 vUv_V;
|
||||
flat varying highp vec4 vUvBounds_V;
|
||||
|
||||
YUV_PRECISION flat varying vec3 vYcbcrBias;
|
||||
YUV_PRECISION flat varying mat3 vRgbFromDebiasedYcbcr;
|
||||
flat varying YUV_PRECISION vec3 vYcbcrBias;
|
||||
flat varying YUV_PRECISION mat3 vRgbFromDebiasedYcbcr;
|
||||
|
||||
// YUV format. Packed in to vector to work around bug 1630356.
|
||||
flat varying ivec2 vFormat;
|
||||
flat varying mediump ivec2 vFormat;
|
||||
|
||||
#ifdef SWGL_DRAW_SPAN
|
||||
flat varying int vRescaleFactor;
|
||||
flat varying mediump int vRescaleFactor;
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
@ -16,28 +16,28 @@
|
||||
#endif
|
||||
|
||||
#ifdef WR_FEATURE_YUV
|
||||
YUV_PRECISION flat varying vec3 vYcbcrBias;
|
||||
YUV_PRECISION flat varying mat3 vRgbFromDebiasedYcbcr;
|
||||
flat varying YUV_PRECISION vec3 vYcbcrBias;
|
||||
flat varying YUV_PRECISION mat3 vRgbFromDebiasedYcbcr;
|
||||
// YUV format. Packed in to vector to avoid bug 1630356.
|
||||
flat varying ivec2 vYuvFormat;
|
||||
flat varying mediump ivec2 vYuvFormat;
|
||||
|
||||
#ifdef SWGL_DRAW_SPAN
|
||||
flat varying int vRescaleFactor;
|
||||
flat varying mediump int vRescaleFactor;
|
||||
#endif
|
||||
varying vec2 vUV_y;
|
||||
varying vec2 vUV_u;
|
||||
varying vec2 vUV_v;
|
||||
flat varying vec4 vUVBounds_y;
|
||||
flat varying vec4 vUVBounds_u;
|
||||
flat varying vec4 vUVBounds_v;
|
||||
varying highp vec2 vUV_y;
|
||||
varying highp vec2 vUV_u;
|
||||
varying highp vec2 vUV_v;
|
||||
flat varying highp vec4 vUVBounds_y;
|
||||
flat varying highp vec4 vUVBounds_u;
|
||||
flat varying highp vec4 vUVBounds_v;
|
||||
#else
|
||||
varying vec2 vUv;
|
||||
varying highp vec2 vUv;
|
||||
#ifndef WR_FEATURE_FAST_PATH
|
||||
flat varying vec4 vColor;
|
||||
flat varying vec4 vUVBounds;
|
||||
flat varying mediump vec4 vColor;
|
||||
flat varying highp vec4 vUVBounds;
|
||||
#endif
|
||||
#ifdef WR_FEATURE_TEXTURE_EXTERNAL_ESSL1
|
||||
uniform vec2 uTextureSize;
|
||||
uniform mediump vec2 uTextureSize;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#include shared,prim_shared
|
||||
|
||||
varying vec2 vUv;
|
||||
flat varying vec4 vUvRect;
|
||||
flat varying vec2 vOffsetScale;
|
||||
varying highp vec2 vUv;
|
||||
flat varying highp vec4 vUvRect;
|
||||
flat varying mediump vec2 vOffsetScale;
|
||||
// The number of pixels on each end that we apply the blur filter over.
|
||||
// Packed in to vector to work around bug 1630356.
|
||||
flat varying ivec2 vSupport;
|
||||
flat varying vec2 vGaussCoefficients;
|
||||
flat varying mediump ivec2 vSupport;
|
||||
flat varying mediump vec2 vGaussCoefficients;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
// Applies a separable gaussian blur in one direction, as specified
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
// For edges, the colors are the same. For corners, these
|
||||
// are the colors of each edge making up the corner.
|
||||
flat varying vec4 vColor00;
|
||||
flat varying vec4 vColor01;
|
||||
flat varying vec4 vColor10;
|
||||
flat varying vec4 vColor11;
|
||||
flat varying mediump vec4 vColor00;
|
||||
flat varying mediump vec4 vColor01;
|
||||
flat varying mediump vec4 vColor10;
|
||||
flat varying mediump vec4 vColor11;
|
||||
|
||||
// A point + tangent defining the line where the edge
|
||||
// transition occurs. Used for corners only.
|
||||
flat varying vec4 vColorLine;
|
||||
flat varying mediump vec4 vColorLine;
|
||||
|
||||
// x: segment, y: clip mode
|
||||
// We cast these to/from floats rather than using an ivec due to a driver bug
|
||||
@ -27,24 +27,24 @@ flat varying mediump vec4 vStyleEdgeAxis;
|
||||
// xy = Local space position of the clip center.
|
||||
// zw = Scale the rect origin by this to get the outer
|
||||
// corner from the segment rectangle.
|
||||
flat varying vec4 vClipCenter_Sign;
|
||||
flat varying highp vec4 vClipCenter_Sign;
|
||||
|
||||
// An outer and inner elliptical radii for border
|
||||
// corner clipping.
|
||||
flat varying vec4 vClipRadii;
|
||||
flat varying mediump vec4 vClipRadii;
|
||||
|
||||
// Reference point for determine edge clip lines.
|
||||
flat varying vec4 vEdgeReference;
|
||||
flat varying mediump vec4 vEdgeReference;
|
||||
|
||||
// Stores widths/2 and widths/3 to save doing this in FS.
|
||||
flat varying vec4 vPartialWidths;
|
||||
flat varying mediump vec4 vPartialWidths;
|
||||
|
||||
// Clipping parameters for dot or dash.
|
||||
flat varying vec4 vClipParams1;
|
||||
flat varying vec4 vClipParams2;
|
||||
flat varying mediump vec4 vClipParams1;
|
||||
flat varying mediump vec4 vClipParams2;
|
||||
|
||||
// Local space position
|
||||
varying vec2 vPos;
|
||||
varying highp vec2 vPos;
|
||||
|
||||
#define SEGMENT_TOP_LEFT 0
|
||||
#define SEGMENT_TOP_RIGHT 1
|
||||
|
@ -10,34 +10,34 @@
|
||||
|
||||
// For edges, the colors are the same. For corners, these
|
||||
// are the colors of each edge making up the corner.
|
||||
flat varying vec4 vColor0;
|
||||
flat varying vec4 vColor1;
|
||||
flat varying mediump vec4 vColor0;
|
||||
flat varying mediump vec4 vColor1;
|
||||
|
||||
// A point + tangent defining the line where the edge
|
||||
// transition occurs. Used for corners only.
|
||||
flat varying vec4 vColorLine;
|
||||
flat varying mediump vec4 vColorLine;
|
||||
|
||||
// A boolean indicating that we should be mixing between edge colors.
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying ivec2 vMixColors;
|
||||
flat varying mediump ivec2 vMixColors;
|
||||
|
||||
// xy = Local space position of the clip center.
|
||||
// zw = Scale the rect origin by this to get the outer
|
||||
// corner from the segment rectangle.
|
||||
flat varying vec4 vClipCenter_Sign;
|
||||
flat varying highp vec4 vClipCenter_Sign;
|
||||
|
||||
// An outer and inner elliptical radii for border
|
||||
// corner clipping.
|
||||
flat varying vec4 vClipRadii;
|
||||
flat varying highp vec4 vClipRadii;
|
||||
|
||||
// Position, scale, and radii of horizontally and vertically adjacent corner clips.
|
||||
flat varying vec4 vHorizontalClipCenter_Sign;
|
||||
flat varying vec2 vHorizontalClipRadii;
|
||||
flat varying vec4 vVerticalClipCenter_Sign;
|
||||
flat varying vec2 vVerticalClipRadii;
|
||||
flat varying highp vec4 vHorizontalClipCenter_Sign;
|
||||
flat varying highp vec2 vHorizontalClipRadii;
|
||||
flat varying highp vec4 vVerticalClipCenter_Sign;
|
||||
flat varying highp vec2 vVerticalClipRadii;
|
||||
|
||||
// Local space position
|
||||
varying vec2 vPos;
|
||||
varying highp vec2 vPos;
|
||||
|
||||
#define SEGMENT_TOP_LEFT 0
|
||||
#define SEGMENT_TOP_RIGHT 1
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
#include shared,clip_shared
|
||||
|
||||
varying vec4 vLocalPos;
|
||||
varying vec2 vUv;
|
||||
flat varying vec4 vUvBounds;
|
||||
flat varying vec4 vEdge;
|
||||
flat varying vec4 vUvBounds_NoClamp;
|
||||
varying highp vec4 vLocalPos;
|
||||
varying highp vec2 vUv;
|
||||
flat varying highp vec4 vUvBounds;
|
||||
flat varying mediump vec4 vEdge;
|
||||
flat varying highp vec4 vUvBounds_NoClamp;
|
||||
// Clip mode. Packed in to a vector to avoid bug 1630356.
|
||||
flat varying vec2 vClipMode;
|
||||
flat varying mediump vec2 vClipMode;
|
||||
|
||||
#define MODE_STRETCH 0
|
||||
#define MODE_SIMPLE 1
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#include shared,clip_shared
|
||||
|
||||
varying vec2 vLocalPos;
|
||||
varying vec2 vClipMaskImageUv;
|
||||
varying highp vec2 vLocalPos;
|
||||
varying highp vec2 vClipMaskImageUv;
|
||||
|
||||
flat varying vec4 vClipMaskUvInnerRect;
|
||||
flat varying highp vec4 vClipMaskUvInnerRect;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -4,21 +4,21 @@
|
||||
|
||||
#include shared,clip_shared,ellipse
|
||||
|
||||
varying vec4 vLocalPos;
|
||||
varying highp vec4 vLocalPos;
|
||||
#ifdef WR_FEATURE_FAST_PATH
|
||||
flat varying vec3 vClipParams; // xy = box size, z = radius
|
||||
flat varying mediump vec3 vClipParams; // xy = box size, z = radius
|
||||
#else
|
||||
flat varying vec4 vClipCenter_Radius_TL;
|
||||
flat varying vec4 vClipCenter_Radius_TR;
|
||||
flat varying vec4 vClipCenter_Radius_BL;
|
||||
flat varying vec4 vClipCenter_Radius_BR;
|
||||
flat varying vec3 vClipPlane_TL;
|
||||
flat varying vec3 vClipPlane_TR;
|
||||
flat varying vec3 vClipPlane_BL;
|
||||
flat varying vec3 vClipPlane_BR;
|
||||
flat varying highp vec4 vClipCenter_Radius_TL;
|
||||
flat varying highp vec4 vClipCenter_Radius_TR;
|
||||
flat varying highp vec4 vClipCenter_Radius_BL;
|
||||
flat varying highp vec4 vClipCenter_Radius_BR;
|
||||
flat varying highp vec3 vClipPlane_TL;
|
||||
flat varying highp vec3 vClipPlane_TR;
|
||||
flat varying highp vec3 vClipPlane_BL;
|
||||
flat varying highp vec3 vClipPlane_BR;
|
||||
#endif
|
||||
// Clip mode. Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 vClipMode;
|
||||
flat varying mediump vec2 vClipMode;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#define PI 3.141592653589793
|
||||
|
||||
varying vec2 v_pos;
|
||||
varying highp vec2 v_pos;
|
||||
|
||||
flat varying vec2 v_center;
|
||||
flat varying highp vec2 v_center;
|
||||
|
||||
// x: start offset, y: offset scale, z: angle
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec3 v_start_offset_offset_scale_angle_vec;
|
||||
flat varying highp vec3 v_start_offset_offset_scale_angle_vec;
|
||||
#define v_start_offset v_start_offset_offset_scale_angle_vec.x
|
||||
#define v_offset_scale v_start_offset_offset_scale_angle_vec.y
|
||||
#define v_angle v_start_offset_offset_scale_angle_vec.z
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
#include shared
|
||||
|
||||
varying float vPos;
|
||||
flat varying vec4 vColor0;
|
||||
flat varying vec4 vColor1;
|
||||
varying highp float vPos;
|
||||
flat varying mediump vec4 vColor0;
|
||||
flat varying mediump vec4 vColor1;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
// To keep the code independent of whether the line is horizontal or vertical,
|
||||
// vLocalPos.x is always parallel, and .y always perpendicular, to the line
|
||||
// being decorated.
|
||||
varying vec2 vLocalPos;
|
||||
varying highp vec2 vLocalPos;
|
||||
|
||||
// Line style. Packed in to a vector to work around bug 1630356.
|
||||
flat varying ivec2 vStyle;
|
||||
flat varying mediump ivec2 vStyle;
|
||||
|
||||
flat varying vec4 vParams;
|
||||
flat varying mediump vec4 vParams;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
#include shared,rect,render_task,gpu_cache,gpu_buffer,gradient
|
||||
|
||||
varying vec2 v_pos;
|
||||
varying highp vec2 v_pos;
|
||||
|
||||
flat varying vec2 v_scale_dir;
|
||||
flat varying mediump vec2 v_scale_dir;
|
||||
|
||||
// Start offset. Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 v_start_offset;
|
||||
flat varying highp vec2 v_start_offset;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#include shared,rect,render_task,gpu_cache,gpu_buffer,gradient
|
||||
|
||||
varying vec2 v_pos;
|
||||
varying highp vec2 v_pos;
|
||||
|
||||
// Start radius. Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 v_start_radius;
|
||||
flat varying highp vec2 v_start_radius;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include shared
|
||||
|
||||
varying vec2 vUv;
|
||||
flat varying vec4 vUvRect;
|
||||
varying highp vec2 vUv;
|
||||
flat varying highp vec4 vUvRect;
|
||||
#ifdef WR_FEATURE_TEXTURE_EXTERNAL_ESSL1
|
||||
uniform vec2 uTextureSize;
|
||||
#endif
|
||||
|
@ -6,24 +6,24 @@
|
||||
|
||||
#include shared,prim_shared
|
||||
|
||||
varying vec2 vInput1Uv;
|
||||
varying vec2 vInput2Uv;
|
||||
flat varying vec4 vInput1UvRect;
|
||||
flat varying vec4 vInput2UvRect;
|
||||
flat varying ivec4 vData;
|
||||
flat varying vec4 vFilterData0;
|
||||
flat varying vec4 vFilterData1;
|
||||
varying highp vec2 vInput1Uv;
|
||||
varying highp vec2 vInput2Uv;
|
||||
flat varying highp vec4 vInput1UvRect;
|
||||
flat varying highp vec4 vInput2UvRect;
|
||||
flat varying mediump ivec4 vData;
|
||||
flat varying mediump vec4 vFilterData0;
|
||||
flat varying mediump vec4 vFilterData1;
|
||||
|
||||
// x: Filter input count, y: Filter kind.
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying ivec2 vFilterInputCountFilterKindVec;
|
||||
flat varying mediump ivec2 vFilterInputCountFilterKindVec;
|
||||
#define vFilterInputCount vFilterInputCountFilterKindVec.x
|
||||
#define vFilterKind vFilterInputCountFilterKindVec.y
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 vFloat0;
|
||||
flat varying mediump vec2 vFloat0;
|
||||
|
||||
flat varying mat4 vColorMat;
|
||||
flat varying ivec4 vFuncs;
|
||||
flat varying mediump mat4 vColorMat;
|
||||
flat varying mediump ivec4 vFuncs;
|
||||
|
||||
#define FILTER_BLEND 0
|
||||
#define FILTER_FLOOD 1
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include shared,shared_other
|
||||
|
||||
varying vec4 vColor;
|
||||
varying mediump vec4 vColor;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
in vec4 aColor;
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include shared,shared_other
|
||||
|
||||
varying vec2 vColorTexCoord;
|
||||
varying vec4 vColor;
|
||||
varying highp vec2 vColorTexCoord;
|
||||
varying mediump vec4 vColor;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
in vec4 aColor;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include base
|
||||
|
||||
varying vec4 vData;
|
||||
varying highp vec4 vData;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
in vec4 aValue;
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
// Gradient GPU cache address.
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying HIGHP_FS_ADDRESS ivec2 v_gradient_address;
|
||||
flat varying highp ivec2 v_gradient_address;
|
||||
// Repetition along the gradient stops.
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 v_gradient_repeat;
|
||||
flat varying mediump vec2 v_gradient_repeat;
|
||||
|
||||
#ifdef WR_FRAGMENT_SHADER
|
||||
|
||||
|
@ -7,12 +7,12 @@
|
||||
// Size of the gradient pattern's rectangle, used to compute horizontal and vertical
|
||||
// repetitions. Not to be confused with another kind of repetition of the pattern
|
||||
// which happens along the gradient stops.
|
||||
flat varying vec2 v_repeated_size;
|
||||
flat varying highp vec2 v_repeated_size;
|
||||
|
||||
varying vec2 v_pos;
|
||||
varying highp vec2 v_pos;
|
||||
|
||||
#ifdef WR_FEATURE_ALPHA_PASS
|
||||
flat varying vec2 v_tile_repeat;
|
||||
flat varying highp vec2 v_tile_repeat;
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
@ -19,8 +19,9 @@ uniform sampler2D sClipMask;
|
||||
|
||||
#ifndef SWGL_CLIP_MASK
|
||||
// TODO: convert back to RectWithEndpoint if driver issues are resolved, if ever.
|
||||
flat varying vec4 vClipMaskUvBounds;
|
||||
varying vec2 vClipMaskUv;
|
||||
// UVs must usually be highp, but because these are unnormalized they can be mediump.
|
||||
flat varying mediump vec4 vClipMaskUvBounds;
|
||||
varying mediump vec2 vClipMaskUv;
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include shared
|
||||
|
||||
varying vec4 vColor;
|
||||
varying mediump vec4 vColor;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
PER_INSTANCE in vec4 aRect;
|
||||
|
@ -13,7 +13,7 @@ attribute vec4 a_src_rect;
|
||||
attribute vec4 a_dst_rect;
|
||||
attribute vec2 a_dst_texture_size;
|
||||
|
||||
varying vec2 v_uv;
|
||||
varying highp vec2 v_uv;
|
||||
|
||||
void main(void) {
|
||||
// We use texel fetch so v_uv is in unnormalized device space.
|
||||
@ -30,7 +30,7 @@ void main(void) {
|
||||
|
||||
out vec4 oFragColor;
|
||||
|
||||
varying vec2 v_uv;
|
||||
varying highp vec2 v_uv;
|
||||
|
||||
uniform sampler2D sColor0;
|
||||
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
#include shared,rect,transform,render_task,gpu_buffer
|
||||
|
||||
flat varying vec4 v_color;
|
||||
flat varying ivec2 v_flags;
|
||||
flat varying mediump vec4 v_color;
|
||||
flat varying mediump ivec2 v_flags;
|
||||
|
||||
#ifndef SWGL_ANTIALIAS
|
||||
varying vec2 vLocalPos;
|
||||
varying highp vec2 vLocalPos;
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
@ -7,13 +7,13 @@
|
||||
#include shared,prim_shared
|
||||
|
||||
// interpolated UV coordinates to sample.
|
||||
varying vec2 vUv;
|
||||
varying highp vec2 vUv;
|
||||
|
||||
// Flag to allow perspective interpolation of UV.
|
||||
// Packed in to a vector to work around bug 1630356.
|
||||
flat varying vec2 vPerspective;
|
||||
flat varying mediump vec2 vPerspective;
|
||||
|
||||
flat varying vec4 vUvSampleBounds;
|
||||
flat varying highp vec4 vUvSampleBounds;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
struct SplitGeometry {
|
||||
|
@ -4,17 +4,17 @@
|
||||
|
||||
#include shared,prim_shared
|
||||
|
||||
flat varying vec4 v_color;
|
||||
flat varying vec3 v_mask_swizzle;
|
||||
flat varying mediump vec4 v_color;
|
||||
flat varying mediump vec3 v_mask_swizzle;
|
||||
// Normalized bounds of the source image in the texture.
|
||||
flat varying vec4 v_uv_bounds;
|
||||
flat varying highp vec4 v_uv_bounds;
|
||||
|
||||
// Interpolated UV coordinates to sample.
|
||||
varying vec2 v_uv;
|
||||
varying highp vec2 v_uv;
|
||||
|
||||
|
||||
#if defined(WR_FEATURE_GLYPH_TRANSFORM) && !defined(SWGL_CLIP_DIST)
|
||||
varying vec4 v_uv_clip;
|
||||
varying highp vec4 v_uv_clip;
|
||||
#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
flat varying vec4 vTransformBounds;
|
||||
flat varying highp vec4 vTransformBounds;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#define YUV_FORMAT_INTERLEAVED 3
|
||||
|
||||
//#define YUV_PRECISION mediump
|
||||
#define YUV_PRECISION
|
||||
#define YUV_PRECISION highp
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
skip_on(android) fuzzy(1,1) fuzzy-if(platform(swgl),4,27) == rounded-rects.yaml rounded-rects-ref.png # Too wide for Android
|
||||
== aa-dist-bug.yaml aa-dist-bug-ref.yaml
|
||||
== fractional-radii.yaml fractional-radii-ref.yaml
|
||||
fuzzy-if(env(android,device),6,792) == fractional-radii.yaml fractional-radii-ref.yaml
|
||||
|
@ -5,7 +5,7 @@ fuzzy-if(platform(swgl),3,2) == inset-no-blur-radius.yaml inset-no-blur-radius-r
|
||||
platform(linux,mac) == inset-alpha.yaml inset-alpha.png
|
||||
platform(linux,mac) == boxshadow-spread-only.yaml boxshadow-spread-only-ref.png
|
||||
== box-shadow-clip.yaml box-shadow-clip-ref.yaml
|
||||
fuzzy(1,402) fuzzy-if(platform(swgl),2,1208) == inset-large-offset.yaml inset-large-offset-ref.png
|
||||
fuzzy(1,402) fuzzy-if(platform(swgl),2,1208) fuzzy-if(env(android,device),6,399) == inset-large-offset.yaml inset-large-offset-ref.png
|
||||
platform(linux,mac) == inset-border-radius.yaml inset-border-radius.png
|
||||
platform(linux,mac) == inset-offset.yaml inset-offset.png
|
||||
platform(linux,mac) == inset-neg-offset.yaml inset-neg-offset.png
|
||||
|
@ -2,6 +2,6 @@
|
||||
# e.g. filter: blur(3px) grayscale(0.5) invert(0.2);
|
||||
|
||||
# Some platforms render this complex filter chain a little differently, and that's ok.
|
||||
fuzzy(4-6,12000-19950) fuzzy-if(swgl,5-10,13600-20260) == long-chain.html long-chain-ref.html # Win10: Bug 1258241
|
||||
fuzzy(4-6,12000-19950) fuzzy-if(swgl,5-10,13600-20260) fuzzy-if(Android&&device&&!swgl,6-6,19986-19986) == long-chain.html long-chain-ref.html # Win10: Bug 1258241
|
||||
== moz-element.html moz-element-ref.html
|
||||
fuzzy-if(!useDrawSnapshot,13-15,7670-7982) fuzzy-if(!useDrawSnapshot&&swgl,11-12,14052-14056) == same-filter.html same-filter-ref.html
|
||||
fuzzy-if(!useDrawSnapshot,13-15,7670-7982) fuzzy-if(!useDrawSnapshot&&swgl,11-12,14052-14056) fuzzy-if(Android&&device&&!swgl,13-13,13505-13505) == same-filter.html same-filter-ref.html
|
||||
|
@ -6,7 +6,7 @@
|
||||
== blur-calc.html blur-calc-ref.html
|
||||
== blur-calc-negative.html blur-calc-negative-ref.html
|
||||
fuzzy-if(cocoaWidget,0-1,0-2) skip-if(d2d) == blur-cap-large-radius-on-software.html blur-cap-large-radius-on-software-ref.html
|
||||
fuzzy-if(!useDrawSnapshot,2-5,4764-8168) == blur-clip-rect.html ../feGaussianBlur-4-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,2-5,4764-8168) fuzzy-if(Android&&device&&!swgl,5-5,8574-8574) == blur-clip-rect.html ../feGaussianBlur-4-ref.svg
|
||||
== blur-em-radius.html blur-em-radius-ref.html
|
||||
== blur-invalid-radius.html blur-invalid-radius-ref.html
|
||||
== blur-rem-radius.html blur-rem-radius-ref.html
|
||||
|
@ -41,10 +41,10 @@ fuzzy(0-1,0-10000) == feComposite-2.svg feComposite-2-ref.svg
|
||||
fuzzy(0-1,0-1600) == feFlood-1.svg feFlood-1-ref.svg
|
||||
skip-if(d2d) fuzzy(0-1,0-6400) == feFlood-2.svg feFlood-2-ref.svg
|
||||
|
||||
fuzzy(0-2,0-6404) == feGaussianBlur-1.svg feGaussianBlur-1-ref.svg
|
||||
fuzzy(0-2,0-6404) fuzzy-if(Android&&device&&!swgl,6-6,6400-6400) == feGaussianBlur-1.svg feGaussianBlur-1-ref.svg
|
||||
fuzzy(0-2,0-304) == feGaussianBlur-2.svg feGaussianBlur-2-ref.svg
|
||||
# != feGaussianBlur-3.svg feGaussianBlur-3-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,2-5,4764-8168) == feGaussianBlur-4.svg feGaussianBlur-4-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,2-5,4764-8168) fuzzy-if(Android&&device&&!swgl,5-5,8574-8574) == feGaussianBlur-4.svg feGaussianBlur-4-ref.svg
|
||||
fuzzy-if(geckoview,0-4,0-200) == feGaussianBlur-5.svg feGaussianBlur-5-ref.svg
|
||||
== feGaussianBlur-6.svg feGaussianBlur-6-ref.svg
|
||||
skip-if(d2d) == feGaussianBlur-cap-large-directional-radius-on-software.html feGaussianBlur-cap-large-directional-radius-on-software-ref.html
|
||||
|
@ -4,13 +4,13 @@
|
||||
== clip-input.svg clip-input-ref.svg
|
||||
== clip-original-SourceGraphic.svg clip-original-SourceGraphic-ref.svg
|
||||
== clip-output.svg clip-output-ref.svg
|
||||
fuzzy(0-5,0-20300) == default-subregion.svg default-subregion-ref.svg
|
||||
fuzzy(0-5,0-20300) fuzzy-if(Android&&device&&!swgl,5-5,21751-21751) == default-subregion.svg default-subregion-ref.svg
|
||||
== different-FillPaint-filter-regions.svg different-FillPaint-filter-regions-ref.svg
|
||||
== different-StrokePaint-filter-regions.svg different-StrokePaint-filter-regions-ref.svg
|
||||
== dont-clip-previous-primitives.svg dont-clip-previous-primitives-ref.svg
|
||||
== intersecting-filter-regions.svg intersecting-filter-regions-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,9-9,5168-5536) fuzzy-if(!useDrawSnapshot&&swgl,7-7,13170-13184) == long-chain.svg simple-chain-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,9-9,5168-5536) fuzzy-if(!useDrawSnapshot&&swgl,7-7,13170-13184) == multiple-primitives-per-filter.svg simple-chain-ref.svg
|
||||
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-1,0-173) fuzzy-if(!useDrawSnapshot||(winWidget&&isCoverageBuild),9-9,5128-5496) fuzzy-if(!useDrawSnapshot&&swgl,7-7,12820-12830) == second-filter-uses-SourceAlpha.svg second-filter-uses-SourceAlpha-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,9-9,5168-5536) fuzzy-if(!useDrawSnapshot&&swgl,7-7,13170-13180) == second-filter-uses-SourceGraphic.svg simple-chain-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,9-9,5168-5536) fuzzy-if(!useDrawSnapshot&&swgl,7-7,13170-13184) fuzzy-if(Android&&device&&!swgl,8-8,12391-12391) == long-chain.svg simple-chain-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,9-9,5168-5536) fuzzy-if(!useDrawSnapshot&&swgl,7-7,13170-13184) fuzzy-if(Android&&device&&!swgl,8-8,12391-12391) == multiple-primitives-per-filter.svg simple-chain-ref.svg
|
||||
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-1,0-173) fuzzy-if(!useDrawSnapshot||(winWidget&&isCoverageBuild),9-9,5128-5496) fuzzy-if(!useDrawSnapshot&&swgl,7-7,12820-12830) fuzzy-if(Android&&device&&!swgl,8-8,12355-12355) == second-filter-uses-SourceAlpha.svg second-filter-uses-SourceAlpha-ref.svg
|
||||
fuzzy-if(!useDrawSnapshot,9-9,5168-5536) fuzzy-if(!useDrawSnapshot&&swgl,7-7,13170-13180) fuzzy-if(Android&&device&&!swgl,8-8,12391-12391) == second-filter-uses-SourceGraphic.svg simple-chain-ref.svg
|
||||
== simple-chain.svg simple-chain-ref.svg
|
||||
|
@ -14,7 +14,7 @@
|
||||
== clip-path-polygon-010.html clip-path-stripes-001-ref.html
|
||||
== clip-path-polygon-011.html clip-path-stripes-001-ref.html
|
||||
== clip-path-polygon-012.html clip-path-stripes-001-ref.html
|
||||
fuzzy(0-1,0-20) == clip-path-polygon-013.html clip-path-stripes-003-ref.html
|
||||
fuzzy(0-1,0-20) fuzzy-if(Android&&device&&!swgl,255-255,40-48) == clip-path-polygon-013.html clip-path-stripes-003-ref.html
|
||||
|
||||
fuzzy-if(!useDrawSnapshot,35-70,699-800) == clip-path-circle-001.html clip-path-circle-001-ref.html
|
||||
fuzzy-if(!useDrawSnapshot,35-70,699-800) == clip-path-circle-002.html clip-path-circle-001-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user