Skip to content

spirv_shader_passthrough must enable wgpu/spirv #15515

@BD103

Description

@BD103

Bevy version

Main branch.

What you did

Built bevy with just the spirv_shader_passthrough feature. (x11 or wayland is required on Linux, so I included x11 while testing.)

cargo b -p bevy --no-default-features -F spirv_shader_passthrough,x11

What went wrong

error[E0599]: no variant or associated item named `SpirV` found for enum `wgpu::ShaderSource` in the current scope
  --> crates/bevy_render/src/renderer/render_device.rs:53:33
   |
53 |             wgpu::ShaderSource::SpirV(source)
   |                                 ^^^^^ variant or associated item not found in `ShaderSource<'_>`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `bevy_render` (lib) due to 1 previous error

Additional information

This is because the bevy_render/Cargo.toml does not make the spirv_shader_passthrough feature depend on wgpu's wgpu/spirv feature.

You may want to enable bevy_render's shader_format_spirv feature, since it adds naga support for spirv as well. I don't know enough about rendering to know if this is required or not, though.


Caught by flag-frenzy.

Metadata

Metadata

Labels

A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorD-TrivialNice and easy! A great choice to get started with BevyS-Needs-ReviewNeeds reviewer attention (from anyone!) to move forward

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions