Skip to content

Record render diagnostics for all engine passes #16742

Closed

Description

@JMS55

https://dev-docs.bevyengine.org/bevy_render/diagnostic/struct.RenderDiagnosticsPlugin.html

Ideally we nest the diagnostics so that each view has it's own diagnostic subpath, although we'll have to figure out how shadow passes fit into that, as well as non-view-specific nodes like MeshPreprocessing.

Also would be nice to further group by category, e.g. prepass/gbuffer, mainpass, post processing, etc.

Total path would look like /render/view_<NameOrEntityId>/main3d/opaque/gpu_time, using the Name component of the view if it's available, else the entity ID.

  • Bloom
  • MainOpaquePass2d
  • MainTransparentPass2d
  • MainOpaquePass3d
  • MainTransparentPass3d
  • Prepass
  • ShadowPass
  • AutoExposure
  • RCAS
  • MainTransmissivePass3d
  • DeferredGBufferPrepass (+CopyDeferredLightingId?)
  • DeferredOpaquePass3dPbrLighting
  • DepthOfField
  • FXAA
  • MotionBlur
  • OITResolve
  • PostProcessing stack
  • SMAA
  • TAA
  • MSAAWriteback
  • Upscale
  • Meshlet
    • MeshletVisibilityBufferRasterPass (+subpass timings)
    • MeshletMainOpaquePass3d, MeshletPrepass, MeshletDeferredGBufferPrepass
  • SSAO
  • SSR
  • VolumetricFog
  • GpuPreprocess
  • UI
  • Tonemapping
  • CameraDriver(?)

Activity

  1. added
    A-DiagnosticsLogging, crash handling, error reporting and performance analysis
    A-RenderingDrawing game state to the screen
    D-TrivialNice and easy! A great choice to get started with Bevy
    on Dec 10, 2024
  2. added this to the 0.17 milestone on Mar 23, 2025
  3. jf908 commented on May 9, 2025

    @jf908
    Contributor

    I'm interested in implementing this.

    Any ideas on how to implement the nesting? I'm not immediately seeing any easy way to propagate the timestamps up to form groups. Would it be fine to just do the passes individually for now deal with the nesting in a follow up?

  4. JMS55 commented on May 9, 2025

    @JMS55
    ContributorAuthor

    It's been a bit since I've looked, but I think that nesting works automatically for Bevy render diagnostics, i.e. what goes into bevy_diagnostics and later gets printed out to the terminal with log diagnostics plugin or whatever.

    For the tracy GPU integration, I think I was able to get nesting working, but it just looked a little weird.

    Honestly can't really remember, you'll just have to play around with it and see what works or not.

    Totally fine to leave nesting as a followup (or for someone else to do in the future) though!

  5. JMS55 commented on May 9, 2025

    @JMS55
    ContributorAuthor

    Some other comments:

    • Be aware that the list I wrote above is not complete. E.g. since that time we've added atmosphere rendering.
    • Code for converting render diagnostics -> bevy diagnostics is here if you need to see the internal details
      fn run_mapped_callback(&mut self, timestamp_period_ns: f32) -> bool {
  6. added
    S-Adopt-MeThe original PR author has no intent to complete this work. Pick me up!
    S-Waiting-on-AuthorThe author needs to make changes or address concerns before this can be merged
    and removed
    S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!
    S-Adopt-MeThe original PR author has no intent to complete this work. Pick me up!
    on Jul 29, 2025
  7. added a commit that references this issue on Aug 6, 2025
    44efc81
  8. added a commit that references this issue on Aug 9, 2025
    684c7ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DiagnosticsLogging, crash handling, error reporting and performance analysisA-RenderingDrawing game state to the screenD-TrivialNice and easy! A great choice to get started with BevyS-Waiting-on-AuthorThe author needs to make changes or address concerns before this can be merged

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions