Remove depreated APIs and WGSL
WGSL:
* Remove vertex_idx and instance_idx.
These are now vertex_index and instance_index.
It seems this was removed once before, then reverted due to CTS
failures, but the original change never landed again.
* Remove the [[set(n)]] decoration. This has been [[group(n)]] for
months now.
API:
* Remove deprecated enums from transform::VertexFormat.
* Remove transform::Renamer constructor that takes a Config. This should
be passed by DataMap.
* Remove ast::AccessControl alias to ast::Access.
Change-Id: I988c96c4269b02a5d77163409f261fd5923188e0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56541
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/ast/access.h b/src/ast/access.h
index 1faddbf..664e5e3 100644
--- a/src/ast/access.h
+++ b/src/ast/access.h
@@ -38,9 +38,6 @@
/// @return the std::ostream so calls can be chained
std::ostream& operator<<(std::ostream& out, Access access);
-/// [DEPRECATED]: Old name in use by Dawn.
-using AccessControl = Access;
-
} // namespace ast
} // namespace tint
diff --git a/src/reader/wgsl/parser_impl.cc b/src/reader/wgsl/parser_impl.cc
index 7808f9c..d80e8c7 100644
--- a/src/reader/wgsl/parser_impl.cc
+++ b/src/reader/wgsl/parser_impl.cc
@@ -73,10 +73,10 @@
if (str == "position") {
return ast::Builtin::kPosition;
}
- if (str == "vertex_idx" || str == "vertex_index") {
+ if (str == "vertex_index") {
return ast::Builtin::kVertexIndex;
}
- if (str == "instance_idx" || str == "instance_index") {
+ if (str == "instance_index") {
return ast::Builtin::kInstanceIndex;
}
if (str == "front_facing") {
@@ -115,7 +115,6 @@
const char kOverrideDecoration[] = "override";
const char kSizeDecoration[] = "size";
const char kAlignDecoration[] = "align";
-const char kSetDecoration[] = "set";
const char kStageDecoration[] = "stage";
const char kStrideDecoration[] = "stride";
const char kWorkgroupSizeDecoration[] = "workgroup_size";
@@ -130,7 +129,7 @@
s == kBlockDecoration || s == kBuiltinDecoration ||
s == kGroupDecoration || s == kInterpolateDecoration ||
s == kLocationDecoration || s == kOverrideDecoration ||
- s == kSetDecoration || s == kSizeDecoration || s == kStageDecoration ||
+ s == kSizeDecoration || s == kStageDecoration ||
s == kStrideDecoration || s == kWorkgroupSizeDecoration;
}
@@ -3007,7 +3006,7 @@
});
}
- if (s == kSetDecoration || s == kGroupDecoration) {
+ if (s == kGroupDecoration) {
const char* use = "group decoration";
return expect_paren_block(use, [&]() -> Result {
auto val = expect_positive_sint(use);
diff --git a/src/reader/wgsl/parser_impl_variable_decoration_test.cc b/src/reader/wgsl/parser_impl_variable_decoration_test.cc
index 5e0696b..b3fd05a 100644
--- a/src/reader/wgsl/parser_impl_variable_decoration_test.cc
+++ b/src/reader/wgsl/parser_impl_variable_decoration_test.cc
@@ -108,9 +108,7 @@
BuiltinTest,
testing::Values(
BuiltinData{"position", ast::Builtin::kPosition},
- BuiltinData{"vertex_idx", ast::Builtin::kVertexIndex},
BuiltinData{"vertex_index", ast::Builtin::kVertexIndex},
- BuiltinData{"instance_idx", ast::Builtin::kInstanceIndex},
BuiltinData{"instance_index", ast::Builtin::kInstanceIndex},
BuiltinData{"front_facing", ast::Builtin::kFrontFacing},
BuiltinData{"frag_depth", ast::Builtin::kFragDepth},
@@ -355,22 +353,6 @@
"1:9: expected signed integer literal for binding decoration");
}
-// DEPRECATED
-TEST_F(ParserImplTest, Decoration_set) {
- auto p = parser("set(4)");
- auto deco = p->decoration();
- EXPECT_TRUE(deco.matched);
- EXPECT_FALSE(deco.errored);
- ASSERT_NE(deco.value, nullptr);
- auto* var_deco = deco.value->As<ast::Decoration>();
- ASSERT_FALSE(p->has_error());
- ASSERT_NE(var_deco, nullptr);
- ASSERT_TRUE(var_deco->Is<ast::GroupDecoration>());
-
- auto* group = var_deco->As<ast::GroupDecoration>();
- EXPECT_EQ(group->value(), 4u);
-}
-
TEST_F(ParserImplTest, Decoration_group) {
auto p = parser("group(4)");
auto deco = p->decoration();
diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc
index 8d9f265..c857240 100644
--- a/src/resolver/resolver.cc
+++ b/src/resolver/resolver.cc
@@ -595,7 +595,7 @@
return info;
}
-ast::AccessControl Resolver::DefaultAccessForStorageClass(
+ast::Access Resolver::DefaultAccessForStorageClass(
ast::StorageClass storage_class) {
// https://gpuweb.github.io/gpuweb/wgsl/#storage-class
switch (storage_class) {
diff --git a/src/resolver/resolver.h b/src/resolver/resolver.h
index 047ccc1..39f616d 100644
--- a/src/resolver/resolver.h
+++ b/src/resolver/resolver.h
@@ -363,8 +363,7 @@
/// @param storage_class the storage class
/// @returns the default access control for the given storage class
- ast::AccessControl DefaultAccessForStorageClass(
- ast::StorageClass storage_class);
+ ast::Access DefaultAccessForStorageClass(ast::StorageClass storage_class);
/// @returns the resolved type of the ast::Expression `expr`
/// @param expr the expression
diff --git a/src/resolver/storage_class_validation_test.cc b/src/resolver/storage_class_validation_test.cc
index 96c4666..c9a1ea5 100644
--- a/src/resolver/storage_class_validation_test.cc
+++ b/src/resolver/storage_class_validation_test.cc
@@ -153,7 +153,7 @@
TEST_F(ResolverStorageClassValidationTest, UniformBuffer_Struct_Runtime) {
// [[block]] struct S { m: array<f32>; };
- // [[set(0), binding(0)]] var<uniform, > svar : S;
+ // [[group(0), binding(0)]] var<uniform, > svar : S;
auto* s = Structure(Source{{12, 34}}, "S", {Member("m", ty.array<i32>())},
{create<ast::StructBlockDecoration>()});
diff --git a/src/sem/pointer_type.h b/src/sem/pointer_type.h
index ec0e98f..73ac3a3 100644
--- a/src/sem/pointer_type.h
+++ b/src/sem/pointer_type.h
@@ -59,7 +59,7 @@
private:
Type const* const subtype_;
ast::StorageClass const storage_class_;
- ast::AccessControl const access_;
+ ast::Access const access_;
};
} // namespace sem
diff --git a/src/sem/reference_type.h b/src/sem/reference_type.h
index 5e2eaeb..72ebbdb 100644
--- a/src/sem/reference_type.h
+++ b/src/sem/reference_type.h
@@ -59,7 +59,7 @@
private:
Type const* const subtype_;
ast::StorageClass const storage_class_;
- ast::AccessControl const access_;
+ ast::Access const access_;
};
} // namespace sem
diff --git a/src/transform/array_length_from_uniform.cc b/src/transform/array_length_from_uniform.cc
index 9cd1096..bb182c9 100644
--- a/src/transform/array_length_from_uniform.cc
+++ b/src/transform/array_length_from_uniform.cc
@@ -15,6 +15,7 @@
#include "src/transform/array_length_from_uniform.h"
#include <memory>
+#include <string>
#include <utility>
#include "src/ast/struct_block_decoration.h"
@@ -45,7 +46,7 @@
if (cfg == nullptr) {
ctx.dst->Diagnostics().add_error(
diag::System::Transform,
- "missing transform data for ArrayLengthFromUniform");
+ "missing transform data for " + std::string(TypeInfo().name));
return;
}
diff --git a/src/transform/array_length_from_uniform_test.cc b/src/transform/array_length_from_uniform_test.cc
index 124320e..a173de8 100644
--- a/src/transform/array_length_from_uniform_test.cc
+++ b/src/transform/array_length_from_uniform_test.cc
@@ -29,7 +29,9 @@
TEST_F(ArrayLengthFromUniformTest, Error_MissingTransformData) {
auto* src = "";
- auto* expect = "error: missing transform data for ArrayLengthFromUniform";
+ auto* expect =
+ "error: missing transform data for "
+ "tint::transform::ArrayLengthFromUniform";
auto got = Run<InlinePointerLets, Simplify, ArrayLengthFromUniform>(src);
diff --git a/src/transform/binding_remapper.cc b/src/transform/binding_remapper.cc
index 5e6cc20..0b034e1 100644
--- a/src/transform/binding_remapper.cc
+++ b/src/transform/binding_remapper.cc
@@ -14,6 +14,7 @@
#include "src/transform/binding_remapper.h"
+#include <string>
#include <unordered_set>
#include <utility>
@@ -46,7 +47,7 @@
if (!remappings) {
ctx.dst->Diagnostics().add_error(
diag::System::Transform,
- "BindingRemapper did not find the remapping data");
+ "missing transform data for " + std::string(TypeInfo().name));
return;
}
diff --git a/src/transform/binding_remapper_test.cc b/src/transform/binding_remapper_test.cc
index 0f68c60..fded200 100644
--- a/src/transform/binding_remapper_test.cc
+++ b/src/transform/binding_remapper_test.cc
@@ -382,7 +382,8 @@
fn f() {}
)";
- auto* expect = "error: BindingRemapper did not find the remapping data";
+ auto* expect =
+ "error: missing transform data for tint::transform::BindingRemapper";
auto got = Run<BindingRemapper>(src);
diff --git a/src/transform/canonicalize_entry_point_io.cc b/src/transform/canonicalize_entry_point_io.cc
index db1ce66..e8bc3dc 100644
--- a/src/transform/canonicalize_entry_point_io.cc
+++ b/src/transform/canonicalize_entry_point_io.cc
@@ -15,6 +15,7 @@
#include "src/transform/canonicalize_entry_point_io.h"
#include <algorithm>
+#include <string>
#include <utility>
#include "src/program_builder.h"
@@ -70,7 +71,7 @@
if (cfg == nullptr) {
ctx.dst->Diagnostics().add_error(
diag::System::Transform,
- "missing transform data for CanonicalizeEntryPointIO");
+ "missing transform data for " + std::string(TypeInfo().name));
return;
}
diff --git a/src/transform/canonicalize_entry_point_io_test.cc b/src/transform/canonicalize_entry_point_io_test.cc
index 245612d..d0a59e3 100644
--- a/src/transform/canonicalize_entry_point_io_test.cc
+++ b/src/transform/canonicalize_entry_point_io_test.cc
@@ -25,7 +25,9 @@
TEST_F(CanonicalizeEntryPointIOTest, Error_MissingTransformData) {
auto* src = "";
- auto* expect = "error: missing transform data for CanonicalizeEntryPointIO";
+ auto* expect =
+ "error: missing transform data for "
+ "tint::transform::CanonicalizeEntryPointIO";
auto got = Run<CanonicalizeEntryPointIO>(src);
diff --git a/src/transform/renamer.cc b/src/transform/renamer.cc
index ac975b3..ede3b16 100644
--- a/src/transform/renamer.cc
+++ b/src/transform/renamer.cc
@@ -881,8 +881,7 @@
Renamer::Config::Config(const Config&) = default;
Renamer::Config::~Config() = default;
-Renamer::Renamer() : deprecated_cfg_(Target::kAll) {}
-Renamer::Renamer(const Config& config) : deprecated_cfg_(config) {}
+Renamer::Renamer() = default;
Renamer::~Renamer() = default;
Output Renamer::Run(const Program* in, const DataMap& inputs) {
@@ -918,14 +917,15 @@
Data::Remappings remappings;
- auto* cfg = inputs.Get<Config>();
- if (!cfg) {
- cfg = &deprecated_cfg_;
+ Target target = Target::kAll;
+
+ if (auto* cfg = inputs.Get<Config>()) {
+ target = cfg->target;
}
ctx.ReplaceAll([&](Symbol sym_in) {
auto name_in = ctx.src->Symbols().NameFor(sym_in);
- switch (cfg->target) {
+ switch (target) {
case Target::kAll:
// Always rename.
break;
diff --git a/src/transform/renamer.h b/src/transform/renamer.h
index 33e9142..5dc0330 100644
--- a/src/transform/renamer.h
+++ b/src/transform/renamer.h
@@ -56,7 +56,8 @@
kMslKeywords,
};
- /// Configuration options for the transform
+ /// Optional configuration options for the transform.
+ /// If omitted, then the renamer will use Target::kAll.
struct Config : public Castable<Config, transform::Data> {
/// Constructor
/// @param tgt the targets to rename
@@ -75,11 +76,6 @@
/// Constructor using a the configuration provided in the input Data
Renamer();
- /// Constructor
- /// @param config the configuration for the transform
- /// [DEPRECATED] Pass Config as input Data
- explicit Renamer(const Config& config);
-
/// Destructor
~Renamer() override;
@@ -88,9 +84,6 @@
/// @param data optional extra transform-specific input data
/// @returns the transformation result
Output Run(const Program* program, const DataMap& data = {}) override;
-
- private:
- Config const deprecated_cfg_;
};
} // namespace transform
diff --git a/src/transform/single_entry_point.cc b/src/transform/single_entry_point.cc
index c8ece46..264d5fa 100644
--- a/src/transform/single_entry_point.cc
+++ b/src/transform/single_entry_point.cc
@@ -35,7 +35,9 @@
auto* cfg = inputs.Get<Config>();
if (cfg == nullptr) {
ctx.dst->Diagnostics().add_error(
- diag::System::Transform, "missing transform data for SingleEntryPoint");
+ diag::System::Transform,
+ "missing transform data for " + std::string(TypeInfo().name));
+
return;
}
diff --git a/src/transform/single_entry_point_test.cc b/src/transform/single_entry_point_test.cc
index 31fed3d..677f411 100644
--- a/src/transform/single_entry_point_test.cc
+++ b/src/transform/single_entry_point_test.cc
@@ -27,7 +27,8 @@
TEST_F(SingleEntryPointTest, Error_MissingTransformData) {
auto* src = "";
- auto* expect = "error: missing transform data for SingleEntryPoint";
+ auto* expect =
+ "error: missing transform data for tint::transform::SingleEntryPoint";
auto got = Run<SingleEntryPoint>(src);
diff --git a/src/transform/vertex_pulling.cc b/src/transform/vertex_pulling.cc
index 3229af3..900b6a3 100644
--- a/src/transform/vertex_pulling.cc
+++ b/src/transform/vertex_pulling.cc
@@ -426,7 +426,7 @@
// Returns a u32 loaded from buffer_base + offset.
auto load_u32 = [&] {
- return LoadPrimitive(array_base, offset, buffer, VertexFormat::kU32);
+ return LoadPrimitive(array_base, offset, buffer, VertexFormat::kUint32);
};
// Returns a i32 loaded from buffer_base + offset.
@@ -434,7 +434,8 @@
// Returns a u32 loaded from buffer_base + offset + 4.
auto load_next_u32 = [&] {
- return LoadPrimitive(array_base, offset + 4, buffer, VertexFormat::kU32);
+ return LoadPrimitive(array_base, offset + 4, buffer,
+ VertexFormat::kUint32);
};
// Returns a i32 loaded from buffer_base + offset + 4.
@@ -446,8 +447,8 @@
// `offset` must be `min_alignment` bytes aligned.
auto load_u16_h = [&] {
auto low_u32_offset = offset & ~3u;
- auto* low_u32 =
- LoadPrimitive(array_base, low_u32_offset, buffer, VertexFormat::kU32);
+ auto* low_u32 = LoadPrimitive(array_base, low_u32_offset, buffer,
+ VertexFormat::kUint32);
switch (offset & 3) {
case 0:
return ctx.dst->Shl(low_u32, 16u);
@@ -457,7 +458,7 @@
return ctx.dst->And(low_u32, 0xffff0000u);
default: { // 3:
auto* high_u32 = LoadPrimitive(array_base, low_u32_offset + 4, buffer,
- VertexFormat::kU32);
+ VertexFormat::kUint32);
auto* shr = ctx.dst->Shr(low_u32, 8u);
auto* shl = ctx.dst->Shl(high_u32, 24u);
return ctx.dst->And(ctx.dst->Or(shl, shr), 0xffff0000u);
@@ -469,8 +470,8 @@
// The high 16 bits are 0.
auto load_u16_l = [&] {
auto low_u32_offset = offset & ~3u;
- auto* low_u32 =
- LoadPrimitive(array_base, low_u32_offset, buffer, VertexFormat::kU32);
+ auto* low_u32 = LoadPrimitive(array_base, low_u32_offset, buffer,
+ VertexFormat::kUint32);
switch (offset & 3) {
case 0:
return ctx.dst->And(low_u32, 0xffffu);
@@ -480,7 +481,7 @@
return ctx.dst->Shr(low_u32, 16u);
default: { // 3:
auto* high_u32 = LoadPrimitive(array_base, low_u32_offset + 4, buffer,
- VertexFormat::kU32);
+ VertexFormat::kUint32);
auto* shr = ctx.dst->Shr(low_u32, 24u);
auto* shl = ctx.dst->Shl(high_u32, 8u);
return ctx.dst->And(ctx.dst->Or(shl, shr), 0xffffu);
@@ -504,31 +505,31 @@
// Vectors of basic primitives
case VertexFormat::kUint32x2:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.u32(),
- VertexFormat::kU32, 2);
+ VertexFormat::kUint32, 2);
case VertexFormat::kUint32x3:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.u32(),
- VertexFormat::kU32, 3);
+ VertexFormat::kUint32, 3);
case VertexFormat::kUint32x4:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.u32(),
- VertexFormat::kU32, 4);
+ VertexFormat::kUint32, 4);
case VertexFormat::kSint32x2:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.i32(),
- VertexFormat::kI32, 2);
+ VertexFormat::kSint32, 2);
case VertexFormat::kSint32x3:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.i32(),
- VertexFormat::kI32, 3);
+ VertexFormat::kSint32, 3);
case VertexFormat::kSint32x4:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.i32(),
- VertexFormat::kI32, 4);
+ VertexFormat::kSint32, 4);
case VertexFormat::kFloat32x2:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.f32(),
- VertexFormat::kF32, 2);
+ VertexFormat::kFloat32, 2);
case VertexFormat::kFloat32x3:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.f32(),
- VertexFormat::kF32, 3);
+ VertexFormat::kFloat32, 3);
case VertexFormat::kFloat32x4:
return LoadVec(array_base, offset, buffer, 4, ctx.dst->ty.f32(),
- VertexFormat::kF32, 4);
+ VertexFormat::kFloat32, 4);
case VertexFormat::kUint8x2: {
// yyxx0000, yyxx0000
@@ -639,7 +640,8 @@
/// of the vertex array (each index is 4-bytes).
/// @param offset the byte offset of the data from `buffer_base`
/// @param buffer the index of the vertex buffer
- /// @param format VertexFormat::kU32, VertexFormat::kI32 or VertexFormat::kF32
+ /// @param format VertexFormat::kUint32, VertexFormat::kSint32 or
+ /// VertexFormat::kFloat32
ast::Expression* LoadPrimitive(Symbol array_base,
uint32_t offset,
uint32_t buffer,
@@ -662,10 +664,10 @@
} else {
// Unaligned load
uint32_t offset_aligned = offset & ~3u;
- auto* low =
- LoadPrimitive(array_base, offset_aligned, buffer, VertexFormat::kU32);
+ auto* low = LoadPrimitive(array_base, offset_aligned, buffer,
+ VertexFormat::kUint32);
auto* high = LoadPrimitive(array_base, offset_aligned + 4u, buffer,
- VertexFormat::kU32);
+ VertexFormat::kUint32);
uint32_t shift = 8u * (offset & 3u);
@@ -675,11 +677,11 @@
}
switch (format) {
- case VertexFormat::kU32:
+ case VertexFormat::kUint32:
return u32;
- case VertexFormat::kI32:
+ case VertexFormat::kSint32:
return ctx.dst->Bitcast(ctx.dst->ty.i32(), u32);
- case VertexFormat::kF32:
+ case VertexFormat::kFloat32:
return ctx.dst->Bitcast(ctx.dst->ty.f32(), u32);
default:
break;
diff --git a/src/transform/vertex_pulling.h b/src/transform/vertex_pulling.h
index 76fb8f0..a96336d 100644
--- a/src/transform/vertex_pulling.h
+++ b/src/transform/vertex_pulling.h
@@ -58,38 +58,7 @@
kSint32x3, // sint32x3
kSint32x4, // sint32x4
- // Deprecated names
- kVec2U8 = kUint8x2,
- kVec4U8 = kUint8x4,
- kVec2I8 = kSint8x2,
- kVec4I8 = kSint8x4,
- kVec2U8Norm = kUnorm8x2,
- kVec4U8Norm = kUnorm8x4,
- kVec2I8Norm = kSnorm8x2,
- kVec4I8Norm = kSnorm8x4,
- kVec2U16 = kUint16x2,
- kVec4U16 = kUint16x4,
- kVec2I16 = kSint16x2,
- kVec4I16 = kSint16x4,
- kVec2U16Norm = kUnorm16x2,
- kVec4U16Norm = kUnorm16x4,
- kVec2I16Norm = kSnorm16x2,
- kVec4I16Norm = kSnorm16x4,
- kVec2F16 = kFloat16x2,
- kVec4F16 = kFloat16x4,
- kF32 = kFloat32,
- kVec2F32 = kFloat32x2,
- kVec3F32 = kFloat32x3,
- kVec4F32 = kFloat32x4,
- kU32 = kUint32,
- kVec2U32 = kUint32x2,
- kVec3U32 = kUint32x3,
- kVec4U32 = kUint32x4,
- kI32 = kSint32,
- kVec2I32 = kSint32x2,
- kVec3I32 = kSint32x3,
- kVec4I32 = kSint32x4,
- kLastEntry = kVec4I32
+ kLastEntry = kSint32x4,
};
/// Describes if a vertex attributes increments with vertex index or instance
diff --git a/src/transform/vertex_pulling_test.cc b/src/transform/vertex_pulling_test.cc
index 6a01e54..8be8da2 100644
--- a/src/transform/vertex_pulling_test.cc
+++ b/src/transform/vertex_pulling_test.cc
@@ -544,7 +544,7 @@
cfg.vertex_state = {
{{16,
InputStepMode::kVertex,
- {{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kVec4F32, 0, 1}}}}};
+ {{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
cfg.entry_point_name = "main";
DataMap data;
@@ -596,9 +596,9 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{
- {8, InputStepMode::kVertex, {{VertexFormat::kVec2F32, 0, 0}}},
- {12, InputStepMode::kVertex, {{VertexFormat::kVec3F32, 0, 1}}},
- {16, InputStepMode::kVertex, {{VertexFormat::kVec4F32, 0, 2}}},
+ {8, InputStepMode::kVertex, {{VertexFormat::kFloat32x2, 0, 0}}},
+ {12, InputStepMode::kVertex, {{VertexFormat::kFloat32x3, 0, 1}}},
+ {16, InputStepMode::kVertex, {{VertexFormat::kFloat32x4, 0, 2}}},
}};
cfg.entry_point_name = "main";
@@ -651,7 +651,7 @@
cfg.vertex_state = {
{{16,
InputStepMode::kVertex,
- {{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kVec4F32, 0, 1}}}}};
+ {{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
cfg.entry_point_name = "main";
DataMap data;
diff --git a/src/writer/hlsl/test_helper.h b/src/writer/hlsl/test_helper.h
index dc9420f..7daca49 100644
--- a/src/writer/hlsl/test_helper.h
+++ b/src/writer/hlsl/test_helper.h
@@ -81,12 +81,12 @@
}();
transform::Manager transform_manager;
- transform::Renamer::Config renamer_config{
- transform::Renamer::Target::kHlslKeywords};
- transform_manager.append(
- std::make_unique<tint::transform::Renamer>(renamer_config));
- transform_manager.append(std::make_unique<tint::transform::Hlsl>());
- auto result = transform_manager.Run(program.get());
+ transform::DataMap transform_data;
+ transform_data.Add<transform::Renamer::Config>(
+ transform::Renamer::Target::kHlslKeywords);
+ transform_manager.Add<tint::transform::Renamer>();
+ transform_manager.Add<tint::transform::Hlsl>();
+ auto result = transform_manager.Run(program.get(), transform_data);
[&]() {
ASSERT_TRUE(result.program.IsValid())
<< formatter.format(result.program.Diagnostics());