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>
diff --git a/src/tint/fuzzers/tint_common_fuzzer.cc b/src/tint/fuzzers/tint_common_fuzzer.cc
index 80f5797..b8bfe08 100644
--- a/src/tint/fuzzers/tint_common_fuzzer.cc
+++ b/src/tint/fuzzers/tint_common_fuzzer.cc
@@ -299,9 +299,6 @@
CHECK_INSPECTOR(program, inspector);
for (auto& ep : entry_points) {
- inspector.GetRemappedNameForEntryPoint(ep.name);
- CHECK_INSPECTOR(program, inspector);
-
inspector.GetStorageSize(ep.name);
CHECK_INSPECTOR(program, inspector);
diff --git a/src/tint/inspector/inspector.cc b/src/tint/inspector/inspector.cc
index ed49371..d4f9b5e 100644
--- a/src/tint/inspector/inspector.cc
+++ b/src/tint/inspector/inspector.cc
@@ -227,19 +227,6 @@
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> result;
for (auto* var : program_->AST().GlobalVariables()) {
diff --git a/src/tint/inspector/inspector.h b/src/tint/inspector/inspector.h
index 1fa2d00..df0ccab 100644
--- a/src/tint/inspector/inspector.h
+++ b/src/tint/inspector/inspector.h
@@ -53,11 +53,6 @@
/// @returns vector of entry point information
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
std::map<uint32_t, Scalar> GetConstantIDs();
diff --git a/src/tint/inspector/inspector_test.cc b/src/tint/inspector/inspector_test.cc
index 36d54b9..a1c3ba7 100644
--- a/src/tint/inspector/inspector_test.cc
+++ b/src/tint/inspector/inspector_test.cc
@@ -63,8 +63,6 @@
: public InspectorBuilder,
public testing::TestWithParam<
InspectorGetEntryPointInterpolateTestParams> {};
-class InspectorGetRemappedNameForEntryPointTest : public InspectorBuilder,
- public testing::Test {};
class InspectorGetConstantIDsTest : public InspectorBuilder,
public testing::Test {};
class InspectorGetConstantNameToIdMapTest : public InspectorBuilder,
@@ -1024,75 +1022,6 @@
ast::InterpolationType::kFlat, ast::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) {
AddOverridableConstantWithID("foo", 1, ty.bool_(), nullptr);
AddOverridableConstantWithID("bar", 20, ty.bool_(), Expr(true));