TS8034
Front-end code BARRIER_PLACEMENT
workgroupBarrier() or storageBarrier() where a barrier cannot stand: in a vertex or fragment entry, which has no workgroup, or as a value, since a barrier is a statement. A barrier under control flow that the invocations do not share is UNIFORMITY.
The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.
The registry text and every compiler message on these pages are the compiler's own English.
Example
"use typeshade"
@fragmentexport function main(uv: location<0, vec2>): vec4 { workgroupBarrier() return vec4(uv, 0., 1.)}Compiled at build time against the pinned compiler, this program gets:
TS8034 error, line 5: workgroupBarrier() belongs in a compute entry or a function it calls; a fragment entry has no workgroup to wait for.
How to fix it
The same program, corrected. It compiles with no diagnostic.
"use typeshade"
@fragmentexport function main(uv: location<0, vec2>): vec4 { return vec4(uv, 0., 1.)}The rule this enforces
- Rule 8.3 Test
- A builtin WGSL confines by stage may be used in an entry of a permitted stage, and in a helper that no entry of an excluded stage can reach.
See also
Source
Where the compiler raises this code at commit af54ddad5, one line per file: