-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support for storing failed commands in traces #8429
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
base: trunk
Are you sure you want to change the base?
Conversation
Use it to deduplicate some `Foo` / `ArcFoo` / `TraceFoo` definitions.
This updates pass operations. The trace player is temporarily broken.
This updates non-pass command encoder operations and device operations.
|
Responding to #8289 (comment):
ID resolution was already largely separated from validation. What I've implemented here will not write to the trace if ID resolution fails, but will write to the trace if validation fails. This seems like it should cover most use cases -- ID resolution generally shouldn't fail, and if it does fail, it seems like we want more detail about every ID/pointer association than a regular trace would contain.
|
| /// Stop tracing and return the trace object. | ||
| /// | ||
| /// This is mostly useful for in-memory traces. | ||
| pub fn take_trace(&self) -> Option<Box<dyn trace::Trace + Send + Sync + 'static>> { |
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.
This doesn't work, because Trace isn't even defined when the feature isn't enabled.
There is a comment on wgt::Trace:
Line 1514 in 0810110
| // This enum must be non-exhaustive so that enabling the "trace" feature is not a semver break. |
I'm not sure I fully understand the concern here. Would it be a problem if take_trace is only available when the feature is enabled?
| # `cargo clippy -- -Wunused-crate-dependencies` give fewer false positives. | ||
| [dependencies] | ||
| wgpu = { workspace = true, features = ["noop"] } | ||
| wgpu-core = { workspace = true, features = ["trace"] } |
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'm not sure about this. Possibly it should be a separate build?
On top of #8289. At time of writing, the last three commits are for this change.
This adds support for storing commands that resulted in an error (either during encoding, or on submission) in a trace. It also adds a simple test for tracing and for the new error tracing functionality.
Squash or Rebase? Rebase
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.