-
Notifications
You must be signed in to change notification settings - Fork 368
Closed
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues
Milestone
Description
Trying to compile this:
[[group(0), binding(0)]] var<storage, read> myArray: array<i32, 8>;
is an error. Instead, the author has to say:
[[block]] struct MyData {
myArray: array<i32, 8>;
};
[[group(0), binding(0)]] var<storage, read> myBuffer: MyData;
This seems like a lot of characters to type just to get something simple. We should relax this constraint, and if the backend API requires a struct, a single-member struct can be generated around the member type.
So, the WebGPU author could instead write:
[[group(0), binding(0), block]] var<storage, read> myArray: array<i32, 8>;
or even better, just
[[group(0), binding(0)]] var<storage, read> myArray: array<i32, 8>;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues