summaryrefslogtreecommitdiff
path: root/servers/rendering/rasterizer_rd
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2020-07-01 11:55:49 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2020-07-01 12:55:00 +0300
commitc554d9e5565252313b1f31783e93edfd2fc9ea03 (patch)
tree46a7497146e211b9b2e700d44474745517cf75f2 /servers/rendering/rasterizer_rd
parent719609522a30fa9e3b96b028ac5a1d1a65f1678f (diff)
Added const qualifier support for function arguments in shaders
Diffstat (limited to 'servers/rendering/rasterizer_rd')
-rw-r--r--servers/rendering/rasterizer_rd/shader_compiler_rd.cpp3
1 files changed, 3 insertions, 0 deletions
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 {