ATOMIC_INTRINSICS
On this page

ATOMIC_INTRINSICS

Constant in Backends

The atomic builtins, with the arity and result of each: atomicLoad takes the location alone and returns its value; atomicStore takes a value and returns nothing; the eight read-modify-write forms take a value and return the value the location held before the update.

import { ATOMIC_INTRINSICS } from 'typeshade'

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

Syntax

const ATOMIC_INTRINSICS: Readonly<Record<string, { readonly arity: 1 | 2 | 3; readonly returns: "value" | "void" | "casResult"; }>>

Description

Every one takes its first argument as a location (xs[i], a storage struct field, a bare atomic binding), which WGSL spells as a pointer, &xs[i], and which the CPU backends resolve once and write back through. GLSL ES 3.00 has no atomics.

Source

src/core/intrinsics.ts, line 85, at commit 26de7be8

Edit this page Report a problem