Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spirv_shader_passthrough must enable wgpu/spirv #15515

Closed
BD103 opened this issue Sep 29, 2024 · 1 comment · Fixed by #15873
Closed

spirv_shader_passthrough must enable wgpu/spirv #15515

BD103 opened this issue Sep 29, 2024 · 1 comment · Fixed by #15873
Assignees
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Milestone

Comments

@BD103
Copy link
Member

BD103 commented Sep 29, 2024

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.

@BD103 BD103 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Sep 29, 2024
@JMS55 JMS55 added this to the 0.15 milestone Sep 29, 2024
@BenjaminBrienen BenjaminBrienen added the S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! label Sep 29, 2024
@BenjaminBrienen BenjaminBrienen self-assigned this Sep 29, 2024
@BenjaminBrienen
Copy link
Contributor

I'll work on this today

@BenjaminBrienen BenjaminBrienen added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! labels Oct 12, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 13, 2024
# Objective

Fixes #15515

## Solution

I went for the simplest solution because "format" in
`shader_format_spirv` didn't sound directly related.

## Testing

The command `cargo b -p bevy --no-default-features -F
spirv_shader_passthrough,x11` failed before, but works now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants