- Notifications
You must be signed in to change notification settings - Fork353
wgsl: support swizzle assignment#5268
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedJul 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Previews, as seen when thisbuild job started (f17717e): |
Uh oh!
There was an error while loading.Please reload this page.
abeafa1 to9aa6e7fCompareKangz commentedAug 19, 2025
GPU Web WG 2025-07-30 Atlantic-time
|
Add language extension 'swizzle_assignment'Example: var v:vec4u; v.yz = vec2(1,2);Issue:gpuweb#737
9aa6e7f tof17717eCompare| 3. Evaluate |e2|. | ||
| 4. Compute |update| by performing the specified binary operation on |viewed_contents| and |e2|. | ||
| * For example, if the swizzle assignment is `v += w` then the specified operation is addition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This isn't actually a swizzle assignment. Should this bev.wx += w to make clearer it's a swizzle assign?
dneto0 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There is an interaction with 15.2.5 Function Scope Variable Value Analysis, where a swizzle view should sometimes be considered afull reference. It would be if the root variable is of vector type, because a swizzle assignment is deemed to be overwriting the entire vector.
jimblandy commentedNov 3, 2025
@dneto0 I gather that, since this is a draft, it's not ready for committee discussion? |
Uh oh!
There was an error while loading.Please reload this page.
Add language extension 'swizzle_assignment'
Example:
var v:vec4u;
v.yz = vec2(1,2);
Issue:#737