Fix typo in FirstIndexOffset::Data
s/first_index_offset/first_instance_offset
Change-Id: I7f77490cf5e75002baaedcb319140dd329a087ac
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42461
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/transform/first_index_offset.cc b/src/transform/first_index_offset.cc
index 29fe53f..f5f3026 100644
--- a/src/transform/first_index_offset.cc
+++ b/src/transform/first_index_offset.cc
@@ -86,11 +86,11 @@
FirstIndexOffset::Data::Data(bool has_vtx_index,
bool has_inst_index,
uint32_t first_vtx_offset,
- uint32_t first_idx_offset)
+ uint32_t first_inst_offset)
: has_vertex_index(has_vtx_index),
has_instance_index(has_inst_index),
first_vertex_offset(first_vtx_offset),
- first_index_offset(first_idx_offset) {}
+ first_instance_offset(first_inst_offset) {}
FirstIndexOffset::Data::Data(const Data&) = default;
diff --git a/src/transform/first_index_offset.h b/src/transform/first_index_offset.h
index dfb0353..ab642c4 100644
--- a/src/transform/first_index_offset.h
+++ b/src/transform/first_index_offset.h
@@ -68,11 +68,11 @@
/// @param has_vtx_index True if the shader uses vertex_index
/// @param has_inst_index True if the shader uses instance_index
/// @param first_vtx_offset Offset of first vertex into constant buffer
- /// @param first_idx_offset Offset of first instance into constant buffer
+ /// @param first_inst_offset Offset of first instance into constant buffer
Data(bool has_vtx_index,
bool has_inst_index,
uint32_t first_vtx_offset,
- uint32_t first_idx_offset);
+ uint32_t first_inst_offset);
/// Copy constructor
Data(const Data&);
@@ -87,7 +87,7 @@
/// Offset of first vertex into constant buffer
uint32_t const first_vertex_offset;
/// Offset of first instance into constant buffer
- uint32_t const first_index_offset;
+ uint32_t const first_instance_offset;
};
/// Constructor
diff --git a/src/transform/first_index_offset_test.cc b/src/transform/first_index_offset_test.cc
index c102c9d..4618915 100644
--- a/src/transform/first_index_offset_test.cc
+++ b/src/transform/first_index_offset_test.cc
@@ -57,7 +57,7 @@
EXPECT_EQ(data->has_vertex_index, true);
EXPECT_EQ(data->has_instance_index, false);
EXPECT_EQ(data->first_vertex_offset, 0u);
- EXPECT_EQ(data->first_index_offset, 0u);
+ EXPECT_EQ(data->first_instance_offset, 0u);
}
TEST_F(FirstIndexOffsetTest, EmptyModule) {
@@ -74,7 +74,7 @@
EXPECT_EQ(data->has_vertex_index, false);
EXPECT_EQ(data->has_instance_index, false);
EXPECT_EQ(data->first_vertex_offset, 0u);
- EXPECT_EQ(data->first_index_offset, 0u);
+ EXPECT_EQ(data->first_instance_offset, 0u);
}
TEST_F(FirstIndexOffsetTest, BasicModuleVertexIndex) {
@@ -123,7 +123,7 @@
EXPECT_EQ(data->has_vertex_index, true);
EXPECT_EQ(data->has_instance_index, false);
EXPECT_EQ(data->first_vertex_offset, 0u);
- EXPECT_EQ(data->first_index_offset, 0u);
+ EXPECT_EQ(data->first_instance_offset, 0u);
}
TEST_F(FirstIndexOffsetTest, BasicModuleInstanceIndex) {
@@ -172,7 +172,7 @@
EXPECT_EQ(data->has_vertex_index, false);
EXPECT_EQ(data->has_instance_index, true);
EXPECT_EQ(data->first_vertex_offset, 0u);
- EXPECT_EQ(data->first_index_offset, 0u);
+ EXPECT_EQ(data->first_instance_offset, 0u);
}
TEST_F(FirstIndexOffsetTest, BasicModuleBothIndex) {
@@ -227,7 +227,7 @@
EXPECT_EQ(data->has_vertex_index, true);
EXPECT_EQ(data->has_instance_index, true);
EXPECT_EQ(data->first_vertex_offset, 0u);
- EXPECT_EQ(data->first_index_offset, 4u);
+ EXPECT_EQ(data->first_instance_offset, 4u);
}
TEST_F(FirstIndexOffsetTest, NestedCalls) {
@@ -284,7 +284,7 @@
EXPECT_EQ(data->has_vertex_index, true);
EXPECT_EQ(data->has_instance_index, false);
EXPECT_EQ(data->first_vertex_offset, 0u);
- EXPECT_EQ(data->first_index_offset, 0u);
+ EXPECT_EQ(data->first_instance_offset, 0u);
}
} // namespace