Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sarahM0
Copy link
Contributor

@sarahM0 sarahM0 commented Nov 17, 2020

Using the rule From https://gpuweb.github.io/gpuweb/wgsl.html#scoping to take all the name uniqueness rules and condense them to one.

@dj2 dj2 added the wgsl WebGPU Shading Language Issues label Nov 19, 2020
@dj2 dj2 added this to the MVP milestone Nov 19, 2020
wgsl/index.bs Outdated
* v-0004: Recursion is not allowed.
* v-0005: Functions must be declared before use.
* v-0006: Variables must be defined before use.
* v-0005: Types must be declared before use.
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't type name an identifier? if so, would the second sentence be a generalization of the first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. How about I use the rule From https://gpuweb.github.io/gpuweb/wgsl.html#scoping to take all the name uniqueness rules and condense them to one?

@sarahM0 sarahM0 force-pushed the add-types-rule branch 2 times, most recently from fe64fb4 to b0f4de3 Compare November 23, 2020 20:12
@sarahM0 sarahM0 requested review from dj2 and kvark November 23, 2020 20:16
wgsl/index.bs Outdated
* v-0028: A fallthrough statement must not appear as the last statement in last clause of a switch.

* v-0029: Return must come last in its block.
* v-0030: The storage type of a struct containing a runtime-sized array must be a of storage class
Copy link
Contributor

Choose a reason for hiding this comment

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

v-0030 isn't quite right. A struct type doesn't have a storage type or store type. A variable has a store type.

I suggest:

If a runtime-sized array appears inside the store type for a variable, then its appearance must be as the last member of the structure type that is the store type for a storage buffer variable. A runtime-sized array must not be the store type of a variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for bringing this up, I created a separated PR to continue our discussions. #1252

@sarahM0 sarahM0 changed the title [wgsl] update validation rules [wgsl] update name uniqueness validation rules Nov 24, 2020
@sarahM0 sarahM0 merged commit e8cca40 into gpuweb:main Nov 25, 2020
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
This PR adds unimplemented stubs for the `modf` builtin.

Issue: gpuweb#1229 gpuweb#1228 gpuweb#1227 gpuweb#1226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wgsl WebGPU Shading Language Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants