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:
@@ -2,36 +2,48 @@ 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
|
||||
// Id's are bound by 53
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 40 43
|
||||
EntryPoint Fragment 4 "main" 49 52
|
||||
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
|
||||
Name 14 "Nested"
|
||||
MemberName 14(Nested) 0 "y"
|
||||
MemberName 14(Nested) 1 "texNested"
|
||||
Name 15 "A"
|
||||
MemberName 15(A) 0 "n"
|
||||
MemberName 15(A) 1 "x"
|
||||
Name 25 "B"
|
||||
MemberName 25(B) 0 "n"
|
||||
MemberName 25(B) 1 "tex"
|
||||
Name 36 "someTex"
|
||||
Name 49 "vpos"
|
||||
Name 52 "@entryPointOutput"
|
||||
Decorate 36(someTex) DescriptorSet 0
|
||||
Decorate 49(vpos) Location 0
|
||||
Decorate 52(@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
|
||||
13: TypeImage 6(float) 2D sampled format:Unknown
|
||||
14(Nested): TypeStruct 6(float) 13
|
||||
15(A): TypeStruct 14(Nested) 6(float)
|
||||
25(B): TypeStruct 14(Nested) 13
|
||||
35: TypePointer UniformConstant 13
|
||||
36(someTex): 35(ptr) Variable UniformConstant
|
||||
43: 6(float) Constant 0
|
||||
44: 7(fvec4) ConstantComposite 43 43 43 43
|
||||
48: TypePointer Input 7(fvec4)
|
||||
49(vpos): 48(ptr) Variable Input
|
||||
51: TypePointer Output 7(fvec4)
|
||||
52(@entryPointOutput): 51(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 43(@entryPointOutput) 35
|
||||
Store 52(@entryPointOutput) 44
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user