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

Merge override-expression sized arrays into existing types once resolved #6746

Draft
wants to merge 9 commits into
base: trunk
Choose a base branch
from

Conversation

kentslaney
Copy link
Contributor

@kentslaney kentslaney commented Dec 14, 2024

Connections
Resolves #6722

Description
When an array size override-expression resolves into an existing type, naga panics because types are in a unique arena. The solution for when this happens is to add a Resolved variant to the PendingArraySize type which is unique by the global expression it is initialized by. The struct also has a handle field for the type it is being merged into. If any of these are used, compact is called again after the pipeline overrides are resolved. Compact then removes those Resolved types and maps the handle index to the type it is merging into.

Testing
This change modifies the existing tests by adding an array with the size of the test array when the size is overridden.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. If applicable, add:
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. (It's an issue that fixes a change that hadn't been released yet, should it still have a line in the release notes?)

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.

[naga] panic when array override value already in arena
1 participant