Test: Add more legalization tests; those effected by flattening.
This commit is contained in:
parent
ca4ef9f43b
commit
cb421ef991
37
Test/baseLegalResults/hlsl.flattenSubset2.frag.out
Executable file
37
Test/baseLegalResults/hlsl.flattenSubset2.frag.out
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
hlsl.flattenSubset2.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80002
|
||||||
|
// Id's are bound by 44
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 40 43
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source HLSL 500
|
||||||
|
Name 4 "main"
|
||||||
|
Name 31 "someTex"
|
||||||
|
Name 40 "vpos"
|
||||||
|
Name 43 "@entryPointOutput"
|
||||||
|
Decorate 31(someTex) DescriptorSet 0
|
||||||
|
Decorate 40(vpos) Location 0
|
||||||
|
Decorate 43(@entryPointOutput) Location 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
17: TypeImage 6(float) 2D sampled format:Unknown
|
||||||
|
30: TypePointer UniformConstant 17
|
||||||
|
31(someTex): 30(ptr) Variable UniformConstant
|
||||||
|
34: 6(float) Constant 0
|
||||||
|
35: 7(fvec4) ConstantComposite 34 34 34 34
|
||||||
|
39: TypePointer Input 7(fvec4)
|
||||||
|
40(vpos): 39(ptr) Variable Input
|
||||||
|
42: TypePointer Output 7(fvec4)
|
||||||
|
43(@entryPointOutput): 42(ptr) Variable Output
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
Store 43(@entryPointOutput) 35
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
91
Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out
Executable file
91
Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out
Executable file
@ -0,0 +1,91 @@
|
|||||||
|
hlsl.partialFlattenLocal.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80002
|
||||||
|
// Id's are bound by 148
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main" 90 93
|
||||||
|
Source HLSL 500
|
||||||
|
Name 4 "main"
|
||||||
|
Name 17 "tex"
|
||||||
|
Name 90 "pos"
|
||||||
|
Name 93 "@entryPointOutput"
|
||||||
|
Decorate 17(tex) DescriptorSet 0
|
||||||
|
Decorate 90(pos) Location 0
|
||||||
|
Decorate 93(@entryPointOutput) BuiltIn Position
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
13: TypeImage 6(float) 2D sampled format:Unknown
|
||||||
|
16: TypePointer UniformConstant 13
|
||||||
|
17(tex): 16(ptr) Variable UniformConstant
|
||||||
|
19: TypeVector 6(float) 3
|
||||||
|
20: TypeInt 32 0
|
||||||
|
21: 20(int) Constant 3
|
||||||
|
22: TypeArray 19(fvec3) 21
|
||||||
|
23: TypePointer Function 22
|
||||||
|
25: TypeInt 32 1
|
||||||
|
26: 25(int) Constant 0
|
||||||
|
27: 6(float) Constant 0
|
||||||
|
28: 19(fvec3) ConstantComposite 27 27 27
|
||||||
|
29: TypePointer Function 19(fvec3)
|
||||||
|
31: TypeVector 6(float) 2
|
||||||
|
32: 20(int) Constant 2
|
||||||
|
33: TypeArray 31(fvec2) 32
|
||||||
|
34: TypePointer Function 33
|
||||||
|
36: 6(float) Constant 1065353216
|
||||||
|
37: 31(fvec2) ConstantComposite 27 36
|
||||||
|
38: TypePointer Function 31(fvec2)
|
||||||
|
52: 25(int) Constant 1
|
||||||
|
53: TypeBool
|
||||||
|
89: TypePointer Input 7(fvec4)
|
||||||
|
90(pos): 89(ptr) Variable Input
|
||||||
|
92: TypePointer Output 7(fvec4)
|
||||||
|
93(@entryPointOutput): 92(ptr) Variable Output
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
98: 23(ptr) Variable Function
|
||||||
|
99: 34(ptr) Variable Function
|
||||||
|
91: 7(fvec4) Load 90(pos)
|
||||||
|
110: 29(ptr) AccessChain 98 26
|
||||||
|
Store 110 28
|
||||||
|
111: 38(ptr) AccessChain 99 26
|
||||||
|
Store 111 37
|
||||||
|
Branch 112
|
||||||
|
112: Label
|
||||||
|
147: 25(int) Phi 26 5 131 114
|
||||||
|
LoopMerge 113 114 None
|
||||||
|
Branch 115
|
||||||
|
115: Label
|
||||||
|
117: 53(bool) SLessThan 147 52
|
||||||
|
BranchConditional 117 118 113
|
||||||
|
118: Label
|
||||||
|
121: 38(ptr) AccessChain 99 147
|
||||||
|
122: 31(fvec2) Load 121
|
||||||
|
123: 29(ptr) AccessChain 98 147
|
||||||
|
124: 19(fvec3) Load 123
|
||||||
|
125: 31(fvec2) VectorShuffle 124 124 0 1
|
||||||
|
126: 31(fvec2) FAdd 125 122
|
||||||
|
127: 29(ptr) AccessChain 98 147
|
||||||
|
128: 19(fvec3) Load 127
|
||||||
|
129: 19(fvec3) VectorShuffle 128 126 3 4 2
|
||||||
|
Store 127 129
|
||||||
|
Branch 114
|
||||||
|
114: Label
|
||||||
|
131: 25(int) IAdd 147 52
|
||||||
|
Branch 112
|
||||||
|
113: Label
|
||||||
|
133: 22 Load 98
|
||||||
|
146: 19(fvec3) CompositeExtract 133 0
|
||||||
|
140: 6(float) CompositeExtract 146 0
|
||||||
|
141: 6(float) CompositeExtract 146 1
|
||||||
|
142: 6(float) CompositeExtract 146 2
|
||||||
|
143: 7(fvec4) CompositeConstruct 140 141 142 27
|
||||||
|
144: 7(fvec4) FAdd 91 143
|
||||||
|
Store 93(@entryPointOutput) 144
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
38
Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out
Executable file
38
Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
hlsl.partialFlattenMixed.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80002
|
||||||
|
// Id's are bound by 31
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main" 27 30
|
||||||
|
Source HLSL 500
|
||||||
|
Name 4 "main"
|
||||||
|
Name 20 "tex"
|
||||||
|
Name 27 "pos"
|
||||||
|
Name 30 "@entryPointOutput"
|
||||||
|
Decorate 20(tex) DescriptorSet 0
|
||||||
|
Decorate 27(pos) Location 0
|
||||||
|
Decorate 30(@entryPointOutput) BuiltIn Position
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
13: TypeImage 6(float) 2D sampled format:Unknown
|
||||||
|
14: TypeInt 32 0
|
||||||
|
15: 14(int) Constant 2
|
||||||
|
16: TypeArray 13 15
|
||||||
|
19: TypePointer UniformConstant 16
|
||||||
|
20(tex): 19(ptr) Variable UniformConstant
|
||||||
|
26: TypePointer Input 7(fvec4)
|
||||||
|
27(pos): 26(ptr) Variable Input
|
||||||
|
29: TypePointer Output 7(fvec4)
|
||||||
|
30(@entryPointOutput): 29(ptr) Variable Output
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
28: 7(fvec4) Load 27(pos)
|
||||||
|
Store 30(@entryPointOutput) 28
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
@ -387,7 +387,10 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.flattenOpaque.frag", "main"},
|
{"hlsl.flattenOpaque.frag", "main"},
|
||||||
{"hlsl.flattenOpaqueInit.vert", "main"},
|
{"hlsl.flattenOpaqueInit.vert", "main"},
|
||||||
{"hlsl.flattenOpaqueInitMix.vert", "main"},
|
{"hlsl.flattenOpaqueInitMix.vert", "main"},
|
||||||
{"hlsl.flattenSubset.frag", "main"}
|
{"hlsl.flattenSubset.frag", "main"},
|
||||||
|
{"hlsl.flattenSubset2.frag", "main"},
|
||||||
|
{"hlsl.partialFlattenLocal.vert", "main"},
|
||||||
|
{"hlsl.partialFlattenMixed.vert", "main"}
|
||||||
}),
|
}),
|
||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user