gfx-rs/wgpu

Naga (Metal conversion) crash if we use "vertex" variable name in VertexOutput

tpisto opened this issue · 1 comments

The shader code that causes Naga error is working with Chrome, so I assume it's valid shader code.

Description

This shader code works:

struct VertexOutput {
    @builtin(position) position: vec4f,
    @location(1) @interpolate(flat) instance: u32,
    @location(2) @interpolate(linear) my_vertex: vec2f
}

Please note the "my_vertex" name

This causes naga errors:

struct VertexOutput {
    @builtin(position) position: vec4f,
    @location(1) @interpolate(flat) instance: u32,
    @location(2) @interpolate(linear) vertex: vec2f
}

Please note the "vertex" name

Platform
OS X, M1

I'm not seeing any errors on trunk. Could you provide more details? naga/wgpu version would be a good start.