summaryrefslogtreecommitdiff
path: root/drivers/gles2/shader_compiler_gles2.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-01 15:28:58 +0200
committerGitHub <noreply@github.com>2020-07-01 15:28:58 +0200
commit77e4794721bd261fb9fb689298def80f16249ffd (patch)
treeb843a26d4a6386a97fbfaaeccae32b51f2c23dbb /drivers/gles2/shader_compiler_gles2.cpp
parent435a4c117e0336b322e1f6574e542e280de97f1d (diff)
parentc554d9e5565252313b1f31783e93edfd2fc9ea03 (diff)
Merge pull request #40010 from Chaosus/shader_func_arg_const_qual
Added const qualifier support for function arguments in shaders
Diffstat (limited to 'drivers/gles2/shader_compiler_gles2.cpp')
-rw-r--r--drivers/gles2/shader_compiler_gles2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp
index 2e36de5c79..a5e85424b7 100644
--- a/drivers/gles2/shader_compiler_gles2.cpp
+++ b/drivers/gles2/shader_compiler_gles2.cpp
@@ -247,6 +247,9 @@ void ShaderCompilerGLES2::_dump_function_deps(SL::ShaderNode *p_node, const Stri
for (int i = 0; i < fnode->arguments.size(); i++) {
if (i > 0)
header += ", ";
+ if (fnode->arguments[i].is_const) {
+ header += "const ";
+ }
if (fnode->arguments[i].type == SL::TYPE_STRUCT) {
header += _qualstr(fnode->arguments[i].qualifier) + _mkid(fnode->arguments[i].type_str) + " " + _mkid(fnode->arguments[i].name);
} else {