[wgsl-in] Missing integer type validation for contants
Wumpf opened this issue · comments
As of 0.12.0 this compiles:
var<private> TEXTURE_SIZE: u32 = 2048;
When it should actually be
var<private> TEXTURE_SIZE: u32 = 2048u;
For me, this caused an invalid glsl shader down the line whereas the msl variant was happy. Glsl failed (correctly) with Internal error in ShaderStages(NONE | VERTEX) shader: ERROR: 0:63: '=' : cannot convert from 'const int' to 'highp uint'
(yes, const TEXTURE_SIZE: u32 = 2048u;
would be more appropriate!)
Thanks for the report! I recently fixed this in #2266.