Generate vector constructions more efficiently when sizes match
When two vectors are the same size, there is no need to extract the components and construct a new vector.
This commit is contained in:
parent
2d8b71fc63
commit
33d517470e
13 changed files with 1777 additions and 1867 deletions
|
|
@ -400,14 +400,14 @@ using depth_any
|
|||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 209
|
||||
// Id's are bound by 194
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 166 170
|
||||
EntryPoint Fragment 4 "main" 151 155
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
ExecutionMode 4 DepthReplacing
|
||||
Source HLSL 500
|
||||
|
|
@ -431,26 +431,26 @@ Validation failed
|
|||
Name 96 "g_tTex2du4a"
|
||||
Name 107 "r60"
|
||||
Name 110 "g_tTexcdf4a"
|
||||
Name 123 "r62"
|
||||
Name 126 "g_tTexcdi4a"
|
||||
Name 137 "r64"
|
||||
Name 140 "g_tTexcdu4a"
|
||||
Name 152 "psout"
|
||||
Name 163 "flattenTemp"
|
||||
Name 166 "@entryPointOutput.Color"
|
||||
Name 170 "@entryPointOutput.Depth"
|
||||
Name 175 "g_tTex1df4"
|
||||
Name 178 "g_tTex1di4"
|
||||
Name 181 "g_tTex1du4"
|
||||
Name 184 "g_tTex2df4"
|
||||
Name 187 "g_tTex2di4"
|
||||
Name 190 "g_tTex2du4"
|
||||
Name 193 "g_tTex3df4"
|
||||
Name 196 "g_tTex3di4"
|
||||
Name 199 "g_tTex3du4"
|
||||
Name 202 "g_tTexcdf4"
|
||||
Name 205 "g_tTexcdi4"
|
||||
Name 208 "g_tTexcdu4"
|
||||
Name 118 "r62"
|
||||
Name 121 "g_tTexcdi4a"
|
||||
Name 127 "r64"
|
||||
Name 130 "g_tTexcdu4a"
|
||||
Name 137 "psout"
|
||||
Name 148 "flattenTemp"
|
||||
Name 151 "@entryPointOutput.Color"
|
||||
Name 155 "@entryPointOutput.Depth"
|
||||
Name 160 "g_tTex1df4"
|
||||
Name 163 "g_tTex1di4"
|
||||
Name 166 "g_tTex1du4"
|
||||
Name 169 "g_tTex2df4"
|
||||
Name 172 "g_tTex2di4"
|
||||
Name 175 "g_tTex2du4"
|
||||
Name 178 "g_tTex3df4"
|
||||
Name 181 "g_tTex3di4"
|
||||
Name 184 "g_tTex3du4"
|
||||
Name 187 "g_tTexcdf4"
|
||||
Name 190 "g_tTexcdi4"
|
||||
Name 193 "g_tTexcdu4"
|
||||
Decorate 16(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 16(g_tTex1df4a) Binding 1
|
||||
Decorate 20(g_sSamp) DescriptorSet 0
|
||||
|
|
@ -467,36 +467,36 @@ Validation failed
|
|||
Decorate 96(g_tTex2du4a) Binding 6
|
||||
Decorate 110(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 110(g_tTexcdf4a) Binding 7
|
||||
Decorate 126(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 126(g_tTexcdi4a) Binding 8
|
||||
Decorate 140(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 140(g_tTexcdu4a) Binding 9
|
||||
Decorate 166(@entryPointOutput.Color) Location 0
|
||||
Decorate 170(@entryPointOutput.Depth) BuiltIn FragDepth
|
||||
Decorate 175(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 175(g_tTex1df4) Binding 0
|
||||
Decorate 178(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 178(g_tTex1di4) Binding 0
|
||||
Decorate 181(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 181(g_tTex1du4) Binding 0
|
||||
Decorate 184(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 184(g_tTex2df4) Binding 0
|
||||
Decorate 187(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 187(g_tTex2di4) Binding 0
|
||||
Decorate 190(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 190(g_tTex2du4) Binding 0
|
||||
Decorate 193(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 193(g_tTex3df4) Binding 0
|
||||
Decorate 196(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 196(g_tTex3di4) Binding 0
|
||||
Decorate 199(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 199(g_tTex3du4) Binding 0
|
||||
Decorate 202(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 202(g_tTexcdf4) Binding 0
|
||||
Decorate 205(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 205(g_tTexcdi4) Binding 0
|
||||
Decorate 208(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 208(g_tTexcdu4) Binding 0
|
||||
Decorate 121(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 121(g_tTexcdi4a) Binding 8
|
||||
Decorate 130(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 130(g_tTexcdu4a) Binding 9
|
||||
Decorate 151(@entryPointOutput.Color) Location 0
|
||||
Decorate 155(@entryPointOutput.Depth) BuiltIn FragDepth
|
||||
Decorate 160(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 160(g_tTex1df4) Binding 0
|
||||
Decorate 163(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 163(g_tTex1di4) Binding 0
|
||||
Decorate 166(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 166(g_tTex1du4) Binding 0
|
||||
Decorate 169(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 169(g_tTex2df4) Binding 0
|
||||
Decorate 172(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 172(g_tTex2di4) Binding 0
|
||||
Decorate 175(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 175(g_tTex2du4) Binding 0
|
||||
Decorate 178(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 178(g_tTex3df4) Binding 0
|
||||
Decorate 181(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 181(g_tTex3di4) Binding 0
|
||||
Decorate 184(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 184(g_tTex3du4) Binding 0
|
||||
Decorate 187(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 187(g_tTexcdf4) Binding 0
|
||||
Decorate 190(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 190(g_tTexcdi4) Binding 0
|
||||
Decorate 193(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 193(g_tTexcdu4) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -547,71 +547,71 @@ Validation failed
|
|||
113: TypeSampledImage 108
|
||||
115: 6(float) Constant 1053609165
|
||||
116: 7(fvec4) ConstantComposite 25 26 71 115
|
||||
124: TypeImage 36(int) Cube depth array sampled format:Unknown
|
||||
125: TypePointer UniformConstant 124
|
||||
126(g_tTexcdi4a): 125(ptr) Variable UniformConstant
|
||||
129: TypeSampledImage 124
|
||||
138: TypeImage 50(int) Cube depth array sampled format:Unknown
|
||||
139: TypePointer UniformConstant 138
|
||||
140(g_tTexcdu4a): 139(ptr) Variable UniformConstant
|
||||
143: TypeSampledImage 138
|
||||
151: TypePointer Function 8(PS_OUTPUT)
|
||||
153: 36(int) Constant 0
|
||||
154: 6(float) Constant 1065353216
|
||||
155: 7(fvec4) ConstantComposite 154 154 154 154
|
||||
156: TypePointer Function 7(fvec4)
|
||||
158: 36(int) Constant 1
|
||||
165: TypePointer Output 7(fvec4)
|
||||
166(@entryPointOutput.Color): 165(ptr) Variable Output
|
||||
169: TypePointer Output 6(float)
|
||||
170(@entryPointOutput.Depth): 169(ptr) Variable Output
|
||||
173: TypeImage 6(float) 1D sampled format:Unknown
|
||||
119: TypeImage 36(int) Cube depth array sampled format:Unknown
|
||||
120: TypePointer UniformConstant 119
|
||||
121(g_tTexcdi4a): 120(ptr) Variable UniformConstant
|
||||
124: TypeSampledImage 119
|
||||
128: TypeImage 50(int) Cube depth array sampled format:Unknown
|
||||
129: TypePointer UniformConstant 128
|
||||
130(g_tTexcdu4a): 129(ptr) Variable UniformConstant
|
||||
133: TypeSampledImage 128
|
||||
136: TypePointer Function 8(PS_OUTPUT)
|
||||
138: 36(int) Constant 0
|
||||
139: 6(float) Constant 1065353216
|
||||
140: 7(fvec4) ConstantComposite 139 139 139 139
|
||||
141: TypePointer Function 7(fvec4)
|
||||
143: 36(int) Constant 1
|
||||
150: TypePointer Output 7(fvec4)
|
||||
151(@entryPointOutput.Color): 150(ptr) Variable Output
|
||||
154: TypePointer Output 6(float)
|
||||
155(@entryPointOutput.Depth): 154(ptr) Variable Output
|
||||
158: TypeImage 6(float) 1D sampled format:Unknown
|
||||
159: TypePointer UniformConstant 158
|
||||
160(g_tTex1df4): 159(ptr) Variable UniformConstant
|
||||
161: TypeImage 36(int) 1D sampled format:Unknown
|
||||
162: TypePointer UniformConstant 161
|
||||
163(g_tTex1di4): 162(ptr) Variable UniformConstant
|
||||
164: TypeImage 50(int) 1D sampled format:Unknown
|
||||
165: TypePointer UniformConstant 164
|
||||
166(g_tTex1du4): 165(ptr) Variable UniformConstant
|
||||
167: TypeImage 6(float) 2D sampled format:Unknown
|
||||
168: TypePointer UniformConstant 167
|
||||
169(g_tTex2df4): 168(ptr) Variable UniformConstant
|
||||
170: TypeImage 36(int) 2D sampled format:Unknown
|
||||
171: TypePointer UniformConstant 170
|
||||
172(g_tTex2di4): 171(ptr) Variable UniformConstant
|
||||
173: TypeImage 50(int) 2D sampled format:Unknown
|
||||
174: TypePointer UniformConstant 173
|
||||
175(g_tTex1df4): 174(ptr) Variable UniformConstant
|
||||
176: TypeImage 36(int) 1D sampled format:Unknown
|
||||
175(g_tTex2du4): 174(ptr) Variable UniformConstant
|
||||
176: TypeImage 6(float) 3D sampled format:Unknown
|
||||
177: TypePointer UniformConstant 176
|
||||
178(g_tTex1di4): 177(ptr) Variable UniformConstant
|
||||
179: TypeImage 50(int) 1D sampled format:Unknown
|
||||
178(g_tTex3df4): 177(ptr) Variable UniformConstant
|
||||
179: TypeImage 36(int) 3D sampled format:Unknown
|
||||
180: TypePointer UniformConstant 179
|
||||
181(g_tTex1du4): 180(ptr) Variable UniformConstant
|
||||
182: TypeImage 6(float) 2D sampled format:Unknown
|
||||
181(g_tTex3di4): 180(ptr) Variable UniformConstant
|
||||
182: TypeImage 50(int) 3D sampled format:Unknown
|
||||
183: TypePointer UniformConstant 182
|
||||
184(g_tTex2df4): 183(ptr) Variable UniformConstant
|
||||
185: TypeImage 36(int) 2D sampled format:Unknown
|
||||
184(g_tTex3du4): 183(ptr) Variable UniformConstant
|
||||
185: TypeImage 6(float) Cube sampled format:Unknown
|
||||
186: TypePointer UniformConstant 185
|
||||
187(g_tTex2di4): 186(ptr) Variable UniformConstant
|
||||
188: TypeImage 50(int) 2D sampled format:Unknown
|
||||
187(g_tTexcdf4): 186(ptr) Variable UniformConstant
|
||||
188: TypeImage 36(int) Cube sampled format:Unknown
|
||||
189: TypePointer UniformConstant 188
|
||||
190(g_tTex2du4): 189(ptr) Variable UniformConstant
|
||||
191: TypeImage 6(float) 3D sampled format:Unknown
|
||||
190(g_tTexcdi4): 189(ptr) Variable UniformConstant
|
||||
191: TypeImage 50(int) Cube sampled format:Unknown
|
||||
192: TypePointer UniformConstant 191
|
||||
193(g_tTex3df4): 192(ptr) Variable UniformConstant
|
||||
194: TypeImage 36(int) 3D sampled format:Unknown
|
||||
195: TypePointer UniformConstant 194
|
||||
196(g_tTex3di4): 195(ptr) Variable UniformConstant
|
||||
197: TypeImage 50(int) 3D sampled format:Unknown
|
||||
198: TypePointer UniformConstant 197
|
||||
199(g_tTex3du4): 198(ptr) Variable UniformConstant
|
||||
200: TypeImage 6(float) Cube sampled format:Unknown
|
||||
201: TypePointer UniformConstant 200
|
||||
202(g_tTexcdf4): 201(ptr) Variable UniformConstant
|
||||
203: TypeImage 36(int) Cube sampled format:Unknown
|
||||
204: TypePointer UniformConstant 203
|
||||
205(g_tTexcdi4): 204(ptr) Variable UniformConstant
|
||||
206: TypeImage 50(int) Cube sampled format:Unknown
|
||||
207: TypePointer UniformConstant 206
|
||||
208(g_tTexcdu4): 207(ptr) Variable UniformConstant
|
||||
193(g_tTexcdu4): 192(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
163(flattenTemp): 151(ptr) Variable Function
|
||||
164:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
Store 163(flattenTemp) 164
|
||||
167: 156(ptr) AccessChain 163(flattenTemp) 153
|
||||
168: 7(fvec4) Load 167
|
||||
Store 166(@entryPointOutput.Color) 168
|
||||
171: 12(ptr) AccessChain 163(flattenTemp) 158
|
||||
172: 6(float) Load 171
|
||||
Store 170(@entryPointOutput.Depth) 172
|
||||
148(flattenTemp): 136(ptr) Variable Function
|
||||
149:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
Store 148(flattenTemp) 149
|
||||
152: 141(ptr) AccessChain 148(flattenTemp) 138
|
||||
153: 7(fvec4) Load 152
|
||||
Store 151(@entryPointOutput.Color) 153
|
||||
156: 12(ptr) AccessChain 148(flattenTemp) 143
|
||||
157: 6(float) Load 156
|
||||
Store 155(@entryPointOutput.Depth) 157
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
|
|
@ -623,9 +623,9 @@ Validation failed
|
|||
79(r32): 12(ptr) Variable Function
|
||||
93(r34): 12(ptr) Variable Function
|
||||
107(r60): 12(ptr) Variable Function
|
||||
123(r62): 12(ptr) Variable Function
|
||||
137(r64): 12(ptr) Variable Function
|
||||
152(psout): 151(ptr) Variable Function
|
||||
118(r62): 12(ptr) Variable Function
|
||||
127(r64): 12(ptr) Variable Function
|
||||
137(psout): 136(ptr) Variable Function
|
||||
17: 14 Load 16(g_tTex1df4a)
|
||||
21: 18 Load 20(g_sSamp)
|
||||
23: 22 SampledImage 17 21
|
||||
|
|
@ -686,37 +686,22 @@ Validation failed
|
|||
111: 108 Load 110(g_tTexcdf4a)
|
||||
112: 18 Load 20(g_sSamp)
|
||||
114: 113 SampledImage 111 112
|
||||
117: 6(float) CompositeExtract 116 0
|
||||
118: 6(float) CompositeExtract 116 1
|
||||
119: 6(float) CompositeExtract 116 2
|
||||
120: 6(float) CompositeExtract 116 3
|
||||
121: 7(fvec4) CompositeConstruct 117 118 119 120
|
||||
122: 6(float) ImageSampleDrefImplicitLod 114 121 28
|
||||
Store 107(r60) 122
|
||||
127: 124 Load 126(g_tTexcdi4a)
|
||||
128: 18 Load 20(g_sSamp)
|
||||
130: 129 SampledImage 127 128
|
||||
131: 6(float) CompositeExtract 116 0
|
||||
132: 6(float) CompositeExtract 116 1
|
||||
133: 6(float) CompositeExtract 116 2
|
||||
134: 6(float) CompositeExtract 116 3
|
||||
135: 7(fvec4) CompositeConstruct 131 132 133 134
|
||||
136: 6(float) ImageSampleDrefImplicitLod 130 135 28
|
||||
Store 123(r62) 136
|
||||
141: 138 Load 140(g_tTexcdu4a)
|
||||
142: 18 Load 20(g_sSamp)
|
||||
144: 143 SampledImage 141 142
|
||||
145: 6(float) CompositeExtract 116 0
|
||||
146: 6(float) CompositeExtract 116 1
|
||||
147: 6(float) CompositeExtract 116 2
|
||||
148: 6(float) CompositeExtract 116 3
|
||||
149: 7(fvec4) CompositeConstruct 145 146 147 148
|
||||
150: 6(float) ImageSampleDrefImplicitLod 144 149 28
|
||||
Store 137(r64) 150
|
||||
157: 156(ptr) AccessChain 152(psout) 153
|
||||
Store 157 155
|
||||
159: 12(ptr) AccessChain 152(psout) 158
|
||||
Store 159 154
|
||||
160:8(PS_OUTPUT) Load 152(psout)
|
||||
ReturnValue 160
|
||||
117: 6(float) ImageSampleDrefImplicitLod 114 116 28
|
||||
Store 107(r60) 117
|
||||
122: 119 Load 121(g_tTexcdi4a)
|
||||
123: 18 Load 20(g_sSamp)
|
||||
125: 124 SampledImage 122 123
|
||||
126: 6(float) ImageSampleDrefImplicitLod 125 116 28
|
||||
Store 118(r62) 126
|
||||
131: 128 Load 130(g_tTexcdu4a)
|
||||
132: 18 Load 20(g_sSamp)
|
||||
134: 133 SampledImage 131 132
|
||||
135: 6(float) ImageSampleDrefImplicitLod 134 116 28
|
||||
Store 127(r64) 135
|
||||
142: 141(ptr) AccessChain 137(psout) 138
|
||||
Store 142 140
|
||||
144: 12(ptr) AccessChain 137(psout) 143
|
||||
Store 144 139
|
||||
145:8(PS_OUTPUT) Load 137(psout)
|
||||
ReturnValue 145
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue