From 7e1e73c719d321feefedf4f3a78114ba1090d3e6 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 10 Nov 2018 10:48:18 -0300 Subject: [PATCH] Avoid double underscore from breaking glsl compiler, fixes #12880 (cherry picked from commit f00b52270503de8bebc01f5bd8e813f54ee9b62c) --- drivers/gles3/shader_compiler_gles3.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 1f3b76f5cd5..d8e322af4e6 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -154,7 +154,8 @@ static String _opstr(SL::Operator p_op) { static String _mkid(const String &p_id) { - return "m_" + p_id; + String id = "m_" + p_id; + return id.replace("__", "_dus_"); //doubleunderscore is reserverd in glsl } static String f2sp0(float p_float) {