determinismReport()
Function in Tooling
The operations in m whose result may differ by driver, one entry per operation and float kind, in order of first appearance over the module constants, the module variables and the functions: a builtin with a ULP or absolute bound, one inherited from a formula the driver may reassociate or fuse, a derivative or determinant, a filtered texture read or gather, an operation the GLSL ES 3.00 spelling may answer differently, every emulated f64 arithmetic operator and bounded builtin, and each floating-point reduction of a kernel function's loop, which runs in the tree order.
import { determinismReport } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
function determinismReport(m: ModuleDecl): readonly DeterminismEntry[]Parameters
Return value
readonly DeterminismEntry[]
Description
Empty
when every operation in the module has one answer under the assumption the module header
states, which is when a GPU result and the CPU oracle can differ only by the oracle’s own
rounding and never by the driver’s choice. A raw statement is opaque and contributes
nothing; a call to the module’s own helper is not listed itself, its body is. accuracyOf answers for a single operation.
Exported from typeshade; compile() returns it as determinism.
See also
Source
src/core/passes/determinism.ts, line 489, at commit 26de7be8