Remove InputStepMode (it was deprecated in favor of VertexStepMode)
Bug: dawn:1023
Change-Id: Ie5bb84f34f62143f92b59a816c7976f358b5c102
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59665
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/fuzzers/tint_common_fuzzer.cc b/fuzzers/tint_common_fuzzer.cc
index 49e770e..8ea569f 100644
--- a/fuzzers/tint_common_fuzzer.cc
+++ b/fuzzers/tint_common_fuzzer.cc
@@ -63,8 +63,8 @@
Reader* r) {
transform::VertexBufferLayoutDescriptor desc;
desc.array_stride = r->read<uint32_t>();
- desc.step_mode = r->enum_class<transform::InputStepMode>(
- static_cast<uint8_t>(transform::InputStepMode::kLastEntry) + 1);
+ desc.step_mode = r->enum_class<transform::VertexStepMode>(
+ static_cast<uint8_t>(transform::VertexStepMode::kLastEntry) + 1);
desc.attributes = r->vector(ExtractVertexAttributeDescriptor);
return desc;
}
diff --git a/src/transform/vertex_pulling.cc b/src/transform/vertex_pulling.cc
index 11e5fb8..d4a8d5e 100644
--- a/src/transform/vertex_pulling.cc
+++ b/src/transform/vertex_pulling.cc
@@ -298,7 +298,7 @@
return nullptr;
}
- auto* index_expr = buffer_layout.step_mode == InputStepMode::kVertex
+ auto* index_expr = buffer_layout.step_mode == VertexStepMode::kVertex
? vertex_index_expr()
: instance_index_expr();
@@ -860,7 +860,7 @@
// Insert new parameters for vertex_index and instance_index if needed.
if (!vertex_index_expr) {
for (const VertexBufferLayoutDescriptor& layout : cfg.vertex_state) {
- if (layout.step_mode == InputStepMode::kVertex) {
+ if (layout.step_mode == VertexStepMode::kVertex) {
auto name = ctx.dst->Symbols().New("tint_pulling_vertex_index");
new_function_parameters.push_back(
ctx.dst->Param(name, ctx.dst->ty.u32(),
@@ -872,7 +872,7 @@
}
if (!instance_index_expr) {
for (const VertexBufferLayoutDescriptor& layout : cfg.vertex_state) {
- if (layout.step_mode == InputStepMode::kInstance) {
+ if (layout.step_mode == VertexStepMode::kInstance) {
auto name = ctx.dst->Symbols().New("tint_pulling_instance_index");
new_function_parameters.push_back(
ctx.dst->Param(name, ctx.dst->ty.u32(),
@@ -945,7 +945,7 @@
VertexBufferLayoutDescriptor::VertexBufferLayoutDescriptor(
uint32_t in_array_stride,
- InputStepMode in_step_mode,
+ VertexStepMode in_step_mode,
std::vector<VertexAttributeDescriptor> in_attributes)
: array_stride(in_array_stride),
step_mode(in_step_mode),
diff --git a/src/transform/vertex_pulling.h b/src/transform/vertex_pulling.h
index b445db7..c6250b7 100644
--- a/src/transform/vertex_pulling.h
+++ b/src/transform/vertex_pulling.h
@@ -65,9 +65,6 @@
/// index
enum class VertexStepMode { kVertex, kInstance, kLastEntry = kInstance };
-/// Deprecated
-using InputStepMode = VertexStepMode;
-
/// Describes a vertex attribute within a buffer
struct VertexAttributeDescriptor {
/// The format of the attribute
@@ -88,7 +85,7 @@
/// @param in_attributes the in attributes
VertexBufferLayoutDescriptor(
uint32_t in_array_stride,
- InputStepMode in_step_mode,
+ VertexStepMode in_step_mode,
std::vector<VertexAttributeDescriptor> in_attributes);
/// Copy constructor
/// @param other the struct to copy
@@ -105,7 +102,7 @@
/// The array stride used in the in buffer
uint32_t array_stride = 0u;
/// The input step mode used
- InputStepMode step_mode = InputStepMode::kVertex;
+ VertexStepMode step_mode = VertexStepMode::kVertex;
/// The vertex attributes
std::vector<VertexAttributeDescriptor> attributes;
};
diff --git a/src/transform/vertex_pulling_test.cc b/src/transform/vertex_pulling_test.cc
index 8be8da2..20f7929 100644
--- a/src/transform/vertex_pulling_test.cc
+++ b/src/transform/vertex_pulling_test.cc
@@ -88,7 +88,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
- {{15, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
+ {{15, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
cfg.entry_point_name = "main";
DataMap data;
@@ -157,7 +157,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
- {{4, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
+ {{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
cfg.entry_point_name = "main";
DataMap data;
@@ -196,7 +196,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
- {{4, InputStepMode::kInstance, {{VertexFormat::kFloat32, 0, 0}}}}};
+ {{4, VertexStepMode::kInstance, {{VertexFormat::kFloat32, 0, 0}}}}};
cfg.entry_point_name = "main";
DataMap data;
@@ -235,7 +235,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
- {{4, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
+ {{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
cfg.pulling_group = 5;
cfg.entry_point_name = "main";
@@ -284,7 +284,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
- {{4, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
+ {{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
cfg.entry_point_name = "main";
DataMap data;
@@ -335,12 +335,12 @@
cfg.vertex_state = {{
{
4,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}},
},
{
4,
- InputStepMode::kInstance,
+ VertexStepMode::kInstance,
{{VertexFormat::kFloat32, 0, 1}},
},
}};
@@ -415,12 +415,12 @@
cfg.vertex_state = {{
{
4,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}},
},
{
4,
- InputStepMode::kInstance,
+ VertexStepMode::kInstance,
{{VertexFormat::kFloat32, 0, 1}},
},
}};
@@ -492,12 +492,12 @@
cfg.vertex_state = {{
{
4,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}},
},
{
4,
- InputStepMode::kInstance,
+ VertexStepMode::kInstance,
{{VertexFormat::kFloat32, 0, 1}},
},
}};
@@ -543,7 +543,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
{{16,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
cfg.entry_point_name = "main";
@@ -596,9 +596,9 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{
- {8, InputStepMode::kVertex, {{VertexFormat::kFloat32x2, 0, 0}}},
- {12, InputStepMode::kVertex, {{VertexFormat::kFloat32x3, 0, 1}}},
- {16, InputStepMode::kVertex, {{VertexFormat::kFloat32x4, 0, 2}}},
+ {8, VertexStepMode::kVertex, {{VertexFormat::kFloat32x2, 0, 0}}},
+ {12, VertexStepMode::kVertex, {{VertexFormat::kFloat32x3, 0, 1}}},
+ {16, VertexStepMode::kVertex, {{VertexFormat::kFloat32x4, 0, 2}}},
}};
cfg.entry_point_name = "main";
@@ -650,7 +650,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {
{{16,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
cfg.entry_point_name = "main";
@@ -779,7 +779,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{256,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{
{VertexFormat::kUint8x2, 64, 0},
{VertexFormat::kUint8x4, 64, 1},
@@ -940,7 +940,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{256,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{
{VertexFormat::kUint8x2, 63, 0},
{VertexFormat::kUint8x4, 63, 1},
@@ -1100,7 +1100,7 @@
VertexPulling::Config cfg;
cfg.vertex_state = {{{256,
- InputStepMode::kVertex,
+ VertexStepMode::kVertex,
{
{VertexFormat::kUint8x2, 64, 0},
{VertexFormat::kUint8x4, 64, 1},