Merge pull request #88581 from jsjtxietian/dummy-crash

Fail early if shader mode is invalid in dummy renderer
This commit is contained in:
Rémi Verschelde 2024-02-23 11:29:42 +01:00
commit b82855bcc1
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -81,6 +81,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) {
new_mode = RS::SHADER_FOG;
} else {
new_mode = RS::SHADER_MAX;
ERR_FAIL_MSG("Shader type " + mode_string + " not supported in Dummy renderer.");
}
ShaderCompiler::IdentifierActions actions;
actions.uniforms = &shader->uniforms;