Skip to content

refactor(core): Eliminate buffer mapping logic in Global#9444

Merged
teoxoy merged 1 commit intogfx-rs:trunkfrom
andyleiserson:jj-push-powp
Apr 21, 2026
Merged

refactor(core): Eliminate buffer mapping logic in Global#9444
teoxoy merged 1 commit intogfx-rs:trunkfrom
andyleiserson:jj-push-powp

Conversation

@andyleiserson
Copy link
Copy Markdown
Contributor

Small refactor relevant to and in preparation for #9307.

Motivations:

  • I consider the role of Global to be looking up objects in the hub, and expect it will go away once Remove IDs and Registries #5121 is resolved, so functional logic should move elsewhere.
  • Eliminates one place where the callback is handed off to somebody else to be called instead of just calling it.
  • Removes the following comment on map_async, which is able to call the callback after locks are released: "Returns the mapping callback in case of error so that the callback can be fired outside of the locks that are held in this function."

Testing
Existing tests

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.

Copy link
Copy Markdown
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Great stuff!

@teoxoy teoxoy self-assigned this Apr 21, 2026
@teoxoy teoxoy merged commit 07a7dd4 into gfx-rs:trunk Apr 21, 2026
66 of 67 checks passed
@andyleiserson andyleiserson deleted the jj-push-powp branch April 22, 2026 15:29
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