Skip to content

Conversation

bernhl
Copy link
Contributor

@bernhl bernhl commented Apr 13, 2025

Description
As per https://www.w3.org/TR/WGSL/#distance-builtin the distance function should allow float scalars.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@ErichDonGubler ErichDonGubler self-assigned this Apr 15, 2025
@ErichDonGubler
Copy link
Member

@bernhl: Hey! Welcome to the WGPU community, and thanks for taking the time to contribute.

CI is failing because we have actually invalidated a snapshot test; we exercise a diagnostic in wgsl_errors called too_many_arguments_2 which lists all the overloads for distance specifically. Because you added some overloads, that set has expanded, and the snapshot needs the output for them.

I pushed a fixup! commit that adds these overloads. I'll squash the commit into yours once CI has passed, at which point we'll merge into trunk.

@ErichDonGubler ErichDonGubler enabled auto-merge (squash) April 15, 2025 19:17
@ErichDonGubler
Copy link
Member

Just added a CHANGELOG entry for this, too, since this is a nice user-facing change. 🙂

Copy link
Member

@jimblandy jimblandy left a comment

Choose a reason for hiding this comment

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

Thanks!

@ErichDonGubler ErichDonGubler merged commit 06ee718 into gfx-rs:trunk Apr 16, 2025
37 checks passed
jimblandy pushed a commit to jimblandy/wgpu that referenced this pull request Apr 18, 2025
sinjs pushed a commit to sinjs/wgpu that referenced this pull request Jul 22, 2025
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.

3 participants