Bug 1505871. Fix comment to not trigger angle_shader_validation.rs.
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 26 Feb 2019 00:16:37 -0600
changeset 519015 30f9e207c3d4dd83247792c3806668e09273cf36
parent 519014 55ba29bf61f031b82f94a76e18f2f769ac0b264e
child 519016 44192297e3ae55473fbe669a681f937191a54b81
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1505871
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505871. Fix comment to not trigger angle_shader_validation.rs. angle_shader_validation.rs just checks that the number of "switch" and "default:" are the same number in the source file, even if they occur in comments.
gfx/wr/webrender/res/brush_blend.glsl
--- a/gfx/wr/webrender/res/brush_blend.glsl
+++ b/gfx/wr/webrender/res/brush_blend.glsl
@@ -66,16 +66,18 @@ void brush_vs(
     vOp = user_data.y & 0xffff;
     vAmount = amount;
 
     // This assignment is only used for component transfer filters but this
     // assignment has to be done here and not in the component transfer case
     // below because it doesn't get executed on Windows because of a suspected
     // miscompile of this shader on Windows. See
     // https://github.com/servo/webrender/wiki/Driver-issues#bug-1505871---assignment-to-varying-flat-arrays-inside-switch-statement-of-vertex-shader-suspected-miscompile-on-windows
+    // default: just to satisfy angle_shader_validation.rs which needs one
+    // default: for every switch, even in comments.
     vFuncs[0] = (user_data.y >> 28) & 0xf; // R
     vFuncs[1] = (user_data.y >> 24) & 0xf; // G
     vFuncs[2] = (user_data.y >> 20) & 0xf; // B
     vFuncs[3] = (user_data.y >> 16) & 0xf; // A
 
     switch (vOp) {
         case 2: {
             // Grayscale