DeterminismKind
On this page

DeterminismKind

Type in Tooling

Why an operation's result may differ by driver, in WGSL §15.7.4's own categories plus four of TypeShade's.

import type { DeterminismKind } from 'typeshade'

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

Syntax

type DeterminismKind =
'ulp' | 'absolute' | 'inherited' | 'unbounded' | 'filtered' | 'target' | 'emulated' | 'order';

Description

ulp and absolute are the spec’s numeric bounds (absolute also covers acos, asin and tanh, which the spec bounds by the worse of an absolute error and an inherited formula); inherited is an operation the spec defines by a formula the driver may reassociate or fuse, the matrix products included; unbounded is a derivative or determinant, where the spec asks only for a pragmatically useful result; filtered is a texture read whose footprint, filtering and level selection are implementation-defined, a gather included; target is an operation WGSL settles that the GLSL ES 3.00 spelling may answer differently on some input; emulated is an f64 operation, computed in f32 pairs whose error terms a driver may fold; order is a floating-point reduction of a kernel function’s loop, which every tier folds in Rule 7.2’s tree, so it has one answer on every tier but not the one the loop’s sequential reading gives.

Source

src/core/passes/determinism.ts, line 67, at commit 26de7be8

Edit this page Report a problem