From fed98ff52853932dd5bf51496880c0d766687a22 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 6 Aug 2024 14:33:52 -0700 Subject: [PATCH] [Impeller] ensure precision matches for buggy vulkan drivers. (flutter/engine#54372) This is another precision mismatch bug - WHICH IS NOT AN ERROR AT ALL BUT THE PowerVR Drivers ARE BUGGY BUGGY BUGGY Fixes https://github.com/flutter/flutter/issues/152951 --- .../impeller/entity/shaders/gradients/fast_gradient.vert | 4 ++-- engine/src/flutter/impeller/tools/malioc.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/impeller/entity/shaders/gradients/fast_gradient.vert b/engine/src/flutter/impeller/entity/shaders/gradients/fast_gradient.vert index 993f05ccc4..44f1acae66 100644 --- a/engine/src/flutter/impeller/entity/shaders/gradients/fast_gradient.vert +++ b/engine/src/flutter/impeller/entity/shaders/gradients/fast_gradient.vert @@ -11,11 +11,11 @@ uniform FrameInfo { frame_info; in vec2 position; -in vec4 color; +in mediump vec4 color; // The geometry of the fast gradient draws is designed so that the // varying unit will perform the correct color interpolation. -out vec4 v_color; +out mediump vec4 v_color; void main() { gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0); diff --git a/engine/src/flutter/impeller/tools/malioc.json b/engine/src/flutter/impeller/tools/malioc.json index 65d69603b1..55e276afed 100644 --- a/engine/src/flutter/impeller/tools/malioc.json +++ b/engine/src/flutter/impeller/tools/malioc.json @@ -793,7 +793,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 20, - "work_registers_used": 9 + "work_registers_used": 7 } } } @@ -2175,7 +2175,7 @@ "stack_spill_bytes": 0, "thread_occupancy": 100, "uniform_registers_used": 8, - "work_registers_used": 9 + "work_registers_used": 7 } } },