Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

[wgsl-in] Missing integer type validation for contants #2311

@Wumpf

Description

@Wumpf

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!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions