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
|
|
@ -2,57 +2,56 @@ hlsl.flattenOpaqueInit.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 176
|
||||
// Id's are bound by 134
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 99
|
||||
EntryPoint Vertex 4 "main" 80
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 17 "FxaaTex"
|
||||
MemberName 17(FxaaTex) 0 "smpl"
|
||||
MemberName 17(FxaaTex) 1 "tex"
|
||||
Name 38 "g_tInputTexture_sampler"
|
||||
Name 42 "g_tInputTexture"
|
||||
Name 99 "@entryPointOutput"
|
||||
Decorate 38(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 42(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 99(@entryPointOutput) Location 0
|
||||
Name 9 "FxaaTex"
|
||||
MemberName 9(FxaaTex) 0 "smpl"
|
||||
MemberName 9(FxaaTex) 1 "tex"
|
||||
Name 43 "g_tInputTexture_sampler"
|
||||
Name 47 "g_tInputTexture"
|
||||
Name 80 "@entryPointOutput"
|
||||
Decorate 43(g_tInputTexture_sampler) DescriptorSet 0
|
||||
Decorate 47(g_tInputTexture) DescriptorSet 0
|
||||
Decorate 80(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeSampler
|
||||
8: TypeFloat 32
|
||||
9: TypeImage 8(float) 2D sampled format:Unknown
|
||||
11: TypeVector 8(float) 4
|
||||
17(FxaaTex): TypeStruct 6 9
|
||||
26: TypeSampledImage 9
|
||||
28: TypeVector 8(float) 2
|
||||
29: 8(float) Constant 1050253722
|
||||
30: 8(float) Constant 1053609165
|
||||
31: 28(fvec2) ConstantComposite 29 30
|
||||
32: 8(float) Constant 0
|
||||
37: TypePointer UniformConstant 6
|
||||
38(g_tInputTexture_sampler): 37(ptr) Variable UniformConstant
|
||||
41: TypePointer UniformConstant 9
|
||||
42(g_tInputTexture): 41(ptr) Variable UniformConstant
|
||||
98: TypePointer Output 11(fvec4)
|
||||
99(@entryPointOutput): 98(ptr) Variable Output
|
||||
175: 17(FxaaTex) Undef
|
||||
7: TypeFloat 32
|
||||
8: TypeImage 7(float) 2D sampled format:Unknown
|
||||
9(FxaaTex): TypeStruct 6 8
|
||||
11: TypeVector 7(float) 4
|
||||
31: TypeSampledImage 8
|
||||
33: TypeVector 7(float) 2
|
||||
34: 7(float) Constant 1050253722
|
||||
35: 7(float) Constant 1053609165
|
||||
36: 33(fvec2) ConstantComposite 34 35
|
||||
37: 7(float) Constant 0
|
||||
42: TypePointer UniformConstant 6
|
||||
43(g_tInputTexture_sampler): 42(ptr) Variable UniformConstant
|
||||
46: TypePointer UniformConstant 8
|
||||
47(g_tInputTexture): 46(ptr) Variable UniformConstant
|
||||
79: TypePointer Output 11(fvec4)
|
||||
80(@entryPointOutput): 79(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
117: 6 Load 38(g_tInputTexture_sampler)
|
||||
118: 9 Load 42(g_tInputTexture)
|
||||
148: 26 SampledImage 118 117
|
||||
149: 11(fvec4) ImageSampleExplicitLod 148 31 Lod 32
|
||||
172: 6 CompositeExtract 175 0
|
||||
174: 9 CompositeExtract 175 1
|
||||
160: 26 SampledImage 174 172
|
||||
161: 11(fvec4) ImageSampleExplicitLod 160 31 Lod 32
|
||||
136: 11(fvec4) FAdd 149 161
|
||||
165: 26 SampledImage 118 117
|
||||
166: 11(fvec4) ImageSampleExplicitLod 165 31 Lod 32
|
||||
143: 11(fvec4) FAdd 136 166
|
||||
Store 99(@entryPointOutput) 143
|
||||
90: 6 Load 43(g_tInputTexture_sampler)
|
||||
91: 8 Load 47(g_tInputTexture)
|
||||
111: 31 SampledImage 91 90
|
||||
112: 11(fvec4) ImageSampleExplicitLod 111 36 Lod 37
|
||||
115: 6 Load 43(g_tInputTexture_sampler)
|
||||
117: 8 Load 47(g_tInputTexture)
|
||||
125: 31 SampledImage 117 115
|
||||
126: 11(fvec4) ImageSampleExplicitLod 125 36 Lod 37
|
||||
99: 11(fvec4) FAdd 112 126
|
||||
132: 31 SampledImage 91 90
|
||||
133: 11(fvec4) ImageSampleExplicitLod 132 36 Lod 37
|
||||
104: 11(fvec4) FAdd 99 133
|
||||
Store 80(@entryPointOutput) 104
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue