---
title: "SD0111: portable kernel outside the gather-only tier"
description: "SD0111, an error code of the TypeShade compiler. portable kernel outside the gather-only tier"
url: https://typeshade.dev/reference/errors/sd0111/
language: en
---

# `SD0111`

Core code

portable kernel outside the gather-only tier

No `"use typeshade"` program on this site raises this code, so the page has no example. The [`fn()`](https://typeshade.dev/api/fn/) builder builds the IR directly and reaches the check at the lines under Source.

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

## When it fires

SD0110 is the author-run guard (fn() rejects the declaration on a non-compute stage); SD0111 is the shape gate, reported per violation by the portable-kernel rule at every emit on both writers and thrown by the GLSL lowering. Like SD0109 the per-violation remedy travels in the diagnostic's own message — the analyzer is its single authority — so the hint below states the tier, which is the invariant half.

## How to fix it

The registry's hint: the portable tier is out\[gid.x\] = f(reads): a 1-D gid and workgroup, one `u32` storage output written once at the invocation index, a `vec4<u32>` dispatch uniform, no raw statements — restructure the kernel, or drop `portable` so that it runs on WebGL2 as the pass program ([Rule 8.24](https://typeshade.dev/reference/rules/8-24/))

## The rules this enforces

**[Rule 8.7](https://typeshade.dev/reference/rules/8-7/) Test**

`@compute` carries the workgroup size as an array literal of one to three positive whole-number literals, integer module constants or `u32` override names, `x`, `y` and `z`, a missing `y` or `z` being 1, and the default is 64; every default extent reaches reflection and the manifest, and each override name reaches WGSL’s `@workgroup_size`.

**[Rule 8.24](https://typeshade.dev/reference/rules/8-24/) Test**

An exported `@compute` entry is called from host code as `entry(bindings, workgroups)`.

## See also

**[`SD0109`](https://typeshade.dev/reference/errors/sd0109/)**

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

**[`SD0110`](https://typeshade.dev/reference/errors/sd0110/)**

portable declared on a non-compute entry

- [`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/backends/glsl/compute-lowering.ts:47`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/backends/glsl/compute-lowering.ts#L47)
- [`src/core/passes/lint/rules/portable-kernel.ts:34`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/passes/lint/rules/portable-kernel.ts#L34)
