Skip to content

Conversation

@andyleiserson
Copy link
Contributor

@andyleiserson andyleiserson commented Oct 2, 2025

This resolves the duplicate storage of Id and Arc versions of commands (when tracing) that was introduced by encode-on-finish. It now stores the Arc version only, and uses the pointers from the Arcs as object IDs when tracing. It also overhauls the trace player to play back traces in this format.

This fixes tracing of compute and render passes when encoded using the standard APIs. Tracing of render bundles is still broken.

Testing
Updates the existing player tests to new trace format. Did some manual testing including in Firefox. #8429 adds directed tests for tracing.

Squash or Rebase? Rebase, after squashing fixups.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@andyleiserson
Copy link
Contributor Author

This does have all my latest local changes, but there's still a little work to do to fix the CI failures, and I want to revisit the way that polling and user_closures are handled.

@teoxoy
Copy link
Member

teoxoy commented Oct 13, 2025

I wanted to mention that the main difference I noticed between this approach and the previous is that we now effectively only record commands after successful validation. I find that this somewhat limits the usefulness of recording and replaying traces since they won't record invalid commands.

I've mostly used the record/replay functionality to debug overly restrictive or wrong validation in Firefox which will no longer be possible with this PR.

We should probably talk about this at the maintainers meeting.

@teoxoy
Copy link
Member

teoxoy commented Oct 15, 2025

We talked a bit about this at the maintainers meeting. Would it be possible to trace before validation runs (so that invalid commands get included in the trace)?

@teoxoy
Copy link
Member

teoxoy commented Oct 17, 2025

I just realized Fallible::Invalid also has type Arc<String> - we could use that address to be able to record before validation.

@andyleiserson
Copy link
Contributor Author

Since this PR is already quite large, I opened #8429 for the error tracing support.

@teoxoy teoxoy merged commit c6dc8ee into gfx-rs:trunk Oct 30, 2025
41 checks passed
@andyleiserson andyleiserson deleted the tracing branch October 30, 2025 15:59
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