Prevent shader crash when passing constant expression to textureGather
This commit is contained in:
parent
9c9ec63e1d
commit
57fd362fe1
1 changed files with 1 additions and 0 deletions
|
@ -2763,6 +2763,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
|
|||
|
||||
bool is_const = false;
|
||||
ConstantNode::Value value;
|
||||
value.sint = -1;
|
||||
|
||||
_find_identifier(p_block, false, p_function_info, vn->name, nullptr, nullptr, &is_const, nullptr, nullptr, &value);
|
||||
if (!is_const || value.sint < min || value.sint > max) {
|
||||
|
|
Loading…
Reference in a new issue