Skip to content

Deferred rendering example is broken on macos (0.16-dev) #18468

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

Closed
aloucks opened this issue Mar 21, 2025 · 2 comments · Fixed by #18634
Closed

Deferred rendering example is broken on macos (0.16-dev) #18468

aloucks opened this issue Mar 21, 2025 · 2 comments · Fixed by #18634
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Milestone

Comments

@aloucks
Copy link
Contributor

aloucks commented Mar 21, 2025

Bevy version

main branch: 116484b

System Information

2025-03-21T17:34:23.065859Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "macOS 15.3.2 Sequoia", kernel: "24.3.0", cpu: "Apple M4", core_count: "10", memory: "32.0 GiB" }    
2025-03-21T17:34:23.175362Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M4", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

What you did

cargo run --example deferred_rendering

What went wrong

2025-03-21T17:34:23.065859Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "macOS 15.3.2 Sequoia", kernel: "24.3.0", cpu: "Apple M4", core_count: "10", memory: "32.0 GiB" }    
2025-03-21T17:34:23.175362Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M4", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2025-03-21T17:34:23.825092Z  INFO bevy_winit::system: Creating new window App (0v1)
2025-03-21 13:34:23.980 deferred_rendering[43133:13193081] +[IMKClient subclass]: chose IMKClient_Modern
2025-03-21 13:34:23.980 deferred_rendering[43133:13193081] +[IMKInputSession subclass]: chose IMKInputSession_Modern
2025-03-21T17:34:24.137905Z  WARN bevy_pbr::render::mesh_view_bindings: Too many textures in mesh pipeline view layout, this might cause us to hit `wgpu::Limits::max_sampled_textures_per_shader_stage` in some environments.
2025-03-21T17:34:26.963602Z ERROR wgpu::backend::wgpu_core: Shader translation error for stage ShaderStages(FRAGMENT): mapping of ResourceBinding { group: 0, binding: 17 } is missing    
2025-03-21T17:34:26.963691Z ERROR wgpu::backend::wgpu_core: Please report it to https://github.com/gfx-rs/wgpu    
2025-03-21T17:34:26.963735Z ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default    

thread 'Compute Task Pool (2)' panicked at /Users/aloucks/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-24.0.3/src/backend/wgpu_core.rs:1303:26:
wgpu error: Validation Error

Caused by:
  In Device::create_render_pipeline, label = 'deferred_lighting_pipeline'
    Internal error in ShaderStages(FRAGMENT) shader: mapping of ResourceBinding { group: 0, binding: 17 } is missing


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 '<unnamed>' panicked at /Users/aloucks/projects/bevy/crates/bevy_render/src/render_resource/pipeline_cache.rs:694:28:
index out of bounds: the len is 0 but the index is 21
Encountered a panic in system `bevy_render::renderer::render_system`!

Additional information

I'm not sure what to report at the wgpu repo as this seems specific to the deferred rendering pipeline.

@aloucks aloucks added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Mar 21, 2025
@JMS55 JMS55 added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Mar 22, 2025
@JMS55 JMS55 added this to the 0.16 milestone Mar 22, 2025
@JMS55
Copy link
Contributor

JMS55 commented Mar 22, 2025

No need to report this to wgpu, this is a bevy bug.

@tychedelia
Copy link
Contributor

See #18149

github-merge-queue bot pushed a commit that referenced this issue Mar 31, 2025
…ed (#18634)

# Objective

Fixes #18468

## Solution

Missing shader defs caused shader compilation failure.
mockersf pushed a commit that referenced this issue Mar 31, 2025
…ed (#18634)

# Objective

Fixes #18468

## Solution

Missing shader defs caused shader compilation failure.
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants