diff --git a/src/transform/first_index_offset.cc b/src/transform/first_index_offset.cc index 29fe53f8c3..f5f3026fce 100644 --- a/src/transform/first_index_offset.cc +++ b/src/transform/first_index_offset.cc @@ -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; diff --git a/src/transform/first_index_offset.h b/src/transform/first_index_offset.h index dfb0353f58..ab642c4e99 100644 --- a/src/transform/first_index_offset.h +++ b/src/transform/first_index_offset.h @@ -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 diff --git a/src/transform/first_index_offset_test.cc b/src/transform/first_index_offset_test.cc index c102c9d556..46189157e8 100644 --- a/src/transform/first_index_offset_test.cc +++ b/src/transform/first_index_offset_test.cc @@ -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