workgroupBarrier
On this page

workgroupBarrier

Function

Waits until every invocation of the workgroup has reached this line, and makes every write to workgroup memory before it visible to every invocation after it.

The signature and the sentence under each name are the compiler's own text at commit 26de7be8.

Syntax

declare function workgroupBarrier(): void

Return value

void

Description

A statement, in a compute entry or a helper and never inside an if or switch. WGSL only; the CPU oracle runs the workgroup in lockstep through dispatch.

Targets

WGSL
workgroupBarrier()
GLSL ES 3.00
workgroupBarrier has no GLSL ES 3.00 spelling (no compute stage)

Examples

See also

Edit this page Report a problem