Avoid generating 8/16-bit constants when 8/16-bit arithmetic extensions aren't enabled

This commit is contained in:
Jeff Bolz
2019-07-10 13:06:15 -05:00
parent f970253a5d
commit c1ad396258
10 changed files with 136 additions and 80 deletions

View File

@@ -1,8 +1,7 @@
spv.8bitstorage-int.frag
Validation failed
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 172
// Id's are bound by 171
Capability Shader
Capability UniformAndStorageBuffer8BitAccess
@@ -209,10 +208,7 @@ Validation failed
114: 20(int) Constant 7
115: 20(int) Constant 6
116: TypePointer Uniform 20(int)
166: 6(int8_t) Constant 1
167: 6(int8_t) Constant 2
168: 7(i8vec2) ConstantComposite 166 167
170: 6(int8_t) Constant 3
166: 39(ivec2) ConstantComposite 32 33
4(main): 2 Function None 3
5: Label
69(x0): 68(ptr) Variable Function
@@ -332,9 +328,11 @@ Validation failed
164: 6(int8_t) Load 163
165: 28(ptr) AccessChain 19(b2) 21
Store 165 164
169: 42(ptr) AccessChain 19(b2) 32
Store 169 168
171: 28(ptr) AccessChain 19(b2) 21
Store 171 170
167: 7(i8vec2) SConvert 166
168: 42(ptr) AccessChain 19(b2) 32
Store 168 167
169: 6(int8_t) SConvert 58
170: 28(ptr) AccessChain 19(b2) 21
Store 170 169
Return
FunctionEnd