HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -130,10 +130,20 @@ gl_FragCoord origin is upper left
|
||||
0:64 1 (const int)
|
||||
0:64 Constant:
|
||||
0:64 1.000000
|
||||
0:66 Sequence
|
||||
0:66 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:66 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:66 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:66 Constant:
|
||||
0:66 0 (const int)
|
||||
0:66 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:66 Depth: direct index for structure (temp float FragDepth)
|
||||
0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:66 Constant:
|
||||
0:66 1 (const int)
|
||||
0:66 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -296,10 +306,20 @@ gl_FragCoord origin is upper left
|
||||
0:64 1 (const int)
|
||||
0:64 Constant:
|
||||
0:64 1.000000
|
||||
0:66 Sequence
|
||||
0:66 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:66 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:66 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:66 Constant:
|
||||
0:66 0 (const int)
|
||||
0:66 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:66 Depth: direct index for structure (temp float FragDepth)
|
||||
0:66 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:66 Constant:
|
||||
0:66 1 (const int)
|
||||
0:66 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -329,14 +349,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 162
|
||||
// Id's are bound by 163
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 110 159 161
|
||||
EntryPoint Fragment 4 "main" 110 114
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r11"
|
||||
@@ -356,24 +376,23 @@ gl_FragCoord origin is upper left
|
||||
MemberName 99(PS_OUTPUT) 0 "Color"
|
||||
MemberName 99(PS_OUTPUT) 1 "Depth"
|
||||
Name 101 "psout"
|
||||
Name 110 "@entryPointOutput"
|
||||
Name 115 "g_tTex1df4"
|
||||
Name 118 "g_tTex1di4"
|
||||
Name 121 "g_tTex1du4"
|
||||
Name 124 "g_tTex2df4"
|
||||
Name 127 "g_tTex2di4"
|
||||
Name 130 "g_tTex2du4"
|
||||
Name 133 "g_tTex3df4"
|
||||
Name 136 "g_tTex3di4"
|
||||
Name 139 "g_tTex3du4"
|
||||
Name 142 "g_tTexcdf4"
|
||||
Name 145 "g_tTexcdi4"
|
||||
Name 148 "g_tTexcdu4"
|
||||
Name 151 "g_tTexcdf4a"
|
||||
Name 154 "g_tTexcdi4a"
|
||||
Name 157 "g_tTexcdu4a"
|
||||
Name 159 "Color"
|
||||
Name 161 "Depth"
|
||||
Name 110 "Color"
|
||||
Name 114 "Depth"
|
||||
Name 120 "g_tTex1df4"
|
||||
Name 123 "g_tTex1di4"
|
||||
Name 126 "g_tTex1du4"
|
||||
Name 129 "g_tTex2df4"
|
||||
Name 132 "g_tTex2di4"
|
||||
Name 135 "g_tTex2du4"
|
||||
Name 138 "g_tTex3df4"
|
||||
Name 141 "g_tTex3di4"
|
||||
Name 144 "g_tTex3du4"
|
||||
Name 147 "g_tTexcdf4"
|
||||
Name 150 "g_tTexcdi4"
|
||||
Name 153 "g_tTexcdu4"
|
||||
Name 156 "g_tTexcdf4a"
|
||||
Name 159 "g_tTexcdi4a"
|
||||
Name 162 "g_tTexcdu4a"
|
||||
Decorate 11(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) Binding 0
|
||||
@@ -383,24 +402,24 @@ gl_FragCoord origin is upper left
|
||||
Decorate 77(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 89(g_tTex2du4a) DescriptorSet 0
|
||||
MemberDecorate 99(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 115(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 115(g_tTex1df4) Binding 0
|
||||
Decorate 118(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 121(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 124(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 127(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 130(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 133(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 136(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 139(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 142(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 145(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 148(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 151(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 154(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 157(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 159(Color) Location 0
|
||||
Decorate 161(Depth) BuiltIn FragDepth
|
||||
Decorate 110(Color) Location 0
|
||||
Decorate 114(Depth) BuiltIn FragDepth
|
||||
Decorate 120(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 120(g_tTex1df4) Binding 0
|
||||
Decorate 123(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 126(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 129(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 132(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 135(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 138(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 141(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 144(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 147(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 150(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 153(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 156(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 159(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 162(g_tTexcdu4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -461,57 +480,55 @@ gl_FragCoord origin is upper left
|
||||
104: 98(fvec4) ConstantComposite 103 103 103 103
|
||||
105: TypePointer Function 98(fvec4)
|
||||
107: 27(int) Constant 1
|
||||
109: TypePointer Output 99(PS_OUTPUT)
|
||||
110(@entryPointOutput): 109(ptr) Variable Output
|
||||
113: TypeImage 6(float) 1D sampled format:Unknown
|
||||
114: TypePointer UniformConstant 113
|
||||
115(g_tTex1df4): 114(ptr) Variable UniformConstant
|
||||
116: TypeImage 27(int) 1D sampled format:Unknown
|
||||
117: TypePointer UniformConstant 116
|
||||
118(g_tTex1di4): 117(ptr) Variable UniformConstant
|
||||
119: TypeImage 44(int) 1D sampled format:Unknown
|
||||
120: TypePointer UniformConstant 119
|
||||
121(g_tTex1du4): 120(ptr) Variable UniformConstant
|
||||
122: TypeImage 6(float) 2D sampled format:Unknown
|
||||
123: TypePointer UniformConstant 122
|
||||
124(g_tTex2df4): 123(ptr) Variable UniformConstant
|
||||
125: TypeImage 27(int) 2D sampled format:Unknown
|
||||
126: TypePointer UniformConstant 125
|
||||
127(g_tTex2di4): 126(ptr) Variable UniformConstant
|
||||
128: TypeImage 44(int) 2D sampled format:Unknown
|
||||
129: TypePointer UniformConstant 128
|
||||
130(g_tTex2du4): 129(ptr) Variable UniformConstant
|
||||
131: TypeImage 6(float) 3D sampled format:Unknown
|
||||
132: TypePointer UniformConstant 131
|
||||
133(g_tTex3df4): 132(ptr) Variable UniformConstant
|
||||
134: TypeImage 27(int) 3D sampled format:Unknown
|
||||
135: TypePointer UniformConstant 134
|
||||
136(g_tTex3di4): 135(ptr) Variable UniformConstant
|
||||
137: TypeImage 44(int) 3D sampled format:Unknown
|
||||
138: TypePointer UniformConstant 137
|
||||
139(g_tTex3du4): 138(ptr) Variable UniformConstant
|
||||
140: TypeImage 6(float) Cube sampled format:Unknown
|
||||
141: TypePointer UniformConstant 140
|
||||
142(g_tTexcdf4): 141(ptr) Variable UniformConstant
|
||||
143: TypeImage 27(int) Cube sampled format:Unknown
|
||||
144: TypePointer UniformConstant 143
|
||||
145(g_tTexcdi4): 144(ptr) Variable UniformConstant
|
||||
146: TypeImage 44(int) Cube sampled format:Unknown
|
||||
147: TypePointer UniformConstant 146
|
||||
148(g_tTexcdu4): 147(ptr) Variable UniformConstant
|
||||
149: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
150: TypePointer UniformConstant 149
|
||||
151(g_tTexcdf4a): 150(ptr) Variable UniformConstant
|
||||
152: TypeImage 27(int) Cube array sampled format:Unknown
|
||||
153: TypePointer UniformConstant 152
|
||||
154(g_tTexcdi4a): 153(ptr) Variable UniformConstant
|
||||
155: TypeImage 44(int) Cube array sampled format:Unknown
|
||||
156: TypePointer UniformConstant 155
|
||||
157(g_tTexcdu4a): 156(ptr) Variable UniformConstant
|
||||
158: TypePointer Output 98(fvec4)
|
||||
159(Color): 158(ptr) Variable Output
|
||||
160: TypePointer Output 6(float)
|
||||
161(Depth): 160(ptr) Variable Output
|
||||
109: TypePointer Output 98(fvec4)
|
||||
110(Color): 109(ptr) Variable Output
|
||||
113: TypePointer Output 6(float)
|
||||
114(Depth): 113(ptr) Variable Output
|
||||
118: TypeImage 6(float) 1D sampled format:Unknown
|
||||
119: TypePointer UniformConstant 118
|
||||
120(g_tTex1df4): 119(ptr) Variable UniformConstant
|
||||
121: TypeImage 27(int) 1D sampled format:Unknown
|
||||
122: TypePointer UniformConstant 121
|
||||
123(g_tTex1di4): 122(ptr) Variable UniformConstant
|
||||
124: TypeImage 44(int) 1D sampled format:Unknown
|
||||
125: TypePointer UniformConstant 124
|
||||
126(g_tTex1du4): 125(ptr) Variable UniformConstant
|
||||
127: TypeImage 6(float) 2D sampled format:Unknown
|
||||
128: TypePointer UniformConstant 127
|
||||
129(g_tTex2df4): 128(ptr) Variable UniformConstant
|
||||
130: TypeImage 27(int) 2D sampled format:Unknown
|
||||
131: TypePointer UniformConstant 130
|
||||
132(g_tTex2di4): 131(ptr) Variable UniformConstant
|
||||
133: TypeImage 44(int) 2D sampled format:Unknown
|
||||
134: TypePointer UniformConstant 133
|
||||
135(g_tTex2du4): 134(ptr) Variable UniformConstant
|
||||
136: TypeImage 6(float) 3D sampled format:Unknown
|
||||
137: TypePointer UniformConstant 136
|
||||
138(g_tTex3df4): 137(ptr) Variable UniformConstant
|
||||
139: TypeImage 27(int) 3D sampled format:Unknown
|
||||
140: TypePointer UniformConstant 139
|
||||
141(g_tTex3di4): 140(ptr) Variable UniformConstant
|
||||
142: TypeImage 44(int) 3D sampled format:Unknown
|
||||
143: TypePointer UniformConstant 142
|
||||
144(g_tTex3du4): 143(ptr) Variable UniformConstant
|
||||
145: TypeImage 6(float) Cube sampled format:Unknown
|
||||
146: TypePointer UniformConstant 145
|
||||
147(g_tTexcdf4): 146(ptr) Variable UniformConstant
|
||||
148: TypeImage 27(int) Cube sampled format:Unknown
|
||||
149: TypePointer UniformConstant 148
|
||||
150(g_tTexcdi4): 149(ptr) Variable UniformConstant
|
||||
151: TypeImage 44(int) Cube sampled format:Unknown
|
||||
152: TypePointer UniformConstant 151
|
||||
153(g_tTexcdu4): 152(ptr) Variable UniformConstant
|
||||
154: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
155: TypePointer UniformConstant 154
|
||||
156(g_tTexcdf4a): 155(ptr) Variable UniformConstant
|
||||
157: TypeImage 27(int) Cube array sampled format:Unknown
|
||||
158: TypePointer UniformConstant 157
|
||||
159(g_tTexcdi4a): 158(ptr) Variable UniformConstant
|
||||
160: TypeImage 44(int) Cube array sampled format:Unknown
|
||||
161: TypePointer UniformConstant 160
|
||||
162(g_tTexcdu4a): 161(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r11): 7(ptr) Variable Function
|
||||
@@ -567,7 +584,11 @@ gl_FragCoord origin is upper left
|
||||
Store 106 104
|
||||
108: 7(ptr) AccessChain 101(psout) 107
|
||||
Store 108 103
|
||||
111:99(PS_OUTPUT) Load 101(psout)
|
||||
Store 110(@entryPointOutput) 111
|
||||
111: 105(ptr) AccessChain 101(psout) 102
|
||||
112: 98(fvec4) Load 111
|
||||
Store 110(Color) 112
|
||||
115: 7(ptr) AccessChain 101(psout) 107
|
||||
116: 6(float) Load 115
|
||||
Store 114(Depth) 116
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user