From 055004c589a044ee16edf907a58bb7b39331b9bd Mon Sep 17 00:00:00 2001 From: Marcus Brummer Date: Fri, 5 Jul 2019 00:26:25 +0200 Subject: [PATCH] Prevent GLES2 bool uniforms from having a precision type set. When setting the default precision type for uniforms (before compiling the shader) prevent boolean uniforms from having one set. Booleans can't have a precision type and on some Android devices this caused a compilation failure. Fixes #30317 (cherry picked from commit 10f1e0f63a53a9261101cbef28e1be2b7706a7a7) --- drivers/gles2/shader_compiler_gles2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 8f3405c71be..b74771d4fd4 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -318,7 +318,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener // use highp if no precision is specified to prevent different default values in fragment and vertex shader SL::DataPrecision precision = E->get().precision; - if (precision == SL::PRECISION_DEFAULT) { + if (precision == SL::PRECISION_DEFAULT && E->get().type != SL::TYPE_BOOL) { precision = SL::PRECISION_HIGHP; }