-
Notifications
You must be signed in to change notification settings - Fork 184
Conversation
1ca2d04
to
1d63e36
Compare
740: First Phase of Tracing Transition r=kvark a=cwfitzgerald ## Connections First step in the implementation of #491. gfx-rs/wgpu-rs#395 ## Description This adds the tracing crate, implements a tracing "layer" for chrome tracing, and instruments every entrypoint into wgpu. Tracing is added as a main dependency. A feature is added called `subscriber` which guards the tracing and default logger implementation, as that adds 3 dependencies. The main macro is there to make creating a span a simple one line process. This macro will come in useful in the next couple stages. Use of this macro is used unqualified with it imported into scope as that style allows IntelliJ ides to actually find the macro. I also removed a really annoying warning that was driving me crazy. This PR does not make sure the logging output from tracing is up to snuff, that will be done when logging output and conversion is the priority. Both commits should compile individually, so shouldn't need to be squashed. ## Testing This PR was tested with the wgpu-rs PR on various examples, as well as my personal project. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
5270e25
to
6608914
Compare
Should be ready to review! |
examples/hello-triangle/main.rs
Outdated
#[cfg(feature = "subscriber")] | ||
{ | ||
let chrome_tracing_dir = std::env::var("WGPU_CHROME_TRACING"); | ||
wgpu::util::initialize_default_subscriber(chrome_tracing_dir.ok()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to show it off in hello- examples. Just framework is OK and most useful anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I added this here too is because once we switch to tracing
entirely, env_logger won't do anything, and I would imagine we want logging enabled. I can remove this for now and we can revisit it later if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This is really happening now!
bors r+
Wooooo! |
fix gfx-rs#395 Add BufferMapState enum to track the state of buffer mapping and store any mapping details in case one is pending.
547: Add BufferMapState r=kvark a=kunalmohan WIP for issue gfx-rs#395 Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
Connections
This is the wgpu-rs component of gfx-rs/wgpu#740.
Notable Changes