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] Restore return statement at end of functions without return types #7021

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

jamienicol
Copy link
Contributor

Connections
This is a partial reversion of #7013, and adds the changelog entry for it

Description
This keeps the bug fix from #7013 but reverts the additional change made to avoid adding superfluous return statements to the end of functions without return types. This was done for aesthetics without proper discussion of the technicalities. Perhaps we will revisit this when we follow up in #7015

Testing
Inspected shader snapshots. Ran validation.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

This is a partial reversion of gfx-rs#7013. The fix for the actual
validation bug remains - ie ensuring that validation correctly rejects
shaders containing functions with return types that do not return a
value. But this reverts the additional change made to avoid adding
superfluous return statements to the end of functions *without* return
types. This was done for aesthetics without proper discussion of the
technicalities. Perhaps we will revisit this when we follow up in

Additionally add a changelog entry for gfx-rs#7013.
@ErichDonGubler ErichDonGubler merged commit 6c8d0b0 into gfx-rs:trunk Jan 29, 2025
31 checks passed
@jamienicol jamienicol deleted the void-return branch January 29, 2025 19:19
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