brendan-duncan/wgsl_reflect

Reflect errors from valid WGSL

Closed this issue · 2 comments

After testing reflect, I got two errors from what I believe are valid wgsl code (it runs without warnings)

@compute @workgroup_size(64)
fn compute(@builtin(global_invocation_id) id : vec3<u32>) {

    // return void from a function
    if (id.x > 1000.) { return; }
    // error: Uncaught (in promise) TypeError: this.args is not iterable

    // vector type inference from abstract types
    let f = vec2(0.);
    // error: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isStruct')
}

Fixed and published npm update.

Thanks. All good on my side.