---
title: "BARRIER_INTRINSICS: constant in Backends, TypeShade API"
description: "BARRIER_INTRINSICS, a constant in Backends. The barriers: workgroupBarrier() and storageBarrier()…"
url: https://typeshade.dev/api/barrierintrinsics/
language: en
---

# `BARRIER_INTRINSICS`

Constant in Backends

The barriers: `workgroupBarrier`() and `storageBarrier`(), statements with no value that every invocation of a workgroup reaches before any runs on.

`import { BARRIER_INTRINSICS } from 'typeshade'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const BARRIER_INTRINSICS: ReadonlySet<string>
```

## Description

WGSL spells them bare. The GLSL lowering of a barrier is not supported yet ([Rule 10.5](https://typeshade.dev/reference/rules/10-5/)); a `@compute` entry that calls one runs on WebGL2 as its pass program ([Rule 11.8](https://typeshade.dev/reference/rules/11-8/)) when it reaches no texture. The CPU oracle runs them through `dispatch`, which holds each invocation of a workgroup at the barrier until all have arrived.

## Source

[`src/core/intrinsics.ts`, line 131](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/intrinsics.ts#L131), at commit af54ddad5
