Skip to content

Impl. more component-wise built-ins in const. eval.#4879

Merged
ErichDonGubler merged 21 commits intogfx-rs:trunkfrom
erichdongubler-mozilla:builtins-const-eval-1
Jan 18, 2024
Merged

Impl. more component-wise built-ins in const. eval.#4879
ErichDonGubler merged 21 commits intogfx-rs:trunkfrom
erichdongubler-mozilla:builtins-const-eval-1

Conversation

@ErichDonGubler
Copy link
Copy Markdown
Member

@ErichDonGubler ErichDonGubler commented Dec 14, 2023

Connections

Resolves many numeric built-ins listed under #4507, and sets the groundwork for many more.

Description

Adds support for evaluating the following built-in functions:

  • abs
  • saturate
  • cos
  • cosh
  • sin
  • sinh
  • tan
  • tanh
  • acos
  • acosh
  • asin
  • asinh
  • atan
  • atanh
  • round
  • step
  • sqrt

Testing

Checklist

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

@ErichDonGubler ErichDonGubler added naga Shader Translator kind: refactor Making existing function faster or nicer area: naga processing Passes over IR in the middle labels Dec 14, 2023
@ErichDonGubler ErichDonGubler self-assigned this Dec 14, 2023
@ErichDonGubler ErichDonGubler force-pushed the builtins-const-eval-1 branch 2 times, most recently from 435ed16 to 596bef9 Compare December 14, 2023 15:51
@ErichDonGubler ErichDonGubler force-pushed the builtins-const-eval-1 branch 2 times, most recently from 333cb71 to c7b07d9 Compare December 22, 2023 13:06
@ErichDonGubler ErichDonGubler force-pushed the builtins-const-eval-1 branch 2 times, most recently from 342c881 to 7b7a115 Compare December 22, 2023 14:13
@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler ErichDonGubler marked this pull request as ready for review December 22, 2023 14:25
@ErichDonGubler ErichDonGubler requested a review from a team December 22, 2023 14:25
@ErichDonGubler ErichDonGubler requested a review from a team as a code owner December 22, 2023 14:25
Copy link
Copy Markdown
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Good stuff! Left some comments about handling edge-cases.

@ErichDonGubler ErichDonGubler force-pushed the builtins-const-eval-1 branch 3 times, most recently from 691f37a to 99c54f4 Compare January 5, 2024 16:48
@ErichDonGubler ErichDonGubler force-pushed the builtins-const-eval-1 branch 3 times, most recently from 53bfd62 to 528bfca Compare January 11, 2024 21:19
@ErichDonGubler ErichDonGubler dismissed jimblandy’s stale review January 18, 2024 21:22

Spoke on call, agreed to merge and iterate.

@ErichDonGubler ErichDonGubler enabled auto-merge (rebase) January 18, 2024 21:24
@ErichDonGubler ErichDonGubler enabled auto-merge (rebase) January 18, 2024 21:39
@ErichDonGubler ErichDonGubler merged commit 063e110 into gfx-rs:trunk Jan 18, 2024
@ErichDonGubler ErichDonGubler deleted the builtins-const-eval-1 branch January 18, 2024 22:10
@jimblandy
Copy link
Copy Markdown
Member

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: naga processing Passes over IR in the middle 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