PORTABLE_INTRINSICS
On this page

PORTABLE_INTRINSICS

Constant in Backends

The builtin ids that spell identically on both targets, such as sin, dot and clamp.

import { PORTABLE_INTRINSICS } from 'typeshade'

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

Syntax

const PORTABLE_INTRINSICS: ReadonlySet<string>

Description

The builtin ids that spell identically on both targets, such as sin, dot and clamp. These carry no INTRINSICS entry and fall through spellIntrinsic as the plain name(args) form. spellIntrinsic never reads this set; it exists so that isKnownIntrinsic can tell a builtin known to be identical from an id nobody has classified, a distinction fp64Lower relies on when it checks which builtins may be applied to f64 values. Add a builtin here only when its spelling is the same in WGSL and GLSL ES 3.00; a builtin whose spelling differs belongs in INTRINSICS, since listing it here would emit the same text on both targets and one of them would be wrong.

See also

Source

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

Edit this page Report a problem