Do not error on empty shader, just treat it as invalid by default. Fixes #15998.
This commit is contained in:
parent
55f5f4757e
commit
4d88721e62
|
@ -1125,6 +1125,10 @@ void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const {
|
||||||
|
|
||||||
p_shader->uniforms.clear();
|
p_shader->uniforms.clear();
|
||||||
|
|
||||||
|
if (p_shader->code == String()) {
|
||||||
|
return; //just invalid, but no error
|
||||||
|
}
|
||||||
|
|
||||||
ShaderCompilerGLES2::GeneratedCode gen_code;
|
ShaderCompilerGLES2::GeneratedCode gen_code;
|
||||||
ShaderCompilerGLES2::IdentifierActions *actions = NULL;
|
ShaderCompilerGLES2::IdentifierActions *actions = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1903,6 +1903,10 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const {
|
||||||
|
|
||||||
p_shader->uniforms.clear();
|
p_shader->uniforms.clear();
|
||||||
|
|
||||||
|
if (p_shader->code == String()) {
|
||||||
|
return; //just invalid, but no error
|
||||||
|
}
|
||||||
|
|
||||||
ShaderCompilerGLES3::GeneratedCode gen_code;
|
ShaderCompilerGLES3::GeneratedCode gen_code;
|
||||||
ShaderCompilerGLES3::IdentifierActions *actions = NULL;
|
ShaderCompilerGLES3::IdentifierActions *actions = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue