Merged
Conversation
Co-authored-by: Jim Blandy <jimb@red-bean.com>
There's no need to build a fresh `ConstantEvaluator` for every expression; just build it once and reuse it.
This removes some clones and collects, simplifies call sites, and isn't any more complicated to implement.
I found I needed a little bit more detail here.
Properly adjust `AtomicFunction::Exchange::compare` after pipeline constant evaluation.
Allow `LocalVariable::init` to be an override expression. Note that this is unrelated to WGSL compliance. The WGSL front end already accepts any sort of expression as an initializer for `LocalVariable`s, but initialization by an override expression was handled in the same way as initialization by a runtime expression, via an explicit `Store` statement. This commit merely lets us skip the `Store` when the initializer is an override expression, producing slightly cleaner output in some cases.
jimblandy
approved these changes
Apr 5, 2024
Member
jimblandy
left a comment
There was a problem hiding this comment.
All these changes have been previously reviewed as PRs to the pipeline-constants branch.
Contributor
|
Wooo! Thanks for all your efforts, I've been waiting for this for a long time! Great job! |
10 tasks
|
This is awesome! Is there a reason that the constants field isn't an |
Member
|
@hannesojala: Well, let's start thinking, then! 😉 Why would you want an AFAIK, |
|
That makes perfect sense! I was only thinking from a semantic clarity perspective, but that's not everything, of course. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's time 🎉
Resolves #4366 & resolves #1762.
All commits have been previously approved in the following PRs:
Constant::overrideandOverride. #4845--overrideoption. #5419LocalVariableinitializers. #5495There are still 2 features that remain to be implemented:
workgroup_size#4450Commits should not be squashed (they are self-contained and passed CI individually).