[inspector] Convert GetRemapped to be a pass through
This is a temporary fix to get Tint rolling into Dawn again and will
be removed in a future patch.
BUG=tint:273
Change-Id: I632e71711146eb4055f46c1bebfbd6d3ff5772fa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32520
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/src/inspector/inspector.cc b/src/inspector/inspector.cc
index 61016fb..151a199 100644
--- a/src/inspector/inspector.cc
+++ b/src/inspector/inspector.cc
@@ -68,13 +68,17 @@
return result;
}
-std::string Inspector::GetRemappedNamedForEntryPoint(
+std::string Inspector::GetRemappedNameForEntryPoint(
const std::string& entry_point) {
- auto* func = FindEntryPointByName(entry_point);
- if (!func) {
- return {};
- }
- return namer_.NameFor(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 namer_.NameFor(entry_point);
+ return entry_point;
}
std::map<uint32_t, Scalar> Inspector::GetConstantIDs() {
diff --git a/src/inspector/inspector.h b/src/inspector/inspector.h
index f3c9b11..b2b6573 100644
--- a/src/inspector/inspector.h
+++ b/src/inspector/inspector.h
@@ -81,7 +81,7 @@
/// @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 GetRemappedNamedForEntryPoint(const std::string& 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/inspector/inspector_test.cc b/src/inspector/inspector_test.cc
index f15b058..19bad67 100644
--- a/src/inspector/inspector_test.cc
+++ b/src/inspector/inspector_test.cc
@@ -643,8 +643,8 @@
class InspectorGetEntryPointTest : public InspectorHelper,
public testing::Test {};
-class InspectorGetRemappedNamedForEntryPointTest : public InspectorHelper,
- public testing::Test {};
+class InspectorGetRemappedNameForEntryPointTest : public InspectorHelper,
+ public testing::Test {};
class InspectorGetConstantIDsTest : public InspectorHelper,
public testing::Test {};
class InspectorGetUniformBufferResourceBindingsTest : public InspectorHelper,
@@ -1000,35 +1000,44 @@
EXPECT_EQ("out2_var", result[1].output_variables[0]);
}
-TEST_F(InspectorGetRemappedNamedForEntryPointTest, NoFunctions) {
- auto result = inspector()->GetRemappedNamedForEntryPoint("foo");
+// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
+// through
+TEST_F(InspectorGetRemappedNameForEntryPointTest, DISABLED_NoFunctions) {
+ auto result = inspector()->GetRemappedNameForEntryPoint("foo");
ASSERT_TRUE(inspector()->has_error());
EXPECT_EQ("", result);
}
-TEST_F(InspectorGetRemappedNamedForEntryPointTest, NoEntryPoints) {
+// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
+// through
+TEST_F(InspectorGetRemappedNameForEntryPointTest, DISABLED_NoEntryPoints) {
mod()->AddFunction(MakeEmptyBodyFunction("foo"));
- auto result = inspector()->GetRemappedNamedForEntryPoint("foo");
+ auto result = inspector()->GetRemappedNameForEntryPoint("foo");
ASSERT_TRUE(inspector()->has_error());
EXPECT_EQ("", result);
}
-TEST_F(InspectorGetRemappedNamedForEntryPointTest, OneEntryPoint) {
+// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
+// through
+TEST_F(InspectorGetRemappedNameForEntryPointTest, DISABLED_OneEntryPoint) {
auto foo = MakeEmptyBodyFunction("foo");
foo->add_decoration(std::make_unique<ast::StageDecoration>(
ast::PipelineStage::kVertex, Source{}));
mod()->AddFunction(std::move(foo));
- auto result = inspector()->GetRemappedNamedForEntryPoint("foo");
+ auto result = inspector()->GetRemappedNameForEntryPoint("foo");
ASSERT_FALSE(inspector()->has_error()) << inspector()->error();
EXPECT_EQ("tint_666f6f", result);
}
-TEST_F(InspectorGetRemappedNamedForEntryPointTest, MultipleEntryPoints) {
+// TODO(rharrison): Reenable once GetRemappedNameForEntryPoint isn't a pass
+// through
+TEST_F(InspectorGetRemappedNameForEntryPointTest,
+ DISABLED_MultipleEntryPoints) {
auto foo = MakeEmptyBodyFunction("foo");
foo->add_decoration(std::make_unique<ast::StageDecoration>(
ast::PipelineStage::kVertex, Source{}));
@@ -1040,12 +1049,12 @@
mod()->AddFunction(std::move(bar));
{
- auto result = inspector()->GetRemappedNamedForEntryPoint("foo");
+ auto result = inspector()->GetRemappedNameForEntryPoint("foo");
ASSERT_FALSE(inspector()->has_error()) << inspector()->error();
EXPECT_EQ("tint_666f6f", result);
}
{
- auto result = inspector()->GetRemappedNamedForEntryPoint("bar");
+ auto result = inspector()->GetRemappedNameForEntryPoint("bar");
ASSERT_FALSE(inspector()->has_error()) << inspector()->error();
EXPECT_EQ("tint_626172", result);
}