---
title: "TS8029 STRUCT_FIELD_MISSING_ATTR: TypeShade error code"
description: "TS8029 STRUCT_FIELD_MISSING_ATTR, an error code of the TypeShade compiler."
url: https://typeshade.dev/reference/errors/ts8029/
language: en
---

# `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](https://typeshade.dev/reference/rules/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

example.shade.ts

```ts
"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.

example.shade.ts

```ts
"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

**[Rule 6.6](https://typeshade.dev/reference/rules/6-6/) Test**

An entry point’s inputs and outputs are explicit parameters and return values.

**[Rule 12.6](https://typeshade.dev/reference/rules/12-6/) Test**

A requirement the front end can check must be checked at the front end, in the author’s words, and not left to Tint or a driver.

## See also

- [Shader stages](https://typeshade.dev/guide/language/stages/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

Where the compiler raises this code at commit af54ddad5, one line per file:

- [`src/compiler/ts/lower/function-signature/entry-refusals.ts:125`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-signature/entry-refusals.ts#L125)
- [`src/compiler/ts/lower/function-signature/parameters.ts:264`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-signature/parameters.ts#L264) (2 sites)
