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

[Impeller] Delete dead code from reflector.cc #40805

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions impeller/compiler/reflector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,28 +125,6 @@ static std::string StringToShaderStage(std::string str) {
return "ShaderStage::kUnknown";
}

static std::string StringToVkShaderStage(std::string str) {
if (str == "vertex") {
return "VK_SHADER_STAGE_VERTEX_BIT";
}
if (str == "fragment") {
return "VK_SHADER_STAGE_FRAGMENT_BIT";
}

if (str == "tessellation_control") {
return "VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT";
}

if (str == "tessellation_evaluation") {
return "VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT";
}

if (str == "compute") {
return "VK_SHADER_STAGE_COMPUTE_BIT";
}
return "VK_SHADER_STAGE_ALL_GRAPHICS";
}

Reflector::Reflector(Options options,
std::shared_ptr<const spirv_cross::ParsedIR> ir,
std::shared_ptr<fml::Mapping> shader_data,
Expand Down Expand Up @@ -425,10 +403,6 @@ std::shared_ptr<fml::Mapping> Reflector::InflateTemplate(
[type = compiler_.GetType()](inja::Arguments& args) {
return ToString(type);
});
env.add_callback(
"to_vk_shader_stage_flag_bits", 1u, [](inja::Arguments& args) {
return StringToVkShaderStage(args.at(0u)->get<std::string>());
});

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