You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Added support for constants in shader case and array size declaration
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user