HLSL: Stop flattening non-IO structs containing opaques.
This makes struct returns from functions work, but breaks structs containing arrays, due to limitations in subsequent transforms in spirv-opt. This is expected to be fixed soon.
This commit is contained in:
parent
471bfed062
commit
dc005fb083
18 changed files with 1610 additions and 1419 deletions
|
|
@ -1,65 +1,73 @@
|
|||
hlsl.flattenOpaque.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 144
|
||||
// Id's are bound by 185
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 97
|
||||
EntryPoint Fragment 4 "main" 120
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 7 "os"
|
||||
MemberName 7(os) 0 "s2D"
|
||||
Name 23 "os2"
|
||||
MemberName 23(os2) 0 "s2D"
|
||||
MemberName 23(os2) 1 "tex"
|
||||
Name 38 "tex"
|
||||
Name 70 "s.s2D"
|
||||
Name 79 "s2.s2D"
|
||||
Name 80 "s2.tex"
|
||||
Name 97 "@entryPointOutput"
|
||||
Name 82 "s.s2D"
|
||||
Name 97 "s2.s2D"
|
||||
Name 100 "s2.tex"
|
||||
Name 120 "@entryPointOutput"
|
||||
Decorate 38(tex) DescriptorSet 0
|
||||
Decorate 70(s.s2D) DescriptorSet 0
|
||||
Decorate 79(s2.s2D) DescriptorSet 0
|
||||
Decorate 80(s2.tex) DescriptorSet 0
|
||||
Decorate 97(@entryPointOutput) Location 0
|
||||
Decorate 82(s.s2D) DescriptorSet 0
|
||||
Decorate 97(s2.s2D) DescriptorSet 0
|
||||
Decorate 100(s2.tex) DescriptorSet 0
|
||||
Decorate 120(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
8: TypeFloat 32
|
||||
9: TypeVector 8(float) 4
|
||||
14: TypeVector 8(float) 2
|
||||
21: TypeImage 8(float) 2D sampled format:Unknown
|
||||
37: TypePointer UniformConstant 21
|
||||
7(os): TypeStruct 6
|
||||
9: TypeFloat 32
|
||||
10: TypeVector 9(float) 4
|
||||
15: TypeVector 9(float) 2
|
||||
22: TypeImage 9(float) 2D sampled format:Unknown
|
||||
23(os2): TypeStruct 6 22
|
||||
37: TypePointer UniformConstant 22
|
||||
38(tex): 37(ptr) Variable UniformConstant
|
||||
41: TypeSampledImage 21
|
||||
43: 8(float) Constant 1045220557
|
||||
44: 8(float) Constant 1050253722
|
||||
45: 14(fvec2) ConstantComposite 43 44
|
||||
69: TypePointer UniformConstant 6
|
||||
70(s.s2D): 69(ptr) Variable UniformConstant
|
||||
79(s2.s2D): 69(ptr) Variable UniformConstant
|
||||
80(s2.tex): 37(ptr) Variable UniformConstant
|
||||
96: TypePointer Output 9(fvec4)
|
||||
97(@entryPointOutput): 96(ptr) Variable Output
|
||||
45: TypeSampledImage 22
|
||||
47: 9(float) Constant 1045220557
|
||||
48: 9(float) Constant 1050253722
|
||||
49: 15(fvec2) ConstantComposite 47 48
|
||||
81: TypePointer UniformConstant 6
|
||||
82(s.s2D): 81(ptr) Variable UniformConstant
|
||||
97(s2.s2D): 81(ptr) Variable UniformConstant
|
||||
100(s2.tex): 37(ptr) Variable UniformConstant
|
||||
119: TypePointer Output 10(fvec4)
|
||||
120(@entryPointOutput): 119(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
109: 6 Load 70(s.s2D)
|
||||
123: 21 Load 38(tex)
|
||||
125: 41 SampledImage 123 109
|
||||
126: 9(fvec4) ImageSampleImplicitLod 125 45
|
||||
111: 6 Load 70(s.s2D)
|
||||
128: 21 Load 38(tex)
|
||||
130: 41 SampledImage 128 111
|
||||
132: 9(fvec4) ImageSampleImplicitLod 130 45
|
||||
113: 9(fvec4) FAdd 126 132
|
||||
114: 6 Load 79(s2.s2D)
|
||||
115: 21 Load 80(s2.tex)
|
||||
136: 41 SampledImage 115 114
|
||||
137: 9(fvec4) ImageSampleImplicitLod 136 45
|
||||
117: 9(fvec4) FAdd 113 137
|
||||
118: 6 Load 79(s2.s2D)
|
||||
119: 21 Load 80(s2.tex)
|
||||
141: 41 SampledImage 119 118
|
||||
143: 9(fvec4) ImageSampleImplicitLod 141 45
|
||||
121: 9(fvec4) FAdd 117 143
|
||||
Store 97(@entryPointOutput) 121
|
||||
134: 6 Load 82(s.s2D)
|
||||
158: 22 Load 38(tex)
|
||||
161: 45 SampledImage 158 134
|
||||
162: 10(fvec4) ImageSampleImplicitLod 161 49
|
||||
138: 6 Load 82(s.s2D)
|
||||
164: 22 Load 38(tex)
|
||||
167: 45 SampledImage 164 138
|
||||
169: 10(fvec4) ImageSampleImplicitLod 167 49
|
||||
142: 10(fvec4) FAdd 162 169
|
||||
143: 6 Load 97(s2.s2D)
|
||||
145: 22 Load 100(s2.tex)
|
||||
175: 45 SampledImage 145 143
|
||||
176: 10(fvec4) ImageSampleImplicitLod 175 49
|
||||
149: 10(fvec4) FAdd 142 176
|
||||
150: 6 Load 97(s2.s2D)
|
||||
152: 22 Load 100(s2.tex)
|
||||
182: 45 SampledImage 152 150
|
||||
184: 10(fvec4) ImageSampleImplicitLod 182 49
|
||||
156: 10(fvec4) FAdd 149 184
|
||||
Store 120(@entryPointOutput) 156
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue