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:
parent
2432e3429d
commit
c1f7e90417
|
@ -86,11 +86,11 @@ ast::Variable* clone_variable_with_new_name(CloneContext* ctx,
|
||||||
FirstIndexOffset::Data::Data(bool has_vtx_index,
|
FirstIndexOffset::Data::Data(bool has_vtx_index,
|
||||||
bool has_inst_index,
|
bool has_inst_index,
|
||||||
uint32_t first_vtx_offset,
|
uint32_t first_vtx_offset,
|
||||||
uint32_t first_idx_offset)
|
uint32_t first_inst_offset)
|
||||||
: has_vertex_index(has_vtx_index),
|
: has_vertex_index(has_vtx_index),
|
||||||
has_instance_index(has_inst_index),
|
has_instance_index(has_inst_index),
|
||||||
first_vertex_offset(first_vtx_offset),
|
first_vertex_offset(first_vtx_offset),
|
||||||
first_index_offset(first_idx_offset) {}
|
first_instance_offset(first_inst_offset) {}
|
||||||
|
|
||||||
FirstIndexOffset::Data::Data(const Data&) = default;
|
FirstIndexOffset::Data::Data(const Data&) = default;
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,11 @@ class FirstIndexOffset : public Transform {
|
||||||
/// @param has_vtx_index True if the shader uses vertex_index
|
/// @param has_vtx_index True if the shader uses vertex_index
|
||||||
/// @param has_inst_index True if the shader uses instance_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_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,
|
Data(bool has_vtx_index,
|
||||||
bool has_inst_index,
|
bool has_inst_index,
|
||||||
uint32_t first_vtx_offset,
|
uint32_t first_vtx_offset,
|
||||||
uint32_t first_idx_offset);
|
uint32_t first_inst_offset);
|
||||||
|
|
||||||
/// Copy constructor
|
/// Copy constructor
|
||||||
Data(const Data&);
|
Data(const Data&);
|
||||||
|
@ -87,7 +87,7 @@ class FirstIndexOffset : public Transform {
|
||||||
/// Offset of first vertex into constant buffer
|
/// Offset of first vertex into constant buffer
|
||||||
uint32_t const first_vertex_offset;
|
uint32_t const first_vertex_offset;
|
||||||
/// Offset of first instance into constant buffer
|
/// Offset of first instance into constant buffer
|
||||||
uint32_t const first_index_offset;
|
uint32_t const first_instance_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
|
|
|
@ -57,7 +57,7 @@ fn entry() -> void {
|
||||||
EXPECT_EQ(data->has_vertex_index, true);
|
EXPECT_EQ(data->has_vertex_index, true);
|
||||||
EXPECT_EQ(data->has_instance_index, false);
|
EXPECT_EQ(data->has_instance_index, false);
|
||||||
EXPECT_EQ(data->first_vertex_offset, 0u);
|
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) {
|
TEST_F(FirstIndexOffsetTest, EmptyModule) {
|
||||||
|
@ -74,7 +74,7 @@ TEST_F(FirstIndexOffsetTest, EmptyModule) {
|
||||||
EXPECT_EQ(data->has_vertex_index, false);
|
EXPECT_EQ(data->has_vertex_index, false);
|
||||||
EXPECT_EQ(data->has_instance_index, false);
|
EXPECT_EQ(data->has_instance_index, false);
|
||||||
EXPECT_EQ(data->first_vertex_offset, 0u);
|
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) {
|
TEST_F(FirstIndexOffsetTest, BasicModuleVertexIndex) {
|
||||||
|
@ -123,7 +123,7 @@ fn entry() -> void {
|
||||||
EXPECT_EQ(data->has_vertex_index, true);
|
EXPECT_EQ(data->has_vertex_index, true);
|
||||||
EXPECT_EQ(data->has_instance_index, false);
|
EXPECT_EQ(data->has_instance_index, false);
|
||||||
EXPECT_EQ(data->first_vertex_offset, 0u);
|
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) {
|
TEST_F(FirstIndexOffsetTest, BasicModuleInstanceIndex) {
|
||||||
|
@ -172,7 +172,7 @@ fn entry() -> void {
|
||||||
EXPECT_EQ(data->has_vertex_index, false);
|
EXPECT_EQ(data->has_vertex_index, false);
|
||||||
EXPECT_EQ(data->has_instance_index, true);
|
EXPECT_EQ(data->has_instance_index, true);
|
||||||
EXPECT_EQ(data->first_vertex_offset, 0u);
|
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) {
|
TEST_F(FirstIndexOffsetTest, BasicModuleBothIndex) {
|
||||||
|
@ -227,7 +227,7 @@ fn entry() -> void {
|
||||||
EXPECT_EQ(data->has_vertex_index, true);
|
EXPECT_EQ(data->has_vertex_index, true);
|
||||||
EXPECT_EQ(data->has_instance_index, true);
|
EXPECT_EQ(data->has_instance_index, true);
|
||||||
EXPECT_EQ(data->first_vertex_offset, 0u);
|
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) {
|
TEST_F(FirstIndexOffsetTest, NestedCalls) {
|
||||||
|
@ -284,7 +284,7 @@ fn entry() -> void {
|
||||||
EXPECT_EQ(data->has_vertex_index, true);
|
EXPECT_EQ(data->has_vertex_index, true);
|
||||||
EXPECT_EQ(data->has_instance_index, false);
|
EXPECT_EQ(data->has_instance_index, false);
|
||||||
EXPECT_EQ(data->first_vertex_offset, 0u);
|
EXPECT_EQ(data->first_vertex_offset, 0u);
|
||||||
EXPECT_EQ(data->first_index_offset, 0u);
|
EXPECT_EQ(data->first_instance_offset, 0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in New Issue