---
title: "SD0109: an error code of the TypeShade compiler"
description: "SD0109, an error code of the TypeShade compiler. a fragment-only builtin is reachable from a vertex or compute entry"
url: https://typeshade.dev/reference/errors/sd0109/
language: en
---

# `SD0109`

Core code

a fragment-only builtin is reachable from a vertex or compute entry

The registry text and every compiler message on these pages are the compiler's own English.

## When it fires

The hint is deliberately generic and enumerates no fix family: the per-builtin fix lives in the rule's FRAGMENT\_ONLY\_IDS table (the single fix-authority) and reaches the reader through the diagnostic's own message. Enumerating families here would re-create the untested sync contract that table replaced — one new family and the catalogue would lie again.

## In the front end

A `"use typeshade"` file never reaches this check with the same mistake: the front end refuses it first, under its own code. This program, compiled at build time, gets:

example.shade.ts

```ts
"use typeshade"

interface VsOut {
  pos: builtin<"position">
  uv: location<0, vec2>
}

@vertex
export function vs(i: builtin<"vertex_index">): VsOut {
  const x = f32(i)
  return { pos: vec4(x, dpdx(x), 0., 1.), uv: vec2(0., 0.) }
}

@fragment
export function fs(v: VsOut): vec4 {
  return vec4(v.uv, 0., 1.)
}
```

**[TS8099](https://typeshade.dev/reference/errors/ts8099/)** error, line 9: "dpdx" is only valid in a fragment shader; "vs" is a vertex entry.

## How to fix it

The registry's hint: the fix is per-builtin and named in the diagnostic message itself — the fragment-only-builtin rule table (FRAGMENT\_ONLY\_IDS) is the single fix-authority

## See also

**[`TS8099`](https://typeshade.dev/reference/errors/ts8099/) `UNSUPPORTED`**

The catch-all for a diagnostic whose site does not yet deserve its own code. It stays parked at TS8099, past the sequential range.

- [Diagnostics](https://typeshade.dev/guide/internals/diagnostics/)
- [`TypeShadeError`](https://typeshade.dev/api/typeshadeerror/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

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

- [`src/core/passes/lint/rules/fragment-only-builtin.ts:146`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/passes/lint/rules/fragment-only-builtin.ts#L146)
