inspector: Remove GetRemappedNameForEntryPoint

Entry points are renamed via the Renamer transform which returns the
remapped names for Dawn to use.

Change-Id: Id4a462a95de34c826a8a7ac1878e1d5982a269c2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82680
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
James Price 2022-03-04 12:55:13 +00:00
parent c7e2e32d48
commit b37221a1cb
4 changed files with 0 additions and 92 deletions

View File

@ -299,9 +299,6 @@ void CommonFuzzer::RunInspector(Program* program) {
CHECK_INSPECTOR(program, inspector); CHECK_INSPECTOR(program, inspector);
for (auto& ep : entry_points) { for (auto& ep : entry_points) {
inspector.GetRemappedNameForEntryPoint(ep.name);
CHECK_INSPECTOR(program, inspector);
inspector.GetStorageSize(ep.name); inspector.GetStorageSize(ep.name);
CHECK_INSPECTOR(program, inspector); CHECK_INSPECTOR(program, inspector);

View File

@ -227,19 +227,6 @@ std::vector<EntryPoint> Inspector::GetEntryPoints() {
return result; return result;
} }
std::string Inspector::GetRemappedNameForEntryPoint(
const std::string& entry_point) {
// TODO(rharrison): Reenable once all of the backends are using the renamed
// entry points.
// auto* func = FindEntryPointByName(entry_point);
// if (!func) {
// return {};
// }
// return func->name();
return entry_point;
}
std::map<uint32_t, Scalar> Inspector::GetConstantIDs() { std::map<uint32_t, Scalar> Inspector::GetConstantIDs() {
std::map<uint32_t, Scalar> result; std::map<uint32_t, Scalar> result;
for (auto* var : program_->AST().GlobalVariables()) { for (auto* var : program_->AST().GlobalVariables()) {

View File

@ -53,11 +53,6 @@ class Inspector {
/// @returns vector of entry point information /// @returns vector of entry point information
std::vector<EntryPoint> GetEntryPoints(); std::vector<EntryPoint> GetEntryPoints();
/// @param entry_point name of the entry point to get the remapped version of
/// @returns the remapped name of the entry point, or the empty string if it
/// isn't a known entry point.
std::string GetRemappedNameForEntryPoint(const std::string& entry_point);
/// @returns map of const_id to initial value /// @returns map of const_id to initial value
std::map<uint32_t, Scalar> GetConstantIDs(); std::map<uint32_t, Scalar> GetConstantIDs();

View File

@ -63,8 +63,6 @@ class InspectorGetEntryPointInterpolateTest
: public InspectorBuilder, : public InspectorBuilder,
public testing::TestWithParam< public testing::TestWithParam<
InspectorGetEntryPointInterpolateTestParams> {}; InspectorGetEntryPointInterpolateTestParams> {};
class InspectorGetRemappedNameForEntryPointTest : public InspectorBuilder,
public testing::Test {};
class InspectorGetConstantIDsTest : public InspectorBuilder, class InspectorGetConstantIDsTest : public InspectorBuilder,
public testing::Test {}; public testing::Test {};
class InspectorGetConstantNameToIdMapTest : public InspectorBuilder, class InspectorGetConstantNameToIdMapTest : public InspectorBuilder,
@ -1024,75 +1022,6 @@ INSTANTIATE_TEST_SUITE_P(
ast::InterpolationType::kFlat, ast::InterpolationSampling::kNone, ast::InterpolationType::kFlat, ast::InterpolationSampling::kNone,
InterpolationType::kFlat, InterpolationSampling::kNone})); InterpolationType::kFlat, InterpolationSampling::kNone}));
// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
// through
TEST_F(InspectorGetRemappedNameForEntryPointTest, DISABLED_NoFunctions) {
Inspector& inspector = Build();
auto result = inspector.GetRemappedNameForEntryPoint("foo");
ASSERT_TRUE(inspector.has_error());
EXPECT_EQ("", result);
}
// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
// through
TEST_F(InspectorGetRemappedNameForEntryPointTest, DISABLED_NoEntryPoints) {
Inspector& inspector = Build();
auto result = inspector.GetRemappedNameForEntryPoint("foo");
ASSERT_TRUE(inspector.has_error());
EXPECT_EQ("", result);
}
// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
// through
TEST_F(InspectorGetRemappedNameForEntryPointTest, DISABLED_OneEntryPoint) {
MakeEmptyBodyFunction("foo", ast::AttributeList{
Stage(ast::PipelineStage::kVertex),
});
// TODO(dsinclair): Update to run the namer transform when
// available.
Inspector& inspector = Build();
auto result = inspector.GetRemappedNameForEntryPoint("foo");
ASSERT_FALSE(inspector.has_error()) << inspector.error();
EXPECT_EQ("foo", result);
}
// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
// through
TEST_F(InspectorGetRemappedNameForEntryPointTest,
DISABLED_MultipleEntryPoints) {
MakeEmptyBodyFunction("foo", ast::AttributeList{
Stage(ast::PipelineStage::kVertex),
});
// TODO(dsinclair): Update to run the namer transform when
// available.
MakeEmptyBodyFunction("bar",
ast::AttributeList{Stage(ast::PipelineStage::kCompute),
WorkgroupSize(1)});
Inspector& inspector = Build();
{
auto result = inspector.GetRemappedNameForEntryPoint("foo");
ASSERT_FALSE(inspector.has_error()) << inspector.error();
EXPECT_EQ("foo", result);
}
{
auto result = inspector.GetRemappedNameForEntryPoint("bar");
ASSERT_FALSE(inspector.has_error()) << inspector.error();
EXPECT_EQ("bar", result);
}
}
TEST_F(InspectorGetConstantIDsTest, Bool) { TEST_F(InspectorGetConstantIDsTest, Bool) {
AddOverridableConstantWithID("foo", 1, ty.bool_(), nullptr); AddOverridableConstantWithID("foo", 1, ty.bool_(), nullptr);
AddOverridableConstantWithID("bar", 20, ty.bool_(), Expr(true)); AddOverridableConstantWithID("bar", 20, ty.bool_(), Expr(true));