Skip to content

Commit c37c9aa

Browse files
committed
Update shader converter after texture_blit changes
1 parent 4711ff9 commit c37c9aa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

servers/rendering/shader_converter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,10 @@ static constexpr const char *token_to_str[] = {
887887
"hint_screen_texture",
888888
"hint_normal_roughness_texture",
889889
"hint_depth_texture",
890+
"hint_blit_source0",
891+
"hint_blit_source1",
892+
"hint_blit_source2",
893+
"hint_blit_source3",
890894
"filter_nearest",
891895
"filter_linear",
892896
"filter_nearest_mipmap",

tests/servers/rendering/test_shader_language.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ RenderingServer::ShaderMode get_shader_mode(const String &p_mode_string) {
6060
return RS::SHADER_SKY;
6161
} else if (p_mode_string == "fog") {
6262
return RS::SHADER_FOG;
63+
} else if (p_mode_string == "texture_blit") {
64+
return RS::SHADER_TEXTURE_BLIT;
6365
} else {
6466
return RS::SHADER_MAX;
6567
}
@@ -105,7 +107,9 @@ TEST_CASE("[ShaderLanguage] Ensure no reserved keywords are valid identifiers")
105107
HashSet<String> shader_types_to_test = ShaderTypes::get_singleton()->get_types();
106108
for (const String &shader_type : shader_types_to_test) {
107109
ShaderLanguage::ShaderCompileInfo info;
108-
get_compile_info(info, get_shader_mode(shader_type));
110+
RS::ShaderMode mode = get_shader_mode(shader_type);
111+
CHECK_NE(mode, RS::SHADER_MAX);
112+
get_compile_info(info, mode);
109113
// test templates with non-keyword identifiers
110114

111115
for (int i = 0; decl_test_template[i] != nullptr; i++) {

0 commit comments

Comments
 (0)