Skip to content
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

Fix staging buffer ID allocation mismatch #5309

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

nical
Copy link
Contributor

@nical nical commented Feb 27, 2024

Connections

Followup from #5244 and #5229

Description

Two problems:

  • There was a mix of externally and internally allocated buffer IDs: regular buffers could be externally allocated but the temporary buffer used to initialize non-mappable-but-mapped-at-creation buffers was always internally allocated. The assertion added in Simplify the ID allocation in IdentityValues #5229 caught this in gecko. To my understanding this was incorrect before since externally allocated IDs can't know about the IDs that are internally produced so they would silently stomp over one another in the registry. This is fixed by the first commit.
  • The trackers for render bundle execution were sized from the wrong source (the registry storage instead of the tracker index allocators). This is an oversight from Use a unique tracker index per resource instead of the ID in trackers #5244 and is fixed in the second commit.

Checklist

  • Run cargo fmt.
  • Run cargo clippy
  • Run cargo xtask test to run tests.

@nical nical requested a review from a team as a code owner February 27, 2024 10:19
@nical nical changed the title Staging leak Fix staging buffer leak Feb 27, 2024
@nical nical changed the title Fix staging buffer leak Fix staging buffer ID allocation mismatch Feb 27, 2024
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

LGTM!

@ErichDonGubler ErichDonGubler self-assigned this Feb 27, 2024
@ErichDonGubler ErichDonGubler merged commit 6f68d3d into gfx-rs:trunk Feb 27, 2024
27 checks passed
@nical nical deleted the staging-leak branch February 27, 2024 15:43
@ErichDonGubler ErichDonGubler mentioned this pull request Feb 28, 2024
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