Commit cdc37b8d authored by Jeff Muizelaar's avatar Jeff Muizelaar
Browse files

Bug 1676406. Reduce the number of varyings in brush_blend. r=kvark

On 10.0 level hardware we only have 14 vecs of varyings allowed.
Reusing v_color_offset for v_flood_color gets us under the limit.

Differential Revision: https://phabricator.services.mozilla.com/D96607
parent 396275b3
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@
varying vec2 v_uv;
varying vec2 v_local_pos;

flat varying vec4 v_flood_color;

// Normalized bounds of the source image in the texture, adjusted to avoid
// sampling artifacts.
flat varying vec4 v_uv_sample_bounds;
@@ -151,7 +149,7 @@ void brush_vs(
    } else if (v_op == FILTER_COMPONENT_TRANSFER) {
        v_table_address = prim_user_data.z;
    } else if (v_op == FILTER_FLOOD) {
        v_flood_color = fetch_from_gpu_cache_1(prim_user_data.z);
        v_color_offset = fetch_from_gpu_cache_1(prim_user_data.z);
    }
}
#endif
@@ -283,8 +281,8 @@ Fragment brush_fs() {
            break;
        }
        case FILTER_FLOOD:
            color = v_flood_color.rgb;
            alpha = v_flood_color.a;
            color = v_color_offset.rgb;
            alpha = v_color_offset.a;
            break;
        default:
            // Color matrix type filters (sepia, hue-rotate, etc...)