DeterminismEntry
On this page

DeterminismEntry

Interface in Tooling

One row of determinismReport: an operation the module uses whose result may differ by driver, with the spec's bound, how many times it occurs and where, in declaration order.

import type { DeterminismEntry } from 'typeshade'

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

Syntax

interface DeterminismEntry {
readonly op: string;
readonly elem: 'f32' | 'f64';
readonly kind: DeterminismKind;
readonly accuracy: string;
readonly count: number;
readonly where: readonly string[];
readonly note?: string;
}

Description

An operation used on f32 and on emulated f64 is two rows.

Instance properties

opread only string

The operation as the IR names it: a builtin id (sin, fma, textureSample), a binary operator (/, %, and for f64 every arithmetic operator), or a matrix product (mat * vec, vec * mat, mat * mat), which is a sum of products and not the component-wise *.

elemread only 'f32' | 'f64'

The float the operation computes in: native f32, or emulated f64.

kindread only DeterminismKind

Why the result may differ.

accuracyread only string

The bound in words, from WGSL §15.7.4 for f32, from the emulation for f64, and from Rule 7.2’s tree for an order row.

countread only number

How many times the operation occurs in the module.

whereread only readonly string[]

Where it occurs: the module constants, module variables and functions whose initializer or body holds it, by name, in declaration order, each once.

noteoptionalread only string

What the GLSL ES 3.00 spelling does differently, when that matters.

See also

Source

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

Edit this page Report a problem