HLSL: Flatten structs for all non-arrayed I/O interfaces.
This commit is contained in:
@@ -125,15 +125,24 @@ Shader version: 500
|
||||
0:? 'd' ( temp 4-component vector of float)
|
||||
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:? 'e' ( temp 4-component vector of float)
|
||||
0:8 move second child to first child ( temp 2-element array of 4-component vector of float)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
|
||||
0:8 direct index ( temp 4-component vector of float)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
|
||||
0:8 direct index ( temp 4-component vector of float)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 1 (const int)
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput.coord' ( out 4-component vector of float Position)
|
||||
0:8 coord: direct index for structure ( temp 4-component vector of float)
|
||||
@@ -141,17 +150,16 @@ Shader version: 500
|
||||
0:8 Constant:
|
||||
0:8 1 (const int)
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:8 b: direct index for structure ( smooth temp 4-component vector of float)
|
||||
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 1 (const int)
|
||||
0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
|
||||
0:8 b: direct index for structure ( temp 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 2 (const int)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput.coord' ( out 4-component vector of float Position)
|
||||
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
|
||||
0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
|
||||
0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
|
||||
0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
|
||||
0:? 'd' (layout( location=0) in 4-component vector of float)
|
||||
0:? 'vi.m[0]' (layout( location=1) in 4-component vector of float)
|
||||
0:? 'vi.m[1]' (layout( location=2) in 4-component vector of float)
|
||||
@@ -289,15 +297,24 @@ Shader version: 500
|
||||
0:? 'd' ( temp 4-component vector of float)
|
||||
0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:? 'e' ( temp 4-component vector of float)
|
||||
0:8 move second child to first child ( temp 2-element array of 4-component vector of float)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
|
||||
0:8 direct index ( temp 4-component vector of float)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
|
||||
0:8 direct index ( temp 4-component vector of float)
|
||||
0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 1 (const int)
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput.coord' ( out 4-component vector of float Position)
|
||||
0:8 coord: direct index for structure ( temp 4-component vector of float)
|
||||
@@ -305,17 +322,16 @@ Shader version: 500
|
||||
0:8 Constant:
|
||||
0:8 1 (const int)
|
||||
0:8 move second child to first child ( temp 4-component vector of float)
|
||||
0:8 b: direct index for structure ( smooth temp 4-component vector of float)
|
||||
0:8 '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 1 (const int)
|
||||
0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
|
||||
0:8 b: direct index for structure ( temp 4-component vector of float)
|
||||
0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b})
|
||||
0:8 Constant:
|
||||
0:8 2 (const int)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput.coord' ( out 4-component vector of float Position)
|
||||
0:? '@entryPointOutput' (layout( location=0) out structure{ temp 2-element array of 4-component vector of float m, smooth temp 4-component vector of float b})
|
||||
0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float)
|
||||
0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float)
|
||||
0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float)
|
||||
0:? 'd' (layout( location=0) in 4-component vector of float)
|
||||
0:? 'vi.m[0]' (layout( location=1) in 4-component vector of float)
|
||||
0:? 'vi.m[1]' (layout( location=2) in 4-component vector of float)
|
||||
@@ -325,12 +341,12 @@ Shader version: 500
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 96
|
||||
// Id's are bound by 94
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 55 58 61 64 67 71 83 90
|
||||
EntryPoint Vertex 4 "main" 55 58 61 64 67 71 82 85 88 91
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 12 "VI"
|
||||
@@ -355,19 +371,20 @@ Shader version: 500
|
||||
Name 74 "param"
|
||||
Name 76 "param"
|
||||
Name 78 "param"
|
||||
Name 81 "VI"
|
||||
MemberName 81(VI) 0 "m"
|
||||
MemberName 81(VI) 1 "b"
|
||||
Name 83 "@entryPointOutput"
|
||||
Name 90 "@entryPointOutput.coord"
|
||||
Name 82 "@entryPointOutput.m[0]"
|
||||
Name 85 "@entryPointOutput.m[1]"
|
||||
Name 88 "@entryPointOutput.coord"
|
||||
Name 91 "@entryPointOutput.b"
|
||||
Decorate 55(d) Location 0
|
||||
Decorate 58(vi.m[0]) Location 1
|
||||
Decorate 61(vi.m[1]) Location 2
|
||||
Decorate 64(vi.coord) Location 3
|
||||
Decorate 67(vi.b) Location 4
|
||||
Decorate 71(e) Location 5
|
||||
Decorate 83(@entryPointOutput) Location 0
|
||||
Decorate 90(@entryPointOutput.coord) BuiltIn Position
|
||||
Decorate 82(@entryPointOutput.m[0]) Location 0
|
||||
Decorate 85(@entryPointOutput.m[1]) Location 1
|
||||
Decorate 88(@entryPointOutput.coord) BuiltIn Position
|
||||
Decorate 91(@entryPointOutput.b) Location 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -398,13 +415,11 @@ Shader version: 500
|
||||
64(vi.coord): 54(ptr) Variable Input
|
||||
67(vi.b): 54(ptr) Variable Input
|
||||
71(e): 54(ptr) Variable Input
|
||||
81(VI): TypeStruct 11 7(fvec4)
|
||||
82: TypePointer Output 81(VI)
|
||||
83(@entryPointOutput): 82(ptr) Variable Output
|
||||
84: TypePointer Function 11
|
||||
87: TypePointer Output 11
|
||||
89: TypePointer Output 7(fvec4)
|
||||
90(@entryPointOutput.coord): 89(ptr) Variable Output
|
||||
81: TypePointer Output 7(fvec4)
|
||||
82(@entryPointOutput.m[0]): 81(ptr) Variable Output
|
||||
85(@entryPointOutput.m[1]): 81(ptr) Variable Output
|
||||
88(@entryPointOutput.coord): 81(ptr) Variable Output
|
||||
91(@entryPointOutput.b): 81(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
53(d): 8(ptr) Variable Function
|
||||
@@ -438,17 +453,18 @@ Shader version: 500
|
||||
Store 78(param) 79
|
||||
80: 12(VI) FunctionCall 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;) 74(param) 76(param) 78(param)
|
||||
Store 73(flattenTemp) 80
|
||||
85: 84(ptr) AccessChain 73(flattenTemp) 23
|
||||
86: 11 Load 85
|
||||
88: 87(ptr) AccessChain 83(@entryPointOutput) 23
|
||||
Store 88 86
|
||||
91: 8(ptr) AccessChain 73(flattenTemp) 24
|
||||
92: 7(fvec4) Load 91
|
||||
Store 90(@entryPointOutput.coord) 92
|
||||
93: 8(ptr) AccessChain 73(flattenTemp) 22
|
||||
94: 7(fvec4) Load 93
|
||||
95: 89(ptr) AccessChain 83(@entryPointOutput) 24
|
||||
Store 95 94
|
||||
83: 8(ptr) AccessChain 73(flattenTemp) 23 23
|
||||
84: 7(fvec4) Load 83
|
||||
Store 82(@entryPointOutput.m[0]) 84
|
||||
86: 8(ptr) AccessChain 73(flattenTemp) 23 24
|
||||
87: 7(fvec4) Load 86
|
||||
Store 85(@entryPointOutput.m[1]) 87
|
||||
89: 8(ptr) AccessChain 73(flattenTemp) 24
|
||||
90: 7(fvec4) Load 89
|
||||
Store 88(@entryPointOutput.coord) 90
|
||||
92: 8(ptr) AccessChain 73(flattenTemp) 22
|
||||
93: 7(fvec4) Load 92
|
||||
Store 91(@entryPointOutput.b) 93
|
||||
Return
|
||||
FunctionEnd
|
||||
18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;): 12(VI) Function None 14
|
||||
|
||||
Reference in New Issue
Block a user