mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Added support for constants in shader case and array size declaration
This commit is contained in:
parent
9e49dbda2a
commit
fe4c8e387b
3 changed files with 119 additions and 28 deletions
|
|
@ -930,7 +930,11 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
|
|||
}
|
||||
declaration += _mkid(adnode->declarations[i].name);
|
||||
declaration += "[";
|
||||
declaration += itos(adnode->declarations[i].size);
|
||||
if (adnode->size_expression != nullptr) {
|
||||
declaration += _dump_node_code(adnode->size_expression, p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
|
||||
} else {
|
||||
declaration += itos(adnode->declarations[i].size);
|
||||
}
|
||||
declaration += "]";
|
||||
int sz = adnode->declarations[i].initializer.size();
|
||||
if (sz > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue