HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -118,10 +118,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)
|
||||
@@ -272,10 +282,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)
|
||||
@@ -305,14 +325,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 161
|
||||
// Id's are bound by 162
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 109 158 160
|
||||
EntryPoint Fragment 4 "main" 109 113
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r11"
|
||||
@@ -332,24 +352,23 @@ gl_FragCoord origin is upper left
|
||||
MemberName 98(PS_OUTPUT) 0 "Color"
|
||||
MemberName 98(PS_OUTPUT) 1 "Depth"
|
||||
Name 100 "psout"
|
||||
Name 109 "@entryPointOutput"
|
||||
Name 114 "g_tTex1df4"
|
||||
Name 117 "g_tTex1di4"
|
||||
Name 120 "g_tTex1du4"
|
||||
Name 123 "g_tTex2df4"
|
||||
Name 126 "g_tTex2di4"
|
||||
Name 129 "g_tTex2du4"
|
||||
Name 132 "g_tTex3df4"
|
||||
Name 135 "g_tTex3di4"
|
||||
Name 138 "g_tTex3du4"
|
||||
Name 141 "g_tTexcdf4"
|
||||
Name 144 "g_tTexcdi4"
|
||||
Name 147 "g_tTexcdu4"
|
||||
Name 150 "g_tTexcdf4a"
|
||||
Name 153 "g_tTexcdi4a"
|
||||
Name 156 "g_tTexcdu4a"
|
||||
Name 158 "Color"
|
||||
Name 160 "Depth"
|
||||
Name 109 "Color"
|
||||
Name 113 "Depth"
|
||||
Name 119 "g_tTex1df4"
|
||||
Name 122 "g_tTex1di4"
|
||||
Name 125 "g_tTex1du4"
|
||||
Name 128 "g_tTex2df4"
|
||||
Name 131 "g_tTex2di4"
|
||||
Name 134 "g_tTex2du4"
|
||||
Name 137 "g_tTex3df4"
|
||||
Name 140 "g_tTex3di4"
|
||||
Name 143 "g_tTex3du4"
|
||||
Name 146 "g_tTexcdf4"
|
||||
Name 149 "g_tTexcdi4"
|
||||
Name 152 "g_tTexcdu4"
|
||||
Name 155 "g_tTexcdf4a"
|
||||
Name 158 "g_tTexcdi4a"
|
||||
Name 161 "g_tTexcdu4a"
|
||||
Decorate 11(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) Binding 0
|
||||
@@ -359,24 +378,24 @@ gl_FragCoord origin is upper left
|
||||
Decorate 76(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 88(g_tTex2du4a) DescriptorSet 0
|
||||
MemberDecorate 98(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 114(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 114(g_tTex1df4) Binding 0
|
||||
Decorate 117(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 120(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 123(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 126(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 129(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 132(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 135(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 138(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 141(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 144(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 147(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 150(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 153(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 156(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 158(Color) Location 0
|
||||
Decorate 160(Depth) BuiltIn FragDepth
|
||||
Decorate 109(Color) Location 0
|
||||
Decorate 113(Depth) BuiltIn FragDepth
|
||||
Decorate 119(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 119(g_tTex1df4) Binding 0
|
||||
Decorate 122(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 125(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 128(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 131(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 134(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 137(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 140(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 143(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 146(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 149(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 152(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 155(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 158(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 161(g_tTexcdu4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -436,57 +455,55 @@ gl_FragCoord origin is upper left
|
||||
103: 97(fvec4) ConstantComposite 102 102 102 102
|
||||
104: TypePointer Function 97(fvec4)
|
||||
106: 26(int) Constant 1
|
||||
108: TypePointer Output 98(PS_OUTPUT)
|
||||
109(@entryPointOutput): 108(ptr) Variable Output
|
||||
112: TypeImage 6(float) 1D sampled format:Unknown
|
||||
113: TypePointer UniformConstant 112
|
||||
114(g_tTex1df4): 113(ptr) Variable UniformConstant
|
||||
115: TypeImage 26(int) 1D sampled format:Unknown
|
||||
116: TypePointer UniformConstant 115
|
||||
117(g_tTex1di4): 116(ptr) Variable UniformConstant
|
||||
118: TypeImage 43(int) 1D sampled format:Unknown
|
||||
119: TypePointer UniformConstant 118
|
||||
120(g_tTex1du4): 119(ptr) Variable UniformConstant
|
||||
121: TypeImage 6(float) 2D sampled format:Unknown
|
||||
122: TypePointer UniformConstant 121
|
||||
123(g_tTex2df4): 122(ptr) Variable UniformConstant
|
||||
124: TypeImage 26(int) 2D sampled format:Unknown
|
||||
125: TypePointer UniformConstant 124
|
||||
126(g_tTex2di4): 125(ptr) Variable UniformConstant
|
||||
127: TypeImage 43(int) 2D sampled format:Unknown
|
||||
128: TypePointer UniformConstant 127
|
||||
129(g_tTex2du4): 128(ptr) Variable UniformConstant
|
||||
130: TypeImage 6(float) 3D sampled format:Unknown
|
||||
131: TypePointer UniformConstant 130
|
||||
132(g_tTex3df4): 131(ptr) Variable UniformConstant
|
||||
133: TypeImage 26(int) 3D sampled format:Unknown
|
||||
134: TypePointer UniformConstant 133
|
||||
135(g_tTex3di4): 134(ptr) Variable UniformConstant
|
||||
136: TypeImage 43(int) 3D sampled format:Unknown
|
||||
137: TypePointer UniformConstant 136
|
||||
138(g_tTex3du4): 137(ptr) Variable UniformConstant
|
||||
139: TypeImage 6(float) Cube sampled format:Unknown
|
||||
140: TypePointer UniformConstant 139
|
||||
141(g_tTexcdf4): 140(ptr) Variable UniformConstant
|
||||
142: TypeImage 26(int) Cube sampled format:Unknown
|
||||
143: TypePointer UniformConstant 142
|
||||
144(g_tTexcdi4): 143(ptr) Variable UniformConstant
|
||||
145: TypeImage 43(int) Cube sampled format:Unknown
|
||||
146: TypePointer UniformConstant 145
|
||||
147(g_tTexcdu4): 146(ptr) Variable UniformConstant
|
||||
148: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
149: TypePointer UniformConstant 148
|
||||
150(g_tTexcdf4a): 149(ptr) Variable UniformConstant
|
||||
151: TypeImage 26(int) Cube array sampled format:Unknown
|
||||
152: TypePointer UniformConstant 151
|
||||
153(g_tTexcdi4a): 152(ptr) Variable UniformConstant
|
||||
154: TypeImage 43(int) Cube array sampled format:Unknown
|
||||
155: TypePointer UniformConstant 154
|
||||
156(g_tTexcdu4a): 155(ptr) Variable UniformConstant
|
||||
157: TypePointer Output 97(fvec4)
|
||||
158(Color): 157(ptr) Variable Output
|
||||
159: TypePointer Output 6(float)
|
||||
160(Depth): 159(ptr) Variable Output
|
||||
108: TypePointer Output 97(fvec4)
|
||||
109(Color): 108(ptr) Variable Output
|
||||
112: TypePointer Output 6(float)
|
||||
113(Depth): 112(ptr) Variable Output
|
||||
117: TypeImage 6(float) 1D sampled format:Unknown
|
||||
118: TypePointer UniformConstant 117
|
||||
119(g_tTex1df4): 118(ptr) Variable UniformConstant
|
||||
120: TypeImage 26(int) 1D sampled format:Unknown
|
||||
121: TypePointer UniformConstant 120
|
||||
122(g_tTex1di4): 121(ptr) Variable UniformConstant
|
||||
123: TypeImage 43(int) 1D sampled format:Unknown
|
||||
124: TypePointer UniformConstant 123
|
||||
125(g_tTex1du4): 124(ptr) Variable UniformConstant
|
||||
126: TypeImage 6(float) 2D sampled format:Unknown
|
||||
127: TypePointer UniformConstant 126
|
||||
128(g_tTex2df4): 127(ptr) Variable UniformConstant
|
||||
129: TypeImage 26(int) 2D sampled format:Unknown
|
||||
130: TypePointer UniformConstant 129
|
||||
131(g_tTex2di4): 130(ptr) Variable UniformConstant
|
||||
132: TypeImage 43(int) 2D sampled format:Unknown
|
||||
133: TypePointer UniformConstant 132
|
||||
134(g_tTex2du4): 133(ptr) Variable UniformConstant
|
||||
135: TypeImage 6(float) 3D sampled format:Unknown
|
||||
136: TypePointer UniformConstant 135
|
||||
137(g_tTex3df4): 136(ptr) Variable UniformConstant
|
||||
138: TypeImage 26(int) 3D sampled format:Unknown
|
||||
139: TypePointer UniformConstant 138
|
||||
140(g_tTex3di4): 139(ptr) Variable UniformConstant
|
||||
141: TypeImage 43(int) 3D sampled format:Unknown
|
||||
142: TypePointer UniformConstant 141
|
||||
143(g_tTex3du4): 142(ptr) Variable UniformConstant
|
||||
144: TypeImage 6(float) Cube sampled format:Unknown
|
||||
145: TypePointer UniformConstant 144
|
||||
146(g_tTexcdf4): 145(ptr) Variable UniformConstant
|
||||
147: TypeImage 26(int) Cube sampled format:Unknown
|
||||
148: TypePointer UniformConstant 147
|
||||
149(g_tTexcdi4): 148(ptr) Variable UniformConstant
|
||||
150: TypeImage 43(int) Cube sampled format:Unknown
|
||||
151: TypePointer UniformConstant 150
|
||||
152(g_tTexcdu4): 151(ptr) Variable UniformConstant
|
||||
153: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
154: TypePointer UniformConstant 153
|
||||
155(g_tTexcdf4a): 154(ptr) Variable UniformConstant
|
||||
156: TypeImage 26(int) Cube array sampled format:Unknown
|
||||
157: TypePointer UniformConstant 156
|
||||
158(g_tTexcdi4a): 157(ptr) Variable UniformConstant
|
||||
159: TypeImage 43(int) Cube array sampled format:Unknown
|
||||
160: TypePointer UniformConstant 159
|
||||
161(g_tTexcdu4a): 160(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r11): 7(ptr) Variable Function
|
||||
@@ -542,7 +559,11 @@ gl_FragCoord origin is upper left
|
||||
Store 105 103
|
||||
107: 7(ptr) AccessChain 100(psout) 106
|
||||
Store 107 102
|
||||
110:98(PS_OUTPUT) Load 100(psout)
|
||||
Store 109(@entryPointOutput) 110
|
||||
110: 104(ptr) AccessChain 100(psout) 101
|
||||
111: 97(fvec4) Load 110
|
||||
Store 109(Color) 111
|
||||
114: 7(ptr) AccessChain 100(psout) 106
|
||||
115: 6(float) Load 114
|
||||
Store 113(Depth) 115
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user