mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
egui-wgpu: Show wgpu profiling scopes when using puffin profiler
This commit is contained in:
@@ -43,15 +43,23 @@ epaint = { version = "0.24.1", path = "../epaint", default-features = false, fea
|
||||
|
||||
bytemuck = "1.7"
|
||||
log = { version = "0.4", features = ["std"] }
|
||||
# wgpu uses the `profiling` crate for its profiling scopes.
|
||||
# This will hook them up to the puffin profiler as backend:
|
||||
profiling = { version = "1.0.12", default-features = false, features = [
|
||||
"profile-with-puffin",
|
||||
] }
|
||||
thiserror.workspace = true
|
||||
type-map = "0.5.0"
|
||||
wgpu.workspace = true
|
||||
|
||||
|
||||
#! ### Optional dependencies
|
||||
## Enable this when generating docs.
|
||||
document-features = { version = "0.2", optional = true }
|
||||
|
||||
winit = { version = "0.29.4", default-features = false, optional = true, features = ["rwh_05"] }
|
||||
winit = { version = "0.29.4", default-features = false, optional = true, features = [
|
||||
"rwh_05",
|
||||
] }
|
||||
|
||||
# Native:
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
|
||||
@@ -622,12 +622,9 @@ impl Painter {
|
||||
};
|
||||
|
||||
// Submit the commands: both the main buffer and user-defined ones.
|
||||
{
|
||||
crate::profile_scope!("Queue::submit");
|
||||
render_state
|
||||
.queue
|
||||
.submit(user_cmd_bufs.into_iter().chain([encoded]));
|
||||
};
|
||||
render_state
|
||||
.queue
|
||||
.submit(user_cmd_bufs.into_iter().chain([encoded]));
|
||||
|
||||
let screenshot = if capture {
|
||||
let screen_capture_state = self.screen_capture_state.as_ref()?;
|
||||
@@ -636,10 +633,8 @@ impl Painter {
|
||||
None
|
||||
};
|
||||
|
||||
{
|
||||
crate::profile_scope!("present");
|
||||
output_frame.present();
|
||||
}
|
||||
output_frame.present();
|
||||
|
||||
screenshot
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user