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.16bitstorage.frag
Validation failed
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 172
// Id's are bound by 173
Capability Shader
Capability StorageUniformBufferBlock16
@ -210,10 +209,9 @@ Validation failed
114: 20(int) Constant 7
115: 20(int) Constant 6
116: TypePointer Uniform 20(int)
166:6(float16_t) Constant 15360
167:6(float16_t) Constant 16384
168: 7(f16vec2) ConstantComposite 166 167
170:6(float16_t) Constant 16896
166: 37(float) Constant 1073741824
167: 40(fvec2) ConstantComposite 83 166
170: 37(float) Constant 1077936128
4(main): 2 Function None 3
5: Label
70(x0): 69(ptr) Variable Function
@ -333,9 +331,11 @@ Validation failed
164:6(float16_t) Load 163
165: 28(ptr) AccessChain 19(b2) 21
Store 165 164
168: 7(f16vec2) FConvert 167
169: 43(ptr) AccessChain 19(b2) 32
Store 169 168
171: 28(ptr) AccessChain 19(b2) 21
Store 171 170
171:6(float16_t) FConvert 170
172: 28(ptr) AccessChain 19(b2) 21
Store 172 171
Return
FunctionEnd