writers: Use the new sem::Module::DependencyOrderedDeclarations

As the resolver currently enforces in-order declarations, this does not
change the declaration order from iterating over the
ast::Module::GlobalDeclarations.

The MSL backend has been changed to use the
sem::Module::DependencyOrderedDeclarations list instead of looping over
different declaration types separately.

Bug: tint:1266
Change-Id: I698d612032285311017bfceab3c42adae1928a0e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79767
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton
2022-02-09 23:55:51 +00:00
parent a52be6c9ec
commit 8ec32a6ec9
841 changed files with 3258 additions and 2784 deletions

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -5,18 +5,23 @@ struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct S1 {
tint_array_wrapper a2;
};
struct tint_array_wrapper_1 {
S1 arr[8];
};
struct OuterS {
tint_array_wrapper_1 a1;
};

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -5,15 +5,19 @@ struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
struct InnerS {
int v;
};
struct tint_array_wrapper_1 {
InnerS arr[8];
};
struct tint_array_wrapper {
tint_array_wrapper_1 arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -4,15 +4,19 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct S1 {
InnerS s2;
};
struct tint_array_wrapper {
S1 arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -5,18 +5,23 @@ struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct S1 {
tint_array_wrapper a2;
};
struct tint_array_wrapper_1 {
S1 arr[8];
};
struct OuterS {
tint_array_wrapper_1 a1;
};

View File

@@ -4,9 +4,11 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
/* 0x0000 */ int v;
};
struct OuterS {
/* 0x0000 */ InnerS a1[1];
};

View File

@@ -5,15 +5,19 @@ struct Uniforms {
/* 0x0000 */ uint i;
/* 0x0004 */ uint j;
};
struct InnerS {
/* 0x0000 */ int v;
};
struct tint_array_wrapper {
/* 0x0000 */ InnerS arr[8];
};
struct S1 {
/* 0x0000 */ tint_array_wrapper a2;
};
struct OuterS {
/* 0x0000 */ S1 a1[1];
};

View File

@@ -4,6 +4,7 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct OuterS {
float2x4 m1;
};

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
tint_array_wrapper a2;

View File

@@ -4,15 +4,19 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct S1 {
tint_array_wrapper a;
};
struct OuterS {
S1 s2;
};

View File

@@ -4,6 +4,7 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct OuterS {
float3 v1;
};

View File

@@ -4,9 +4,11 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct tint_array_wrapper {
uint arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};

View File

@@ -4,12 +4,15 @@ using namespace metal;
struct Uniforms {
/* 0x0000 */ uint i;
};
struct InnerS {
int v;
};
struct tint_array_wrapper {
InnerS arr[8];
};
struct OuterS {
tint_array_wrapper a1;
};