From a7866c214d3eae95d075caeeceb829d01c8a2f99 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 25 Jul 2024 09:16:06 +0100 Subject: [PATCH] Add a precision to the fragment shader This is required for OpenGL ES. https://github.com/flutter/flutter/issues/152297 --- shell/platform/linux/fl_renderer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/linux/fl_renderer.cc b/shell/platform/linux/fl_renderer.cc index 80bdbea2db06a..1abdcd0172038 100644 --- a/shell/platform/linux/fl_renderer.cc +++ b/shell/platform/linux/fl_renderer.cc @@ -25,6 +25,10 @@ static const char* vertex_shader_src = // Fragment shader to draw Flutter window contents. static const char* fragment_shader_src = + "#ifdef GL_ES\n" + "precision mediump float;\n" + "#endif\n" + "\n" "uniform sampler2D texture;\n" "varying vec2 texcoord;\n" "\n"