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
|
|
@ -436,14 +436,14 @@ using depth_any
|
|||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 210
|
||||
// Id's are bound by 195
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 167 171
|
||||
EntryPoint Fragment 4 "main" 152 156
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
ExecutionMode 4 DepthReplacing
|
||||
Source HLSL 500
|
||||
|
|
@ -467,26 +467,26 @@ Validation failed
|
|||
Name 97 "g_tTex2du4a"
|
||||
Name 108 "r60"
|
||||
Name 111 "g_tTexcdf4a"
|
||||
Name 124 "r62"
|
||||
Name 127 "g_tTexcdi4a"
|
||||
Name 138 "r64"
|
||||
Name 141 "g_tTexcdu4a"
|
||||
Name 153 "psout"
|
||||
Name 164 "flattenTemp"
|
||||
Name 167 "@entryPointOutput.Color"
|
||||
Name 171 "@entryPointOutput.Depth"
|
||||
Name 176 "g_tTex1df4"
|
||||
Name 179 "g_tTex1di4"
|
||||
Name 182 "g_tTex1du4"
|
||||
Name 185 "g_tTex2df4"
|
||||
Name 188 "g_tTex2di4"
|
||||
Name 191 "g_tTex2du4"
|
||||
Name 194 "g_tTex3df4"
|
||||
Name 197 "g_tTex3di4"
|
||||
Name 200 "g_tTex3du4"
|
||||
Name 203 "g_tTexcdf4"
|
||||
Name 206 "g_tTexcdi4"
|
||||
Name 209 "g_tTexcdu4"
|
||||
Name 119 "r62"
|
||||
Name 122 "g_tTexcdi4a"
|
||||
Name 128 "r64"
|
||||
Name 131 "g_tTexcdu4a"
|
||||
Name 138 "psout"
|
||||
Name 149 "flattenTemp"
|
||||
Name 152 "@entryPointOutput.Color"
|
||||
Name 156 "@entryPointOutput.Depth"
|
||||
Name 161 "g_tTex1df4"
|
||||
Name 164 "g_tTex1di4"
|
||||
Name 167 "g_tTex1du4"
|
||||
Name 170 "g_tTex2df4"
|
||||
Name 173 "g_tTex2di4"
|
||||
Name 176 "g_tTex2du4"
|
||||
Name 179 "g_tTex3df4"
|
||||
Name 182 "g_tTex3di4"
|
||||
Name 185 "g_tTex3du4"
|
||||
Name 188 "g_tTexcdf4"
|
||||
Name 191 "g_tTexcdi4"
|
||||
Name 194 "g_tTexcdu4"
|
||||
Decorate 16(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 16(g_tTex1df4a) Binding 1
|
||||
Decorate 20(g_sSamp) DescriptorSet 0
|
||||
|
|
@ -503,36 +503,36 @@ Validation failed
|
|||
Decorate 97(g_tTex2du4a) Binding 6
|
||||
Decorate 111(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 111(g_tTexcdf4a) Binding 7
|
||||
Decorate 127(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 127(g_tTexcdi4a) Binding 8
|
||||
Decorate 141(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 141(g_tTexcdu4a) Binding 9
|
||||
Decorate 167(@entryPointOutput.Color) Location 0
|
||||
Decorate 171(@entryPointOutput.Depth) BuiltIn FragDepth
|
||||
Decorate 176(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 176(g_tTex1df4) Binding 0
|
||||
Decorate 179(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 179(g_tTex1di4) Binding 0
|
||||
Decorate 182(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 182(g_tTex1du4) Binding 0
|
||||
Decorate 185(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 185(g_tTex2df4) Binding 0
|
||||
Decorate 188(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 188(g_tTex2di4) Binding 0
|
||||
Decorate 191(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 191(g_tTex2du4) Binding 0
|
||||
Decorate 194(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 194(g_tTex3df4) Binding 0
|
||||
Decorate 197(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 197(g_tTex3di4) Binding 0
|
||||
Decorate 200(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 200(g_tTex3du4) Binding 0
|
||||
Decorate 203(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 203(g_tTexcdf4) Binding 0
|
||||
Decorate 206(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 206(g_tTexcdi4) Binding 0
|
||||
Decorate 209(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 209(g_tTexcdu4) Binding 0
|
||||
Decorate 122(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 122(g_tTexcdi4a) Binding 8
|
||||
Decorate 131(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 131(g_tTexcdu4a) Binding 9
|
||||
Decorate 152(@entryPointOutput.Color) Location 0
|
||||
Decorate 156(@entryPointOutput.Depth) BuiltIn FragDepth
|
||||
Decorate 161(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 161(g_tTex1df4) Binding 0
|
||||
Decorate 164(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 164(g_tTex1di4) Binding 0
|
||||
Decorate 167(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 167(g_tTex1du4) Binding 0
|
||||
Decorate 170(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 170(g_tTex2df4) Binding 0
|
||||
Decorate 173(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 173(g_tTex2di4) Binding 0
|
||||
Decorate 176(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 176(g_tTex2du4) Binding 0
|
||||
Decorate 179(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 179(g_tTex3df4) Binding 0
|
||||
Decorate 182(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 182(g_tTex3di4) Binding 0
|
||||
Decorate 185(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 185(g_tTex3du4) Binding 0
|
||||
Decorate 188(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 188(g_tTexcdf4) Binding 0
|
||||
Decorate 191(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 191(g_tTexcdi4) Binding 0
|
||||
Decorate 194(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 194(g_tTexcdu4) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -584,71 +584,71 @@ Validation failed
|
|||
114: TypeSampledImage 109
|
||||
116: 6(float) Constant 1053609165
|
||||
117: 7(fvec4) ConstantComposite 25 26 72 116
|
||||
125: TypeImage 37(int) Cube depth array sampled format:Unknown
|
||||
126: TypePointer UniformConstant 125
|
||||
127(g_tTexcdi4a): 126(ptr) Variable UniformConstant
|
||||
130: TypeSampledImage 125
|
||||
139: TypeImage 51(int) Cube depth array sampled format:Unknown
|
||||
140: TypePointer UniformConstant 139
|
||||
141(g_tTexcdu4a): 140(ptr) Variable UniformConstant
|
||||
144: TypeSampledImage 139
|
||||
152: TypePointer Function 8(PS_OUTPUT)
|
||||
154: 37(int) Constant 0
|
||||
155: 6(float) Constant 1065353216
|
||||
156: 7(fvec4) ConstantComposite 155 155 155 155
|
||||
157: TypePointer Function 7(fvec4)
|
||||
159: 37(int) Constant 1
|
||||
166: TypePointer Output 7(fvec4)
|
||||
167(@entryPointOutput.Color): 166(ptr) Variable Output
|
||||
170: TypePointer Output 6(float)
|
||||
171(@entryPointOutput.Depth): 170(ptr) Variable Output
|
||||
174: TypeImage 6(float) 1D sampled format:Unknown
|
||||
120: TypeImage 37(int) Cube depth array sampled format:Unknown
|
||||
121: TypePointer UniformConstant 120
|
||||
122(g_tTexcdi4a): 121(ptr) Variable UniformConstant
|
||||
125: TypeSampledImage 120
|
||||
129: TypeImage 51(int) Cube depth array sampled format:Unknown
|
||||
130: TypePointer UniformConstant 129
|
||||
131(g_tTexcdu4a): 130(ptr) Variable UniformConstant
|
||||
134: TypeSampledImage 129
|
||||
137: TypePointer Function 8(PS_OUTPUT)
|
||||
139: 37(int) Constant 0
|
||||
140: 6(float) Constant 1065353216
|
||||
141: 7(fvec4) ConstantComposite 140 140 140 140
|
||||
142: TypePointer Function 7(fvec4)
|
||||
144: 37(int) Constant 1
|
||||
151: TypePointer Output 7(fvec4)
|
||||
152(@entryPointOutput.Color): 151(ptr) Variable Output
|
||||
155: TypePointer Output 6(float)
|
||||
156(@entryPointOutput.Depth): 155(ptr) Variable Output
|
||||
159: TypeImage 6(float) 1D sampled format:Unknown
|
||||
160: TypePointer UniformConstant 159
|
||||
161(g_tTex1df4): 160(ptr) Variable UniformConstant
|
||||
162: TypeImage 37(int) 1D sampled format:Unknown
|
||||
163: TypePointer UniformConstant 162
|
||||
164(g_tTex1di4): 163(ptr) Variable UniformConstant
|
||||
165: TypeImage 51(int) 1D sampled format:Unknown
|
||||
166: TypePointer UniformConstant 165
|
||||
167(g_tTex1du4): 166(ptr) Variable UniformConstant
|
||||
168: TypeImage 6(float) 2D sampled format:Unknown
|
||||
169: TypePointer UniformConstant 168
|
||||
170(g_tTex2df4): 169(ptr) Variable UniformConstant
|
||||
171: TypeImage 37(int) 2D sampled format:Unknown
|
||||
172: TypePointer UniformConstant 171
|
||||
173(g_tTex2di4): 172(ptr) Variable UniformConstant
|
||||
174: TypeImage 51(int) 2D sampled format:Unknown
|
||||
175: TypePointer UniformConstant 174
|
||||
176(g_tTex1df4): 175(ptr) Variable UniformConstant
|
||||
177: TypeImage 37(int) 1D sampled format:Unknown
|
||||
176(g_tTex2du4): 175(ptr) Variable UniformConstant
|
||||
177: TypeImage 6(float) 3D sampled format:Unknown
|
||||
178: TypePointer UniformConstant 177
|
||||
179(g_tTex1di4): 178(ptr) Variable UniformConstant
|
||||
180: TypeImage 51(int) 1D sampled format:Unknown
|
||||
179(g_tTex3df4): 178(ptr) Variable UniformConstant
|
||||
180: TypeImage 37(int) 3D sampled format:Unknown
|
||||
181: TypePointer UniformConstant 180
|
||||
182(g_tTex1du4): 181(ptr) Variable UniformConstant
|
||||
183: TypeImage 6(float) 2D sampled format:Unknown
|
||||
182(g_tTex3di4): 181(ptr) Variable UniformConstant
|
||||
183: TypeImage 51(int) 3D sampled format:Unknown
|
||||
184: TypePointer UniformConstant 183
|
||||
185(g_tTex2df4): 184(ptr) Variable UniformConstant
|
||||
186: TypeImage 37(int) 2D sampled format:Unknown
|
||||
185(g_tTex3du4): 184(ptr) Variable UniformConstant
|
||||
186: TypeImage 6(float) Cube sampled format:Unknown
|
||||
187: TypePointer UniformConstant 186
|
||||
188(g_tTex2di4): 187(ptr) Variable UniformConstant
|
||||
189: TypeImage 51(int) 2D sampled format:Unknown
|
||||
188(g_tTexcdf4): 187(ptr) Variable UniformConstant
|
||||
189: TypeImage 37(int) Cube sampled format:Unknown
|
||||
190: TypePointer UniformConstant 189
|
||||
191(g_tTex2du4): 190(ptr) Variable UniformConstant
|
||||
192: TypeImage 6(float) 3D sampled format:Unknown
|
||||
191(g_tTexcdi4): 190(ptr) Variable UniformConstant
|
||||
192: TypeImage 51(int) Cube sampled format:Unknown
|
||||
193: TypePointer UniformConstant 192
|
||||
194(g_tTex3df4): 193(ptr) Variable UniformConstant
|
||||
195: TypeImage 37(int) 3D sampled format:Unknown
|
||||
196: TypePointer UniformConstant 195
|
||||
197(g_tTex3di4): 196(ptr) Variable UniformConstant
|
||||
198: TypeImage 51(int) 3D sampled format:Unknown
|
||||
199: TypePointer UniformConstant 198
|
||||
200(g_tTex3du4): 199(ptr) Variable UniformConstant
|
||||
201: TypeImage 6(float) Cube sampled format:Unknown
|
||||
202: TypePointer UniformConstant 201
|
||||
203(g_tTexcdf4): 202(ptr) Variable UniformConstant
|
||||
204: TypeImage 37(int) Cube sampled format:Unknown
|
||||
205: TypePointer UniformConstant 204
|
||||
206(g_tTexcdi4): 205(ptr) Variable UniformConstant
|
||||
207: TypeImage 51(int) Cube sampled format:Unknown
|
||||
208: TypePointer UniformConstant 207
|
||||
209(g_tTexcdu4): 208(ptr) Variable UniformConstant
|
||||
194(g_tTexcdu4): 193(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
164(flattenTemp): 152(ptr) Variable Function
|
||||
165:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
Store 164(flattenTemp) 165
|
||||
168: 157(ptr) AccessChain 164(flattenTemp) 154
|
||||
169: 7(fvec4) Load 168
|
||||
Store 167(@entryPointOutput.Color) 169
|
||||
172: 12(ptr) AccessChain 164(flattenTemp) 159
|
||||
173: 6(float) Load 172
|
||||
Store 171(@entryPointOutput.Depth) 173
|
||||
149(flattenTemp): 137(ptr) Variable Function
|
||||
150:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
Store 149(flattenTemp) 150
|
||||
153: 142(ptr) AccessChain 149(flattenTemp) 139
|
||||
154: 7(fvec4) Load 153
|
||||
Store 152(@entryPointOutput.Color) 154
|
||||
157: 12(ptr) AccessChain 149(flattenTemp) 144
|
||||
158: 6(float) Load 157
|
||||
Store 156(@entryPointOutput.Depth) 158
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
|
|
@ -660,9 +660,9 @@ Validation failed
|
|||
80(r32): 12(ptr) Variable Function
|
||||
94(r34): 12(ptr) Variable Function
|
||||
108(r60): 12(ptr) Variable Function
|
||||
124(r62): 12(ptr) Variable Function
|
||||
138(r64): 12(ptr) Variable Function
|
||||
153(psout): 152(ptr) Variable Function
|
||||
119(r62): 12(ptr) Variable Function
|
||||
128(r64): 12(ptr) Variable Function
|
||||
138(psout): 137(ptr) Variable Function
|
||||
17: 14 Load 16(g_tTex1df4a)
|
||||
21: 18 Load 20(g_sSamp)
|
||||
23: 22 SampledImage 17 21
|
||||
|
|
@ -723,37 +723,22 @@ Validation failed
|
|||
112: 109 Load 111(g_tTexcdf4a)
|
||||
113: 18 Load 20(g_sSamp)
|
||||
115: 114 SampledImage 112 113
|
||||
118: 6(float) CompositeExtract 117 0
|
||||
119: 6(float) CompositeExtract 117 1
|
||||
120: 6(float) CompositeExtract 117 2
|
||||
121: 6(float) CompositeExtract 117 3
|
||||
122: 7(fvec4) CompositeConstruct 118 119 120 121
|
||||
123: 6(float) ImageSampleDrefExplicitLod 115 122 28 Lod 33
|
||||
Store 108(r60) 123
|
||||
128: 125 Load 127(g_tTexcdi4a)
|
||||
129: 18 Load 20(g_sSamp)
|
||||
131: 130 SampledImage 128 129
|
||||
132: 6(float) CompositeExtract 117 0
|
||||
133: 6(float) CompositeExtract 117 1
|
||||
134: 6(float) CompositeExtract 117 2
|
||||
135: 6(float) CompositeExtract 117 3
|
||||
136: 7(fvec4) CompositeConstruct 132 133 134 135
|
||||
137: 6(float) ImageSampleDrefExplicitLod 131 136 28 Lod 33
|
||||
Store 124(r62) 137
|
||||
142: 139 Load 141(g_tTexcdu4a)
|
||||
143: 18 Load 20(g_sSamp)
|
||||
145: 144 SampledImage 142 143
|
||||
146: 6(float) CompositeExtract 117 0
|
||||
147: 6(float) CompositeExtract 117 1
|
||||
148: 6(float) CompositeExtract 117 2
|
||||
149: 6(float) CompositeExtract 117 3
|
||||
150: 7(fvec4) CompositeConstruct 146 147 148 149
|
||||
151: 6(float) ImageSampleDrefExplicitLod 145 150 28 Lod 33
|
||||
Store 138(r64) 151
|
||||
158: 157(ptr) AccessChain 153(psout) 154
|
||||
Store 158 156
|
||||
160: 12(ptr) AccessChain 153(psout) 159
|
||||
Store 160 155
|
||||
161:8(PS_OUTPUT) Load 153(psout)
|
||||
ReturnValue 161
|
||||
118: 6(float) ImageSampleDrefExplicitLod 115 117 28 Lod 33
|
||||
Store 108(r60) 118
|
||||
123: 120 Load 122(g_tTexcdi4a)
|
||||
124: 18 Load 20(g_sSamp)
|
||||
126: 125 SampledImage 123 124
|
||||
127: 6(float) ImageSampleDrefExplicitLod 126 117 28 Lod 33
|
||||
Store 119(r62) 127
|
||||
132: 129 Load 131(g_tTexcdu4a)
|
||||
133: 18 Load 20(g_sSamp)
|
||||
135: 134 SampledImage 132 133
|
||||
136: 6(float) ImageSampleDrefExplicitLod 135 117 28 Lod 33
|
||||
Store 128(r64) 136
|
||||
143: 142(ptr) AccessChain 138(psout) 139
|
||||
Store 143 141
|
||||
145: 12(ptr) AccessChain 138(psout) 144
|
||||
Store 145 140
|
||||
146:8(PS_OUTPUT) Load 138(psout)
|
||||
ReturnValue 146
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue