From 807600c38c64aa21077fceb88addc25af12ffa18 Mon Sep 17 00:00:00 2001 From: Jamie Nicol Date: Wed, 5 Apr 2023 16:17:19 +0000 Subject: [PATCH] Bug 1825518 - Use highp for v_color_mat varying to avoid crash on Mali-T devices. r=gfx-reviewers,lsalzman Since landing bug 1823411 we have been receiving crash reports on a variety of Mali-T devices when attempting to compile the brush_blend shader. This appears to be due to changing v_color_mat to mediump, though the reason why that crashes is currently unknown. This patch reverts it to highp to avoid the crash. This is being landed as-is due to being so late in the cycle, in order to prevent crashes making it to beta. Further work should be to determine precisely what conditions cause the crash, and add a test to ensure we do not encounter it again. Differential Revision: https://phabricator.services.mozilla.com/D174722 --- gfx/wr/webrender/res/brush_blend.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/wr/webrender/res/brush_blend.glsl b/gfx/wr/webrender/res/brush_blend.glsl index 7d36eff47fc3..49f047edbd48 100644 --- a/gfx/wr/webrender/res/brush_blend.glsl +++ b/gfx/wr/webrender/res/brush_blend.glsl @@ -30,7 +30,9 @@ 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 mediump mat4 v_color_mat; +// We must keep this as highp as we encoutered shader compilation crashes on +// Mali-T devices when mediump. +flat varying highp 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.