Skip to content

Fix render debug overlay panic without bevy_pbr (#25980) - #26012

Open
jorgeandrecastro wants to merge 2 commits into
bevyengine:mainfrom
jorgeandrecastro:fix/render-debug-overlay-pbr
Open

jorgeandrecastro wants to merge 2 commits into
bevyengine:mainfrom
jorgeandrecastro:fix/render-debug-overlay-pbr

Conversation

@jorgeandrecastro

@jorgeandrecastro jorgeandrecastro commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Objective
Fixes #25980

  • Stops a startup crash in Bevy apps that turn on the dev feature (which brings in RenderDebugOverlayPlugin) without having the bevy_pbr feature around.

Solution

  • I Made the MeshPipelineViewLayouts resource optional in RenderDebugOverlayPlugin by wrapping it in Option<Res> inside crates/bevy_dev_tools/src/render_debug.rs.

  • An i added safe checks for when it's missing during pipeline initialization and specialization, so non-PBR or pure 2D setups won't panic anymore.

Testing

  • Did you test these changes? Yes, verified by running the 2d_shapes example with the dev feature enabled.

  • Are there any parts that need more testing? Nope.

  • How can other people test your changes? Just run cargo run --example 2d_shapes --features dev and watch it boot up cleanly without throwing a missing resource erro

  • What platforms did you test on? Tested on Linux (Debian 13, Vulkan with Intel Iris Xe Graphics).

Showcase
The 2d_shapes example now starts up and runs without issues with dev features:

cargo run --example 2d_shapes --features dev

Thanks for reading :)

@jorgeandrecastro
jorgeandrecastro force-pushed the fix/render-debug-overlay-pbr branch from 7f968a7 to 68ab83f Compare October 2, 2026 16:05
@mockersf

mockersf commented Oct 3, 2026

Copy link
Copy Markdown
Member

could you remove most of the comments to keep to the existing style? And only the first one is useful

@kfc35 kfc35 added C-Bug An unexpected or incorrect behavior I-Crash A sudden unexpected crash D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged A-Dev-Tools Tools used to debug Bevy applications. labels Oct 3, 2026
@jorgeandrecastro
jorgeandrecastro force-pushed the fix/render-debug-overlay-pbr branch from 68ab83f to 7062d52 Compare October 3, 2026 12:30
@jorgeandrecastro
jorgeandrecastro force-pushed the fix/render-debug-overlay-pbr branch from 7062d52 to 9dcbaaa Compare October 3, 2026 12:31
@jorgeandrecastro

Copy link
Copy Markdown
Contributor Author

could you remove most of the comments to keep to the existing style? And only the first one is useful

Done! I cleaned up the extra comments and kept just the first one pointing out that it's optional. Thanks for the guidance! :)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dev-Tools Tools used to debug Bevy applications. C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples I-Crash A sudden unexpected crash S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render_dev_tools feature panics without bevy_pbr feature

3 participants