mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Fix completion of functions with struct param/return type in shaders
This commit is contained in:
parent
b7feebefab
commit
246a760323
3 changed files with 22 additions and 14 deletions
|
@ -362,7 +362,7 @@ void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const Str
|
|||
}
|
||||
header += _constr(fnode->arguments[i].is_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);
|
||||
header += _qualstr(fnode->arguments[i].qualifier) + _mkid(fnode->arguments[i].struct_name) + " " + _mkid(fnode->arguments[i].name);
|
||||
} else {
|
||||
header += _qualstr(fnode->arguments[i].qualifier) + _prestr(fnode->arguments[i].precision) + _typestr(fnode->arguments[i].type) + " " + _mkid(fnode->arguments[i].name);
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
|
|||
gcode += _constr(true);
|
||||
gcode += _prestr(cnode.precision, ShaderLanguage::is_float_type(cnode.type));
|
||||
if (cnode.type == SL::TYPE_STRUCT) {
|
||||
gcode += _mkid(cnode.type_str);
|
||||
gcode += _mkid(cnode.struct_name);
|
||||
} else {
|
||||
gcode += _typestr(cnode.type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue