[wgsl] ignore offset decorations on struct fields
naga does not require offset decorations on struct fields in WGSL source, and automatically adds them to spv output. The `tint` compiler does not automatically add them, and requires that they be present in the WGSL source. A potential confusion is that an spv binary missing required `OpMemberDecorate` instructions that set the field's offset will fail validation when run through `spirv-val`. But since naga automatically produces these offsets, the same spv binary passed through naga will be successfully validated. This change is to ignore these decorations in naga's WGSL front end so that the same WGSL source can be used with naga and tint to produce valid spv.
parent
f3cab651
Please register or sign in to comment