Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a966c34

Browse files
authored
[Impeller] Delete dead code from reflector.cc (#40805)
1 parent 5e7e153 commit a966c34

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

impeller/compiler/reflector.cc

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -110,28 +110,6 @@ static std::string StringToShaderStage(std::string str) {
110110
return "ShaderStage::kUnknown";
111111
}
112112

113-
static std::string StringToVkShaderStage(std::string str) {
114-
if (str == "vertex") {
115-
return "VK_SHADER_STAGE_VERTEX_BIT";
116-
}
117-
if (str == "fragment") {
118-
return "VK_SHADER_STAGE_FRAGMENT_BIT";
119-
}
120-
121-
if (str == "tessellation_control") {
122-
return "VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT";
123-
}
124-
125-
if (str == "tessellation_evaluation") {
126-
return "VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT";
127-
}
128-
129-
if (str == "compute") {
130-
return "VK_SHADER_STAGE_COMPUTE_BIT";
131-
}
132-
return "VK_SHADER_STAGE_ALL_GRAPHICS";
133-
}
134-
135113
Reflector::Reflector(Options options,
136114
std::shared_ptr<const spirv_cross::ParsedIR> ir,
137115
std::shared_ptr<fml::Mapping> shader_data,
@@ -410,10 +388,6 @@ std::shared_ptr<fml::Mapping> Reflector::InflateTemplate(
410388
[type = compiler_.GetType()](inja::Arguments& args) {
411389
return ToString(type);
412390
});
413-
env.add_callback(
414-
"to_vk_shader_stage_flag_bits", 1u, [](inja::Arguments& args) {
415-
return StringToVkShaderStage(args.at(0u)->get<std::string>());
416-
});
417391

418392
auto inflated_template =
419393
std::make_shared<std::string>(env.render(tmpl, *template_arguments_));

0 commit comments

Comments
 (0)