> naga .\x.wgsl
error:
┌─ x.wgsl:8:1
│
8 │ ╭ struct InstanceInput {
9 │ │ @location(5) position: vec3<f32>,
10 │ │ @location(6) scale: f32,
11 │ │ @location(7) rotation: Rotor, // <-- This is the problem
│ ╰────────────────────────────────^ naga::Type [4]
Entry point main at Vertex is invalid:
Argument 0 varying error
The type [2] does not match the varying
Motivation I'm a newbie to writing shaders. I recently tried to use
@location
incorrectly:The error message I got confused me:
I had trouble understanding what I was doing wrong. I later learned from the WGSL Spec that @location can only be used with numeric scalars or vectors.
By contrast, the error from tint was a lot easier to understand:
Proposed solution There is already some code to test against IO_SHAREABLE. We would just need to change the message.
I'd happily volunteer to make this change. Just let me know if this is an acceptable proposal.