From c554d9e5565252313b1f31783e93edfd2fc9ea03 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Wed, 1 Jul 2020 11:55:49 +0300 Subject: Added const qualifier support for function arguments in shaders --- servers/rendering/rasterizer_rd/shader_compiler_rd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'servers/rendering/rasterizer_rd') diff --git a/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp b/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp index 79bb990649..1820c39c5a 100644 --- a/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp +++ b/servers/rendering/rasterizer_rd/shader_compiler_rd.cpp @@ -399,6 +399,9 @@ void ShaderCompilerRD::_dump_function_deps(const SL::ShaderNode *p_node, const S 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 { -- cgit v1.2.3