f64GuardOne
On this page

f64GuardOne()

Function in Builtins

The anti-fast-math guard value of the f64 emulation: a 1.0 the GPU compiler cannot see through, emitted per target as a texel fetch from the guard texture that fp64Guard declares.

import { f64GuardOne } from 'typeshade'

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

Syntax

const f64GuardOne: () => Node<"f32">

Return value

Node<'f32'>

Description

The CPU evaluation returns exactly 1. The f64 emulation pass inserts it on its own; authoring code has no reason to call it.

Targets

TargetSupportNotes
WGSL (WebGPU) Supported

textureLoad(_fp64, vec2<i32>(0, 0), 0).x.

GLSL ES 3.00 (WebGL2) Supported

texelFetch(_fp64, ivec2(0, 0), 0).x.

CPU oracle Supported

Evaluated in f64 by the oracle.

Source

src/core/ir/node.ts, line 2185, at commit 26de7be8

Edit this page Report a problem