Repository navigation
wgsl: Disallow taking the address of a vector component - #2225
Conversation
| It is a [=shader-creation error=] if |SC| is the [=storage | ||
| classes/handle=] storage class. | ||
|
|
||
| It is a [=shader-creation error=] if |r| is the result of a |
There was a problem hiding this comment.
The cross-reference is really broad
I suggest pointing instead at
https://gpuweb.github.io/gpuweb/wgsl/#component-reference-from-vector-reference
.... |r| is a component reference of a vector reference
Also, the sentence (at 6.7.1.3) "A write access to component of a vector may access all of the memory locations associated with that vector." and its following "Note" would not longer be able to be applied.
Maybe it should be replaced by "There is no way to write to a single component of a vector, or any proper subset of the components of a vector."
There was a problem hiding this comment.
I've updated the cross reference to link to the "component reference from vector reference" section.
I don't agree with the rest of your comment though. We're not removing the ability to write to a single component of a vector (v.x = 1.0; is still valid), so the note in that section still applies.
* wgsl: Disallow taking the address of a vector component Closes gpuweb#1931 * Link to component reference from vector reference
Closes #1931