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

First pass at using puffin to display the query results #81

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Gonkalbell
Copy link

Here's a first pass at a way to display the GpuTimerQueryResult in puffin. This only depends on the base puffin crate, not puffin_egui or puffin_http. I added puffin_http as a dev dependency to the example since it's not as invasive of a change as using egui.

This current approach assumes you use a different puffin::GlobalProfiler for wgpu than for CPU threads. I'm not the biggest fan of this approach, and I'd prefer to pretend that the WGPU Queue is just like any other CPU thread, and show them all in the same profiler window. However, the fact that we may need to wait several frames for timer results from the GPU makes this difficult.

@Wumpf Wumpf self-requested a review September 12, 2024 07:16
@Wumpf
Copy link
Owner

Wumpf commented Sep 18, 2024

sorry for the delay in review. Hoping to give this a spin by the end of the week!

Copy link
Owner

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good start, I think this is already plenty useful. Even if we figure out how to combine this into a single puffin connection, this mode of operation can still be quite useful imho!

Some docs are missing and I believe the frame processing should be slightly different. Details see comments

Cargo.toml Outdated Show resolved Hide resolved
examples/demo.rs Outdated Show resolved Hide resolved
src/puffin.rs Outdated Show resolved Hide resolved
examples/demo.rs Outdated Show resolved Hide resolved
examples/demo.rs Show resolved Hide resolved
@Gonkalbell Gonkalbell requested a review from Wumpf October 6, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants