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

[naga] Remove unneeded PartialEq derivations. #5818

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented Jun 14, 2024

Remove PartialEq derivations from various Naga IR types on which equality doesn't really make sense. In some cases, derive only in cfg(test) builds, so tests can check for expected output.

In the GLSL front end, use append to add new constants, not
fetch_or_append, since the latter requires PartialEq yet GLSL
doesn't permit duplicate declarations anyway.

@jimblandy jimblandy added naga Shader Translator kind: refactor Making existing function faster or nicer labels Jun 14, 2024
@jimblandy jimblandy requested a review from a team as a code owner June 14, 2024 22:20
Remove `PartialEq` derivations from various Naga IR types on which
equality doesn't really make sense. In some cases, derive only in
`cfg(test)` builds, so tests can check for expected output.

In the GLSL front end, use `append` to add new constants, not
`fetch_or_append`, since the latter requires `PartialEq` yet GLSL
doesn't permit duplicate declarations anyway.
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.

lezduit

@teoxoy teoxoy merged commit 975ccbd into gfx-rs:trunk Jun 17, 2024
25 checks passed
mockersf pushed a commit to bevyengine/naga_oil that referenced this pull request Aug 3, 2024
This currently doesn't pass the tests, I think because `naga` removed
the `PartialEq` implementation on a bunch of types
(gfx-rs/wgpu#5818)

---------

Co-authored-by: Elabajaba <Elabajaba@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: refactor Making existing function faster or nicer naga Shader Translator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants