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

example shader_material_glsl panics due to missing feature #8505

Closed
mockersf opened this issue Apr 26, 2023 · 6 comments
Closed

example shader_material_glsl panics due to missing feature #8505

mockersf opened this issue Apr 26, 2023 · 6 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples

Comments

@mockersf
Copy link
Member

mockersf commented Apr 26, 2023

Bevy version

main since #8491

What you did

cargo run --example shader_material_glsl

What went wrong

It panics with

thread 'Compute Task Pool (0)' panicked at 'not implemented: Enable feature "shader_format_glsl" to use GLSL shaders', crates/bevy_render/src/render_resource/shader.rs:215:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::render_resource::pipeline_cache::PipelineCache::process_pipeline_queue_system`!
thread 'Compute Task Pool (1)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', crates/bevy_render/src/pipelined_rendering.rs:135:45

Additional information

This is expected as glsl support is now behind a feature. Should the example be removed? Or the feature enabled by default? Or the example updated to have a better fallback when the feature is not enabled?

@mockersf mockersf added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples and removed S-Needs-Triage This issue needs to be labelled labels Apr 26, 2023
@wpederzoli
Copy link
Contributor

Hi @mockersf. I am not able to reproduce this on main or latest branches. I'm on Linux, is this maybe a MacOS specific behavior?

@mockersf
Copy link
Member Author

It is also failing on CI on Linux: https://rparrett.github.io/prototype_bevy_example_runner/

Maybe it's working if you use the OpenGL renderer, CI is on Vulkan

@wpederzoli
Copy link
Contributor

Hmm... Interesting. I just ran the example out of the box (no changes) and I can see in the terminal output backend: Vulkan.
Maybe I'm missing something

@rparrett
Copy link
Contributor

rparrett commented Jun 27, 2023

What is the status of the shader_format_glsl feature after #5703 ?

It seems like the shader_material_glsl example no longer needs it to function.

@rparrett
Copy link
Contributor

It looks like shader_material_glsl was causing naga/glsl-in, naga/wgsl-out to be added, but now those are added unconditionally by naga-oil.

So it seems like shader_material_glsl can be removed now, which is effectively the second suggestion in #8657 (comment)

@mockersf
Copy link
Member Author

mockersf commented May 8, 2024

shader_format_glsl is now a required feature of the example

@mockersf mockersf closed this as completed May 8, 2024
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 C-Examples An addition or correction to our examples
Projects
None yet
3 participants