Fail early if shader mode is invalid in dummy renderer

(cherry picked from commit a382e9539b)
This commit is contained in:
jsjtxietian 2024-02-20 12:01:05 +08:00 committed by Rémi Verschelde
parent 79b7dc7f94
commit 7eb90a35d4
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

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