You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WGSL says [[block]] structs can't be members of other structs, but shows an example of this #1702
§4.3.6.2, "Structure Layout Rules", shows an example in which a [[block]] struct A is used in [[block]] struct B, as the type of member e, and as the element type of an array for member g. But the definition of the block attribute says, "A structure type with the block attribute must not be: • the element type of an array type • the member type in another structure". (If you're gonna break a rule, break 'em all!)
I think the fix is just to remove the [[block]] from A.
You are correct. This was a silly mistake propagated all the way from my initial proposal. We just need to remove [[block]] from the inner structure, as you suggested.
Activity
ben-clayton commentedon Apr 30, 2021
You are correct. This was a silly mistake propagated all the way from my initial proposal. We just need to remove
[[block]]from the inner structure, as you suggested.wgsl: "Structure Layout Rules": Remove forbidden [[block]] attrs.
wgsl: "Structure Layout Rules": Remove forbidden [[block]] attrs.
Implement val:queue,writeTexture:texture_state (gpuweb#1702)