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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow taking the address of a handle #1983
Conversation
wgsl/index.bs
Outdated
@@ -4511,6 +4511,9 @@ The <dfn noexport>address-of</dfn> operator converts a reference to its correspo | |||
If |r| is an [=invalid memory reference=], then the resulting | |||
pointer is also an invalid memory reference. | |||
|
|||
It is a [=shader-creation error=] if |T| is type stored in the |
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.
Isn't it simpler to say |SC| must not be handle
?
And in https://gpuweb.github.io/gpuweb/wgsl/#module-scope-variables it says
If the store type is a texture type or a sampler type, then the variable declaration must not have a storage class decoration. The storage class will always be handle.
(In any case, I think the proposed text is missing "a", as in "is a type stored in the...")
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.
Thanks!
Fixes #1832