You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm trying to extend bevy's shaders, and I need to pass an extra value from vertex to fragment. Bevy has a few functions available which take the original VertexOutput struct as a parameter. Therefore, I decided that introducing this struct would be reasonable:
structActualOut{inner:VertexOutput,// original bevy struct
@location(8)view_position:vec3<f32>,}
And then replaced the input/output types of my vertex/fragment shaders with ActualOut. Unfortunately, Naga complains about the inner field lacking an @location marker -- I'm not sure if this is actually incorrect according to the spec, however in any case if it is indeed the intended behaviour then the error is massively cryptic:
2024-12-30T07:32:15.713303Z ERROR wgpu_core::device::global: Device::create_shader_module error:
Shader validation error: Entry point fragment at Fragment is invalid
┌─ :1:1
│
1 │
│ naga::Type [56]
│
= Argument 0 varying error
= Struct member 0 is missing a binding
I'm running on naga v23.1.0.
If you need more details (a repro isn't super easy to put together, but if you need me to I'd be happy to do so), please let me know.
The text was updated successfully, but these errors were encountered:
structB {
@location(0) x: f32
}
structC {
// Invalid, structures with user-defined IO cannot be nested.b: B
}
cwfitzgerald
changed the title
Naga Error Message Is Crytic on Missing Specifier in Struct
Naga Error Message Is Cryptic on Missing Specifier in Struct
Dec 30, 2024
Description
I'm trying to extend bevy's shaders, and I need to pass an extra value from vertex to fragment. Bevy has a few functions available which take the original
VertexOutput
struct as a parameter. Therefore, I decided that introducing this struct would be reasonable:And then replaced the input/output types of my vertex/fragment shaders with
ActualOut
. Unfortunately, Naga complains about theinner
field lacking an@location
marker -- I'm not sure if this is actually incorrect according to the spec, however in any case if it is indeed the intended behaviour then the error is massively cryptic:I'm running on naga v23.1.0.
If you need more details (a repro isn't super easy to put together, but if you need me to I'd be happy to do so), please let me know.
The text was updated successfully, but these errors were encountered: