From 7eb90a35d472f76bdeead1bfcb41256d50b6aff2 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Tue, 20 Feb 2024 12:01:05 +0800 Subject: [PATCH] Fail early if shader mode is invalid in dummy renderer (cherry picked from commit a382e9539b328f02a1f553a36a4c74457a7aa591) --- servers/rendering/dummy/storage/material_storage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/servers/rendering/dummy/storage/material_storage.cpp b/servers/rendering/dummy/storage/material_storage.cpp index 5a2c135ff54..64f6b55172c 100644 --- a/servers/rendering/dummy/storage/material_storage.cpp +++ b/servers/rendering/dummy/storage/material_storage.cpp @@ -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;