Skip to content

Extract IDs, Registries and Global into wgpu-core-remote - #10053

Open
sagudev wants to merge 5 commits into
gfx-rs:trunkfrom
sagudev:wgpu-core-remote
Open

Extract IDs, Registries and Global into wgpu-core-remote#10053
sagudev wants to merge 5 commits into
gfx-rs:trunkfrom
sagudev:wgpu-core-remote

Conversation

@sagudev

@sagudev sagudev commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Connections
Finally fixes #5121

Description
Move IDs, Registries and Global into wgpu-core-remote to be used by servo and firefox. This PR tries to achieve this with minimal changes, so it's mainly just moving stuff around and fixing imports. Future cleanups are noted in #5121 (comment)

Cargo and lib.rs are adapted from wgc. Because of tracing, we need to keep markers in wgc. To avoid complication with features and build scripts I removed some backend feature gated surface methods and one that is gated on tracing feature (if one needs them they are available in wgc::Device directly, but browsers do not use them anyway). So it's users are expected to depend on wgc directly for future selection. We use normal parking_lot instead of lock rank stuff as we we will remove them in the future anyway.

Testing
It compiles, but otherwise untested. We could implement wgpu custom backend using remoting, but maybe we can just trust that it works.

Squash or Rebase?

Squash

Checklist

  • I self-reviewed and fully understand this PR.
  • WebGPU implementations built with wgpu may be affected behaviorally.
  • Validation and feature gates are in place to confine behavioral changes.
  • Tests demonstrate the validation and altered logic works.
  • CHANGELOG.md entries for the user-facing effects of this change are present.
  • The PR is minimal, and doesn't make sense to land as multiple PRs.
  • Commits are logically scoped and individually reviewable.
  • The PR description has enough context to understand the motivation and solution implemented.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@sagudev sagudev changed the title Move IDs, Registries and Global into wgpu-core-remote Extract IDs, Registries and Global into wgpu-core-remote Aug 12, 2026
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@sagudev
sagudev marked this pull request as ready for review August 12, 2026 18:05
@sagudev
sagudev requested a review from teoxoy August 12, 2026 18:05
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@teoxoy teoxoy self-assigned this Aug 13, 2026

@teoxoy teoxoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work!

Comment thread wgpu-core-remote/src/global/command_encoder.rs
Comment thread wgpu-core-remote/src/global/render_pass.rs
Comment thread wgpu-core/src/lock/rank.rs
@teoxoy

teoxoy commented Aug 13, 2026

Copy link
Copy Markdown
Member

Thoughts on removing ray tracing and presentation/surface functionality from the remote crate? Or more generally things that are not in the spec and also not useful to browser implementations. Shader cache might be interesting to keep - or not due to security concerns.

@sagudev

sagudev commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

Thoughts on removing ray tracing and presentation/surface functionality from the remote crate? Or more generally things that are not in the spec and also not useful to browser implementations. Shader cache might be interesting to keep - or not due to security concerns.

Yes, tho I planned that for follow ups to keep this PR with minimal decisions. We should also remove optional ids, and non ided global methods.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
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.

Remove IDs and Registries

2 participants