mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Prevent usage 'out' modifier on opaque shader types (textures currently)
This commit is contained in:
parent
5c3944e7da
commit
41643e268e
1 changed files with 7 additions and 0 deletions
|
|
@ -6273,6 +6273,13 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
|
|||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
if (qualifier == ARGUMENT_QUALIFIER_OUT || qualifier == ARGUMENT_QUALIFIER_INOUT) {
|
||||
if (is_sampler_type(get_token_datatype(tk.type))) {
|
||||
_set_error("Opaque types cannot be output parameters.");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_struct) {
|
||||
ptype = TYPE_STRUCT;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue