Skip to content

[core] Make RenderBundleEncoder use Arced resources#9830

Merged
andyleiserson merged 5 commits into
gfx-rs:trunkfrom
sagudev:rbe
Jul 16, 2026
Merged

[core] Make RenderBundleEncoder use Arced resources#9830
andyleiserson merged 5 commits into
gfx-rs:trunkfrom
sagudev:rbe

Conversation

@sagudev

@sagudev sagudev commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Connections
Towards #5121
Fixes #8234

Description
This was not as hard as I imagined. We firstly remove bundle_ffi, then we replace parent_id: DeviceId with Arc<Device> (with this we remove ser/de and we always do validation on creation - as we always have device) and lastly we make all resources Arced. For the cherry on top we make make Global methods of RenderBundleEncoder thin.

Testing
Should be covered by existing tests.

Squash or Rebase?

Rebase

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.

@sagudev
sagudev force-pushed the rbe branch 5 times, most recently from c7c0846 to c4e7c2d Compare July 8, 2026 03:56
@sagudev
sagudev marked this pull request as ready for review July 8, 2026 04:02
@sagudev sagudev mentioned this pull request Jul 8, 2026
8 tasks
@sagudev
sagudev requested a review from teoxoy July 8, 2026 04:32

@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.

Looks great but I think this needs to wait on https://bugzilla.mozilla.org/show_bug.cgi?id=2052197 (which I will put up a patch for in a bit).

@teoxoy

teoxoy commented Jul 8, 2026

Copy link
Copy Markdown
Member

Or at last for #9832 in case the wgpu update gets backed out again.

@teoxoy

teoxoy commented Jul 8, 2026

Copy link
Copy Markdown
Member

I just put up the patches for https://bugzilla.mozilla.org/show_bug.cgi?id=2052197. We should probably still wait for those to land first or else we won't be able to easily do the next wgpu update.

@sagudev sagudev mentioned this pull request Jul 8, 2026
11 tasks
@ErichDonGubler

Copy link
Copy Markdown
Member

I reviewed patches in bug 2052197. Only minor feedback given, which I'd expect to be cleared up pretty fast.

@sagudev

sagudev commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

Stuff in mozilla has landed so I rebased and resolved conflicts. Should we wait some time to make sure change is not backed out?

CI miri failure will be solved by katharostech/cfg_aliases#15, though we should probably use pinned nightly and let renovate do the bump.

@andyleiserson

Copy link
Copy Markdown
Contributor

Should we wait some time to make sure change is not backed out?

The likely backout window has passed, so no need to wait for that.

Teo may have already done this, but it couldn't hurt to build Firefox with this change to make sure there aren't any unexpected surprises. I ought to be able to do that today.

sagudev added 5 commits July 16, 2026 11:47
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@andyleiserson
andyleiserson enabled auto-merge (rebase) July 16, 2026 18:51
@andyleiserson
andyleiserson merged commit f680a2c into gfx-rs:trunk Jul 16, 2026
59 checks passed
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.

IDs of resources used in render bundles are not resolved until finish()

4 participants