TS8029
Front-end code STRUCT_FIELD_MISSING_ATTR
A user-defined input of a compute entry: a parameter, or a field of its struct, that carries no builtin<…>. A compute entry has no user-defined input in WGSL, so the front end refuses it. On a vertex or fragment entry a value with no attribute is user-defined, and the compiler gives it its location (Rule 6.6).
The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.
The registry text and every compiler message on these pages are the compiler's own English.
Example
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([64])export function double(n: u32): void { data[n] = data[n] * 2.}Compiled at build time against the pinned compiler, this program gets:
TS8029 error, line 6: "n" is a user-defined input of a compute entry, which has no user IO: a compute shader reads its work from resources and the builtin<…> invocation ids.
How to fix it
The same program, corrected. It compiles with no diagnostic.
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([64])export function double(id: builtin<"global_invocation_id">): void { data[id.x] = data[id.x] * 2.}The rules this enforces
See also
Source
Where the compiler raises this code at commit af54ddad5, one line per file: