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:
Arcady Goldmints-Orlov 2024-06-21 14:07:50 -04:00 committed by arcady-lunarg
parent 2d8b71fc63
commit 33d517470e
13 changed files with 1777 additions and 1867 deletions

View file

@ -1,10 +1,9 @@
spv.8bitstorage-int.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 187
// Id's are bound by 180
Capability Shader
Capability Int8
Capability UniformAndStorageBuffer8BitAccess
Extension "SPV_KHR_8bit_storage"
1: ExtInstImport "GLSL.std.450"
@ -341,18 +340,11 @@ spv.8bitstorage-int.frag
Store 173 172
174: 42(ptr) AccessChain 27(b1) 32
175: 7(i8vec2) Load 174
176: 6(int8_t) CompositeExtract 175 0
177: 6(int8_t) CompositeExtract 175 1
178: 7(i8vec2) CompositeConstruct 176 177
179: 42(ptr) AccessChain 19(b2) 32
176: 42(ptr) AccessChain 19(b2) 32
Store 176 175
177: 34(ptr) AccessChain 27(b1) 33
178: 8(i8vec3) Load 177
179: 34(ptr) AccessChain 19(b2) 33
Store 179 178
180: 34(ptr) AccessChain 27(b1) 33
181: 8(i8vec3) Load 180
182: 6(int8_t) CompositeExtract 181 0
183: 6(int8_t) CompositeExtract 181 1
184: 6(int8_t) CompositeExtract 181 2
185: 8(i8vec3) CompositeConstruct 182 183 184
186: 34(ptr) AccessChain 19(b2) 33
Store 186 185
Return
FunctionEnd