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

migrate to naga 0.13 #40

Merged
merged 10 commits into from
Aug 26, 2023
Merged

migrate to naga 0.13 #40

merged 10 commits into from
Aug 26, 2023

Conversation

robtfm
Copy link
Collaborator

@robtfm robtfm commented Jul 29, 2023

fixes #33

this should not merged until bevy 0.11.1 is out. builds on @VitalyAnkh's partial migration, with additionally :

  • use Rc<RefCell> for const_expressions and const_expr_map - this is basically unavoidable, as DerivedModule::import_expression needs access to both the const_expressions and the arena to import into, which may also be const_expressions
  • don't emit Expression::Literal and Expression::ZeroValues
  • enforce const_expression uniqueness with a custom impl of PartialEq for Expressions, to ensure that the uniqueness test for globals and consts still passes (else we end up with duplicated items, they no longer test as equal as they refer to different init expressions). this could be removed if the PartialEq derive on Expression in naga is made externally available.
  • a basic port of the prune module which just leaves all const_expressions present

the tests pass, but i haven't tried integrating into bevy (which will require bevy to use wgpu 0.17).

@Elabajaba
Copy link
Contributor

It seems to work fine with bevy (the wasm issues are something else) bevyengine/bevy#9302

@JMS55
Copy link
Contributor

JMS55 commented Aug 15, 2023

Bevy 0.11.1 is out :)

@robtfm robtfm merged commit 1854567 into bevyengine:master Aug 26, 2023
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.

Update to naga 0.13
4 participants