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>
This commit is contained in:
Ben Clayton 2021-02-25 14:11:50 +00:00 committed by Commit Bot service account
parent 2432e3429d
commit c1f7e90417
3 changed files with 11 additions and 11 deletions

View File

@ -86,11 +86,11 @@ ast::Variable* clone_variable_with_new_name(CloneContext* ctx,
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;

View File

@ -68,11 +68,11 @@ class FirstIndexOffset : public Transform {
/// @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 @@ class FirstIndexOffset : public Transform {
/// 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

View File

@ -57,7 +57,7 @@ fn entry() -> void {
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 @@ TEST_F(FirstIndexOffsetTest, EmptyModule) {
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 @@ fn entry() -> void {
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 @@ fn entry() -> void {
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 @@ fn entry() -> void {
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 @@ fn entry() -> void {
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