mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
[ast] Change module dump order.
This CL changes the AST dumping order to emit alias types before global variables. This makes the output easier to read as the types come before the usages. Bug: tint:175 Change-Id: Ib7325384b910472e89d6d01853503be989ce4210 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30281 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
481ecff293
commit
95dc655bf8
@@ -136,6 +136,11 @@ TEST_F(VertexPullingTransformTest, OneAttribute) {
|
||||
EXPECT_TRUE(transform()->Run());
|
||||
|
||||
EXPECT_EQ(R"(Module{
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Variable{
|
||||
var_a
|
||||
private
|
||||
@@ -158,11 +163,6 @@ TEST_F(VertexPullingTransformTest, OneAttribute) {
|
||||
storage_buffer
|
||||
__alias_TintVertexData__struct_TintVertexData
|
||||
}
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Function main -> __void
|
||||
StageDecoration{vertex}
|
||||
()
|
||||
@@ -222,6 +222,11 @@ TEST_F(VertexPullingTransformTest, OneInstancedAttribute) {
|
||||
EXPECT_TRUE(transform()->Run());
|
||||
|
||||
EXPECT_EQ(R"(Module{
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Variable{
|
||||
var_a
|
||||
private
|
||||
@@ -244,11 +249,6 @@ TEST_F(VertexPullingTransformTest, OneInstancedAttribute) {
|
||||
storage_buffer
|
||||
__alias_TintVertexData__struct_TintVertexData
|
||||
}
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Function main -> __void
|
||||
StageDecoration{vertex}
|
||||
()
|
||||
@@ -308,6 +308,11 @@ TEST_F(VertexPullingTransformTest, OneAttributeDifferentOutputSet) {
|
||||
EXPECT_TRUE(transform()->Run());
|
||||
|
||||
EXPECT_EQ(R"(Module{
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Variable{
|
||||
var_a
|
||||
private
|
||||
@@ -330,11 +335,6 @@ TEST_F(VertexPullingTransformTest, OneAttributeDifferentOutputSet) {
|
||||
storage_buffer
|
||||
__alias_TintVertexData__struct_TintVertexData
|
||||
}
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Function main -> __void
|
||||
StageDecoration{vertex}
|
||||
()
|
||||
@@ -424,6 +424,11 @@ TEST_F(VertexPullingTransformTest, ExistingVertexIndexAndInstanceIndex) {
|
||||
EXPECT_TRUE(transform()->Run());
|
||||
|
||||
EXPECT_EQ(R"(Module{
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Variable{
|
||||
var_a
|
||||
private
|
||||
@@ -468,11 +473,6 @@ TEST_F(VertexPullingTransformTest, ExistingVertexIndexAndInstanceIndex) {
|
||||
storage_buffer
|
||||
__alias_TintVertexData__struct_TintVertexData
|
||||
}
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Function main -> __void
|
||||
StageDecoration{vertex}
|
||||
()
|
||||
@@ -565,6 +565,11 @@ TEST_F(VertexPullingTransformTest, TwoAttributesSameBuffer) {
|
||||
EXPECT_TRUE(transform()->Run());
|
||||
|
||||
EXPECT_EQ(R"(Module{
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Variable{
|
||||
var_a
|
||||
private
|
||||
@@ -592,11 +597,6 @@ TEST_F(VertexPullingTransformTest, TwoAttributesSameBuffer) {
|
||||
storage_buffer
|
||||
__alias_TintVertexData__struct_TintVertexData
|
||||
}
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Function main -> __void
|
||||
StageDecoration{vertex}
|
||||
()
|
||||
@@ -751,6 +751,11 @@ TEST_F(VertexPullingTransformTest, FloatVectorAttributes) {
|
||||
EXPECT_TRUE(transform()->Run());
|
||||
|
||||
EXPECT_EQ(R"(Module{
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Variable{
|
||||
var_a
|
||||
private
|
||||
@@ -801,11 +806,6 @@ TEST_F(VertexPullingTransformTest, FloatVectorAttributes) {
|
||||
storage_buffer
|
||||
__alias_TintVertexData__struct_TintVertexData
|
||||
}
|
||||
TintVertexData -> __struct_TintVertexData
|
||||
Struct{
|
||||
[[block]]
|
||||
StructMember{[[ offset 0 ]] _tint_vertex_data: __array__u32_stride_4}
|
||||
}
|
||||
Function main -> __void
|
||||
StageDecoration{vertex}
|
||||
()
|
||||
|
||||
Reference in New Issue
Block a user